eif_additive_se: Estimate the standard error of the efficient estimators under...

Description Usage Arguments Value Examples

View source: R/eif_additive.R

Description

The standard errors can be used for both eif_additive and waq under correct specification of the additive model.

Usage

1
eif_additive_se(X, p, xf = NULL, d2_logf = NULL, n = NULL, ...)

Arguments

X

numeric vector, the outcomes of the control observations. (Or a separate sample of observations from the same distribution as the control observations.)

p

numeric between 0 and 1, the fraction of the sample that is treated.

xf

numeric vector, points at which the density is given in d2_logf. If xf is NULL but d2_logf is supplied, it is assumed that the density was estimated at each points in X.

d2_logf

numeric vector, (estimates of) the second derivative of the log density of the control observations X. If d2_logf is null, the density (and its derivatives) of X is estimated using estimate_density_d_logs.

n

integer, the sample size. Defaults to length(X)/(1-p).

...

additional arguments passed on estimate_density_d_logs for density estimation.

Value

the estimated standard error of the efficient additive treatment effect estimators.

Examples

1
2
3
4
5
6
# draw a random sample of observations
X <- rexp(n=1000, rate=2)
# standard error assuming half of the estimation sample is control
eif_additive_se(X=X,p=0.5)
# standard error assuming there are 2000 control and 200 treated in the estimation sample
eif_additive_se(X=X,p=200/(2000+200),n=2000+200)

michaelpollmann/parTreat documentation built on Dec. 21, 2021, 5:58 p.m.