Hi All,
I need to create several boxplots for different bins that include a range of values in v1. The boxplots show the mean, median and spread of v2 in that range. Then I need to graph them in an x-y plot where v2 is on the y axis and v1 bins are on the x axis. I need one boxplot for negative v1s (so they all should be in one bin), one boxplot for missing v1s, one boxplot for v1s in 0-50, one for v1s in 50-100, one for v1 in 100-150, all the way up to 350-400.
Here is a sample of my data:
I really appreciate your help
I need to create several boxplots for different bins that include a range of values in v1. The boxplots show the mean, median and spread of v2 in that range. Then I need to graph them in an x-y plot where v2 is on the y axis and v1 bins are on the x axis. I need one boxplot for negative v1s (so they all should be in one bin), one boxplot for missing v1s, one boxplot for v1s in 0-50, one for v1s in 50-100, one for v1 in 100-150, all the way up to 350-400.
Here is a sample of my data:
Code:
clear input int v1 int v2 . 8.33 . 17 . 2.94 . 12.3 . 7.87 . 10.2 87 7.01 162 10.3 162 7.23 -74.09 11.4 -74.09 9.8 42 5.41 42 11.7 42 5.81 42 18.9 42 6.58 79 14.4 79 7.41 79 9.84 79 11.1 149 10.1 -74.09 9.01 -74.09 10.7 -74.09 10.1 37 11.3 37 10.4 37 7.14 -23 8.55 -23 9.55 -23 11.9 -172 0 -74.09 9.46 -74.09 9.01 -74.09 5.41 56 9.78 56 7.69 56 11.5 56 13.3 82 9.38 82 17.9 82 7.81 82 6.35 62 4.44 62 9.47 -74 5.41 -74 15.3 -97 8.14 -97 6.19 -97 6.9 -84 8.99 -84 6.67 -133 12.1 -133 3.31 -133 8.5 -93 2.63 -74 5.88 104 6.6 104 10.9 104 8.4 104 11.1 82 10.6 82 9.47 82 12.6 82 8 44 4.94 44 5.83 -74.09 8.42 -74.09 6.95 -31 4.44 -31 11.7 -31 12 -31 5.65 150 9.2 150 1.23 81 11.3 end
Comment