Learn R Programming

nbpInference (version 1.0.3)

bias.corrected.neyman: Bias-corrected Neyman Sample Average Treatment Effect Estimator

Description

This function estimates the sample average treatment effect for a set of matched pairs using the bias-corrected Neyman estimator, defined in frazier2024bias;textualnbpInference.

Usage

bias.corrected.neyman(Y, Z, pairs, pmat, xi)

Value

I x 2 dataframe

Arguments

Y

a 2I-length vector of outcome values

Z

a 2I-length vector of treatment values

pairs

an I x 2 dataframe containing the indices of observations that form our set of matched pairs. An appropriate pairs dataframe can be formed using the nbp.caliper function.

pmat

a 2I x 2I matrix where the diagonals equal zero, and the off-diagonal elements (i, j) contain the probability the ith observation has Z = max(Z_i, Z_j) and the jth observation has Z = min(Z_i, Z_j). We can create a p-matrix using the make.pmatrix function.A p-matrix can be created using the make.pmatrix function.

xi

a number in the range 0 to 0.5, the cutoff related to the treatment assignment probability caliper.

See Also

Other inference: classic.neyman(), covAdj.variance(), make.pmatrix(), nbp.caliper()

Examples

Run this code
set.seed(12345)
X <- rnorm(100, 0, 5)
Z <- X + rnorm(100, 0, (1+sqrt(abs(X))))
Y <- X + Z + rnorm(100, 0, 0.5)
pmat <- make.pmatrix(Z, X)
pairs <- nbp.caliper(Z, X, pmat, xi = 0.1, M = 10000)
bias.corrected.neyman(Y, Z, pairs, pmat, xi = 0.1)

Run the code above in your browser using DataLab