I wrote the following, which matches (for my problem) the stata 13 Base Reference (page 1008) example code for multiple kdensity plots on one graph:
What I get is only a graph for ques==1. If I change the order of the kdensity commands, I still only get a graph for ques==1. I checked and there are over 900,000 observations where ques==.7, over a million where ques==.8, over a million where ques==.9, and over a million where ques==1. So, its not that somehow there are zero cases with ques==.7, .8, or .9.
I also ran the code on two different PCs with different amounts of RAM, and on a clustered computer with oodles of memory. I dropped all other variables from the dataset to minimize memory usage (even if only by a few bytes). I also ran all kdensity graphs with the "nograph" option. I also ran lots of other checks. I ran the commands as a histogram--no luck there, either. I ran only two values of ques. No luck there, either. I searched the forum and google and found other kdensity questions, some of whose answers called for looping, which seems like it would be time-cost prohibitive with my 7 million case dataset.
What's up? Any assistance is greatly appreciated.
Take care.
Sam
Code:
kdensity crate, nograph generate(xyall fx) ; kdensity crate if ques== .7, generate(xy07 fx07) at(xyall) ; kdensity crate if ques== .8, generate(xy08 fx08) at(xyall) ; kdensity crate if ques== .9, generate(xy09 fx09) at(xyall) ; kdensity crate if ques== 1, generate(xy10 fx10) at(xyall) ; label var fx07 "ques07" ; label var fx08 "ques08" ; label var fx09 "ques09" ; label var fx10 "ques10" ; line fx07 fx08 fx09 fx10 xyall, sort ytitle(Density) ;
I also ran the code on two different PCs with different amounts of RAM, and on a clustered computer with oodles of memory. I dropped all other variables from the dataset to minimize memory usage (even if only by a few bytes). I also ran all kdensity graphs with the "nograph" option. I also ran lots of other checks. I ran the commands as a histogram--no luck there, either. I ran only two values of ques. No luck there, either. I searched the forum and google and found other kdensity questions, some of whose answers called for looping, which seems like it would be time-cost prohibitive with my 7 million case dataset.
What's up? Any assistance is greatly appreciated.
Take care.
Sam
Comment