
i
i
“K23166” — 2015/1/28 — 9:35 — page 66 — #92
i
i
i
i
i
i
66 CHAPTER 5. COMMON STATISTICAL PROCEDURES
where a value of 0 for linkstatus indicates that the observation was censored, not observed,
at the time recorded in dayslink.
> library(survival)
> survobj = survdiff(Surv(dayslink, linkstatus) ~ treat,
data=ds)
> print(survobj)
Call:
survdiff(formula = Surv(dayslink, linkstatus) ~ treat, data = ds)
n=431, 22 observations deleted due to missingness.
N Observed Expected (O-E)^2/E (O-E)^2/V
treat=0 209 35 92.8 36.0 84.8
treat=1 222 128 70.2 47.6 84.8
Chisq= 84.8 on 1 degrees of freedom, p= 0
> names(survobj)
[1] "n" "obs" "exp" "var" "chisq"
[6] "na.action" "call" ...