stanE {drcarlate} | R Documentation |
Compute the Estimated Standard Error of the Input Estimator
Description
stanE Computes the estimated standard error of the input estimator.
Usage
stanE(muY1, muY0, muD1, muD0, A, S, Y, D, tauhat, stratnum = NULL)
Arguments
muY1 |
A nx1 vector of hat{mu}^Y(A=1)s. |
muY0 |
A nx1 vector of hat{mu}^Y(A=0)s. |
muD1 |
A nx1 vector of hat{mu}^D(A=1)s. |
muD0 |
A nx1 vector of hat{mu}^D(A=0)s. |
A |
A nx1 vector. Each of its elements is the treatment assignment of the corresponding observation. |
S |
A nx1 vector. Each of its elements is the stratum of corresponding observation. |
Y |
A nx1 vector. Each of its elements is the observed outcome of interest of corresponding observation. |
D |
A nx1 vector. Each of its elements is is a binary random variable indicating whether the individual i received treatment (Di = 1) or not (Di = 0) in the actual study. |
tauhat |
A scalar. LATE estimate. |
stratnum |
A scalar. Number of stratum. |
Value
A scalar. The estimated standard deviation in Jiang et al. (2022).
References
Jiang L, Linton O B, Tang H, Zhang Y. Improving estimation efficiency via regression-adjustment in covariate-adaptive randomizations with imperfect compliance [J]. 2022.
Examples
DGP <- FuncDGP(dgptype = 1, rndflag = 1, n = 200, g = 4, pi = c(0.5,0.5,0.5,0.5))
muY1 <- DGP[["Y1"]]
muY0 <- DGP[["Y0"]]
muD1 <- DGP[["D1"]]
muD0 <- DGP[["D0"]]
A <- DGP[["A"]]
S <- DGP[["S"]]
Y <- DGP[["Y"]]
D <- DGP[["D"]]
tauhat <- tau(muY1, muY0, muD1, muD0, A, S, Y, D)
stanE(muY1, muY0, muD1, muD0, A, S, Y, D, tauhat)