Learn R Programming

ctsem (version 2.1.0)

ctStanDiscretePars: ctStanDiscretePars

Description

Calculate model implied regressions for a sequence of time intervals based on a continuous time model fit from ctStanFit, for specified subjects.

Usage

ctStanDiscretePars(ctstanfitobj, subjects = "all", times = seq(from = 0, to  = 10, by = 0.1), quantiles = c(0.05, 0.5, 0.95), plot = FALSE, ...)

Arguments

ctstanfitobj
Continuous time model fit from ctStanFit
subjects
Either 'all', to take the average over all subjects, or a vector of integers denoting which subjects.
times
Numeric vector of positive values, discrete time parameters will be calculated for each.
quantiles
Which quantiles to return. If plotting, specify 3 quantiles, the 2nd will be plotted as a line with 1 and 3 as uncertainty bounds.
plot
Logical. If TRUE, plots output using ctStanDiscreteParsPlot instead of returning output.
...
additional plotting arguments to control ctStanDiscreteParsPlot

Examples

Run this code
ctStanDiscretePars(ctstantestfit,times=seq(.5,4,.1), 
plot=TRUE,indices='all')

Run the code above in your browser using DataLab