powered by
Generate data from a ctstanmodel object
ctStanGenerate( ctm, datastruct, optimize = TRUE, is = FALSE, fullposterior = TRUE, nsamples = 200, parsonly = FALSE, includePreds = FALSE, ... )
ctStanModel object.
ctStanModel
long format data structure as used by ctsem.
Whether to optimize or use Stan's HMC sampler
If optimizing, follow up with importance sampling?
Generate from the full posterior or just the mean?
How many samples to generate?
If TRUE, only return samples of raw parameters, don't generate data.
if TRUE, the prior for covariate effects (TD and TI predictors) is included, as well as the TD and TI pred data. Else the effects are set to zero.
arguments to pass to stanoptimis
Array of nsamples x time points x manifest variables.
# NOT RUN { #generate and plot samples from prior predictive priorpred <- ctStanGenerate(ctm = ctstantestfit$ctstanmodelbase, datastruct = ctstantestdat,cores=2,nsamples = 50) # }
Run the code above in your browser using DataLab