coxreg.fit {eha}R Documentation

Cox regression

Description

Called by coxreg, but a user can call it directly.

Usage

coxreg.fit(X, Y, rs, strats, offset, init, max.survs,
method = "breslow", boot = FALSE, control)

Arguments

X The design matrix.
Y The survival object.
rs The risk set composition. If absent, calculated.
strats The stratum variable. Can be absent.
offset Offset. Can be absent.
init Start values. If absent, equal to zero.
max.survs Sampling of risk sets? If so, gives the maximum number of survivors in each risk set.
method Either "efron" (default) or "breslow".
boot Number of bootstrap replicates. Defaults to FALSE, no bootstrapping.
control See coxreg

Details

rs is dangerous to use when NA's are present.

Value

A list with components

coefficients Estimated regression parameters.
var Covariance matrix of estimated coefficients.
loglik First component is value at init, second at maximum.
score Score test statistic, at initial value.
linear.predictors Linear predictors.
residuals Martingale residuals.
hazard Estimated baseline hazard. At value zero of 'design' variables.
means Means of the columns of the design matrix.
bootstrap The bootstrap replicates, if requested on input.
conver TRUE if convergence.
fail TRUE if failure.
iter Number of performed iterations.

Note

It is the user's responsibility to check that indata is sane.

Author(s)

Göran Broström

See Also

coxreg, risksets

Examples

 X <- as.matrix(data.frame(
                x=     c(0, 2,1,4,1,0,3),
                sex=   c(1, 0,0,0,1,1,1)))
 time <- c(1,2,3,4,5,6,7)
 status <- c(1,1,1,0,1,1,0)
 stratum <- rep(1, length(time))

 coxreg.fit(X, Surv(time, status), strats = stratum, max.survs = 6,
     control = list(eps=1.e-4, maxiter = 10, trace = FALSE))

[Package eha version 0.96-4 Index]