rstpm2 (version 1.5.1)

residuals-methods: Residual values for an stpm2 or pstpm2 fit

Description

Given an stpm2 or pstpm2 fit, return residuals

Usage

# S4 method for stpm2
residuals(object, type=c("li","gradli"))
    # S4 method for 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)

Value

A vector or matrix.

Methods

object= "stpm2"

an stpm2 fit

Details

The gradients are analytical.

See Also

stpm2