View source: R/measurement_error_correction.R
ME_correction | R Documentation |
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.
ME_correction(
pi_10,
pi_01,
gamma0,
gamma1,
cor_covar,
indicator,
yast,
covariate
)
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 |
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.
## 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])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.