Fits the BPPO model to time-to-event data.
Usage
bppo(
formula,
degree = NULL,
data,
approach = c("mle", "bayes"),
dist = NULL,
baseline = NULL,
...
)Arguments
- formula
a Surv object with time-to-event observations, right censoring status and explanatory terms.
- degree
Bernstein polynomial degree. If omitted, defaults to
ceiling(sqrt(n))forn = nrow(data)(seespbp).- data
a data.frame object.
- approach
Bayesian or maximum likelihood estimation methods, default is approach = "mle".
- dist
optional baseline specification; use
bernstein(m)for the Bernstein polynomial degree.- baseline
optional alias for
dist.- ...
further arguments passed to or from other methods
Examples
library("spsurv")
data("veteran", package = "survival")
#> Warning: data set ‘veteran’ not found
fit <- bppo(Surv(time, status) ~ karno + celltype,
data = veteran
)
summary(fit)
#> Warning: Observed information is indefinite; negative variances are set to NA.
#> Call:
#> bppo(formula = Surv(time, status) ~ karno + celltype, data = veteran,
#> approach = "mle", model = "po", degree = 12)
#>
#> Bernstein PO model (degree = 12):
#> Regression coefficients:
#> Estimate 2.5% 97.5% Std. Error z value Pr(>|z|)
#> karno -0.0602 -0.0770 -0.0434 0.0086 -7.0 2e-12 ***
#> celltypesmallcell 1.2792 0.4198 2.1386 0.4385 2.9 0.004 **
#> celltypeadeno 1.4389 0.5075 2.3704 0.4752 3.0 0.002 **
#> celltypelarge 0.1240 -0.7909 1.0389 0.4668 0.3 0.791
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Exponentiated coefficients:
#> Estimate 2.5% 97.5%
#> karno 0.94 0.93 1.0
#> celltypesmallcell 3.59 1.52 8.5
#> celltypeadeno 4.22 1.66 10.7
#> celltypelarge 1.13 0.45 2.8
#>
#> ---
#> loglik = -709 AIC = 1450