Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Nick Cox <n.j.cox@durham.ac.uk> |
To | "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu> |
Subject | st: RE: xtile generates missing values |
Date | Tue, 24 Apr 2012 14:55:44 +0100 |
Is -wgt- ever zero? Nick n.j.cox@durham.ac.uk -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Brent Fulton Sent: 24 April 2012 14:26 To: statalist@hsphsun2.harvard.edu Subject: st: xtile generates missing values hi All, I am using Stata 11, and the following command to generate percentiles results in 1935 missing values out of 36,855 observations (or about 5% missing). Neither totexp or wgt has missing values, so I am not sure what is happening. Maybe missings are being generated at cut points? Is there a way to avoid this? xtile totexp_pct = totexp [pweight=wgt], n(20) Note the same number missings is generated with the following command, so doesn't seem like a cut point issue? xtile totexp_pct2 = totexp [pweight=wgt], n(1000) Thank you, Brent Fulton UC Berkeley * * 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/