ATE.ERROR.XY {ATE.ERROR} | R Documentation |
ATE.ERROR.XY Function for Estimating Average Treatment Effect (ATE) with Measurement Error in X and Misclassification in Y
Description
The ATE.ERROR.XY
function implements a method for estimating the Average Treatment Effect (ATE) that accounts for both measurement error in covariates and misclassification in the binary outcome variable Y.
Usage
ATE.ERROR.XY(
Y_star,
A,
Z,
X_star,
p11,
p10,
sigma_epsilon,
B = 100,
Lambda = seq(0, 2, by = 0.5),
extrapolation = "linear",
bootstrap_number = 250
)
Arguments
Y_star |
Numeric vector. The observed binary outcome variable, possibly misclassified. |
A |
Numeric vector. The treatment indicator (1 if treated, 0 if control). |
Z |
Numeric vector. A precisely measured covariate vector. |
X_star |
Numeric vector. A covariate vector subject to measurement error. |
p11 |
Numeric. The probability of correctly classified Y given Y = 1. |
p10 |
Numeric. The probability of misclassified Y given Y = 0. |
sigma_epsilon |
Numeric. The covariance matrix Sigma_epsilon for the measurement error model. |
B |
Integer. The number of simulated datasets. |
Lambda |
Numeric vector. A sequence of lambda values for simulated datasets. |
extrapolation |
Character. A regression model used for extrapolation ("linear", "quadratic", "nonlinear"). |
bootstrap_number |
Numeric. The number of bootstrap samples (default is 250). |
Details
The ATE.ERROR.XY
function is designed to handle measurement error in covariates and misclassification in outcomes by using the augmented simulation-extrapolation approach.
Value
A list containing:
- summary
A data frame with the following columns:
-
Naive_ATE
: Naive estimate of the ATE. -
Sigma_epsilon
: The covariance matrix Sigma_epsilon for the measurement error model. -
p10
: The probability of misclassified Y given Y = 0. -
p11
: The probability of correctly classified Y given Y = 1. -
Extrapolation
: A regression model used for extrapolation ("linear", "quadratic", "nonlinear"). -
ATE
: Mean ATE estimate from the bootstrap samples. -
SE
: Standard error of the ATE estimate. -
CI
: 95% confidence interval for the ATE estimate.
-
- boxplot
A ggplot object representing the boxplot of the ATE estimates.
Examples
library(ATE.ERROR)
data(Simulated_data)
Y_star <- Simulated_data$Y_star
A <- Simulated_data$T
Z <- Simulated_data$Z
X_star <- Simulated_data$X_star
p11 <- 0.8
p10 <- 0.2
sigma_epsilon <- 0.1
B <- 100
Lambda <- seq(0, 2, by = 0.5)
bootstrap_number <- 10
result <- ATE.ERROR.XY(Y_star, A, Z, X_star, p11, p10, sigma_epsilon, B, Lambda,
"linear", bootstrap_number)
print(result$summary)
print(result$boxplot)