spbp {spsurv} | R Documentation |
spbp: The BP Based Survival Analysis Function
Description
Semiparametric Survival Analysis Using Bernstein Polynomial
Usage
spbp(formula, ...)
Arguments
formula |
a Surv object with time to event, status and explanatory terms. |
... |
Arguments passed to 'rstan::sampling' (e.g. iter, chains) or 'rstan::optimizing'. |
Details
Fits Bernstein Polynomial based Proportional regression to survival data.
Value
An object of class 'spbp'.
See Also
spbp.default
, bpph
, bppo
, bpaft
, https://mc-stan.org/users/documentation/
Examples
library("spsurv")
data("veteran") ## imports from survival package
fit_mle <- spbp(Surv(time, status) ~ karno + factor(celltype),
data = veteran, model = "po")
summary(fit_mle)
fit_bayes <- spbp(Surv(time, status) ~ karno + factor(celltype),
data = veteran, model = "po", approach = "bayes",
cores = 1, iter = 300, chains = 1,
priors = list(beta = c("normal(0,4)"),
gamma = "lognormal(0,4)"))
summary(fit_bayes)
[Package spsurv version 1.0.0 Index]