Essentially after performing regression on three variables,
$$ y = a_0 + a_1 \cdot x_1 + a_2 \cdot x_2 + a_3 \cdot x_3 $$
I want to find variance for $a_1+a_2$ to get CI. Logically, I think I can do
$$\text{Var}(a_1+a_2)=\text{Var}(a_1)+\text{Var}(a_2)+\text{Cov}(a_1,a_2)$$
and calculate covariance of two normals because from the model results I'd know mean and variance of $a_1$ and $a_2$, and they are asymptotically normally distributed.
- I'm stuck at how to get covariance of two normal RV. Any guidance?
- Is there a simple code to calculate this in python or R?