Last chance! 50% off unlimited learning
Sale ends in
Calculates the score residuals of an intercept term fixed at 0.
# S3 method for tramME
residuals(
object,
param = NULL,
newdata = NULL,
fix_smooth = !is.null(newdata),
...
)
A tramME
object.
An optional named list of parameter values (beta and theta). See details. Optionally, gamma elements can also be added, which leads to 'fixing' those random effects terms at the supplied values.
An optional data.frame
of observations for which we
want to calculate the residuals.
Logical; it is set to TRUE
by default, if
newdata
is supplied. The random effects parameters corresponding
the smooth terms are fixed and not fitted (posterior mode) to
newdata
instead they are treated just like fixed effects
parameters. See details.
Optional arguments (for consistency with generic)
library("survival")
fit <- SurvregME(Surv(time, status) ~ rx + (1 | litter), data = rats)
resid(fit)
Run the code above in your browser using DataLab