| double.slice {censorSIR} | R Documentation |
double slice both censored data and un-censored data.
double.slice(y, delta, x, n.slice1, n.slice0)
y |
survival time |
delta |
censor indicator, 0 means censored, 1 means not |
x |
data matrix of predictors, each column in one predictor |
n.slice0 |
number of slices for censored data |
n.slice1 |
number of slices for uncensored data |
values |
the eigen values of eigen decomposition |
vectors |
the eigen vectors of eigen decomposition |
need to run cen.sir to further find dimension reduction directions of lifetime
Wei Sun sunwei@stat.ucla.edu
Ker-chau Li, Jane-ling Wang and Chun-Hou Chen (1999) Dimension reduction for censored regression data. The Annals of Statistics 27, 1-23.
# --- set up parameters --- n.slice = 10; n.slice1 = 5; n.slice0 = 5; h = 0.2; c = 0.05; N = 300; # --- generate data --- id = c(1:N); x1 = rnorm(N,0,1); x2 = rnorm(N,0,1); x3 = rnorm(N,0,1); x4 = rnorm(N,0,1); x5 = rnorm(N,0,1); x6 = rnorm(N,0,1); x = cbind(x1,x2,x3,x4,x5,x6); err1 = rnorm(N,0,0.1); err2 = runif(N,0,0.1); # survival time is only related with x1 Y0 = 4 - abs(x1-1) + err1; # censor time is related with x1-x3 C = 3 + err2; C[x1<=0 | x2+x3<=0] = 10 y = pmin(Y0,C); delta= y; delta[(Y0 <= C)] = 1; delta[(Y0 > C)] = 0; # --- double-slicing --- ds = double.slice(y, delta, x, n.slice1, n.slice0); ds plot.3d.sir(ds) joint.edrs = edr.n(ds, 2); # --- find sir direction --- sir = cen.sir(y, delta, x, n.slice, joint.edrs, h, c) sir