Fast Cox PH regression Robust variance is default variance with the summary.

phreg(formula, data, offset = NULL, weights = NULL, ...)

Arguments

formula

formula with 'Surv' outcome (see coxph)

data

data frame

offset

offsets for cox model

weights

weights for Cox score equations

...

Additional arguments to lower level funtions

Details

influence functions (iid) will follow numerical order of given cluster variable so ordering after $id will give iid in order of data-set.

Author

Klaus K. Holst, Thomas Scheike

Examples

data(TRACE)
dcut(TRACE) <- ~.
out1 <- phreg(Surv(time,status==9)~vf+chf+strata(wmicat.4),data=TRACE)
out2 <- phreg(Event(time,status)~vf+chf+strata(wmicat.4),data=TRACE)
## tracesim <- timereg::sim.cox(out1,1000)
## sout1 <- phreg(Surv(time,status==1)~vf+chf+strata(wmicat.4),data=tracesim)
## robust standard errors default 
summary(out1)
#> 
#>     n events
#>  1878    958
#> coeffients:
#>     Estimate     S.E.  dU^-1/2 P-value
#> vf  0.452306 0.136473 0.111038   9e-04
#> chf 0.931822 0.074226 0.074650   0e+00
#> 
#> exp(coeffients):
#>     Estimate   2.5%  97.5%
#> vf    1.5719 1.2030 2.0540
#> chf   2.5391 2.1954 2.9367
#> 
#> 
out1 <- phreg(Surv(time,status!=0)~vf+chf+strata(wmicat.4),data=TRACE)
summary(out2)
#> 
#>     n events
#>  1878    970
#> coeffients:
#>     Estimate     S.E.  dU^-1/2 P-value
#> vf  0.455201 0.135555 0.110436   8e-04
#> chf 0.903063 0.073354 0.073780   0e+00
#> 
#> exp(coeffients):
#>     Estimate   2.5%  97.5%
#> vf    1.5765 1.2087 2.0563
#> chf   2.4671 2.1368 2.8486
#> 
#> 

par(mfrow=c(1,2))
bplot(out1)
## bplot(sout1,se=TRUE)

## computing robust variance for baseline
rob1 <- robust.phreg(out1)
bplot(rob1,se=TRUE,robust=TRUE)


## making iid decomposition of regression parameters
betaiiid <- lava::iid(out1)

## making iid decomposition of baseline at a specific time-point
Aiiid <- mets:::IIDbaseline.phreg(out1,time=30)