Description Usage Arguments Value Author(s) Examples
simulate the sample path of the CoxSEI model with given covariate process values, and excitation function and order of autodependence in the excitation term.
1 2 3 4 5 6 7 8 |
parreg |
the regression parameter |
parg |
parameters of the excitation function |
lmd0 |
the baseline intensity function |
g |
the excitation function |
censor |
the censoring time |
m |
order of autoregression in the excitation component of the intensity process |
trace |
whether to trace the data generation process; defaults to |
Z |
a function to calculate the covariate values at a specified event time |
A data frame with provided covariate values and the censoring time, and the generated event times.
Feng Chen <feng.chen@unsw.edu.au>
1 2 3 4 5 6 7 8 9 10 11 12 13 | n.smp <- 100;
z <- matrix(NA,n.smp,3)
for(i in 1:n.smp)
z[i,] <- round(c(runif(1,0.5,1.5),runif(1,1.5,2.5),rbinom(1,1,0.5)),2)
dat <- coxseisim(1:3*0.2,c(0.07,10),censor=rlnorm(1,0,0.1),m=2,
Z=function(x)matrix(z[1,],length(x),3,byrow=TRUE))
dat$id <- 1;
for(i in 2:n.smp){
dattmp <- coxseisim(1:3*0.2,c(0.07,10),censor=rlnorm(1,0,0.1),m=2,
Z=function(x)matrix(z[i,],length(x),3,byrow=TRUE))
dattmp$id <- i;
dat <- rbind(dat,dattmp)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.