Given an stpm2
or pstpm2
fit, return residuals
# S4 method for stpm2
residuals(object, type=c("li","gradli"))
# S4 method for pstpm2
residuals(object, type=c("li","gradli"))
A vector or matrix.
an stpm2
fit
an stpm2
or pstpm2
object
specify the type of residuals:
log-likelihood components (not strictly residuals)
gradient of the log-likelihood components (not strictly residuals)
The gradients are analytical.
stpm2