ddhazardResiduals function for the result of a ddhazard fit
# S3 method for fahrmeier_94
residuals(object, type = c("std_space_error",
"space_error", "pearson", "raw"), data = NULL, ...)Result of ddhazard call
Type of residuals. Four possible values: "std_space_error", "space_error", "pearson" and "raw". See the sections below for details
Data frame with data for Pearson or raw residuals
Not used
Is the result of a call with a type argument of either "pearson" or "raw" for Pearson residuals or raw residuals. Returns a list with class "fahrmeier_94_res" with the following elements
residualsList of residuals for each bin. Each element of the list contains a 2D array where the rows corresponds to the passed data and columns are the residuals (residuals), estimated probability of death (p_est), outcome (Y) and row number in the initial dataset (row_num). The data rows will only have a residuals in a given risk list if they are at risk in that risk set
typeThe type of residual
Is the result of a call with a type argument of either "std_space_error" or "space_error". The former is for standardized residuals while the latter is non-standardized. Returns a list with class "fahrmeier_94_SpaceErrors" with the following elements
residuals2D array with either standardized or non-standardized state space errors. The row are bins and the columns are the parameters in the regression
standardizeTRUE if standardized state space errors
Covariances3D array with the smoothed co-variance matrix for each set of the state space errors