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, center = TRUE)
options()$na.action
.exponential
can be obtained by choosing "weibull"
in combination with shape = 1
, or "pch" without cuts
.dist = "pch"
. Specifies the points in
time where the hazard function jumps. If omitted, an exponential model
is fitted.Gompertz
distribution;
"rate" transforms scale
to 1/log(scale), giving the same
parametrization as in Stata and SAS. The latter thus allows for a
negative rate, or a "cure" (Gompertz) model. The default is
"canonical"; if this results in extremely large scale and/or shape
estimates, consider trying "rate".eps
(convergence
criterion), maxiter
(maximum number of iterations), and
silent
(logical, controlling amount of output). You can
change any component without mention the other(s).c("phreg", "coxreg")
with components
NULL
otherwise.NULL
otherwise.center =
TRUE
. Otherwise all zero.NULL
if not).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"
.
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.If center = TRUE
(default), graphs show the "baseline"
distribution at the
means of (continuous) covariates, and for the reference category in case
of factors (avoiding representing "flying pigs"). If center = FALSE
the baseline distribution is at the value zero of all covariates. It is
usually a good idea to use center = FALSE
in combination with
"precentering" of covariates, that is, subtracting a reference value,
ideally close to the center of the covariate distribution. In that way,
the "reference" will be the same for all subsets of the data.
coxreg
, check.dist
, link{aftreg}
.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)
Run the code above in your browser using DataLab