This function implements a goodness-of-fit test using Moran's log spacings statistic.
moranTest(x, densFn, param =NULL,...)
Arguments
densFn: Character. The root name of the distribution to be tested.
x: Numeric. Vector of data to be tested.
param: Numeric. A vector giving the parameter values for the distribution specified by densFn. If no param values are specified, then the default parameter values of the distribution are used instead.
...: Additional arguments to allow specification of the parameters of the distribution other than specified by param.
Details
Moran(1951) gave a statistic for testing the goodness-of-fit of a random sample of x-values to a continuous univariate distribution with cumulative distribution function F(x,theta), where θ is a vector of known parameters. This function implements the Cheng and Stephens(1989) extended Moran test for unknown parameters.
This test has null hypothesis: H0 : a random sample of n values of x comes from distribution F(x,theta), where theta is the vector of parameters. Here theta is expected to be the maximum likelihood estimate thetahat, an efficient estimate. The test rejects H0 at significance level alpha if T(thetahat) > chisq(alpha,df=n).
Returns
statistic: Numeric. The value of the Moran test statistic.
estimate: Numeric. A vector of parameter estimates for the tested distribution.
parameter: Numeric. The degrees of freedom for the Moran statistic.
p.value: Numeric. The p-value for the test. - data.name: Character. A character string giving the name(s) of the data.
method: Character. Type of test performed.
References
Cheng, R. C. & Stephens, M. A. (1989). A goodness-of-fit test using Moran's statistic with estimated parameters. Biometrika, 76 , 385--92.
Moran, P. (1951). The random division of an interval---PartII. J. Roy. Statist. Soc. B, 13 , 147--50.