ME_correction {AFFECT} | R Documentation |
Correction of Measurement Error in Survival time and Censoring Status.
Description
This function aims to correct for measurement error in survival time and
misclassification in censoring status. The key strategy in the function ME_correction
includes regression
calibration for survival time under additive measurement error models and the unbiased conditional expectation
approach for censoring status under misclassification models. With information of parameters in measurement error
models implemented, this function will give outputs with corrected survival time and censoring status.
Usage
ME_correction(
pi_10,
pi_01,
gamma0,
gamma1,
cor_covar,
indicator,
yast,
covariate
)
Arguments
pi_10 |
Misclassifcation probability is P(Observed Censoring Status = 1 | Actual Censoring Status = 0). |
pi_01 |
Misclassifcation probability is P(Observed Censoring Status = 0| Actual Censoring Status = 1). |
gamma0 |
A scalar that links the observed survival time and true survival time in the classical additive
measurement error model |
gamma1 |
A |
cor_covar |
A |
indicator |
A |
yast |
A |
covariate |
A |
Value
correction_data A c(n,2)
data frame. This first column is the corrected survival time, and the
second column is the corrected censoring indicator.
Examples
## generate data with misclassification = 0.9 with n = 500,
## p = 50 and variance of noise term is 0.75. The y* is related
## to the first covariate.
a <- matrix(0,ncol=50, nrow = 1);a[1,1] <- 1
data <- data_gen(n=500, p=50, pi_01 = 0.9, pi_10 = 0.9,
gamma0=1, gamma1=a, e_var=0.75)
## Assume that covariates are independent and
## observed survival time is related to first covariate with
## weight equals 1. And the scalar in the classical additive
## measurement error model is 1 and is classifcation probability = 0.9.
matrixa <- diag(50)
gamma_0 <- 1 ; gamma_1 <- matrix(0,ncol=50, nrow =1); gamma_1[1,1] <- 1
corrected_data1 <- ME_correction(pi_10=0.9,pi_01=0.9,gamma0 = gamma_0,
gamma1 = gamma_1,
cor_covar=matrixa, y=data[,1],
indicator=data[,2], covariate = data[,3:52])