bootTest: Bootstrap test for discretized normality

Description Usage Arguments Value References Examples

View source: R/bootTest.R

Description

bootTest is a bootstrap test for whether an ordinal dataset is consistent with being a discretization of a multivariate normal dataset.

Usage

1
bootTest(my.data, B = 1000, verbose = TRUE)

Arguments

my.data

A dataset containing ordinal data. Must contain only integer values.

B

Number of bootstrap samples.

verbose

If true, bootstrap progress is printed to the console.

Value

p-value associated with the underlying normality hypothesis.

References

Njål Foldnes & Steffen Grønneberg (2019) Pernicious Polychorics: The Impact and Detection of Underlying Non-normality, Structural Equation Modeling: A Multidisciplinary Journal, DOI: 10.1080/10705511.2019.1673168

Examples

1
2
3
4
5
6
7
set.seed(1)
norm.data <- MASS::mvrnorm(300, m=rep(0,3), 
Sigma=cov(MASS::mvrnorm(15, mu=rep(0,3), Sigma=diag(3))))
disc.data <- apply(norm.data,2,  cut, 
breaks = c(-Inf, 0,1, Inf), labels=FALSE)# normal data discretized
pvalue <- bootTest(disc.data, B=500)
#no support for underlying non-normality

discnorm documentation built on July 1, 2020, 6:34 p.m.