dset {CIPerm}R Documentation

Permutation-methods summary statistics

Description

Calculate table of differences in means, medians, etc. for each combination (or permutation, if using Monte Carlo approx.), as needed in order to compute a confidence interval using cint and/or a p-value using pval.

Usage

dset(group1, group2, nmc = 10000, returnData = FALSE)

Arguments

group1

Vector of numeric values for first group.

group2

Vector of numeric values for second group.

nmc

Threshold for whether to use Monte Carlo draws or complete enumeration. If the number of all possible combinations choose(n1+n2, n1) <= nmc, we use complete enumeration. Otherwise, we take a Monte Carlo sample of nmc permutations. You can set nmc = 0 to force complete enumeration regardless of how many combinations there are.

returnData

Whether the returned dataframe should include columns for the permuted data itself (if TRUE), or only the derived columns that are needed for confidence intervals and p-values (if FALSE, default).

Value

A data frame ready to be used in cint() or pval().

Examples

x <- c(19, 22, 25, 26)
y <- c(23, 33, 40)
demo <- dset(x, y, returnData = TRUE)
knitr::kable(demo, digits = 2)

[Package CIPerm version 0.2.3 Index]