
Routine functions for the 3PL model
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)
ability parameters, 1d vector
discrimination parameters, 1d vector
difficulty parameters, 1d vector
guessing parameters, 1d vector
the scaling constant, 1.702 by default
observed responses, 2d matrix
True to return log-likelihood
the parameter of the new scale: 't' or 'b'
the mean of the new scale
the standard deviation of the new scale
the number of people to be generated
the number of items to be generated
parameters of the normal distribution used to generate t-parameters
parameters of the lognormal distribution used to generate a-parameters
parameters of the normal distribution used to generate b-parameters
parameters of the beta distribution used to generate c-parameters
the proportion or number of missing responses
the type of plot: 'prob' for item characteristic curve (ICC) and 'info' for item information function curve (IIFC)
TRUE to sum values over items
the values of x-axis
TRUE to print maximum likelihood estimates
# NOT RUN {
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))
# }
Run the code above in your browser using DataLab