cen.sir {censorSIR}R Documentation

estimate SIR direction of survival time

Description

estimate SIR direction, given estimation of joint e.d.r space from double slicing function double.slice

Usage

cen.sir(y, delta, x, n.slice, joint.edrs, h, c = 0.05)

Arguments

y survival time
delta censor indicator, 0 means censored, 1 means not
x data matrix of predictors, each column in one predictor
n.slice number of slices in SIR
joint.edrs the matrix specify joint e.d.r. space
h bin-width used to calculate the kernel function
c the lower bound of estimation of conditional survival fucntion It is needed for stability since inverse of conditional survival fucntion is used in estimation

Details

Value

values the eigen values of eigen decomposition
vectors the eigen vectors of eigen decomposition

Note

In general, this function needs the input from double slicing (double.slice)

Author(s)

Wei Sun sunwei@stat.ucla.edu

References

Ker-chau Li, Jane-ling Wang and Chun-Hou Chen (1999) Dimension reduction for censored regression data. The Annals of Statistics 27, 1-23.

See Also

double.slice

Examples

# --- 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 = runif(N,0,1);
err2 = runif(N,0,1);
Y0   = -log(err1)/exp(x1); # survival time is only related with x1
C    = -log(err2)/exp(x2); # censor time is only related with x2
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);
joint.edrs  = edr.n(ds, 2);

# --- find sir direction ---
sir = cen.sir(y, delta, x, n.slice, joint.edrs, h, c)
sir
plot(sir, 1, TRUE)
plot.3d.sir(ds, which = 1:2, angles = 60, z.plane = NULL, logY = TRUE)

[Package censorSIR version 1.0 Index]