simpleperm: simpleperm

Description Arguments Details Value Author(s) Examples

View source: R/simpleperm.r

Description

Permutation test with imputation

Arguments

y

An outcome vector.

x

A vector indicating two groups to compare.

iter

An integer specifying the number of permutations to draw.

useNA

A character string specifying the method of imputation of: “complete” (the default), “sample.mean.impute”, “group.mean.impute”, “random.sample”, “random.group”, “random.sample.permute”, and “random.group.permute”.

replace

A logical specifying whether to draw permutations with replacement (i.e., to bootstrap the difference rather than use the permutation distribution). Default is FALSE (for a permutation test).

Details

Function to estimate a mean difference between two groups, with missing outcome data, using a permutation test (or bootstrap). The useNA argument specifies how to handle (and possibly impute) missing outcome values.

Value

A vector representing the permutation (or bootstrap) distribution.

Author(s)

Thomas J. Leeper

Examples

1
2
3
x <- rbinom(100,1,.5)
y <- rnorm(100)
simpleperm(y,x)

leeper/expResults documentation built on May 21, 2019, 12:37 a.m.