This action might not be possible to undo. Are you sure you want to continue?

BooksAudiobooksComicsSheet Music### Categories

### Categories

### Categories

Editors' Picks Books

Hand-picked favorites from

our editors

our editors

Editors' Picks Audiobooks

Hand-picked favorites from

our editors

our editors

Editors' Picks Comics

Hand-picked favorites from

our editors

our editors

Editors' Picks Sheet Music

Hand-picked favorites from

our editors

our editors

Top Books

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Audiobooks

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Comics

What's trending, bestsellers,

award-winners & more

award-winners & more

Top Sheet Music

What's trending, bestsellers,

award-winners & more

award-winners & more

Welcome to Scribd! Start your free trial and access books, documents and more.Find out more

February 15, 2013

Title Tests for Normality Version 1.0-2 Date 2012-05-30 Author Juergen Gross <gross@statistik.uni-dortmund.de>, bug ﬁxes by Uwe Ligges Description Five omnibus tests for the composite hypothesis of normality Maintainer Uwe Ligges <ligges@statistik.tu-dortmund.de> License GPL (>= 2) Repository CRAN Date/Publication 2012-05-30 17:19:44 NeedsCompilation no

R topics documented:

ad.test . . . cvm.test . . lillie.test . . pearson.test sf.test . . . Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 3 4 6 8 10

1

