View source: R/ctStanGenerate.R
ctStanGenerate | R Documentation |
Generate data from a ctstanmodel object
ctStanGenerate(
cts,
datastruct = NA,
is = FALSE,
fullposterior = TRUE,
nsamples = 200,
parsonly = FALSE,
cores = 2
)
cts |
|
datastruct |
long format data structure as used by ctsem. Not used if cts is a ctStanFit object. |
is |
If optimizing, follow up with importance sampling? |
fullposterior |
Generate from the full posterior or just the (unconstrained) mean? |
nsamples |
How many samples to generate? |
parsonly |
If TRUE, only return samples of raw parameters, don't generate data. |
cores |
Number of cpu cores to use. |
List contining Y, and array of nsamples by data rows by manifest variables, and llrow, an array of nsamples by data rows log likelihoods.
#generate and plot samples from prior predictive
priorpred <- ctStanGenerate(cts = ctstantestfit,cores=2,nsamples = 50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.