lsirm1pl_normal_o is used to fit LSIRM for continuous variable with 1pl. lsirm1pl_normal_o factorizes continuous 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.
lsirm1pl_normal_o(
data,
ndim = 2,
niter = 15000,
nburn = 2500,
nthin = 5,
nprint = 500,
jump_beta = 0.4,
jump_theta = 1,
jump_gamma = 1,
jump_z = 0.5,
jump_w = 0.5,
pr_mean_beta = 0,
pr_sd_beta = 1,
pr_mean_theta = 0,
pr_mean_gamma = 0.5,
pr_sd_gamma = 1,
pr_a_theta = 0.001,
pr_b_theta = 0.001,
pr_a_eps = 0.001,
pr_b_eps = 0.001,
verbose = FALSE
)
lsirm1pl_normal_o
returns an object of list containing the following components:
Data frame or matrix containing the variables used in the model.
A numeric value representing the Bayesian Information Criterion (BIC).
Details about the number of MCMC iterations, burn-in periods, and thinning intervals.
The log maximum a posteriori (MAP) value and the iteration number at which this MAP value occurs.
Posterior estimates of the beta parameter.
Posterior estimates of the theta parameter.
Posterior estimates of the standard deviation of theta.
Posterior estimates of gamma parameter.
Posterior estimates of the z parameter.
Posterior estimates of the w parameter.
Posterior samples of the beta parameter.
Posterior samples of the theta parameter.
Posterior samples of the standard deviation of theta.
Posterior samples of the gamma parameter.
Posterior samples of the z parameter, represented as a 3-dimensional matrix where the last axis denotes the dimension of the latent space.
Posterior samples of the w parameter, represented as a 3-dimensional matrix where the last axis denotes the dimension of the latent space.
Acceptance ratio for the beta parameter.
Acceptance ratio for the theta parameter.
Acceptance ratio for the z parameter.
Acceptance ratio for the w parameter.
Acceptance ratio for the gamma parameter.
Posterior estimates of the standard deviation.
Posterior samples of the standard deviation.
Matrix; a binary or continuous item response matrix for analysis. Each row represents a respondent, and each column contains responses to the corresponding item.
Integer; the dimension of the latent space. Default is 2.
Integer; the total number of MCMC iterations to run. Default is 15000.
Integer; the number of initial MCMC iterations to discard as burn-in. Default is 2500.
Integer; the number of MCMC iterations to thin. Default is 5.
Integer; the interval at which MCMC samples are displayed during execution. Default is 500.
Numeric; the jumping rule for the beta proposal density. Default is 0.4.
Numeric; the jumping rule for the theta proposal density. Default is 1.0.
Numeric; the jumping rule for the gamma proposal density. Default is 0.025
Numeric; the jumping rule for the z proposal density. Default is 0.5.
Numeric; the jumping rule for the w proposal density. Default is 0.5.
Numeric; the mean of the normal prior for beta. Default is 0.
Numeric; the standard deviation of the normal prior for beta. Default is 1.0.
Numeric; the mean of the normal prior for theta. Default is 0.
Numeric; mean of log normal prior for gamma. Default is 0.5.
Numeric; standard deviation of log normal prior for gamma. Default is 1.0.
Numeric; the shape parameter of the inverse gamma prior for the variance of theta. Default is 0.001.
Numeric; the scale parameter of the inverse gamma prior for the variance of theta. Default is 0.001.
Numeric; the shape parameter of inverse gamma prior for variance of data likelihood. Default is 0.001.
Numeric; the scale parameter of inverse gamma prior for variance of data likelihood. Default is 0.001.
Logical; If TRUE, MCMC samples are printed for each nprint
. Default is FALSE.
lsirm1pl_normal_o
models the continuous value of 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, with \(\gamma\) represents the weight of the distance term: $$Y_{j,i} = \theta_j+\beta_i-\gamma||z_j-w_i|| + e_{j,i}$$ where the error \(e_{j,i} \sim N(0,\sigma^2)\).
# generate example (continuous) item response matrix
data <- matrix(rnorm(500, mean = 0, sd = 1),ncol=10,nrow=50)
lsirm_result <- lsirm1pl_normal_o(data)
# The code following can achieve the same result.
lsirm_result <- lsirm(data ~ lsirm1pl(spikenslab = FALSE, fixed_gamma = FALSE))
Run the code above in your browser using DataLab