Generate data from a ctstanmodel object
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 ctm 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)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.