Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Re: RE: goodness-of-fit test for lognormal distribution


From   Kieran McCaul <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: Re: RE: goodness-of-fit test for lognormal distribution
Date   Mon, 31 May 2004 12:52:25 +0800

Syed,

If you type 'help swilk' that will guide you to the Shapiro-Francia test
that seems to be better suited to larger sample sizes.
You might also want to look at the help file for sktest.  This has a
modification by Royston that I think is for large samples.

You need to remember that when you are doing a statistical test you are
testing an hypothesis.  With goodness-of-fit tests the null hypothesis is
that any difference between your observed distribution and your expected or
assumed distribution is no greater than would be expected by chance alone.

Like any significance test, the large your sample size, the smaller the
difference that you will be able to detect as 'statistically significant'.
Just because some difference that you are detcting is statistically
significant, doesn't mean that it is an important difference.

This also applies to goodness-of-fit tests.  The test might be finding a
significant difference, but with a large sample, this difference might be
quite small and could be ignored.

Kieran



-----Original Message-----
From: Syed Gillani [mailto:[email protected]]
Sent: Monday, 31 May 2004 12:30 PM
To: [email protected]
Subject: st: Re: RE: goodness-of-fit test for lognormal distribution


Thanks Kieran,

The problem is that I have around 6,000 observations and Shapiro-Wilk reject
the null hypothesis of normality after all transformations, even ln(x).
I wnated to test whether the original distribution is really lognormal,
although it certainly looks like one.
For that, I wanted to use Kolmogorov-Smirnov test but it need definition of
the distribution being tested.
I do not know how to define lognormal distribution for ksmirnov. Would
really apperciate help there.

Syed
----- Original Message -----
From: "Kieran McCaul" <[email protected]>
To: <[email protected]>
Sent: Monday, May 31, 2004 3:59 AM
Subject: st: RE: goodness-of-fit test for lognormal distribution


> If your variable is x and you suspect it is lognormal, then ln(x) should
be
> normal.
> You could check this by looking at a histogram of ln(x) with a normal
> distribution overlaid.  Check skewness and kurtosis.  Have a look at a Q-Q
> plot.  Run a Kolmogorov-Smirnov test or Shapiro-Wilks test.
>
> The usual sort of stuff you would do when checking normality of a
variable.
>
> Kieran
>
> -----Original Message-----
> From: Syed Gillani [mailto:[email protected]]
> Sent: Monday, 31 May 2004 4:13 AM
> To: [email protected]
> Subject: st: goodness-of-fit test for lognormal distribution
>
>
> Dear all,
>
> How can I test whether a variable is lognormally distributed?
>
> Syed
>
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
>


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index