2017-11-07 2 views
0

coxme의 혼합 효과 콕스 모델을 얻었으며 결과를 라텍스 테이블에서 추출하려고합니다. 나는 texreg()가 작동하지 않는 것을보고, 다른 대안이 있는지 궁금해.R : 혼합 효과 Cox 모델 (coxme)의 라텍스 출력

+2

'xtable' 패키지를 사용해 보셨습니까? 어쩌면 [이 스레드] (https://stackoverflow.com/questions/7780666/cox-regression-output-in-xtable-choosing-rows-columns-and-adding-a-confidence) 도움이 될 것입니다. – LAP

+0

예,이 유형의 개체에는 적용 할 수 없습니다. – Edu

+1

개체의 각 구성 요소를 추출하고 테이블에서 축소하는 것이 합리적인 해결책 인 것 같습니다. 감사합니다 .LAP – Edu

답변

1

정말이 유형의 문제에 대해 pixiedust 패키지가있는 빗자루를 좋아합니다. Broom은 coxme 객체를 처리하지 않지만 세 번째 패키지 인 ehahelper는 이러한 객체에 대한 함수를 제공합니다. 일단 설치

# install ehahelper, not on cran 
devtools::install_github('junkka/ehahelper') 

가 dataframe에

library(coxme) 
library(ehahelper) 
library(broom) 
fit <- coxme(Surv(y, uncens) ~ trt + (1|center), eortc) 
tidy_fit <- tidy(fit) 
class(tidy_fit) 
[1] "data.frame" 
tidy_fit 
    term estimate std.error statistic p.value conf.low conf.high 
1 trt 0.7086127 0.06424398  11.03  0 0.5826968 0.8345286 

한 번 정리 할, 당신은 xtable을 내보내거나 PDF로 인하 된 문서 내에서 pixiedust 사용할 수 있습니다.

관련 문제