Convert coxphw::coxphw into a data.frame
as_df.coxphw.RdConverts a coxphw::coxphw object into a data.frame.
Arguments
- x
A
coxphw::coxphwobject.
See also
coxphw::coxphw
Examples
#----------------------------------------------------------------------------
# as_df.coxphw() examples.
#----------------------------------------------------------------------------
library(bkstat)
library(coxphw)
#> Loading required package: survival
data("gastric")
# weighted estimation of average hazard ratio
fit1 <- coxphw(Surv(time, status) ~ radiation, data = gastric, template = "AHR")
summary(fit1)
#> coxphw(formula = Surv(time, status) ~ radiation, data = gastric,
#> template = "AHR")
#>
#> Model fitted by weighted estimation (AHR template)
#>
#> coef se(coef) exp(coef) lower 0.95 upper 0.95 z
#> radiation 0.4625051 0.2387432 1.588047 0.9945916 2.535608 1.937249
#> p
#> radiation 0.05271492
#>
#> Wald Chi-square = 3.752934 on 1 df p = 0.05271492 n = 90
#>
#> Covariance-Matrix:
#> radiation
#> radiation 0.05699834
#>
#> Generalized concordance probability:
#> concordance prob. lower 0.95 upper 0.95
#> radiation 0.6136 0.4986 0.7172
as_df.coxphw(fit1)
#> predictor coef se.coef. exp.coef. lower.0.95 upper.0.95 z p
#> 1 radiation 0.4625051 0.2387432 1.588047 0.9945916 2.535608 1.937249 0.053