lsirm1pl_fixed_gamma {lsirm12pl}R Documentation

1pl LSIRM model fixing gamma to 1.

Description

lsirm1pl_fixed_gamma is used to fit 1pl LSIRM model with gamma fixed to 1. lsirm1pl_fixed_gamma factorizes item response matrix into column-wise item effect, row-wise respondent effect and further embeds interaction effect in a latent space. The resulting latent space provides an interaction map that represents interactions between respondents and items.

Usage

lsirm1pl_fixed_gamma(
  data,
  ndim = 2,
  niter = 15000,
  nburn = 2500,
  nthin = 5,
  nprint = 500,
  jump_beta = 0.4,
  jump_theta = 1,
  jump_z = 0.5,
  jump_w = 0.5,
  pr_mean_beta = 0,
  pr_sd_beta = 1,
  pr_mean_theta = 0,
  pr_a_theta = 0.001,
  pr_b_theta = 0.001,
  verbose = FALSE
)

Arguments

data

Matrix; binary item response matrix to be analyzed. Each row is assumed to be respondent and its column values are assumed to be response to the corresponding item.

ndim

Numeric; dimension of latent space. default value is 2.

niter

Numeric; number of iterations to run MCMC sampling. default value is 15000.

nburn

Numeric; number of initial, pre-thinning, MCMC iterations to discard. default value is 2500.

nthin

Numeric;number of thinning, MCMC iterations to discard. default value is 5.

nprint

Numeric; MCMC samples is displayed during execution of MCMC chain for each nprint. default value is 500.

jump_beta

Numeric; jumping rule of the proposal density for beta. default value is 0.4.

jump_theta

Numeric; jumping rule of the proposal density for theta. default value is 1.0.

jump_z

Numeric; jumping rule of the proposal density for z. default value is 0.5.

jump_w

Numeric; jumping rule of the proposal density for w. default value is 0.5.

pr_mean_beta

Numeric; mean of normal prior for beta. default value is 0.

pr_sd_beta

Numeric; standard deviation of normal prior for beta. default value is 1.0.

pr_mean_theta

Numeric; mean of normal prior for theta. default value is 0.

pr_a_theta

Numeric; shape parameter of inverse gamma prior for variance of theta. default value is 0.001.

pr_b_theta

Numeric; scale parameter of inverse gamma prior for variance of theta. default value is 0.001.

verbose

Logical; If TRUE, MCMC samples are printed for each nprint. default value is FALSE

Details

lsirm1pl_fixed_gamma models the probability of correct response by respondent j to item i with item effect \beta_i, respondent effect \theta_j and the distance between latent position w_i of item i and latent position z_j of respondent j in the shared metric space:

logit(P(Y_{j,i} = 1|\theta_j,\beta_i,z_j,w_i))=\theta_j+\beta_i-||z_j-w_i||

Value

lsirm1pl_fixed_gamma returns an object of list containing the following components:

data

data frame or matrix containing the variables in the model.

bic

Numeric value with the corresponding BIC.

mcmc_inf

number of mcmc iteration, burn-in periods, and thinning intervals.

map_inf

value of log maximum a posterior and iteration number which have log maximum a posterior.

beta_estimate

posterior estimation of beta.

theta_estimate

posterior estimation of theta.

sigma_theta_estimate

posterior estimation of standard deviation of theta.

z_estimate

posterior estimation of z.

w_estimate

posterior estimation of w.

beta

posterior samples of beta.

theta

posterior samples of theta.

theta_sd

posterior samples of standard deviation of theta.

z

posterior samples of z. The output is 3-dimensional matrix with last axis represent the dimension of latent space.

w

posterior samples of w. The output is 3-dimensional matrix with last axis represent the dimension of latent space.

accept_beta

accept ratio of beta.

accept_theta

accept ratio of theta.

accept_z

accept ratio of z.

accept_w

accept ratio of w.

Examples


# generate example item response matrix
data     <- matrix(rbinom(500, size = 1, prob = 0.5),ncol=10,nrow=50)

lsirm_result <- lsirm1pl_fixed_gamma(data)

# The code following can achieve the same result.
lsirm_result <- lsirm(data ~ lsirm1pl(spikenslab = FALSE, fixed_gamma = TRUE))


[Package lsirm12pl version 1.3.1 Index]