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
Three-year volatilityI have been looking on the forum for a topic about three-year volatility but I didn't find what I wa…
Xtabond2 Newbie questionHi, I am a quite newbie to dynamic panels. For my project, I want to run a simple model on governmen…
Problem with Hausman test in xsmleI was estimating spatial panel data models in STATA, when I tried to perform Hausman test, the follo…
Latent class analysis using gsem - Cross validationHi, I'm trying to learn LCA/LPA using gsem command in Stata by walking myself through Masyn (2013) -…
Averaging values from different "sum, detail outputs"Hi everyone, I was wondering if there is a chance to average "sum, detail outputs" over various mon…
Subscribe to:
Post Comments (Atom)
0 Response to Need assistance with histogram or bar graph
Post a Comment