coxreg.fit | R Documentation |
Called by coxreg
, but a user can call it directly.
coxreg.fit(
X,
Y,
rs,
weights,
t.offset = NULL,
strats,
offset,
init,
max.survs,
method = "efron",
boot = FALSE,
efrac = 0,
calc.martres = TRUE,
control,
verbose = TRUE,
calc.hazards = NULL,
center = NULL
)
X |
The design matrix. |
Y |
The survival object. |
rs |
The risk set composition. If absent, calculated. |
weights |
Case weights; time-fixed or time-varying. |
t.offset |
Case offset; time-varying. |
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. |
efrac |
Upper limit of fraction failures in 'mppl'. |
calc.martres |
Should martingale residuals be calculated? |
control |
See |
verbose |
Should Warnings about convergence be printed? |
calc.hazards |
Deprecated. See |
center |
Deprecated. See |
rs
is dangerous to use when NA's are present.
A list with components
coefficients |
Estimated regression parameters. |
var |
Covariance matrix of estimated coefficients. |
loglik |
First component is value at |
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 |
|
f.conver |
TRUE if variables converged. |
fail |
|
iter |
Number of performed iterations. |
It is the user's responsibility to check that indata is sane.
Göran Broström
coxreg
, risksets
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.