Simulates data using parameters from posterior distribution of blatent Markov chain.
blatentPPMC(
model,
nSamples,
seed = model$options$seed,
parallel = TRUE,
nCores = 4,
type = c("mean", "covariance", "univariate", "bivariate", "tetrachoric", "pearson"),
lowPPMCpercentile = c(0.025, 0.025, 0, 0, 0.025, 0.025),
highPPMCpercentile = c(0.975, 0.975, 1, 1, 0.975, 0.975)
)
A blatent MCMC model object.
The number of PPMC samples to be simulated.
The random number seed. Defaults to the seed set in the blatent model object.
If parallelization should be used in PPMC. Defaults to "TRUE"
.
If "parallel == TRUE"
, then specifies the number of cores to use. Defaults to four.
The type of statistic to generate, submitted as a character vector. Options include:
"mean"
computes and tabulates the mean for the posterior simulated data for each
observed variable.
"covariance"
computes and tabulates the covariance for the posterior simulated data
for all pairs of observed variables.
"univariate"
computes and tabulates a Pearson Chi-Square comparing the counts for
an observed variable with the counts for a variable from the posterior simulated data, for each observed variable.
"bivariate"
computes and tabulates a Pearson Chi-Square comparing the counts for a
pair of observed variables with the counts for a pair of variables from the posterior simulated
data, for each pair of observed variables.
"tetrachoric"
computes and tabulates the tetrachoric correlation for the
posterior simulated data for all pairs of observed variables.
"pearson"
computes and tabulates the Pearson correlation for the
posterior simulated data for all pairs of observed variables.
A vector of the lower bound percentiles used for flagging statistics against PPMC
predictive distributions. Results are flagged if the observed statistics percentile is lower than
the number in the vector. Provided in order of each term in "type"
. Defaults to
"c(.025, .025, 0, 0, .025, .025)"
.
A vector of the upper bound percentiles used for flagging statistics against PPMC
predictive distributions. Results are flagged if the observed statistics percentile is higher than
the number in the vector. Provided in order of each term in "type"
. Defaults to
"c(.975, .975, 1, 1, .975, .975)"
.