The function rdd_pred
does a simple prediction of the RDD effect
$$RDDeffect= \mu(x, z, D=1) - \mu(x, z, D=0)$$
When there are no covariates (and z is irrelevant in the equation above), this amounts exactly to the usual RDD coefficient,
shown in the outputs, or obtained with rdd_coef
. If there were covariates, and if these covariates were estimated using the
“include” strategy and with different coefficients left and right to the cutoff (i.e.
had argument slope = “separate”), than the RDD effect is also dependent on the value of the covariate(s).
rdd_pred
allows to set the value of the covariate(s) at which to evaluate the RDD effect, by providing a data.frame with
the values for the covariates. Note that the effect can be evaluated at multiple points, if you provide multiple rows of covdata
.
In pressence of covariate-specific RDD effect, one may wish to estimate an average effect. This can be done by setting the argument stat='mean'
.
Weights can additionally be added, with the argument weights
, to obtain a weighted-average of the predictions. Note however that in most cases,
this will be equivalent to provide covariates at their (weighted) mean value, which will be much faster also!
Standard errors, obtained setting the argument se.fit=TRUE
, are computed using following formula:
$$x_i \Omega x_i^{'}$$
where \(\Omega\) is the estimated variance-covariance matrix ( by default \(\sigma^2(X^{'}X)^{-1}\) using vcov
) and
\(x_i\) is the input data (a mix of covdata and input data). If one wishes individual predictions, standard errors are simply obtained
as the square of that diagonal matrix, whereas for mean/sum, covariances are taken into account.