find_cutoff: Find a cutoff of a normal distribution that results in a...

find_cutoffR Documentation

Find a cutoff of a normal distribution that results in a given mean trait value above the cutoff

Description

Assuming a normal distribution for a trait and a cutoff value. Estimate what this cutoff value is to obtain a population above the cutoff with a known mean trait value.

Usage

find_cutoff(
  mean_above,
  mean_pop = 100,
  sd_pop = 15,
  n = 10000,
  precision = 0.1,
  below = F
)

Arguments

mean_above

(num scalar) Mean trait level of population above the cutoff.

mean_pop

(num scalar) Mean trait level of population. Default = 100 (IQ scale).

sd_pop

(num scalar) Standard deviation of the trait in the population. Default = 15 (IQ scale).

n

(num scalar) Sample size to generate in the process. More results in higher precision and memory use. Default = 1e4.

precision

(num scalar) The precision to use. Default = .1.

below

(log scalar) Reverse the model to find cutoffs for

Examples

#what cutoff is needed to get a population above the cutoff with a mean of 115 when the population mean is 100?
find_cutoff(115)
#try impossible
find_cutoff(95)

Deleetdk/kirkegaard documentation built on April 22, 2024, 5:22 p.m.