Fits the BPPH model to time-to-event data.
bpph(formula, degree, data, approach = c("mle", "bayes"), ...)
formula | a Surv object with time to event observations, right censoring status and explanatory terms. |
---|---|
degree | Bernstein polynomial degree. |
data | a data.frame object. |
approach | Bayesian or maximum likelihood estimation methods, default is approach = "mle". |
... | further arguments passed to or from other methods |
An object of class `spbp`.
library("spsurv") data("veteran") fit <- bpph(Surv(time, status) ~ karno + factor(celltype), data = veteran)#>summary(fit)#> Bernstein Polynomial based Proportional Hazards model #> Call: #> spbp.default(formula = Surv(time, status) ~ karno + factor(celltype), #> degree = degree, data = veteran, approach = "mle", model = "ph") #> #> n= 137, number of events= 128 #> #> coef exp(coef) se(coef) z Pr(>|z|) #> karno -0.03102 0.96946 0.00516 -6.01 1.9e-09 *** #> factor(celltype)smallcell 0.73615 2.08788 0.25280 2.91 0.0036 ** #> factor(celltype)adeno 1.13996 3.12665 0.29342 3.89 0.0001 *** #> factor(celltype)large 0.32982 1.39072 0.27605 1.19 0.2322 #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> Likelihood ratio test= 59.9 on 4 df, p=3e-12 #> Wald test = 62.1 on 4 df, p=1e-12