coxme: Fit a mixed effects Cox model In coxme: Mixed Effects Cox Models

Description

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

Usage

 1 2 3 4 coxme(formula, data, weights, subset, na.action, init, control, ties = c("efron", "breslow"), varlist, vfixed, vinit, 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. 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.

Terry Therneau

References

S Ripatti and J Palmgren, Estimation of multivariate frailty models using penalized partial likelihood, Biometrics, 56:1016-1022, 2000.

T Therneau, P Grambsch and VS Pankratz, Penalized survival models and frailty, J Computational and Graphical Statistics, 12:156-175, 2003.

Examples

 1 2 3 4 5 6 7 8 9 # A non-significant institution effect fit1 <- coxph(Surv(time, status) ~ ph.ecog + age, data=lung, subset=(!is.na(inst))) fit2 <- coxme(Surv(time, status) ~ ph.ecog + age + (1|inst), lung) anova(fit1, fit2) # 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)

Example output

Attaching package: 'bdsmatrix'

The following object is masked from 'package:base':

backsolve

Analysis of Deviance Table
Cox model: response is  Surv(time, status)
Model 1: ~ph.ecog + age
Model 2: ~ph.ecog + age + (1 | inst)
loglik  Chisq Df P(>|Chi|)
1 -729.90
2 -729.73 0.3379  1    0.5611

coxme documentation built on March 26, 2020, 7:50 p.m.