spsurv: An R package for semi-parametric survival analysis.
The spsurv package was designed to contribute with a flexible set of semi-parametric survival regression options, including proportional hazards (PH), proportional odds (PO), and accelerated failure time (AFT) models for right-censored data.
The proposed package provides:
Survival classes (PH, PO, AFT) extensions based on a fully likelihood-based approach for either Bayesian or maximum likelihood (ML) estimation procedures,
smooth estimates for the unknown baseline functions based on the Bernstein polynomial (BP),
integration with Stan software aiming more flexibility in terms of user-defined modeling,
six distinct prior specification options in a Bayesian analysis.
install.packages("spsurv")
install.packages("devtools") devtools::install_github("rvpanaro/spsurv")
library("KMsurv") data("larynx") library(spsurv) fit <- bpph(Surv(time, delta) ~ age + factor(stage), model = "ph", data = larynx) summary(fit)
spbp
function:approach
argument:## NUTS sampling (Bayesian)
fit2 <- spbp(Surv(time, delta) ~ age + factor(stage),
approach = "bayes", data = larynx,
iter = 2000, chains = 1, warmup = 1000)
summary(fit2)
See the reference manual for more examples.
Please report issues at https://github.com/rvpanaro/spsurv/issues or mail it to renatovp@ime.usp.br, we will answer as soon as possible.