residuals.emfrail: Residuals for frailty models

Description Usage Arguments Details Value

View source: R/emfrail_methods.R

Description

Residuals for frailty models

Usage

1
2
## S3 method for class 'emfrail'
residuals(object, type = "group", ...)

Arguments

object

An emfrail object

type

One of cluster or individual

...

Other arguments

Details

For cluster i, individual j and observation row k, we write the cumulative hazard contribution as

Λ_{ijk} = \exp(β^\top \mathbf{x}_{ijk}) Λ_{0, ijk}

where Λ_{0, ijk} is the baseline cumulative hazard correspinding to the row (i,j,k).

When type == "individual", the returned residuals are equal to z_i Λ_{ijk} where z_i is the estimated frailty in cluster i. When type == "cluster", the returned residuals are equal to ∑_{j,k} Λ_{ijk},

Value

A vector corresponding to the Martingale residuals, either for each cluster or for each individual (row of the data).


frailtyEM documentation built on Sept. 22, 2019, 5:05 p.m.