Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: uniform distribution
From
Nick Cox <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: uniform distribution
Date
Fri, 8 Nov 2013 20:53:44 +0000
-egen, count()- on a variable just puts a constant in a variable,
namely the sum of non-missing values, which is useless for your
purpose.
The best test of uniformity is graphical: -quantile- by accident if
not design yields the appropriate graph. Otherwise think of
chi-square, Kolmogorov-Smirnov, etc.
For "STATA" read "Stata".
Nick
[email protected]
On 8 November 2013 18:09, PAPANIKOLAOU P. <[email protected]> wrote:
> I am a fairly new user to STATA. I have got to check whether each of
> these two variables (column 2: MS_COHO; column 3: UK_MS) follow the
> uniform distribution.
> For each for them, I used the following code, properly adjusted:
>
> egen n = count (mpg) // use MS_COHO and UK_MS each time ... drop n i
> surprisingly, the results were identical in both attempts, though the
> script was applied to two different variables.
> MONTH MS_COHO UK_MS
> Apri 396 62986 |
> Aug 330 67503 |
> Dec 342 65218 |
> Feb 348 59491.83 |
> Jan 379 65502.33 |
> Jul 377 68214.5 |
> Jun 368 65511.33 |
> Mar 419 65112.17 |
> May 423 66152.34 |
> Nov 328 65107.67 |
> Oct 347 68344.16 |
> Sep 356 67597.34
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/