mlreg.fit {eha} | R Documentation |
Called by mlreg
, but a user can call it directly.
mlreg.fit(X, Y, rs, strats, offset, init, max.survs, method = "ML", boot = FALSE, control)
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 "ML" (default) or "MPPL". |
boot |
No. of bootstrap replicates. Defaults to FALSE, i.e., no bootstrapping. |
control |
See coxreg |
See mlreg
for details.
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 sample, if requested on input. |
conver |
TRUE if convergence. |
fail |
TRUE if failure. |
iter |
Number of performed iterations. |
rs
is dangerous to use when NA's are present.
It is the user's responsibility to ensure that indata is sane.
Göran Broström
~put references to the literature/web site here ~
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)) mlreg.fit(X, Surv(time, status), strats = stratum, max.survs = 6, control = list(eps=1.e-4, maxiter = 10, trace = TRUE))