View source: R/estimate_performance_function.R
estimate_performance | R Documentation |
Estimate psychometric parameters of an identification system given the observed scores of the identified students using bootstrapping to provide uncertainty estimates.
estimate_performance(
x,
id.rate,
nom.rate,
reps,
relyt = 1,
pop.mean = 0,
pop.sd = 1,
adjust = 1,
CI = 0.95
)
x |
Numeric vector of observed scores. |
id.rate |
The proportion of students who have been identified. Range (0, 1). Must
be less than or equal to |
nom.rate |
The proportion of students who have been nominated. Range (0, 1). Used to calculate the nomination cutoff. |
reps |
The number of bootstrap samples. |
relyt |
Confirmatory test reliability coefficient. Range (0,1]. Must not be exactly 0. Used in the calculation of sensitivity. Defaults to 1, in which case the reported sensitivity is relative to a universal screening system and does not include sensitivity loss from imperfect test reliability. If <1, the test reliability is included in the sensitivity calculation. |
pop.mean |
The known general population mean of the x. Defaults to 0. |
pop.sd |
The known general population standard deviation of the x. Defaults to 1. |
adjust |
Number that controls the amount of smoothing in the density estimation. Defaults to 1.0, which has been found to work well in simulation. |
CI |
The confidence limit. Must be between 0 and 1. Defaults to .95. |
This function stimates the psychometric parameters of an identification system
given the observed scores of the identified students. This function calculates statistics
using the estimate_valid
function with bootstrapping. The resulting
nomination validity (valid
) estimates are passed to the
marginal_psychometrics
function in order to calculate the implied
performance statistics.
At least 500 bootstrapped samples are suggested. This can take a while.
# generate some data
set.seed(123)
x <- r_identified(
n = 300, test.cutoff = .9, valid = .5,
nom.cutoff = .9
)
# calculate the identification rate implied by the system parameters
id.rate <- marginal_psychometrics(
test.cutoff = .9, valid = .5,
nom.cutoff = .9
)$identification.rate
# calculate the nomination rate implied by the system parameters
nom.rate <- marginal_psychometrics(
test.cutoff = .9, valid = .5,
nom.cutoff = .9
)$nom.rate
# estimate the system parameters with 200 bootstrapped samples
# this uses one CPU
a <- estimate_performance(
x = x, id.rate = id.rate,
nom.rate = nom.rate, reps = 200
)
a
# plot the results for each parameter
plot(a)
# plot with histograms
plot(a, type = "hist")
# the width argument controls the x-limits
plot(a, type = "hist", width = .0)
# for type="density", the bandwidth is adjustable
# (default is 1.2, see ?density for details)
plot(a, type = "density", width = .05, adjust = .5)
plot(a, type = "density", width = .05, adjust = 1.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.