CoxModelFit

CoxModelFit[{e1,,en}]
constructs a model of the baseline hazard for events times .

CoxModelFit[{{{ξ11,,ξ1p},,{ξn1,,ξnp}},{e1,,en}},{f1,,fm},{x1,,xp}]
constructs a Cox model of the form , where the depend on the .

Details and OptionsDetails and Options

  • CoxModelFit is used in survival, reliability, and duration analysis. It quantifies relative survival risk and estimates an underlying baseline hazard.
  • CoxModelFit returns a symbolic CoxModel object to represent the proportional hazards model it constructs. The properties and diagnostics of the model can be obtained from model["property"].
  • A list of available model properties can be obtained using model["Properties"].
  • The form of events follows the form used in EventData.
  • CoxModelFit produces a conditional hazard function proportional to the baseline hazard function .
  • The model is semiparametric, with parameters found by maximizing a partial likelihood. The baseline hazard is estimated using nonparametric methods.
  • A null model that only estimates can be specified using CoxModelFit[e], which is equivalent to CoxModelFit[{ξ,e},{},{x1,,xp}].
  • Constant values specified in the basis functions are ignored in the fitting and absorbed in the estimation of the baseline hazard .
  • The following tables of properties pertain to the estimates, diagnostics, and testing of the parametric components of the model.
  • Properties related to data and the fitted function obtained using model["property"] include:
  • "BaselineList"list containing baseline covariate levels for each stratum
    "BasisFunctions"list of basis functions
    "BestFitParameters"parameter estimates
    "Data"the matrix of covariate input data
    "EventData"the event input data
    "RelativeRisk"relative risk for the model parameters
    "StrataModels"list containing submodels for each stratum
    "StrataSummary"list containing name and count pairings for each stratum
  • Properties that measure goodness of fit include:
  • "AIC"Akaike information criterion
    "BIC"SchwartzBayes information criterion
    "LogLikelihood"model log likelihood
    "MaxRSquared"maximum possible coefficient
    "RSquared"pseudo coefficient of determination
  • Types of residuals and influence measures:
  • "BetaDifferences"DFBETAs measure of influence on parameter values
    "CoxSnellResiduals"CoxSnell type residuals
    "DevianceResiduals"scaled Martingale residuals
    "MartingaleResiduals"estimate of the excess number of events over time
    "ScaledBetaDifferences"DFBETAs computed using the model standard deviation
    "SchoenfeldResiduals"Schoenfeld-type residuals
    "ScoreResiduals"score residuals
  • Properties and diagnostics for parameter estimates include:
  • "CovarianceMatrix"covariance estimate for model parameters
    "InformationMatrix"information matrix for model parameters
    "LikelihoodRatioStatistic"likelihood ratio of fitted model to the null model
    "ParameterConfidenceIntervals"confidence intervals about the parameter estimates
    "ParameterStandardErrors"standard errors of model parameters
    "ParameterTable"table of fitted parameter information
    "ParameterTableEntries"entries in the parameter table
    "RelativeRiskConfidenceIntervals"confidence intervals about relative risk estimates
    "RiskScores"risk scores for each observation
    "ScoreStatistic"score statistic comparing fitted and null models
    "TestTable"table of signficance information for model parameters
    "TestTableEntries"entries from the test table
    "TestTableEntriesFunction"entries from table created with test table function
    "TestTableFunction"creates a test table under a specified null hypothesis
    "WaldStatistic"Wald statistic comparing fitted and null models
  • As in SurvivalModelFit, it is possible to obtain information about the nonparametric component of the model , including estimates of survival probabilities, survival confidence intervals, and moment estimates.
  • CoxModelFit has all of the properties available to SurvivalModelFit.
  • Properties related to are specified as in SurvivalModelFit, but additionally require that the covariate level be given as .
  • Different functional forms of the hazard rate for covariate levels can be obtained by specifying the form h in . The following forms can be used.
  • "CDF"cumulative distribution function
    "CHF"cumulative hazard function
    "SF"survival function
  • The value of the fitted function h from CoxModelFit at a particular point t and covariate levels can be found from . gives the form h of the baseline hazard .
  • Specifying Normal[model] gives a pure function form of .
  • CoxModelFit takes the following options:
  • ConfidenceLevel95/100level to use for intervals and bands
    ConfidenceRangeAllrange for simultaneous confidence bands
    ConfidenceTransform"LogLog"confidence transform to use
    MethodAutomaticmethod to use for model fitting
    NominalVariablesNonevariables considered as categorical
    StrataVariablesNonevariables considered as strata
    WorkingPrecisionAutomaticprecision used in internal computations
  • With ConfidenceLevel->p, probability-p confidence intervals and bands are computed for the various functional forms and parameter estimates.
  • ConfidenceRange->{tmin,tmax} gives probability-p simultaneous confidence intervals and bands for the fitted function between and .
  • Possible settings for ConfidenceTransform include , , , , , or a pure function g.
  • The setting Method->m specifies the method for handling ties. Possible settings include the following.
  • "Breslow"use Breslow's partial likelihood
    "Efron"use Efron's partial likelihood
    "Exact"use the exact marginal likelihood
  • By default, the method is used for handling ties.
  • Additional method settings can be found in the options section of examples.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Fit a Cox proportional hazards model to some data with right-censored event times:

In[1]:=
Click for copyable input
In[3]:=
Click for copyable input

Summarize parameter estimates:

In[4]:=
Click for copyable input
Out[4]=

Survival estimates at each covariate level:

In[5]:=
Click for copyable input
Out[5]=

Test overall model significance:

In[6]:=
Click for copyable input
Out[6]=
Introduced in 2012
(9.0)