# 50 observations drawn from normal distribution (null is true)
p_shapiro.test(rnorm(50))
# return analysis object
p_shapiro.test(rnorm(50), TRUE)
# 50 observations from slightly skewed chi-squared distribution (power)
p_shapiro.test(rchisq(50, df=100))
# \donttest{
# empirical Type I error rate estimate
p_shapiro.test(rnorm(50)) |> Spower()
# power
p_shapiro.test(rchisq(50, df=100)) |> Spower()
# }
Run the code above in your browser using DataLab