ctResiduals {ctsem} | R 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
Examples
data.table::setDTthreads(1) #ignore this line
# Example usage:
residuals <- ctResiduals(ctstantestfit)
[Package ctsem version 3.10.1 Index]