coxreg
instead.mlreg(formula = formula(data), data = parent.frame(),
na.action = getOption("na.action"), init=NULL, method = c("ML", "MPPL"),
control = list(eps = 1e-08, maxiter = 10, n.points = 12, trace = FALSE),
singular.ok = TRUE, model = FALSE, center = TRUE,
x = FALSE, y = TRUE, boot = FALSE, geometric = FALSE,
rs=NULL, frailty = NULL, max.survs=NULL)
options()$na.action
.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).TRUE
, the intensity is assumed constant
within strata.c("mlreg", "coxreg", "coxph")
with componentsNULL
if not).rs
is dangerous, see note above. It
can however speed up computing time.ML
performs a true discrete analysis, i.e., one parameter
per observed event time. Method MPPL
is a compromize between the
discrete and continuous time approaches; one parameter per observed
event time with multiple events. With no ties in data, an ordinary Cox
regression (as with coxreg
) is performed.coxreg
, risksets
dat <- data.frame(time= c(4, 3,1,1,2,2,3),
status=c(1,1,1,0,1,1,0),
x= c(0, 2,1,1,1,0,0),
sex= c(0, 0,0,0,1,1,1))
mlreg( Surv(time, status) ~ x + strata(sex), data = dat) #stratified model
# Same as:
rs <- risksets(Surv(dat$time, dat$status), strata = dat$sex)
mlreg( Surv(time, status) ~ x, data = dat, rs = rs) #stratified model
Run the code above in your browser using DataLab