Learn R Programming

tramME (version 1.0.7)

coef.tramME: 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 tramME
coef(object, with_baseline = FALSE, fixed = TRUE, complete = FALSE, ...)

Value

Numeric vector of parameter values.

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).

Examples

Run this code
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)

Run the code above in your browser using DataLab