powered by
Generate data from a ctstanmodel object
ctStanGenerate( cts, datastruct = NA, is = FALSE, fullposterior = TRUE, nsamples = 200, parsonly = FALSE, cores = 2 )
List contining Y, and array of nsamples by data rows by manifest variables, and llrow, an array of nsamples by data rows log likelihoods.
ctStanModel , or ctStanFit,object.
ctStanModel
ctStanFit
long format data structure as used by ctsem. Not used if cts is a ctStanFit object.
If optimizing, follow up with importance sampling?
Generate from the full posterior or just the (unconstrained) mean?
How many samples to generate?
If TRUE, only return samples of raw parameters, don't generate data.
Number of cpu cores to use.
# \donttest{ #generate and plot samples from prior predictive priorpred <- ctStanGenerate(cts = ctstantestfit,cores=2,nsamples = 50) # }
Run the code above in your browser using DataLab