Displaying 2 results from an estimated 2 matches for "infctn".
2011 Apr 01
2
Cox Proportional Hazards model with a time-varying covariate
...NFTIM) & INFTIM < RSPTIM, 2, 1))
vitclear <- data.frame(lapply(vitclear, function(x) rep(x, vitclear$CNT)))
vitclear$CNT <- NULL
vitclear <- transform(vitclear,
START = ifelse(!duplicated(PAT), 0, INFTIM),
STOP = ifelse(!duplicated(PAT, fromLast=T), RSPTIM, INFTIM),
INFCTN = ifelse(INFTIM > RSPTIM | is.na(INFTIM), 0, 1))
head(vitclear, 10)
library("survival")
model <- coxph(Surv(START, STOP, STATUS) ~ TRT + DENS + INFCTN, data = vitclear)
summary(model)
SAS CODE:
/*Example 22.2 (Hyalurise in Vitreous Hemorrhage) */
DATA VITCLEAR;
INPUT...
2011 Jun 13
0
Setting up counting process data for survival analysis
...344 -20 1 C 4 .
345 14 0 C 3 . 346 3 1 C 3 .
")
vitclear <- data.frame(scan(connection, na.strings=".",
list(PAT=0, RSPTIM=0, TRT=0, CENTER="", DENS=0, INFTIM=0)))
head(vitclear)
connection <- textConnection("
PAT RSPTIM CENS TRT DENS CENTER T1 T2 INFCTN
101 2 0 1 3 A 0 2 0
101 4 0 1 3 A 2 4 0
101 6 0 1 3 A 4 6 0
101 7 0 1 3 A 6 7 0
101 8 0 1 3 A 7 8 0
101 9 0 1 3 A 8 9 0
101 11 0 1 3 A 9 11 0
101 12 0 1 3 A 11 12 0
101 13 0 1 3 A 12 13 0
101 14 0 1 3 A 13 14 0
101 16 0 1 3 A 14 16 0
101 19 0 1 3 A 16 19 0
101 20 0 1 3 A 19 20 0
101 21 0 1 3 A 20 2...