CalcNumerator: Calculate the numerator in the estimator Yhat.

View source: R/CalcNumerator_function.R

CalcNumeratorR Documentation

Calculate the numerator in the estimator Yhat.

Description

Calculate the numerator in the estimator Yhat.

Usage

CalcNumerator(Ai_j, Xi_j, gamma_numer, alpha, re_alpha, include_alpha = TRUE)

Arguments

Ai_j

A vector of length n_i - 1 including the treatment assignment of all but the unit we are currently considering.

Xi_j

The matrix of covariates for all units in the cluster but the one. This can be the observed values or a counterfactual set of covariates.

gamma_numer

A vector of the numerator coefficients starting with the intercept.

alpha

The average probability of treatment among the n_i - 1 units.

re_alpha

The fixed effect bi that gives average propensity of treatment in the group equal to alpha.

include_alpha

If include_alpha is set to true, the probabilities in the numerator are divided by the specified value of alpha to stabilize the calculation. Defaults to TRUE.


gpapadog/Interference documentation built on Oct. 30, 2022, 9:20 p.m.