powered by
Add a $generated object to ctstanfit object, with random data generated from posterior of ctstanfit object
ctStanGenerateData(fit, nsamples = 1, fullposterior = FALSE)
ctstanfit object
Positive integer specifying number of datasets to generate.
Logical indicating whether to sample from the full posterior (original nsamples) or the posterior mean.
Matrix of generated data -- one dataset per iteration, according to original time and missingness structure.
# NOT RUN { gen <- ctStanGenerateData(ctstantestfit, nsamples=3,fullposterior=TRUE) plot(gen$generated$Y[,3,2],type='l') #Third random data sample, 2nd manifest var, all time points. # }
Run the code above in your browser using DataLab