the number of which must be greater than 7. the character string “Anderson-Darling normality test”. Value A list with class “htest” containing the following components: statistic p. 5. Missing values are allowed. The test statistic is n 1 [2i − 1][ln(p(i) ) + ln(1 − p(n−i+1) )]. Φ is the cumulative distribution function of the standard normal distribution. and x and s are mean and standard deviation of the data values.value method data.2 ad. Author(s) Juergen Gross the value of the Anderson-Darling statistic. a character string giving the name(s) of the data.4).75/n + 2. Sec. the p-value for the test. The p-value is computed from the modiﬁed statistic Z = A(1.0 + 0.g. Usage ad. Details The Anderson-Darling test is an EDF omnibus test for the composite hypothesis of normality. see e. A = −n − n i=1 where p(i) = Φ([x(i) − x]/s).test ad.name Note The Anderson-Darling test is the recommended EDF test by Stephens (1986). Here.test(x) Arguments x a numeric vector of data values. Compared to the Cramer-von Mises test (as second choice) it gives more weight to the tails of the distribution.test Anderson-Darling test for normality Description Performs the Anderson-Darling test for the composite hypothesis of normality.1. Thode (2002.25/n2 )\ according to Table 4.9 in Stephens (1986). .

12n i=1 2n where p(i) = Φ([x(i) − x]/s). and Stephens. the number of which must be greater than 7. M.test(runif(1 .0 + 0. max = 4)) cvm. Φ is the cumulative distribution function of the standard normal distribution. H. and x and s are mean and standard deviation of the data values.test. cvm. In: D’Agostino. New York.: Goodness-of-Fit Techniques. . Thode (2002. sf.. Marcel Dekker.test. sd = 3)) .test References 3 Stephens.5/n) according to Table 4. R.9 in Stephens (1986).A.test. mean = 5.C. Usage cvm. see e.cvm.test(rnorm(1 ad. 5.g. M.B.test for performing further tests for normality..3). The test statistic is n 1 2i − 1 W = + (p(i) − ). (1986): Tests based on EDF statistics. Here. min = 2. Examples ad.test for performing the Shapiro-Wilk test for normality. (2002): Testing for Normality. Details The Cramer-von Mises test is an EDF omnibus test for the composite hypothesis of normality.test Cramer-von Mises test for normality Description Performs the Cramer-von Mises test for the composite hypothesis of normality. Thode Jr. pearson. qqnorm for producing a normal quantilequantile plot.A. See Also shapiro. eds.test(x) Arguments x a numeric vector of data values. Marcel Dekker. Missing values are allowed. The p-value is computed from the modiﬁed statistic Z = W (1. Sec. lillie.1. New York.

test(runif(1 .A. Missing values are allowed. and Stephens.A. lillie. qqnorm for producing a normal quantilequantile plot.C. (2002): Testing for Normality.B.. the character string “Cramer-von Mises normality test”. eds. pearson.value method data. M. a character string giving the name(s) of the data. lillie.4 Value A list with class “htest” containing the following components: statistic p. 5. New York. Marcel Dekker.1).test.test. see e. sd = 3)) . the p-value for the test.test for performing the Shapiro-Wilk test for normality. H. M. min = 2.test(rnorm(1 cvm.: Goodness-of-Fit Techniques. (1986): Tests based on EDF statistics. sf. Usage lillie.name Author(s) Juergen Gross References the value of the Cramer-von Mises statistic.test.test Stephens.test for performing further tests for normality. New York.test Lilliefors (Kolmogorov-Smirnov) test for normality Description Performs the Lilliefors (Kolmogorov-Smirnov) test for the composite hypothesis of normality. R. Thode Jr. ad. the number of which must be greater than 4. mean = 5.. In: D’Agostino.1.g. . Thode (2002. Sec. max = 4)) lillie. Marcel Dekker. Examples cvm.test(x) Arguments x a numeric vector of data values. See Also shapiro.

"pnorm".. Journal of the American Statistical Association. The American Statistician.name Note The Lilliefors (Kolomorov-Smirnov) test is the most famous EDF omnibus test for normality.A.test(x) is the same as that obtained from ks.5 when the Dallal-Wilkinson approximation yields a p-value greater than 0. If the Dallal-Wilkinson p-value turns out to be greater than 0.. and x and s are mean and standard deviation of the data values. (1974): EDF statistics for goodness of ﬁt and some comparisons.value method data.n where p(i) = Φ([x(i) − x]/s). it is not correct to use the p-value from the latter for the composite hypothesis of normality (mean and variance unknown). i=1..1. see Stephens (1974). sd(x)). the p-value for the test. The test statistic is the maximal absolute difference between empirical and hypothetical cumulative distribution function. but is only used when the Dallal-Wilkinson approximation fails. Thode Jr.test Details 5 The Lilliefors (Kolmogorov-Smirnov) test is an EDF omnibus test for the composite hypothesis of normality. 730–737. The function call lillie. since the distribution of the test statistic is different when the parameters are estimated.01 + 0. the actual p-value formula being obtained by a simulation and approximation process. It may be computed as D = max{D+ . New York.1. the value of the Lilliefors (Kolomogorv-Smirnov) statistic. 294–296.. 69.lillie. which is claimed to be only reliable when the p-value is smaller than 0. The p-value is computed from the Dallal-Wilkinson (1986) formula. D− = max {p(i) − (i − 1)/n}. mean(x). (Actually. Although the test statistic obtained from lillie. D− } with D+ = max {i/n − p(i) }. and Wilkinson.. L.E. Φ is the cumulative distribution function of the standard normal distribution.n i=1. Value A list with class “htest” containing the following components: statistic p. a character string giving the name(s) of the data. . the alternative p-value approximation is provided for the complete range of test statistic values..85/ n).1.test(x. then √the √ p-value is computed from the distribution of the modiﬁed statistic Z = D( n − 0. (1986): An analytic approximation to the distribution of Lilliefors’ test for normality.gof(x) with the distinction that the p-value is not set to 0. Marcel Dekker. (2002): Testing for Normality.) Author(s) Juergen Gross References Dallal... M. Stephens. G.C. Compared to the Anderson-Darling test and the Cramer-von Mises test it is known to perform worse. the character string “Lilliefors (Kolmogorov-Smirnov) normality test”.test(x) essentially produces the same result as the S-PLUS function call ks. H. 40.. Here.

test Pearson chi-square test for normality Description Performs the Pearson chi-square test for the composite hypothesis of normality.value method the value of the Pearson chi-square statistic. see also Moore (1986). Value A list with class “htest” containing the following components: statistic p. In both cases this is not (!) the correct p-value. see e. Sec. The default is due to Moore (1986). the p-value is computed from a chi-square distribution with n.test. . Usage pearson.classes adjust a numeric vector of data values. where Ci is the number of counted and Ei is the number of expected observations (under the hypothesis) in class i.test(x. The p-value is computed from a chi-square distribution with n.test for performing further tests for normality. logical.test. Missing values are allowed.2). adjust = TRUE) Arguments x n. sf. Details The Pearson test statistic is P = (Ci − Ei )2 /Ei . mean = 5. ad.6 See Also pearson.test for performing the Shapiro-Wilk test for normality. The classes are build is such a way that they are equiprobable under the hypothesis of normality. qqnorm for producing a normal quantilequantile plot.g. the character string “Pearson chi-square normality test”. max = 4)) pearson. sd = 3)) . if TRUE (default). the p-value for the test. The number of classes. Thode (2002. 5. n.test shapiro.classes-1 degrees of freedom otherwise. Examples lillie. cvm.classes-3 degrees of freedom.classes-3 degrees of freedom if adjust is TRUE and from a chi-square distribution with n. otherwise from a chi-square distribution with n.classes = ceiling(2 * (n^(2/5))). min = 2. lying somewhere between the two.test(rnorm(1 lillie. pearson.classes-1 degrees of freedom.test(runif(1 .test.

as it is usually done. in order to adjust for the additional estimation of two parameters. (1986): Tests of the chi-squared type. 7 the degress of freedom of the chi-square distribution used to compute the pvalue.est=2). with adjust = TRUE (default) and with adjust = FALSE. New York.name n. Marcel Dekker.test.A. H.param.test. and Stephens. sf.test data.test. R..3 degrees of freedom. See Also shapiro.test(rnorm(1 pearson. it is suggested to run pearson. n.test for performing the Shapiro-Wilk test for normality. sd = 3)) . New York.classes . Author(s) Juergen Gross References Moore. It is common practice to compute the p-value from the chi-square distribution with n.classes df a character string giving the name(s) of the data. Marcel Dekker. ad.gof((x-mean(x))/sqrt(var(x)).B. D.C. eds. see Moore (1986) for details. Since the true p-value is somewhere between the two. lillie. mean = 5. max = 4)) .classes . min = 2.: Goodness-of-Fit Techniques..test(runif(1 . (2002): Testing for Normality. qqnorm for producing a normal quantilequantile plot. Note The Pearson chi-square test is usually not recommended for testing the composite hypothesis of normality due to its inferior power properties compared to other tests. It is also suggested to slightly change the default number of classes. Eventually.test twice. (For the simple hypothesis of normality (mean and variance known) the test statistic is asymptotically chi-square distributed with n. Thode Jr. In: D’Agostino. The function call pearson. Examples pearson. the number of classes used for the test.S. not correct as long as the parameters are estimated by mean(x) and var(x) (or sd(x)). M. in order to see the effect on the p-value.test(x) essentially produces the same result as the S-PLUS function call chisq. however.test for performing further tests for normality.) This is.pearson. it is suggested not to rely upon the result of the test. cvm.1 degrees of freedom.

test sf.8 sf. Marcel Dekker.test(x) Arguments x a numeric vector of data values. the number of which must be between 5 and 5000. see also the comments by Royston (1993). Details The test statistic of the Shapiro-Francia test is simply the squared correlation between the ordered sample values and the (approximated) expected ordered quantiles from the standard normal distribution. the character string “Shapiro-Francia normality test”. (1993): A pocket-calculator algorithm for the Shapiro-Francia test for non-normality: an application to medicine. The expected ordered quantiles from the standard normal distribution are approximated by qnorm(ppoints(x. being slightly different from the approximation qnorm(ppoints(x. The p-value is computed from the formula given by Royston (1993). Statistics in Medicine. a character string giving the name(s) of the data. New York. . a = 3/8)). Sec.name Note The Shapiro-Francia test is known to perform well. 181–184. Author(s) Juergen Gross References Royston. 12.test Shapiro-Francia test for normality Description Performs the Shapiro-Francia test for the composite hypothesis of normality. Missing values are allowed. H.g. Usage sf.C. the p-value for the test. P.value method data. (2002): Testing for Normality.3.. Value A list with class “htest” containing the following components: statistic p. Thode Jr. the value of the Shapiro-Francia statistic. Thode (2002. see e. 2.2). a = 1/2)) used for the normal quantile-quantile plot by qqnorm for sample sizes greater than 10.

test.test for performing the Shapiro-Wilk test for normality.test.test(runif(1 . min = 2. max = 4)) . ad. lillie. sd = 3)) . qqnorm for producing a normal quantilequantile plot.sf.test See Also 9 shapiro. pearson. Examples sf. cvm.test(rnorm(1 sf. mean = 5.test for performing further tests for normality.test.

test. 4. 4.test. 6. 7. 9 pearson.test. 9 10 . 4. 6 sf. 6. 3. 4. 6. 3 lillie. 2. 3. 6–9 sf. 4.Index ∗Topic htest ad. 6. 3.test. 7. 2 cvm. 3. 9 cvm. 6.test.test. 7. 8 shapiro. 3. 3. 6. 4. 7.test. 4. 9 lillie. 9 qqnorm. 3. 8 ad. 7.test.test. 4 pearson.test.test.

noralld tes

noralld tes

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue listening from where you left off, or restart the preview.

scribd