I am having difficulty getting a histogram that was fairly easy to do in python with pyplot. I have a large data set that looks like this:
v1 age gender test result count
0 50 M Glu 188 183892
1 80 F Cl 102 48907
2 50 M Glu 42 13683
3 30 M Glu 272 2859
4 80 M Urea 68 37053
5 40 M Glu 574 467
6 60 M Cl 118 50066
7 100 M Glu 749 1
8 50 F Glu 393 714
9 60 M Urea 140 2568
There are 33,024 rows. The count represents the number of time a particular result, such as 188 in row 0, was recorded by a lab. I'd like to plot histogram of the tests (eventually broken down by ages, gender) with the count on the yaxis and the result (188) on the x-axis. It should look something like below. I want to do with every analytes - so glucose, urea, chloride, etc.
Array
I'm rather new to Stata - taking a course now - and have tried
histogram count if test=="Glu", by(result)
[also the 2way option]
But get an error "too many sersets".
Any advice?
Thanks,
Nathan
Related Posts with Need assistance with histogram or bar graph
GenerateI am using two data set, one contains data for children and another for woman. Now both data sets ha…
stripplot specificationsDear colleagues I have a variable named Total Compensation1 and another called Affiliationindex1 (f…
regression result only except first variableHello When I regress as below, why don't I get the result for the first variable and how can I fix …
Oaxaca decomposition for nonlinear regression (nldecompose)Hello readers, I am trying to decompose (using Ben Jann’s nldecompose) differences in the probabilit…
graph pie with some of percentagesHow to display the fraction when percentage is above 20%, I know how to display all percentages Cod…
Subscribe to:
Post Comments (Atom)
0 Response to Need assistance with histogram or bar graph
Post a Comment