Description Usage Arguments Value Author(s) Examples
The StanDCM.ppmc Function to automate Stan code generation for LCDMs with binary responses
1 2 3 4 5 6 7 8 | StanDCM.ppmc(
stan.model,
response.matrix,
n.sim = NULL,
n.burnin = NULL,
plot.option = FALSE,
type = "sumscores"
)
|
stan.model |
A rStan object |
response.matrix |
the response matrix used by RStan Object |
n.sim |
number of simulations for Posterior Predictive Model Checking |
n.burnin |
number of burn-in iterations |
plot.option |
logical. whether to provide a plot for ppmc using ggplot2 |
type |
The test statistics to perform PPMC. The default is "sumscores". Setting "chisq" will calculate the bivariate item Chi square. |
p-values tables
Jihong Zhang, University of Iowa, jihong-zhang@uiowa.edu
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
load("data.RData")
Qmatrix<-cbind(Qmatrix,rep(1,9)); Qmatrix[1,1]<-0
dim(respMatrix)
misspecifiedQmatrix <- Qmatrix
misspecifiedQmatrix[1:6,] <- 1-Qmatrix[1:6,]
misspecifiedQmatrix[1,3] = 0
mod2 <- StanDINA.run(misspecifiedQmatrix,response.matrix = respMatrix,iter=100,init.list='cdm', chain.num = 3, warmup = 20)
StanDCM.ppmc(stan.model = mod2, response.matrix = respMatrix, n.sim = 1000, n.burnin = 1, plot.option = FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.