coxseiest: Function to estimate the parametric part of the Cox...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/coxseiest.R

Description

Estimate the parametric part of the CoxSEI model using (conditionally) right-censored counting process data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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))

Arguments

dat

a data frame with columns Y containing the censored event times of each individual process arranged in ascending order with the last time always being the the censoring time, delta containing the event time indicator with value indicator an event time and 0 a censoring time, id specifying the id (process number) of each event time recorded, and the others giving the value of the associated covariate process at the corresponding event times.

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 TRUE, print some summary information while the optimization routine is running.

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)

Details

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.

Value

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

Note

the excitation function has to contain exactly two parameters; a feature that does not seem desiable and might change later.

Author(s)

Feng Chen <feng.chen@unsw.edu.au>

References

Feng Chen and Kani Chen. (2014). Modeling Event Clustering Using the m-Memory Cox-Type Self-Exciting Intensity Model. International Journal of Statistics and Probability. 3(3): 126-137. doi:10.5539/ijsp.v3n3p126 URL: http://dx.doi.org/10.5539/ijsp.v3n3p126

Feng Chen and Kani Chen. (2014). Case-cohort analysis of clusters of recurrent events. 20(1): 1-15. doi: 10.1007/s10985-013-9275-3

See Also

See optim for the components of the returned value

Examples

1
2
3
4
5
6
7
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))

coxsei documentation built on Feb. 8, 2020, 9:07 a.m.