setCutoff: Set the cutoff for mediator selection

Description Usage Arguments Details Value Examples

View source: R/methods.R

Description

This function sets the cutoff value on a cmf object for mediator selection. Any cutoff value between 0 and 1 is allowed, where potential mediators with empirical selection probability (selection rate) above the cutoff will be considered mediators and the others will not. The cutoff can be entered manually or, when set to "mc", be based on a monte carlo simulation. See "details"

Usage

1
setCutoff(object, cutoff = 0.5)

Arguments

object

a cmf object

cutoff

either a number between 0 and 1 or "mc" - see details

Details

The monte carlo determination is based on a procedure in PCA and Factor Analysis called "Parallel Analysis". We generate data from the null hypothesis with the same dimensionality as the original dataset and perform the algorithm 100 times. This creates a distribution of nonmediator selection rates from which we can determine the cutoff (the 99.9th percentile)

Value

a cmf object with updated cutoff value

Examples

1
2
3
4
5
# generate some data
dat <- generateMed(a = (1:10)/20, b = (1:10)/20)
res <- cmf(dat)
# set the cutoff for this result at 0.1
setCutoff(res, 0.1)

cmfilter documentation built on April 11, 2019, 5:07 p.m.

Related to setCutoff in cmfilter...