View source: R/boot_estimate_valid_function.R
boot_estimate_valid | R Documentation |
Bootstrapping with a progress bar
boot_estimate_valid(
reps,
x,
nom.rate,
id.rate,
pop.mean = 0,
pop.sd = 1,
adjust = 1
)
reps |
Number of bootstrapped repetitions. |
x |
Numeric vector of observed scores. |
nom.rate |
Nomination rate. Must be between 0 and 1. |
id.rate |
Identification rate. Must be between 0 and 1. |
pop.mean |
The known general population mean of x. Defaults to 0. |
pop.sd |
The known general population standard deviation of x. Defaults to 1. |
adjust |
Controls the bandwidth of the density estimator. Defaults to 1.0, which has been found to perform well in simulation. |
# generate some observed scores
# (note the lack of a relyt argument)
# true validity is .6
set.seed(1)
x <- r_identified(
n = 500, test.cutoff = .9, valid = .6,
nom.cutoff = .85
)
# calculate the identification rate implied by the system parameters
id.rate <- marginal_psychometrics(
test.cutoff = .9, valid = .6,
nom.cutoff = .85
)$identification.rate
# calculate the nomination rate implied by the system parameters
nom.rate <- marginal_psychometrics(
test.cutoff = .9, valid = .6,
nom.cutoff = .85
)$nom.rate
# estimate the nomination validity with 10 bootstrapped samples
boot_estimate_valid(x, id.rate = id.rate, nom.rate = nom.rate, reps = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.