PKLMtest: PKLMtest: compute a p-value for testing MCAR

Description Usage Arguments Value Examples

View source: R/PKLMtest.R

Description

PKLMtest: compute a p-value for testing MCAR

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
PKLMtest(
  X,
  num.proj = 300,
  num.trees.per.proj = 10,
  nrep = 500,
  min.node.size = 10,
  size.resp.set = 2,
  compute.partial.pvals = FALSE,
  ...
)

Arguments

X

a numeric matrix containing missing values encoded as NA, the data.

num.proj

a positive integer specifying the number of projections to consider for the score.

num.trees.per.proj

a positive integer, the number of trees per projection.

nrep

a positive integer, the number of permutations.

min.node.size

a positive number, the minimum number of nodes in a tree.

size.resp.set

an integer (>= 2), maximum number of classes allowed to be compared in each projection.

compute.partial.pvals

a boolean, indicate if partial p-values shopuld be computed as well.

...

additional parameters.

Value

a numeric value, the p-value(s) for the MCAR test, the first value is always the global p-value and if compute.partial.pvals is set to TRUE, the next values are the partial p-values for the relative importance of each variable.

Examples

1
2
3
4
5
6
n <- 100
X <- cbind(rnorm(n),rnorm(n))
X.NA <- X
X.NA[,1] <- ifelse(stats::runif(n)<=0.2, NA, X[,1])

pval <- PKLMtest(X.NA, num.proj = 5)

PKLMtest documentation built on Nov. 5, 2021, 5:07 p.m.