Learn R Programming

ctsem (version 3.10.2)

ctResiduals: 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)

Value

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

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.

See Also

ctStanKalman

Examples

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

Run the code above in your browser using DataLab