model_grm {Rirt}R Documentation

Graded Response Model

Description

Common computations and operations for the GRM

Usage

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), t_bounds = c(-3, 3), a_bounds = c(0.01, 2.5),
  b_bounds = c(-3, 3), missing = NULL, ...)

model_grm_rescale(t, a, b, scale = c("t", "b"), mean = 0, sd = 1)

model_grm_plot(a, b, D = 1.702, type = c("prob", "info"),
  item_level = 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),
  verbose = FALSE)

Arguments

t

ability parameters, 1d vector

a

discrimination parameters, 1d vector

b

item location parameters, 2d matrix

D

the scaling constant, default=1.702

raw

TRUE to return P*

u

observed scores (starting from 0), 2d matrix

log

TRUE to return log-likelihood

n_p

the number of people to be generated

n_i

the number of items to be generated

n_c

the number of score categories

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

t_bounds

the bounds of the ability parameters

a_bounds

the bounds of the discrimination parameters

b_bounds

the bounds of the difficulty parameters

missing

the proportion or number of missing responses

...

additional arguments

scale

the scale, 't' for theta or 'b' for b-parameters

mean

the mean of the new scale

sd

the standard deviation of the new scale

type

the type of plot, prob for ICC and info for IIFC

item_level

TRUE to combine categories

total

TRUE to sum values over items

xaxis

the values of x-axis

verbose

TRUE to print rough maximum likelihood values

Value

model_grm_prob returns the resulting probabilities in a 3d array

model_grm_info returns the resulting information in a 3d array

model_grm_lh returns the resulting likelihood in a matrix

model_grm_gendata returns the generated response data and parameters in a list

model_grm_rescale returns t, a, b parameters on the new scale

model_grm_plot returns a ggplot object

model_grm_plot_loglh returns a ggplot object

Examples

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', item_level=TRUE))
with(model_grm_gendata(5, 50, 3), model_grm_plot_loglh(u, a, b))

[Package Rirt version 0.0.2 Index]