Given an univariate sample \(x\), it tests $$H_0 : x\textrm{ is from normal distribution} \quad vs\quad H_1 : \textrm{ not } H_0$$ using a test procedure by Shapiro and Francia (1972), which is an approximation to Shapiro and Wilk (1965).

norm.1972SF(x)

Arguments

x

a length-\(n\) data vector.

Value

a (list) object of S3 class htest containing:

statistic

a test statistic.

p.value

\(p\)-value under \(H_0\).

alternative

alternative hypothesis.

method

name of the test.

data.name

name(s) of provided sample data.

References

Shapiro SS, Francia RS (1972). “An Approximate Analysis of Variance Test for Normality.” Journal of the American Statistical Association, 67(337), 215--216. ISSN 0162-1459, 1537-274X.

Examples

## CRAN-purpose small example
x = rnorm(10)
norm.1972SF(x) # run the test
#> 
#> 	Univariate Test of Normality by Shapiro and Francia (1972)
#> 
#> data:  x
#> W = 0.96458, p-value = 0.8184
#> alternative hypothesis: Sample x does not follow normal distribution.
#> 

# \donttest{
## generate samples from several distributions
x = stats::runif(496)            # uniform
y = stats::rgamma(496, shape=2)  # gamma
z = stats::rlnorm(496)           # log-normal

## test above samples
test.x = norm.1972SF(x) # uniform
test.y = norm.1972SF(y) # gamma
test.z = norm.1972SF(z) # log-normal
# }