[R] AIC from coxme

Christopher David Desjardins desja004 at umn.edu
Tue Jul 27 19:28:15 CEST 2010


Hi,
I am running the following model:
fit1.full <- coxme(Surv(age_sym1, sym1) ~ sex + lifedxm*sex + (1|famid),
data=bip.surv)

I would like to extract the AIC from that object to calculate the AICC.
However, when I look at str(fit1.full) and summary(fit1.full) (pasted
below) I don't see anything that would allow me to get pull the AIC out
from that object. 

Is there a way to retrieve the AIC from a coxme object?

Please cc me on your response.
Thanks,
Chris


1> str(fit1.full)
List of 20
 $ coefficients    :List of 2
  ..$ fixed : Named num [1:5] 0.197 -1.132 -0.499 0.114 -0.329
  .. ..- attr(*, "names")= chr [1:5] "sexMALES" "lifedxmCONTROL"
"lifedxmMAJOR" "sexMALES:lifedxmCONTROL" ...
  ..$ random:List of 1
  .. ..$ famid: Named num 0.964
  .. .. ..- attr(*, "names")= chr "Intercept"
 $ frail           :List of 1
  ..$ famid: Named num [1:97] -0.8144 -0.6222 -0.0979 0.5179 -0.5587 ...
  .. ..- attr(*, "names")= chr [1:97] "1" "2" "3" "4" ...
 $ penalty         : num 22.6
 $ loglik          : Named num [1:3] -479 -467 -435
  ..- attr(*, "names")= chr [1:3] "NULL" "Integrated" "Penalized"
 $ variance        :Formal class 'bdsmatrix' [package "bdsmatrix"] with
6 slots
  .. ..@ blocksize: int [1:97] 1 1 1 1 1 1 1 1 1 1 ...
  .. ..@ blocks   : num [1:97] 0.545 0.606 0.485 0.415 0.636 ...
  .. ..@ rmat     : num [1:102, 1:5] -0.00096 -0.000778 -0.000286
0.000102 -0.000688 ...
  .. ..@ offdiag  : num 0
  .. ..@ Dim      : int [1:2] 102 102
  .. ..@ Dimnames :List of 2
  .. .. ..$ : NULL
  .. .. ..$ : NULL
 $ df              : num [1:2] 6 49.3
 $ hmat            :Formal class 'gchol.bdsmatrix' [package "bdsmatrix"]
with 6 slots
  .. ..@ blocksize: int [1:97] 1 1 1 1 1 1 1 1 1 1 ...
  .. ..@ blocks   : num [1:97] 1.87 1.68 2.12 2.47 1.61 ...
  .. ..@ rmat     : num [1:102, 1:5] -0.1885 0.0659 -0.2205 -0.0816
-0.1502 ...
  .. ..@ rank     : int 102
  .. ..@ Dim      : int [1:2] 102 102
  .. ..@ Dimnames :List of 2
  .. .. ..$ : NULL
  .. .. ..$ : NULL
 $ iter            : num [1:2] 10 54
 $ control         :List of 6
  ..$ eps        : num 1e-08
  ..$ toler.chol : num 1.82e-12
  ..$ iter.max   : num 20
  ..$ inner.iter : num 5
  ..$ sparse.calc: num 1
  ..$ optpar     :List of 2
  .. ..$ method : chr "BFGS"
  .. ..$ control:List of 1
  .. .. ..$ reltol: num 1e-05
 $ u               : num [1:102] 2.70e-05 2.02e-05 1.48e-05 -1.61e-05
1.78e-05 ...
 $ means           : num [1:5] 0.45 0.307 0.444 0.148 0.206
 $ scale           : num [1:5] 0.495 0.425 0.494 0.252 0.328
 $ linear.predictor: num [1:189] -1.313 -1.313 -1.754 -1.443 -0.597 ...
 $ n               : num [1:2] 99 189
 $ terms           :Classes 'terms', 'formula' length 3 Surv(age_sym1,
sym1) ~ sex + lifedxm * sex
  .. ..- attr(*, "variables")= language list(Surv(age_sym1, sym1), sex,
lifedxm)
  .. ..- attr(*, "factors")= int [1:3, 1:3] 0 1 0 0 0 1 0 1 1
  .. .. ..- attr(*, "dimnames")=List of 2
  .. .. .. ..$ : chr [1:3] "Surv(age_sym1, sym1)" "sex" "lifedxm"
  .. .. .. ..$ : chr [1:3] "sex" "lifedxm" "sex:lifedxm"
  .. ..- attr(*, "term.labels")= chr [1:3] "sex" "lifedxm" "sex:lifedxm"
  .. ..- attr(*, "specials")=Dotted pair list of 2
  .. .. ..$ strata : NULL
  .. .. ..$ cluster: NULL
  .. ..- attr(*, "order")= int [1:3] 1 1 2
  .. ..- attr(*, "intercept")= num 1
  .. ..- attr(*, "response")= int 1
  .. ..- attr(*, ".Environment")=<environment: R_GlobalEnv> 
 $ formulaList     :List of 2
  ..$ fixed :Class 'formula' length 3 Surv(age_sym1, sym1) ~ sex +
lifedxm * sex
  .. .. ..- attr(*, ".Environment")=<environment: R_GlobalEnv> 
  ..$ random:List of 1
  .. ..$ : language, mode "(": (1 | famid)
 $ na.action       :Class 'omit'  Named int [1:3] 27 101 102
  .. ..- attr(*, "names")= chr [1:3] "27" "101" "102"
 $ y               : Surv [1:189, 1:2] 16.13+ 19.33+ 16.55+ 19.37+  5.77
21.51   6.18  10.47  16.46+ 19.95+ ...
  ..- attr(*, "dimnames")=List of 2
  .. ..$ : chr [1:189] "1" "2" "3" "4" ...
  .. ..$ : chr [1:2] "time" "status"
  ..- attr(*, "type")= chr "right"
 $ call            : language coxme(formula = Surv(age_sym1, sym1) ~ sex
+ lifedxm * sex +      (1 | famid), data = bip.surv)
 $ ties            : chr "efron"
 - attr(*, "class")= chr "coxme"


1> summary(fit1.full)
                 Length Class           Mode     
coefficients       2    -none-          list     
frail              1    -none-          list     
penalty            1    -none-          numeric  
loglik             3    -none-          numeric  
variance           1    bdsmatrix       S4       
df                 2    -none-          numeric  
hmat               1    gchol.bdsmatrix S4       
iter               2    -none-          numeric  
control            6    -none-          list     
u                102    -none-          numeric  
means              5    -none-          numeric  
scale              5    -none-          numeric  
linear.predictor 189    -none-          numeric  
n                  2    -none-          numeric  
terms              3    terms           call     
formulaList        2    -none-          list     
na.action          3    omit            numeric  
y                378    Surv            numeric  
call               3    -none-          call     
ties               1    -none-          character




-- 
Christopher David Desjardins
PhD student, Quantitative Methods in Education
MS student, Statistics
University of Minnesota
192 Education Sciences Building
http://cddesjardins.wordpress.com



More information about the R-help mailing list