p_shapiro.test {Spower} | R Documentation |
p-value from Shapiro-Wilk Normality Test simulation
Description
Generates univariate distributional data and returns a p-value to assess the null
that the population follows a Gaussian distribution shape. Uses
shapiro.test
.
Usage
p_shapiro.test(dist)
Arguments
dist |
expression used to generate the required sample data |
Value
a single p-value
Author(s)
Phil Chalmers rphilip.chalmers@gmail.com
Examples
# 50 observations drawn from normal distribution (null is true)
p_shapiro.test(rnorm(50))
# 50 observations from slightly skewed chi-squared distribution (power)
p_shapiro.test(rchisq(50, df=100))
# empirical Type I error rate estimate
p_shapiro.test(rnorm(50)) |> Spower()
# power
p_shapiro.test(rchisq(50, df=100)) |> Spower()
[Package Spower version 0.2.3 Index]