# NOT RUN {
# }
# NOT RUN {
# Fit the model under different within-item multidimensional structures
# for SF12_nomiss data
data(SF12_nomiss)
S = SF12_nomiss[,1:12]
X = SF12_nomiss[,13]
# Partial credit model with two latent variables sharing six items
# (free difficulty parameters and constrained discriminating parameters;
# 1 to 3 latent classes for the 1st latent variable and 1 to 2 classes for the 2nd latent variable;
# one covariate):
multi1 = c(1:5, 8:12)
multi2 = c(6:12, 1)
out1 = search.model_within(S=S,kv1=1:3,kv2=1:2,X=X,link="global",disc=FALSE,
multi1=multi1,multi2=multi2,disp=TRUE,
out_se=TRUE,tol1=10^-4, tol2=10^-7, nrep=1)
# Main output
out1$lkv
out1$aicv
out1$bicv
# Model with 2 latent classes for each latent variable
out1$out.single[[4]]$k1
out1$out.single[[4]]$k2
out1$out.single[[4]]$Th1
out1$out.single[[4]]$Th2
out1$out.single[[4]]$piv1
out1$out.single[[4]]$piv2
out1$out.single[[4]]$ga1c
out1$out.single[[4]]$ga2c
out1$out.single[[4]]$Bec
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab