Calculate model implied regressions for a sequence of time intervals based on a continuous time model fit from ctStanFit, for specified subjects.
ctStanDiscretePars(ctstanfitobj, subjects = "all", times = seq(from =
0, to = 10, by = 0.1), quantiles = c(0.025, 0.5, 0.975),
nsamples = 500, observational = FALSE, standardise = FALSE,
plot = FALSE, ...)
Continuous time model fit from ctStanFit
Either 'all', to take the average over all subjects, or a vector of integers denoting which subjects.
Numeric vector of positive values, discrete time parameters will be calculated for each.
Which quantiles to return. If plotting, specify 3 quantiles, the 2nd will be plotted as a line with 1 and 3 as uncertainty bounds.
Number of samples from the stanfit to use for plotting. Higher values will increase smoothness / accuracy, at cost of plotting speed. Values greater than the total number of samples will be set to total samples.
Logical. If TRUE, outputs expected change in processes *conditional on observing* a 1 unit change in each -- this change is correlated according to the DIFFUSION matrix. If FALSE, outputs expected regression values -- also interpretable as an independent 1 unit change on each process, giving the expected response under a 1 unit experimental impulse.
Logical. If TRUE, output is standardised according to expected total within subject variance, given by the asymDIFFUSION matrix.
Logical. If TRUE, plots output using ctStanDiscreteParsPlot
instead of returning output.
additional plotting arguments to control ctStanDiscreteParsPlot
# NOT RUN {
ctStanDiscretePars(ctstantestfit,times=seq(.5,4,.1),
plot=TRUE,indices='all')
# }
Run the code above in your browser using DataCamp Workspace