perm_dist: Permutation distribution

Description Usage Arguments Details Value Author(s)

Description

Compute the permutation distribution given observations and a test statistic.

Usage

1
2
perm_dist(x1, x2, g1, g2, stat, B, x3 = NULL, g3 = NULL,
  restricted = TRUE, stratified = TRUE)

Arguments

x1

First stage data

x2

Second stage data

g1

(Dummy) first stage treatment assignments

g2

(Dummy) second stage treatment assignments (see Details)

stat

Function that computes the test statistic (signature function(x,g))

B

Number of permutations

x3

(Dummy) third stage data (e.g. sample size increase)

g3

(Dummy) third stage treatment assignments (see Details)

restricted

Should group sizes be considered fixed

stratified

Should permutation be stratified by stage

Details

First, second and third stage treatment assignments are only passed to define the second stage sample size and the sizes of the corresponding (treatment) groups. If the number of permutations is less than the number of all possible permutations the test observed test statistic will be added to the result such that $B+1$ values will be returned. If the number of requested permutations B is larger than the number of all possible permutations, only the latter will be used.

Value

numeric vector

Author(s)

Florian Klinglmueller


floatofmath/adaperm documentation built on May 16, 2019, 1:18 p.m.