spbp: The BP Based Semiparametric Survival Analysis Function
# S3 method for default
spbp(
formula,
degree,
data,
approach = c("mle", "bayes"),
model = c("ph", "po", "aft"),
priors = list(beta = c("normal(0,2)"), gamma = c("lognormal(0,4)"), frailty =
c("gamma(0.01,0.01)")),
cores = .spbp_default_cores(),
scale = TRUE,
dist = NULL,
baseline = NULL,
verbose = FALSE,
chains = 4,
...
)An object of class spbp. Component degree records the
Bernstein polynomial degree used in the fit (also stored in call$degree).
a Surv object with time to event, status and explanatory terms
Bernstein polynomial degree (integer). If omitted and neither
dist nor baseline supplies bernstein(m), the
default is ceiling(sqrt(n)) where n is the number of rows in
data.
a data.frame object
Bayesian or Maximum Likelihood estimation methods; default is "mle"
Bernstein PH ("ph"), PO ("po"), or AFT ("aft") model; default is "ph"
prior settings for the Bayesian approach; `normal` or `cauchy` for beta; `lognormal` or `loglogistic` for gamma (BP coefficients). Defaults are normal(0,2) for standardised regression coefficients and lognormal(0,4) for Bernstein coefficients.
number of core threads to use (Bayes sampling)
logical; indicates whether to center and scale the data
optional baseline specification; use bernstein(m) for the Bernstein polynomial degree
optional alias for dist
passed to Stan
number of MCMC chains (Bayes)
further arguments passed to rstan::optimizing (MLE) or
rstan::sampling (Bayes), e.g. iter, warmup, init.
Right-censored survival data are modeled with a Bernstein-polynomial baseline
and regression on covariates. With approach = "mle", parameters are
estimated by Stan's optimizer and approximate inference uses the Hessian when
available. With approach = "bayes", posterior samples are drawn with
NUTS; use summary, tidy.spbp, and glance.spbp
for output. Covariates are centered and scaled when scale = TRUE
(default).
The returned object includes:
coefficientsRegression estimates on the original covariate scale.
bp.paramBernstein baseline coefficients (gamma).
degreePolynomial degree used (also in call$degree).
loglikMLE: intercept-only and full-model log-likelihoods; Bayes: posterior mean pointwise log-likelihoods.
callMatched call with approach, model, and degree.
bpph, bppo, bpaft,
bernstein, summary.spbp