View source: R/conditional_p_id_function.R
conditional_p_id | R Documentation |
This function calculates the conditional probability of identification for a one- or two-stage system given a student's true or observed score, the test reliability, and, for two-stage systems, the nomination validity and the nomination cutoff. A two-stage system is one in which an initial nomination process is used to select students who are tested on the confirmatory assessment.
conditional_p_id(x, relyt=1, test.cutoff, valid=1e-7, nom.cutoff=1e-7)
x |
The student's score on a standardized (z-score) metric. Interpreted
as a true score if a value is specified for |
relyt |
Confirmatory test reliability coefficient. Range (0, 1].
Must not be exactly 0. Defaults to 1; in this case, x is assumed
to be an observed score. If an alternative value is supplied for
|
test.cutoff |
Confirmatory test cutoff percentile. Range (0, 1). Must not be exactly 0 or 1. Can be a vector or scalar. |
valid |
Nomination validity coefficient. Controls the relatedness of the nomination scores and the confirmatory test scores. Range (0, 1). Must not be exactly 0 or 1, and must be less than the square root of the test reliability. Defaults to 1e-7 for a single- stage system. |
nom.cutoff |
Nomination cutoff percentile. Range (0, 1). Defaults to 1e-7 for a single- stage system. Must not be exactly 0 or 1. |
The probabilities returned by this function can be plotted against a range of true scores to create an identification curve (see examples).
The two-stage identification probability is returned if arguments valid and nom.cutoff are provided. Otherwise, the one-stage probability is returned.
# one-stage system, true score=1
conditional_p_id(x = 1, relyt = .9, test.cutoff = .9)
# one-stage system, observed score=1
# (note that the relyt argument is not specified)
conditional_p_id(x = 1, test.cutoff = .9)
# two-stage system, true score=2
conditional_p_id(
x = 2, relyt = .9, test.cutoff = .9,
nom.cutoff = .9, valid = .5
)
# two-stage system, observed score=2
conditional_p_id(
x = 2, test.cutoff = .9,
nom.cutoff = .9, valid = .5
)
# make an identification curve:
# true score vs p identified
#
# create vector of true scores
Tscores <- seq(0, 3, length.out = 100)
# calculate the identification probability for each
p.id <- conditional_p_id(
x = Tscores, relyt = .9,
test.cutoff = .9, nom.cutoff = .9, valid = .5
)
# make a plot
plot(
x = Tscores, y = p.id, type = "l", xlab = "true score",
ylab = "p identified"
)
# add a reference line for the test cutoff
abline(v = qnorm(.9), col = "red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.