# residuals.fahrmeier_94

##### Residuals for `ddhazard`

Residuals function for the result of a `ddhazard`

fit

##### Usage

```
# S3 method for fahrmeier_94
residuals(object, type = c("std_space_error",
"space_error", "pearson", "raw"), data = NULL, ...)
```

##### Arguments

- object
Result of

`ddhazard`

call- type
Type of residuals. Four possible values:

`"std_space_error"`

,`"space_error"`

,`"pearson"`

and`"raw"`

. See the sections below for details- data
Data frame with data for Pearson or raw residuals

- ...
Not used

##### Pearson and raw residuals

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

`residuals`

List 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`type`

The type of residual

##### State space errors

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

`residuals`

2D array with either standardized or non-standardized state space errors. The row are bins and the columns are the parameters in the regression

`standardize`

`TRUE`

if standardized state space errors`Covariances`

3D array with the smoothed co-variance matrix for each set of the state space errors

*Documentation reproduced from package dynamichazard, version 0.3.0, License: GPL-2*