Learn R Programming

perm (version 1.0-0.4)

methodRuleTS1: Rule for determining method for permTS

Description

This is the default function which determines which method to use in permTS.

Usage

methodRuleTS1(x, group, exact, Nbound = c(1000, 200, 100, 50, 16))

Value

a character vector with one of the following values: "pclt","exact.network","exact.mc"

Arguments

x

vector of response scores

group

group membership vector

exact

logical, TRUE=exact method chosen, FALSE=pclt

Nbound

vector of bounds (see details)

Details

This function determines which of several methods will be used in permTS; see that help for description of methods.

When exact=FALSE then returns 'pclt'. When exact=TRUE then returns either 'exact.network' if the estimated time of calculation is not too large or 'exact.mc' otherwise. When exact=NULL then returns either 'exact.network' if the estimated time is not too large or 'pclt' otherwise. The estimation of the calculation time is as follows: if the smallest number of unique values in one of the two groups is equal to kmin, then calculation time is large if the sample size <=Nbound[kmin-1], if Nbound[kmin-1] exists, or is large if the sample size <= min(Nbound) otherwise.

See Also

permTS

Examples

Run this code
N<-100
set.seed(1)
methodRuleTS1(x=sample(1:2,N,replace=TRUE),group=sample(c(0,1),N,replace=TRUE),exact=NULL)
N<-100
methodRuleTS1(sample(1:500,N,replace=TRUE),sample(c(0,1),N,replace=TRUE),TRUE)

Run the code above in your browser using DataLab