coxseiest {coxsei} | R Documentation |
Estimate the parametric part of the CoxSEI model using (conditionally) right-censored counting process data.
coxseiest(dat, par.init, m = 2, mit = 1000, tr = TRUE, method = "L-BFGS-B", lower=c(rep(-Inf,ncol(dat)-3),-Inf,0), upper=rep(Inf,ncol(dat)-3 + 2), gfun = function(x, pa) { ifelse(x <= 0, rep(0, length(x)), pa[1] * exp(-pa[2] * x)) }) coxseiest2(dat, par.init, m = 2, mit = 1000, tr = TRUE, method = "L-BFGS-B", lower=c(rep(-Inf,ncol(dat)-3),-Inf,0), upper=rep(Inf,ncol(dat)-3 + 2), gfun = function(x, pa) { ifelse(x <= 0, rep(0, length(x)), pa[1] * exp(-pa[2] * x)) }) coxseiest3(dat, par.init, m = 2, mit = 1000, tr = TRUE, method = "L-BFGS-B", lower=c(rep(-Inf,ncol(dat)-3),-Inf,0), upper=rep(Inf,ncol(dat)-3 + 2))
dat |
a data frame with columns |
par.init |
init guess of the value of the parameters to start the optimization iteration with. |
m |
order of "autoregression" of the excitation term. |
mit |
maximum number of iteration in the optimization routine |
tr |
if set to |
method |
method of optimization |
lower |
vector of lower boundary values of the parameter space |
upper |
vector of upper boundary of the parameter space |
gfun |
the excitation function. Defaults to the exponential decay function g(t;γ)=γ_1 γ_2 \exp (-γ_2 t) |
coxseiest
uses only R code; coxseiest2
uses external C
code, and is expected to be 3~4 times fasters than the former;
coxseiest3
assumes the excitation function is the exponential
function as defaulted by the former two, and hardwares it in the C
side of the code, and therefore is much faster than the former two
when the exponential excitation function is desired.
A list as that returned by the call to the optimizer routine. For instance,
par |
gives the estimate of the parameters |
hessian |
gives the inverse of the estimate of the variance-covariance matrix |
the excitation function has to contain exactly two parameters; a feature that does not seem desiable and might change later.
Feng Chen <feng.chen@unsw.edu.au>
coxsei paper
See optim
for the components of the returned value
data("dat") ## this takes over 15 minutes ##est0 <- coxseiest(dat,par.init=c(0.2,0.4,0.6,0.6,5)) ## this one takes about 4 minutes ##est1 <- coxseiest2(dat,par.init=c(0.2,0.4,0.6,0.6,5)) ## this one takes about 10 seconds est2 <- coxseiest3(dat,par.init=c(0.2,0.4,0.6,0.6,5))