ctResiduals: Extract Standardized Residuals from a ctsem Fit

View source: R/ctACF.R

ctResidualsR Documentation

Extract Standardized Residuals from a ctsem Fit

Description

This function takes a fit object from the ctsem package and extracts the standardized residuals.

Usage

ctResiduals(fit)

Arguments

fit

A fitted model object generated by the ctsem package.

Details

This function uses the ctStanKalman function to calculate the standardized residuals and then extracts and formats them as a data table. The standardized residuals represent the differences between the observed and predicted values, divided by the standard errors of the observations.

Value

A data table containing the standardized residuals for each subject and time point.

See Also

ctStanKalman

Examples

data.table::setDTthreads(1) #ignore this line
# Example usage:
residuals <- ctResiduals(ctstantestfit)


ctsem documentation built on Sept. 11, 2024, 9:06 p.m.