Residuals for frailty models
# S3 method for emfrail
residuals(object, type = "group", ...)
An emfrail
object
One of cluster
or individual
Other arguments
A vector corresponding to the Martingale residuals, either for each cluster or for each individual (row of the data).
For cluster \(i\), individual \(j\) and observation row \(k\), we write the cumulative hazard contribution as $$\Lambda_{ijk} = \exp(\beta^\top \mathbf{x}_{ijk}) \Lambda_{0, ijk}$$ where \(\Lambda_{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 \Lambda_{ijk}\) where \(z_i\) is the estimated frailty in cluster \(i\).
When type == "cluster"
, the returned residuals are equal to \(\sum_{j,k} \Lambda_{ijk}\),