Learn R Programming

lordif (version 0.1-2)

getcutoff: determines a cutoff threshold

Description

Determines cutoff thresholds for statistics generated from Monte Carlo simulations

Usage

getcutoff(stat, alpha, reverse)

Arguments

stat
a vector containing statistics sampled from a Monte Carlo simulation
alpha
a value determining the proportion to be cut off from the bottom (or top) of stat
reverse
if TRUE it cuts off the right tail

Value

  • returns a scalar that cuts off the designated proportion (specified by alpha)

Details

if reversed is TRUE it cuts off the right tail (i.e., largest values)

See Also

montecarlo

Examples

Run this code
#top 1 percent
getcutoff(runif(1000),0.01,TRUE)
#bottom 1 percent
getcutoff(runif(1000),0.01,FALSE)

Run the code above in your browser using DataLab