model_3pl_prob {Rirt}R Documentation

3-parameter-logistic model

Description

Common computations and operations 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, scale = 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), t_bounds = c(-3, 3), a_bounds = c(0.01,
  2.5), b_bounds = c(-3, 3), c_bounds = c(0, 0.5), 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),
  verbose = 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, default=1.702

u

observed responses, 2d matrix

log

True to return log-likelihood

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

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

t_bounds

bounds of the ability parameters

a_bounds

bounds of the discrimination parameters

b_bounds

bounds of the difficulty parameters

c_bounds

bounds of the guessing parameters

missing

the proportion or number of missing responses

...

additional arguments

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

verbose

TRUE to print rough maximum likelihood estimates

Value

model_3pl_prob returns the resulting probabilities in a matrix

model_3pl_info returns the resulting information in a matrix

model_3pl_lh returns the resulting likelihood in a matrix

model_3pl_rescale returns t, a, b, c parameters on the new scale

model_3pl_gendata returns the generated response matrix and parameters in a list

model_3pl_plot returns a ggplot object

model_3pl_plot_loglh returns a ggplot object

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))

[Package Rirt version 0.0.2 Index]