2
$\begingroup$

Suppose I believe a sample is drawn from a population that is distributed according to some specified distributional family. I intend to estimate the parameters of the distribution using some appropriate method. However, somewhere along the way I may come to suspect that my original assumptions with respect to the functional form of the distribution may be incorrect.

If my original assumption was that the distribution was normal, I knowa number of the tests for normality that I could use. But suppose I think my data has some distribution other than the normal. Are there any good tests that can be used for an arbitrary distribution against a generalized alternative (perhaps subject to some regularity conditions for it to be reliable)?

For example, if I think my distribution is gamma or log-normal, are there any well-understood tests, with a literature I could find describing when they work, that would reject those choices if the data were clearly bi-modal, or strongly fat-tailed or thin-tailed relative to what is expected given a range of parameter values that is broadly consistent with the data?

(I am looking forward to reaching the point where I con suggest tags. In this case, I was surprised that there is no "specification error" tag.)

$\endgroup$
3
  • $\begingroup$ "a number of the tests for normality that I could use" - off the top of my head I can only think of one suitable "off the shelf" test (perhaps arguably a second), though I can think of a bunch that would work if you specified, rather than estimated, the parameters. Which ones were you thinking of? $\endgroup$
    – Glen_b
    Commented May 12, 2013 at 8:18
  • $\begingroup$ @Glen_b: I was thinking of Shapiro-Wilk and the K-squared test, but I know there are others in common use. $\endgroup$
    – andrewH
    Commented May 13, 2013 at 22:38
  • $\begingroup$ Yes, the Shapiro-Wilk would make sense. I'm not sure what the other one is. Sometimes tests get called different names - which test is the "K-squared"? Do you have a link or reference or an example? Did you mean this one, that's related to the Bowman-Shenton/Jarque-Bera? If so, that would not satisfy all your requirements (though I think it's generally a good test). Specifically it can be blind to some bimodal alternatives. $\endgroup$
    – Glen_b
    Commented May 13, 2013 at 22:50

1 Answer 1

2
$\begingroup$

Are there any good tests that can be used for an arbitrary distribution against a generalized alternative (perhaps subject to some regularity conditions for it to be reliable)?

There are - but not when you have to estimate parameters.

For many distributions you could do something akin to a Shapiro-Francia test, but the distribution of critical values would be different for each distribution.

You could also do something like a Lilliefors test ... and again, critical values would be different for each distribution.

For example, if I think my distribution is gamma or log-normal, are there any well-understood tests, with a literature I could find describing when they work, that would reject those choices if the data were clearly bi-modal, or strongly fat-tailed or thin-tailed relative to what is expected given a range of parameter values that is broadly consistent with the data?

In the case of the lognormal, take logs and test for normality using a test suitable for testing normality with estimated parameters, such as the Shapiro-Wilk.

In the case of a gamma, you could:

  • perform a Lilliefors-type test (a Kolmogorov-Smirnov-type test where parameters are estimated, but the distribution is simulated to take account of the effect of the esitmation)

  • do the same type of thing with an Anderson-Darling test (this tends to be much less affected by parameter estimation - see the discussion in D'Agostino & Stephens Goodness of fit Techniques.

  • test the correlation in a gamma probability plot (that's what I mean by a test akin to the Shapiro-Francia). For example, for an approximate test, one could perform a Wilson-Hilferty type approach (i.e. a cube root transformation) and test normality, though there are other approaches for "gamma-probability" type plots.

There's also a smooth test for the gamma that should be very suitable:

De Boeck, B., O. Thas, J. C.W. Rayner & D. J. Best, (2011)
Smooth tests for the gamma distribution
Journal of Statistical Computation and Simulation
Volume 81, Issue 7, p843-855

Since many people haven't heard of these, I'll give a quick outline of them: Smooth tests consist basically of parameterizing the log-density of the data as the hypothesized log-density plus a set of orthonormal functions (that is, orthogonal to the null as well as each other); the functions differ for each density tested. There are some packages that do smooth tests in R, but I don't know that the gamma one is in there at the moment. They do deal with parameter estimation in a very simple way and generally have good power properties.

R packages that do smooth tests include ddst and smoothtest.

--

edit to respond to questions in comments:

where I could hand my data and my preferred distribution to a package and say"Is this a __ distribution?" and get back some result that would let me answer this question in a straightforward way

You really can't get a "*Is this a __ distribution?*" test. Imagine for a second that there was something like a K-S test but where you could estimate parameters (i.e. a truly omnibus test). Even so, in general for a given sample there would be an infinite number of distributions which would not be rejected by such a test. Statistical tests can help you rule out things ('that's clearly not exponential!') but not to say "that must be Weibull" or something like that, in the same way that you can say "the data are plainly inconsistent with a population mean of 100" but not to say "well, the population mean must be 157.32". Failure to reject a null doesn't tell you the null is true.

Instead, I would need to construct an analogue to one of the normality tests, and then compute my own critical values by Monte Carlo methods or something. Is that right?

Pretty much.

Well, there's the chi-square tests, I suppose.

However, I think you'd probably be best served by pursuing the Anderson-Darling test, but adjusting for parameter estimation.

I think potentially it comes at least fairly close to doing what you want (again, see D'Agostino and Stephens' book on that). In particular, it may be that fairly simple kinds of adjustment to critical values to deal with parameter estimation may be possible in that case.

$\endgroup$
16
  • $\begingroup$ So it sounds like there is not a fill-in-the-blank test, where I could hand my data and my preferred distribution to a package and say"Is this a ____ distribution?" and get back some result that would let me answer this question in a straightforward way. (This is what I was hoping for). Instead, I would need to construct an analogue to one of the normality tests, and then compute my own critical values by Monte Carlo methods or something. Is that right? $\endgroup$
    – andrewH
    Commented May 13, 2013 at 23:02
  • $\begingroup$ see edit to my answer $\endgroup$
    – Glen_b
    Commented May 13, 2013 at 23:24
  • $\begingroup$ Let me tell you what I am really trying to do in case that affects how you are reading my question. I am actually trying to supply my own answer through numerical experiments to another question of mine: stats.stackexchange.com/questions/58080/… $\endgroup$
    – andrewH
    Commented May 14, 2013 at 3:10
  • $\begingroup$ Let me tell you what I'm really trying to do in case that affects your answer. I am actually trying to do numerical experiments to answer another question of mine: Approximating compound distribution with mixture about approximating a compound distribution with a finite mixture. I thought I would produce some finite mixtures of my generating distribution (generalized gamma) to see if the can be distinguished from the compound distribution (Dagum) by some standard test. $\endgroup$
    – andrewH
    Commented May 14, 2013 at 3:46
  • $\begingroup$ Context helps. Pretty much any reasonable test people use will distinguish if you take a large enough sample size. It doesn't sound like you're answering a question you don't already know the answer to. Why would a hypothesis test be a meaningful way to investigate the quality of the approximation? See also and then this $\endgroup$
    – Glen_b
    Commented May 14, 2013 at 4:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.