Skip to contents

Fit a semi-parametric model for interval-censored data

Usage

ic_sp2(
  formula,
  data,
  weights,
  subset,
  na.action,
  B = c(0, 1),
  control = ic_sp_control(...),
  model = c("ph", "po"),
  ...
)

ic_sp_ph(
  formula,
  data,
  weights,
  subset,
  na.action,
  B = c(0, 1),
  control = ic_sp_control(...),
  model = c("ph", "po"),
  ...
)

ic_sp_po(
  formula,
  data,
  weights,
  subset,
  na.action,
  B = c(0, 1),
  control = ic_sp_control(...),
  model = c("ph", "po"),
  ...
)

Arguments

formula

A model formula with Surv(l, u, type = 'interval2') response and covariates on the right-hand side. May also contain strata() terms.

data

A data frame containing the variables in the formula, including strata terms.

weights

Optional vector of weights for each observation, or the name of a variable in data containing the weights.

subset

Optional expression indicating a subset of the rows of data to be used in the fit.

na.action

Optional function to handle missing data. Default is na.omit.

B

A vector of length 2 giving the lower and upper bounds for the observation times. Default is c(0, 1).

control

A list of control settings, with defaults created by ic_sp_control().

model

Type of model to fit. Choices are "ph" for proportional hazards and "po" for proportional odds. Default is "ph". This is normally determined by the function aliases ic_sp_ph and ic_sp_po.

...

Additional arguments passed to control.

Value

A list containing the fitted model information, including coefficients, variance-covariance matrix, and other details.