Fits the BPAFT model to time-to-event data.

bpaft(formula, degree, data, approach = c("mle", "bayes"), ...)

Arguments

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

Value

An object of class `spbp`.

See also

spbp, bpph and bppo for other BP based models.

Examples

library("spsurv") data("veteran") fit <- bpaft(Surv(time, status) ~ karno + celltype, data = veteran)
#> Priors are ignored due to mle approach.
summary(fit)
#> Bernstein Polynomial based Accelerated Failure Time model #> Call: #> spbp.default(formula = Surv(time, status) ~ karno + celltype, #> degree = degree, data = veteran, approach = "mle", model = "aft") #> #> n= 137, number of events= 128 #> #> coef exp(coef) se(coef) z Pr(>|z|) #> karno 0.03418 1.03477 0.00376 9.10 < 2e-16 *** #> celltypesmallcell -0.69255 0.50030 0.24480 -2.83 0.00467 ** #> celltypeadeno -0.86926 0.41926 0.24873 -3.49 0.00047 *** #> celltypelarge -0.12498 0.88252 0.26339 -0.47 0.63514 #> --- #> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> #> Likelihood ratio test= 68.4 on 4 df, p=5e-14 #> Wald test = 140 on 4 df, p=<2e-16