Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Maarten Buis <maartenlbuis@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: RE: query on testing uniform distributions |
Date | Wed, 2 Nov 2011 08:35:20 +0100 |
On Tue, Nov 1, 2011 at 6:00 PM, Sergio Salis <S.Salis@psi.org.uk> wrote: > I understand that to check whether employment_start_dates follow a uniform distribution I can also use the ksmirnov test. It is not clear to me what the command -ksmirnov hazel=hazel- actually does (so I would appreciate if you could provide some further explanation on this). To quote the helpfile of -ksmirnov-: "varname is the variable whose distribution is being tested, and exp must evaluate to the corresponding (theoretical) cumulative." >However, if employment_start_dates was a continuous variable I would use > > -ksmirnov employment_start_date=14341+int((14705-14341+1)*runiform()) That sounds completely wrong to me: In this case your cumulative density function contains a call to a random number generator. > where 14705 is the first and 14341 the last day of the tax year of interest. Is this syntax line correct in case one deals with a continuous variable? If so, how can it be changed to deal with a discrete variable, which is my case? You do so by deriving the cumulative density function for a discrete uniform distribution and put that after the equal sign. Hope this helps, Maarten -------------------------- Maarten L. Buis Institut fuer Soziologie Universitaet Tuebingen Wilhelmstrasse 36 72074 Tuebingen Germany http://www.maartenbuis.nl -------------------------- * * 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/