icfit {icpack}R Documentation

Fit a proportional hazards model with baseline hazard modeled by P-splines

Description

Fit a proportional hazards model with baseline hazard modeled by P-splines

Usage

icfit(
  formula,
  data,
  entry,
  lambda = 10,
  nt = 100,
  tmax,
  nseg = 20,
  bdeg = 3,
  pord = 2,
  nit = 50,
  tol = 1e-06,
  tollam = 0.01,
  kappa = 1e-06,
  update_lambda = TRUE,
  ic_update = TRUE,
  monitor = FALSE
)

Arguments

formula

A formula object with response of the left of a ~ operator and covariate terms on the right. The response must be a survival object as returned by the ‘Surv' function, with type either right’, 'counting' or 'interval2'

data

A data frame in which to interpret the variable names in the 'formula'

entry

When appropriate, a vector of entry (left truncation) times, or a string indicating the column name in 'data' containing entry times; only used if Surv object is of type 'interval2'

lambda

Starting value of penalty tuning parameter

nt

The number of time bins

tmax

The end of time domain (default 1.01 times largest observation)

nseg

The number of B-spline segments

bdeg

The degree of the B-splines

pord

The order of the differences used in the penalty

nit

Maximum number of iterations (integer)

tol

Tolerance for final fit

tollam

Tolerance for switching to lambda update

kappa

Ridge parameter (number)

update_lambda

Automatic update of lambda (Boolean)

ic_update

Update risk and event probabilities (Boolean)

monitor

Monitor convergence (Boolean)

Value

An object of class 'icfit'

Examples

# Fit proportional hazards model to interval-censored data
icfit(Surv(left, right, type='interval2') ~ period + gender + age,
      data=drugusers)
# Fit proportional hazards model to right-censored data
icfit(Surv(time, d) ~ Diameter + FIGO + Karnofsky, data = Ova)


[Package icpack version 0.1.0 Index]