<>
Nothing wrong, I would say: You asked for 100 values, in this case
percentiles, and told Stata to store them alongside the rest of your data.
What else could Stata do but comply and open a new column in your dataset?
For this column, there are only 100 values to fill the first 100
observations. As Stata hates to leave cells empty - in contrast to popular
spreadsheet software- it fills the rest with missings.
BTW, if you want the same results stored in returned results, look at
-_pctile-...
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Janneke Pieters
Gesendet: Donnerstag, 19. Februar 2009 14:52
An: [email protected]
Betreff: st: help with pctile
Dear users,
I want to generate 100 percentiles for a variable called cmpce. These
will be used later to calculate the mean of cmpce for each percentile.
In Stata10 I type:
pctile percentile = cmpce [pweight = weight], nquantiles(100) genp(pctile)
The new variables percentile and pctile only have a value for the first
100 observations in my data, and a missing value for the other 102257
observations. Is something wrong with my command?
Thanks in advance,
Janneke Pieters
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/