Last data update: 2014.03.03

R: Normality Tester
ntesterR Documentation

Normality Tester

Description

Q-Q plots of randomly generated normal data of the same samplesize as the tested data are generated and ploted on the perimeter of the graph while a Q-Q plot of the actual data is depicted in the center of the graph.

Usage

ntester(actual.data)

Arguments

actual.data

is a numeric vector. Missing and infinite values are allowed, but are ignored in the calculation. The length of actual.data must be less than 5000 after dropping nonfinite values.

Details

Q-Q plots of randomly generated normal data of the same size as the tested data are generated and ploted on the perimeter of the graph sheet while a Q-Q plot of the actual data is depicted in the center of the graph. The p-values are calculated based on the Shapiro-Wilk W-statistic. Function will only work on numeric vectors containing less than or equal to 5000 observations.

Author(s)

Alan T. Arnholt

References

Shapiro, S.S. and Wilk, M.B. (1965). An analysis of variance test for normality (complete samples). Biometrika 52: 591-611.

Examples

ntester(rexp(50,1))
    # Q-Q plot of random exponential data in center plot
    # surrounded by 8 Q-Q plots of randomly generated 
    # standard normal data of size 50.

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(PASWR)
Loading required package: e1071
Loading required package: MASS
Loading required package: lattice
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/PASWR/ntester.Rd_%03d_medium.png", width=480, height=480)
> ### Name: ntester
> ### Title: Normality Tester
> ### Aliases: ntester
> ### Keywords: distribution
> 
> ### ** Examples
> 
> ntester(rexp(50,1))
>     # Q-Q plot of random exponential data in center plot
>     # surrounded by 8 Q-Q plots of randomly generated 
>     # standard normal data of size 50.
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>