Skip to content
Prev 378163 / 398502 Next

SURVDIFF()

On 1/12/19 1:18 AM, Medic wrote:
Read the help page:
So the function is documented to accept a list of variable names, but 
_not_ as accepting a formula. So I read the help page as endorsing your 
first option. Since you didn't include a suitable dataset for testing I 
borrowed the ovarian dataframe and checked to see whether the sum of 
variables submitted with a "+" sign was being calculated and can confirm 
that it is:


 >? coxph(Surv(futime, fustat) ~ age + strata(I(rx+ecog.ps)), data=ovarian)
Call:
coxph(formula = Surv(futime, fustat) ~ age + strata(I(rx + ecog.ps)),
 ??? data = ovarian)

 ?????? coef exp(coef) se(coef)???? z?????? p
age 0.11942?? 1.12684? 0.04528 2.637 0.00836

Likelihood ratio test=9.48? on 1 df, p=0.002073
n= 26, number of events= 12
 >? coxph(Surv(futime, fustat) ~ age + strata( rx+ecog.ps) , data=ovarian)
Call:
coxph(formula = Surv(futime, fustat) ~ age + strata(rx + ecog.ps),
 ??? data = ovarian)

 ?????? coef exp(coef) se(coef)???? z?????? p
age 0.11942?? 1.12684? 0.04528 2.637 0.00836