coef.tramME {tramME}R Documentation

Extract the coefficients of a tramME model

Description

Extracts the fixed effects coefficents (default behavior), the baseline parameters or all (baseline, fixed and random) coefficients of the model.

Usage

## S3 method for class 'tramME'
coef(object, with_baseline = FALSE, fixed = TRUE, complete = FALSE, ...)

Arguments

object

A tramME object.

with_baseline

If TRUE, also include the baseline parameters and the fixed effects parameters from the smooth terms. (Kept for compatibility with tram)

fixed

If TRUE, also include the fixed parameters.

complete

If TRUE, return all parameters that can be seen as coefficients (baseline, fixed, random) in the tramME model. With complete = TRUE, with_baseline = FALSE and fixed = FALSE are ignored. (The behavior of this argument might change in the future).

...

Optional parameters (ignored).

Value

Numeric vector of parameter values.

Examples

library("survival")
mod <- SurvregME(Surv(time, status) ~ rx + (1 | litter/rx), data = rats,
                 dist = "exponential", nofit = TRUE)
coef(mod, with_baseline = TRUE)
coef(mod, with_baseline = TRUE, fixed = FALSE)

data("sleepstudy", package = "lme4")
mod2 <- BoxCoxME(Reaction ~ s(Days) + (Days || Subject), data = sleepstudy,
                 nofit = TRUE)
coef(mod2, complete = TRUE)

[Package tramME version 1.0.6 Index]