1\name{sf.test}
2\alias{sf.test}
3\title{Shapiro-Francia test for  normality}
4\description{
5  Performs the Shapiro-Francia  test for the composite hypothesis of normality,
6  see e.g. Thode (2002, Sec. 2.3.2).
7}
8\usage{
9sf.test(x)
10}
11
12\arguments{
13  \item{x}{a numeric vector of data values, the number of
14  which must be between 5 and 5000. Missing values are allowed.}
15}
16\details{The test statistic of the Shapiro-Francia test is simply the
17squared correlation between the ordered sample values and the (approximated)
18expected ordered quantiles from the standard normal
19distribution. The p-value is computed from the formula given by Royston (1993).
20}
21\value{
22  A list with class \dQuote{htest} containing the following components:
23  \item{statistic}{the value of the Shapiro-Francia  statistic.}
24  \item{p.value }{the p-value for the test.}
25  \item{method}{the character string \dQuote{Shapiro-Francia normality test}.}
26  \item{data.name}{a character string giving the name(s) of the data.}
27}
28\references{Royston, P. (1993): A pocket-calculator algorithm for the
29Shapiro-Francia test for non-normality: an application to medicine.
30Statistics in Medicine, 12, 181--184.
31
32Thode Jr., H.C. (2002): Testing for  Normality. Marcel Dekker, New York.}
33
34\author{Juergen Gross}
35
36\note{The Shapiro-Francia test is known to perform well,
37see also the comments by Royston (1993). The expected ordered quantiles
38from the standard normal distribution are approximated by
39\code{qnorm(ppoints(x, a = 3/8))}, being slightly different from the approximation
40\code{qnorm(ppoints(x, a = 1/2))} used for the normal quantile-quantile plot by
41\code{\link{qqnorm}} for sample sizes greater than 10.}
42
43\seealso{\code{\link{shapiro.test}} for performing the Shapiro-Wilk test for normality.
44\code{\link{ad.test}}, \code{\link{cvm.test}},
45\code{\link{lillie.test}}, \code{\link{pearson.test}} for performing further tests for normality.
46\code{\link{qqnorm}} for producing a normal quantile-quantile plot.}
47
48\examples{
49sf.test(rnorm(100, mean = 5, sd = 3))
50sf.test(runif(100, min = 2, max = 4))
51
52}
53\keyword{htest}
54