Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

residuals-methods

Residual values for an stpm2 or pstpm2 fit


Description

Given an stpm2 or pstpm2 fit, return residuals

Usage

## S4 method for signature 'stpm2'
residuals(object, type=c("li","gradli"))
    ## S4 method for signature 'pstpm2'
residuals(object, type=c("li","gradli"))

Arguments

object

an stpm2 or pstpm2 object

type

specify the type of residuals:

  • "li"log-likelihood components (not strictly residuals)

  • "gradli"gradient of the log-likelihood components (not strictly residuals)

Details

The gradients are analytical.

Value

A vector or matrix.

Methods

object= "stpm2"

an stpm2 fit

See Also


rstpm2

Smooth Survival Models, Including Generalized Survival Models

v1.5.2
GPL-2 | GPL-3
Authors
Mark Clements [aut, cre], Xing-Rong Liu [aut], Benjamin Christoffersen [aut], Paul Lambert [ctb], Lasse Hjort Jakobsen [ctb], Alessandro Gasparini [ctb], Gordon Smyth [cph], Patrick Alken [cph], Simon Wood [cph], Rhys Ulerich [cph]
Initial release
2021-02-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.