# Expected confidence interval width (closed form, no Monte Carlo search).
ss_aipe_reliability(model = "Parallel", type = "Normal Theory", width = .1,
i = 6, cor_est = .3, psi_square = .2, conf_level = .95, assurance = NULL)
# The assurance cases run a Monte Carlo search. initial_iter = 50 and
# final_iter = 200 keep the examples quick; a reported plan deserves the
# defaults of 500 and 5000, and set.seed() makes the search reproducible.
set.seed(113)
# Same population, now targeting an assurance.
ss_aipe_reliability(model = "Parallel", type = "Normal Theory", width = .1,
i = 6, cor_est = .3, psi_square = .2, conf_level = .95, assurance = .85,
initial_iter = 50, final_iter = 200)
# The true score (tau equivalent) model takes psi_square as a vector of
# length i (number of items) while cor_est stays a single value.
ss_aipe_reliability(model = "True Score", type = "Normal Theory",
width = .1, i = 5, cor_est = .3, psi_square = c(.2, .3, .3, .2, .3),
conf_level = .95, assurance = .85, initial_iter = 50, final_iter = 200)
# Congeneric model, planned from the item loadings and error variances rather
# than from a single correlation. With assurance = NULL the necessary N comes
# from the closed form expected width evaluated at the implied population
# correlation matrix, so type does not enter the answer; type selects the
# interval that the Monte Carlo assurance search evaluates. Adding an
# assurance to this plan fits a one factor model at every Monte Carlo
# iteration and is the slow case, so the page stops at the closed form
# (see Details).
ss_aipe_reliability(model = "Congeneric", type = "Factor Analytic", width = .15,
i = 4, lambda = c(.8, .7, .7, .8), psi_square = c(.4, .5, .5, .4),
conf_level = .95, assurance = NULL)
# Planning from a presumed population correlation matrix among the items.
pop_mat <- rbind(
c(1.0000000, 0.3813850, 0.4216370, 0.3651484, 0.4472136),
c(0.3813850, 1.0000000, 0.4020151, 0.3481553, 0.4264014),
c(0.4216370, 0.4020151, 1.0000000, 0.3849002, 0.4714045),
c(0.3651484, 0.3481553, 0.3849002, 1.0000000, 0.4082483),
c(0.4472136, 0.4264014, 0.4714045, 0.4082483, 1.0000000))
ss_aipe_reliability(model = "True Score", type = "Normal Theory", width = .15,
S = pop_mat, conf_level = .95, assurance = .85, initial_iter = 50,
final_iter = 200)
Run the code above in your browser using DataLab