model_3pl {xxIRT} | R Documentation |
3-parameter-logistic model
Description
Routine functions for the 3PL model
Usage
model_3pl_prob(t, a, b, c, D = 1.702)
model_3pl_info(t, a, b, c, D = 1.702)
model_3pl_lh(u, t, a, b, c, D = 1.702, log = FALSE)
model_3pl_rescale(t, a, b, c, param = c("t", "b"), mean = 0, sd = 1)
model_3pl_gendata(n_p, n_i, t = NULL, a = NULL, b = NULL, c = NULL,
D = 1.702, t_dist = c(0, 1), a_dist = c(-0.1, 0.2), b_dist = c(0,
0.7), c_dist = c(5, 46), missing = NULL)
model_3pl_plot(a, b, c, D = 1.702, type = c("prob", "info"),
total = FALSE, xaxis = seq(-4, 4, 0.1))
model_3pl_plot_loglh(u, a, b, c, D = 1.702, xaxis = seq(-4, 4, 0.1),
show_mle = FALSE)
Arguments
t |
ability parameters, 1d vector |
a |
discrimination parameters, 1d vector |
b |
difficulty parameters, 1d vector |
c |
guessing parameters, 1d vector |
D |
the scaling constant, 1.702 by default |
u |
observed responses, 2d matrix |
log |
True to return log-likelihood |
param |
the parameter of the new scale: 't' or 'b' |
mean |
the mean of the new scale |
sd |
the standard deviation of the new scale |
n_p |
the number of people to be generated |
n_i |
the number of items to be generated |
t_dist |
parameters of the normal distribution used to generate t-parameters |
a_dist |
parameters of the lognormal distribution used to generate a-parameters |
b_dist |
parameters of the normal distribution used to generate b-parameters |
c_dist |
parameters of the beta distribution used to generate c-parameters |
missing |
the proportion or number of missing responses |
type |
the type of plot: 'prob' for item characteristic curve (ICC) and 'info' for item information function curve (IIFC) |
total |
TRUE to sum values over items |
xaxis |
the values of x-axis |
show_mle |
TRUE to print maximum likelihood estimates |
Examples
with(model_3pl_gendata(10, 5), model_3pl_prob(t, a, b, c))
with(model_3pl_gendata(10, 5), model_3pl_info(t, a, b, c))
with(model_3pl_gendata(10, 5), model_3pl_lh(u, t, a, b, c))
model_3pl_gendata(10, 5)
model_3pl_gendata(10, 5, a=1, c=0, missing=.1)
with(model_3pl_gendata(10, 5), model_3pl_plot(a, b, c, type="prob"))
with(model_3pl_gendata(10, 5), model_3pl_plot(a, b, c, type="info", total=TRUE))
with(model_3pl_gendata(5, 50), model_3pl_plot_loglh(u, a, b, c, show_mle=TRUE))