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.