Learn R Programming

spsurv (version 1.1.0)

bpph: Bernstein PH Model

Description

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

Usage

bpph(
  formula,
  degree = NULL,
  data,
  approach = c("mle", "bayes"),
  dist = NULL,
  baseline = NULL,
  ...
)

Value

An object of class spbp, including component degree.

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)) for n = nrow(data) (see spbp).

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

See Also

spbp, bppo and bpaft for other BP based models.

Examples

Run this code

library("spsurv")
data("veteran", package = "survival")

fit <- bpph(Surv(time, status) ~ karno + factor(celltype),
  data = veteran
)

summary(fit)

Run the code above in your browser using DataLab