phreg {eha} | R Documentation |
Parametric Proportional Hazards Regression
Description
Proportional hazards model with parametric baseline hazard(s). Allows for stratification with different scale and shape in each stratum, and left truncated and right censored data.
Usage
phreg(
formula = formula(data),
data = parent.frame(),
na.action = getOption("na.action"),
dist = "weibull",
cuts = NULL,
init,
shape = 0,
param = c("canonical", "rate"),
control = list(eps = 1e-08, maxiter = 20, trace = FALSE),
singular.ok = TRUE,
model = FALSE,
x = FALSE,
y = TRUE
)
Arguments
formula |
a formula object, with the response on the left of a ~ operator, and the terms on the right. The response must be a survival object as returned by the Surv function. |
data |
a data.frame in which to interpret the variables named in the formula. |
na.action |
a missing-data filter function, applied to the model.frame,
after any subset argument has been used. Default is
|
dist |
Which distribution? Default is "weibull", with the alternatives
"ev" (Extreme value), "gompertz", "pch" (piecewise constant hazards
function), "loglogistic" and "lognormal". A special case like the
|
cuts |
Only used with |
init |
vector of initial values of the iteration. Default initial value is zero for all variables. |
shape |
If positive, the shape parameter is fixed at that value (in each stratum). If zero or negative, the shape parameter is estimated. If more than one stratum is present in data, each stratum gets its own estimate. Only relevant for the Weibull and Extreme Value distributions. |
param |
Applies only to the Gompertz distribution: "canonical" is
defined in the description of the |
control |
a list with components |
singular.ok |
Not used. |
model |
Not used. |
x |
Return the design matrix in the model object? |
y |
Return the response in the model object? |
Details
The parameterization is the same as in coxreg
and
coxph
, but different from the one used by
survreg
(which is not a proportional hazards
modelling function). The model is
S(t; a, b, \beta, z) =
S_0((t/b)^a)^{\exp((z-mean(z))\beta)}
where S0 is some standardized survivor function.
Value
A list of class c("phreg", "coxreg")
with components
coefficients |
Fitted parameter estimates. |
cuts |
Cut points for
the "pch" distribution. |
hazards |
The estimated
constant levels in the case of the "pch" distribution. |
var |
Covariance matrix of the estimates. |
loglik |
Vector of length two; first component is the value at the initial parameter values, the second componet is the maximized value. |
score |
The score test statistic (at the initial value). |
linear.predictors |
The estimated linear predictors. |
means |
Means of the columns of the design matrix, except those columns corresponding to a factor level. Otherwise all zero. |
w.means |
Weighted (against exposure time) means of covariates; weighted relative frequencies of levels of factors. |
n |
Number of spells in indata (possibly after removal of cases with NA's). |
n.events |
Number of events in data. |
terms |
Used by extractor functions. |
assign |
Used by extractor functions. |
wald.test |
The Wald test statistic (at the initial value). |
y |
The Surv vector. |
isF |
Logical vector indicating the covariates that are factors. |
covars |
The covariates. |
ttr |
Total Time at Risk. |
levels |
List of levels of factors. |
formula |
The calling formula. |
call |
The call. |
method |
The method. |
convergence |
Did the optimization converge? |
fail |
Did the optimization fail? (Is |
pfixed |
TRUE if shape was fixed in the estimation. |
Warning
The lognormal and loglogistic distributions are included on an experimental basis for the moment. Use with care, results may be unreliable!
The gompertz distribution has an exponentially increasing hazard function
under the canonical parametrization. This may cause instability in the
convergence of the fitting algorithm in the case of near-exponential data.
It may be resolved by using param = "rate"
.
Note
The lognormal and loglogistic baseline distributions are extended to a three-parameter family by adding a "proportionality" parameter (multiplying the baseline hazard function). The log of the estimated parameter turns up as '(Intercept)' in the printed output. The reason for this extension is that the standard lognormal and loglogistic distributions are not closed under proportional hazards.
Author(s)
Göran Broström
See Also
coxreg
, check.dist
,
link{aftreg}
.
Examples
data(mort)
fit <- phreg(Surv(enter, exit, event) ~ ses, data = mort)
fit
plot(fit)
fit.cr <- coxreg(Surv(enter, exit, event) ~ ses, data = mort)
check.dist(fit.cr, fit)