fixef.coxme: Extraction functions for Coxme

Description Usage Arguments Value Author(s) See Also Examples

View source: R/ranef.R

Description

Extract the fixed effects, randome effects, variance of the fixed effects, or variance of the random effects from a coxme model.

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'coxme'
fixef(object, ...)
## S3 method for class 'coxme'
ranef(object, ...)
## S3 method for class 'coxme'
vcov(object, ...)
## S3 method for class 'coxme'
VarCorr(x, ...)

Arguments

object

an object inheriting from class coxme representing the result of a mixed effects Cox model.

x

an object inheriting from class coxme representing the result of a mixed effects Cox model.

...

some methods for this generic require additional arguments. None are used in this method.

Value

the fixed effects are a vector and the variance of the fixed effects is a matrix. The random effects will be a list with one element for each random effects terms, as will be their variance.

Author(s)

Terry Therneau

See Also

coxme, random.effects, fixed.effects

Examples

1
2
3
4
5
rat1 <- coxme(Surv(time, status) ~ rx + (1|litter), rats)
fixed.effects(rat1)
vcov(rat1)
random.effects(rat1)[[1]]  #one value for each of the 50 litters
VarCorr(rat1)

Example output

Loading required package: survival
Loading required package: bdsmatrix

Attaching package: 'bdsmatrix'

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

    backsolve

       rx 
0.7301151 
          [,1]
[1,] 0.1009764
          1           2           3           4           5           6 
 0.50905765 -0.38286358 -0.45828855 -0.38286358 -0.47279177 -0.26839475 
          7           8           9          10          11          12 
-0.24557502 -0.30156545 -0.39932377 -0.44911387  1.09264483 -0.30854255 
         13          14          15          16          17          18 
 1.04191054 -0.32570291  0.38219534 -0.19104607 -0.30260527 -0.28747724 
         19          20          21          22          23          24 
 0.68389216 -0.45828855  0.55972853 -0.38772561 -0.28141466 -0.45211212 
         25          26          27          28          29          30 
 2.27719156 -0.37939316  0.50412795 -0.26449115 -0.40044488 -0.31562403 
         31          32          33          34          35          36 
-0.30489539 -0.43401164 -0.39870460 -0.37773674 -0.41216446 -0.45828855 
         37          38          39          40          41          42 
-0.28926378 -0.38772561  1.43945640 -0.32283387 -0.47279177 -0.40215716 
         43          44          45          46          47          48 
-0.47279177 -0.05729056  0.51989198 -0.39108092 -0.38485896 -0.45828855 
         49          50          51          52          53          54 
-0.47279177 -0.35071897 -0.39932377 -0.45828855 -0.35077596 -0.42315185 
         55          56          57          58          59          60 
 1.12640985 -0.31451979  1.34929508 -0.38286358  1.59733100 -0.45828855 
         61          62          63          64          65          66 
-0.20649617 -0.26075195  1.58536973  0.46631719  0.43850170 -0.27460292 
         67          68          69          70          71          72 
 0.61282381 -0.41046145  0.74458806 -0.44911387  0.39719327 -0.21785773 
         73          74          75          76          77          78 
-0.47279177 -0.44911387  0.37846791 -0.42828629  1.49003781 -0.45438018 
         79          80          81          82          83          84 
 1.45141276 -0.25343157  0.59885100 -0.40137485  1.38309315 -0.18782619 
         85          86          87          88          89          90 
 1.03401023 -0.14747832 -0.38585861 -0.43205684 -0.30686724 -0.29654037 
         91          92          93          94          95          96 
-0.14252420 -0.39421878  0.41951193 -0.37755425 -0.29635590 -0.38818840 
         97          98          99         100 
 0.37803738  0.52927617  0.38318344 -0.38842111 
$litter
Intercept 
 1.317388 

coxme documentation built on May 13, 2018, 5:03 p.m.