
Routine functions for the GRM
model_grm_prob(t, a, b, D = 1.702, raw = FALSE)model_grm_info(t, a, b, D = 1.702)
model_grm_lh(u, t, a, b, D = 1.702, log = FALSE)
model_grm_gendata(n_p, n_i, n_c, t = NULL, a = NULL, b = NULL,
D = 1.702, t_dist = c(0, 1), a_dist = c(-0.1, 0.2), b_dist = c(0,
0.8), missing = NULL)
model_grm_rescale(t, a, b, param = c("t", "b"), mean = 0, sd = 1)
model_grm_plot(a, b, D = 1.702, type = c("prob", "info"),
by_item = FALSE, total = FALSE, xaxis = seq(-6, 6, 0.1),
raw = FALSE)
model_grm_plot_loglh(u, a, b, D = 1.702, xaxis = seq(-6, 6, 0.1),
show_mle = FALSE)
ability parameters, 1d vector
discrimination parameters, 1d vector
item location parameters, 2d matrix
the scaling constant, 1.702 by default
TRUE to return P*
the observed scores (starting from 0), 2d matrix
TRUE to return log-likelihood
the number of people to be generated
the number of items to be generated
the number of score categories
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
the proportion or number of missing responses
the parameter of the new scale: 't' or 'b'
the mean of the new scale
the standard deviation of the new scale
the type of plot, prob for ICC and info for IIFC
TRUE to combine categories
TRUE to sum values over items
the values of x-axis
TRUE to print maximum likelihood values
# NOT RUN {
with(model_grm_gendata(10, 5, 3), model_grm_prob(t, a, b))
with(model_grm_gendata(10, 5, 3), model_grm_info(t, a, b))
with(model_grm_gendata(10, 5, 3), model_grm_lh(u, t, a, b))
model_grm_gendata(10, 5, 3)
model_grm_gendata(10, 5, 3, missing=.1)
with(model_grm_gendata(10, 5, 3), model_grm_plot(a, b, type='prob'))
with(model_grm_gendata(10, 5, 3), model_grm_plot(a, b, type='info', by_item=TRUE))
with(model_grm_gendata(5, 50, 3), model_grm_plot_loglh(u, a, b))
# }
Run the code above in your browser using DataLab