coxme {coxme}R Documentation

Fit a mixed effects Cox model

Description

Fit a Cox model containing mixed (random and fixed) effects. Assume a Gaussian distribution for the random effects.

Usage

coxme(formula, data, weights, subset, na.action, init, control,
ties = c("efron", "breslow"),
varlist, vfixed, vinit,
sparse = c(50, 0.02),  x = FALSE, y = TRUE,
refine.n = 0, random, fixed, variance, ...)

Arguments

formula a two-sided formula with a survival object as the left hand side of a ~ operator and the fixed and random effects on the right.
data an optional data frame containing the variables named in the formula.
subset, weights, na.action further model specifications arguments as in lm; see there for details.
init optional initial values for the fixed effects.
control optional list of control options. See coxme.control for details.
ties method for handling exact ties in the survival time.
varlist the variance family to be used for each random term. If there are multiple terms it will be a list of variance functions. The default is coxmeFull. Alternatively it can be a list of matrices, in which case the coxmeMlist function is used.
vfixed optional named list or vector used to fix the value of one or more of the variance terms at a constant.
vinit optional named list or vector giving suggested starting values for the variance.
sparse rule for deciding sparsity of a random effect. See the main documentation for discussion of the issue.
x if TRUE the X matrix (fixed effects) is included in the output object
y if TRUE the y variable (survival time) is included in the output object
refine.n number of samples to be used in a monte-carlo estimate of possible error in the log-likelihood of the fitted model due to inadequacy of the Laplace approximation.
fixed, random, variance In the preliminary version of coxme the fixed and random effects were separate arguments. These arguments are included for backwards compatability, but are depreciated. The variance argument is a depreciated alias for vfixed.
... any other arguments are passed forward to coxme.control.

Value

An object of class coxme.

Author(s)

Terry Therneau

References

Ripatti, Therneau

See Also

coxmeFull, coxmeMlist

Examples

## Not run: 
# Random treatment effects per institution
fit1 <- coxme(Surv(pgtime, pgstat) ~ stage + trt + (1+trt |institution),
               data=colon2)
fit2 <- coxme(Surv(pgtime, pgstat) ~ stage + trt + (trt |institution) +
              strata(institution), data=colon2)
## End(Not run)
# Shrinkage effects (equivalent to ridge regression)
temp <- with(lung, scale(cbind(age, wt.loss, meal.cal)))
rfit <- coxme(Surv(time, status) ~ ph.ecog + (temp | 1), data=lung)

[Package coxme version 2.0 Index]