Learn R Programming

ctsem (version 3.10.2)

plotctACF: Plot an approximate continuous-time ACF object from ctACF

Description

Plot an approximate continuous-time ACF object from ctACF

Usage

plotctACF(
  ctacfobj,
  df = "auto",
  quantiles = c(0.025, 0.5, 0.975),
  separateLearnRates = FALSE,
  reducedXlim = 1,
  estimateSpline = TRUE
)

Value

a ggplot object

Arguments

ctacfobj

object

df

df for the basis spline.

quantiles

quantiles to plot.

separateLearnRates

if TRUE, estimate the learning rate for the quantile splines for each combination of variables. Slower but theoretically more accurate.

reducedXlim

if non-zero, n timesteps are removed from the upper and lower end of the x range where the spline estimates are less likely to be reasonable.

estimateSpline

if TRUE, quantile spline regression is used, otherwise the samples are simply plotted as lines and the other arguments here are not used.

Examples

Run this code
data.table::setDTthreads(1) #ignore this line
# Example usage:
head(ctstantestdat)
ac=ctACF(ctstantestdat,varnames=c('Y1'),idcol='id',timecol='time',timestep=.5,nboot=5,plot=FALSE)
plotctACF(ac, reducedXlim=0)

Run the code above in your browser using DataLab