# predict.fahrmeier_94

##### Predict function for the result of `ddhazard`

Predict function for the result of `ddhazard`

##### Usage

```
# S3 method for fahrmeier_94
predict(object, new_data, type = c("response", "term"),
tstart = "start", tstop = "stop", use_parallel = F, sds = F,
max_threads = getOption("ddhazard_max_threads"), ...)
```

##### Arguments

- object
Result of a

`ddhazard`

call- new_data
New data to base predictions on

- type
Either

`"response"`

for predicted probability of death or`"term"`

for predicted terms in the linear predictor- tstart
Name of the start time column in

`new_data`

. It must corresponds to tstart used in the`Surv(tstart, tstop, event)`

in the`formula`

passed to`ddhazard`

- tstop
same as

`tstart`

for the stop argument- use_parallel
`TRUE`

if computation for`type = "response"`

should be computed in parallel with the`parallel`

package- sds
`TRUE`

if point wise standard deviation should be computed. Convenient if you use functions like`ns`

and you only want one term per term in the right hand site of the`formula`

used in`ddhazard`

- max_threads
Maximum number of threads to use. -1 if it should be determined by a call to

`detectCores`

- ...
Not used

##### Term

The result of `type = "term"`

is a list with the following elements

`terms`

Is a 3D array. The first dimension is the number of bins, the second dimension is rows in

`new_data`

and the last dimension is the state space terms`sds`

Similar to

`terms`

for the point wise confidence intervals using the smoothed co-variance matrices`fixed_terms`

Vector of the fixed effect terms for each observation

##### Response

The result of `type = "response"`

is a list with the elements below. The function check if there are columns in `new_data`

which's names match `tstart`

and `tstop`

. If not, then each row in new data will get a predicted probability of dying in every bin.

`fits`

Fitted probability of dying

`istart`

Vector with the index of the first bin the elements in

`fits`

is in`istop`

Vector with the index of the last bin the elements in

`fits`

is in

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