fit_cox {mfp2}R Documentation

Function that fits Cox proportional hazards models

Description

Function that fits Cox proportional hazards models

Usage

fit_cox(
  x,
  y,
  strata,
  weights,
  offset,
  control,
  method,
  rownames,
  nocenter,
  fast = TRUE
)

Arguments

x

a matrix of predictors excluding intercept with nobs observations.

y

a Surv object.

strata, control, rownames, nocenter

passed to survival::coxph.fit().

weights

a numeric vector of length nobs of 'prior weights' to be used in the fitting process.

offset

a numeric vector of length nobs of of a priori known component to be included in the linear predictor during fitting.

method

a character string specifying the method for tie handling. See survival::coxph().

fast

a logical which determines how the model is fitted. The default TRUE uses fast fitting routines (i.e. survival::coxph.fit()), while FALSEuses the normal fitting routines (survival::coxph()) (used for the final output of mfp2).

Value

A list with the following components:


[Package mfp2 version 1.0.0 Index]