ProportionalHazards Class |
Namespace: Imsl.Stat
The ProportionalHazards type exposes the following members.
Name | Description | |
---|---|---|
![]() | ProportionalHazards | Constructor for ProportionalHazards.
|
Name | Description | |
---|---|---|
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetCaseStatistics | Returns the case statistics for each observation.
|
![]() | GetClassValueCounts | Returns the number of values taken by each classification variable.
|
![]() | GetClassValues | Returns the class values taken by each classification variable.
|
![]() | GetGradient | Returns the inverse of the Hessian times the gradient vector,
computed at the initial estimates.
|
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetHessian | Returns the inverse of the Hessian of the negative of the log-likelihood,
computed at the initial estimates.
|
![]() | GetInitialEstimates | Gets the initial parameter estimates.
|
![]() | GetLastUpdates | Gets the last parameter updates.
|
![]() | GetMeans | Returns the means of the design variables.
|
![]() | GetParameterStatistics | Returns the parameter estimates and associated statistics.
|
![]() | GetStratumNumbers | Returns the stratum number used for each observation.
|
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | GetVarianceCovarianceMatrix | Returns the estimated asymptotic variance-covariance matrix of the parameters.
|
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | SetClassVarColumns | Sets the column indices of x that are the classification variables.
|
![]() | SetInitialEstimates | Sets the initial parameter estimates.
|
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
![]() | CensorColumn | The column index of x containing the
optional censoring code for each observation.
|
![]() | ConstantColumn | The column index of x containing the constant to be added
to the linear response.
|
![]() | ConvergenceTol | The convergence tolerance.
|
![]() | FrequencyColumn | The column index of x containing the frequency of
response for each observation.
|
![]() | HessianOption | The boolean used to indicate whether or not to compute the Hessian
and gradient at the initial estimates.
|
![]() | Logger |
Returns the logger object and enables logging.
|
![]() | MaxClass | The upper bound used on the sum of the number of distinct values found among
the classification variables in x.
|
![]() | MaximumLikelihood | Returns the maximized log-likelihood.
|
![]() | MaxIterations | The maximum number of iterations allowed.
|
![]() | NumberOfCoefficients | Returns the number of estimated coefficients in the model.
|
![]() | NumberRowsMissing | The number of rows of data in x that contain
missing values in one or more columns of x.
|
![]() | ResponseColumn | The column index of x containing the
response time for each observation.
|
![]() | StratumColumn | The column index of x containing the stratum number
for each observation.
|
![]() | StratumRatio | The ratio at which a stratum is split into two strata.
|
![]() | TiesOption | The method used for handling ties.
|
Class ProportionalHazards computes parameter estimates and other statistics in Proportional Hazards Generalized Linear Models. These models were first proposed by Cox (1972). Two methods for handling ties are allowed. Time-dependent covariates are not allowed. The user is referred to Cox and Oakes (1984), Kalbfleisch and Prentice (1980), Elandt-Johnson and Johnson (1980), Lee (1980), or Lawless (1982), among other texts, for a thorough discussion of the Cox proportional hazards model.
Let represent the hazard rate
at time t for observation number i with covariables
contained as elements of row vector
. The basic
assumption in the proportional hazards model (the proportionality
assumption) is that the hazard rate can be written as a product of a
time varying function
, which depends
only on time, and a function
, which depends
only on the covariable values. The function
used in ProportionalHazards is given as
where
is a fixed constant assigned to the observation, and b is a
vector of coefficients to be estimated. With this function one obtains
a hazard rate
. The form of
is
not important in proportional hazards models.
The constants may be known theoretically.
For example, the hazard rate may be proportional to a known length or
area, and the
can then be determined from this
known length or area. Alternatively, the
may
be used to fix a subset of the coefficients
(say,
) at specified values. When
is used in this way, constants
are used, while the remaining coefficients in
are free to vary in the optimization
algorithm. Constants are defined as 0.0 by default. If user-specified
constants are desired, use the ConstantColumn property to
specify which column contains the constant.
With this definition of , the
usual partial (or marginal, see Kalbfleisch and Prentice (1980))
likelihood becomes
where denotes the set of indices of
observations that have not yet failed at time
(the risk set),
denotes the time of failure
for the i-th observation,
is the total
number of observations that fail. Right-censored observations (i.e.,
observations that are known to have survived to time
, but for which no time of failure is known) are
incorporated into the likelihood through the risk set
. Such observations never appear in the numerator of the
likelihood. When TiesOption is set to
BreslowsApproximate (the default), all observations that are
censored at time
are not included in
, while all observations that fail at time
are included in
.
If it can be assumed that the dependence of the hazard rate upon
the covariate values remains the same from stratum to stratum, while
the time-dependent term, , may be
different in different strata, then ProportionalHazards allows
the incorporation of strata into the likelihood as follows. Let
k index the m strata (set with StratumColumn).
Then, the likelihood is given by
In ProportionalHazards, the log of the likelihood is
maximized with respect to the coefficients .
A quasi-Newton algorithm approximating the Hessian via the matrix of
sums of squares and cross products of the first partial derivatives is
used in the initial iterations. When the change in the log-likelihood
from one iteration to the next is less than 100 times the convergence
tolerance, Newton-Raphson iteration is used. If, during any iteration,
the initial step does not lead to an increase in the log-likelihood,
then step halving is employed to find a step that will increase the
log-likelihood.
Once the maximum likelihood estimates have been computed, the
algorithm computes estimates of a probability associated with each
failure. Within stratum k, an estimate of the probability that
the i-th observation fails at time
given the risk set
is given by
A diagnostic "influence" or "leverage" statistic is computed for each noncensored observation as:
Influence statistics are not computed for censored observations.
A "residual" is computed for each of the input observations according to methods given in Cox and Oakes (1984, page 108). Residuals are computed as
where is the number of tied failures
in group k at time
. Assuming that
the proportional hazards assumption holds, the residuals should
approximate a random sample (with censoring) from the unit exponential
distribution. By subtracting the expected values, centered residuals
can be obtained. (The j-th expected order statistic from the
unit exponential with censoring is given as
where h is the sample size, and censored observations are not included in the summation.)
An estimate of the cumulative baseline hazard within group k is given as
The observation proportionality constant is computed as
Note that one can use logging to generate intermediate output for this class. Accumulated levels of detail correspond to Fine, Finer, and Finest logging levels with Fine yielding the smallest amount of information and Finest yielding the most. The levels of output yield the following:
Level | Output |
---|---|
Fine | Logging is enabled, but observational statistics are not printed. |
Finer | All output statistics are printed. |
Finest | Tracks progress through internal methods. |