Proportional hazards model with piecewise constant baseline hazard(s). Allows for stratification and left truncated and right censored data.
pchreg(
formula = formula(data),
data = parent.frame(),
na.action = getOption("na.action"),
cuts = NULL,
init,
control = list(eps = 1e-08, maxiter = 20, trace = FALSE),
singular.ok = TRUE,
model = FALSE,
x = FALSE,
y = TRUE
)
A list of class "pchreg"
with components
Fitted parameter estimates.
Cut points (NULL
if no cut points).
The estimated constant levels.
Covariance matrix of the estimates.
Vector of length two; first component is the value at the initial parameter values, the second component is the maximized value.
The score test statistic (at the initial value).
The estimated linear predictors.
Means of the columns of the design matrix, except those columns corresponding to a factor level. Otherwise all zero.
Weighted (against exposure time) means of covariates; weighted relative frequencies of levels of factors.
Number of spells in indata (possibly after removal of cases with NA's).
Number of events in data.
Used by extractor functions.
Used by extractor functions.
The Wald test statistic (at the initial value).
The Surv vector.
Logical vector indicating the covariates that are factors.
The covariates.
Total Time at Risk.
List of levels of factors.
The calling formula.
The call.
The method.
Did the optimization converge?
Did the optimization fail? (Is NULL
if not).
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.
a data.frame in which to interpret the variables named in the formula.
a missing-data filter function, applied to the model.frame,
after any subset argument has been used. Default is
options()$na.action
.
Specifies the points in time where the hazard function jumps. If omitted, an exponential model is fitted.
vector of initial values of the iteration. Default initial value is zero for all variables.
a list with components 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).
Not used.
Not used.
Return the design matrix in the model object?
Return the response in the model object?
Göran Broström
phreg
, coxreg
, link{aftreg}
.
if (FALSE) {
dat <- age.window(oldmort, c(60, 80))
fit <- pchreg(Surv(enter, exit, event) ~ ses.50 + sex,
data = dat, cuts = seq(60, 80, by = 4))
summary(fit)
fit.cr <- coxreg(Surv(enter, exit, event) ~ ses.50 + sex, data = dat)
check.dist(fit.cr, fit, main = "Cumulative hazards")
}
Run the code above in your browser using DataLab