I am running an OLS regression in R from which I get a couple of coefficients. Here's part of the code:
Attacks <- Treat.Terr.Dataset$Attacks[2:30]
Attackslag <- Treat.Terr.Dataset$Attacks[1:29]
TreatmentEffect <- Treat.Terr.Dataset$TreatmentEffect[2:30]
TreatmentEffectlag <- Treat.Terr.Dataset$TreatmentEffect[1:29]
olsreg <- lm(TreatmentEffect ~ TreatmentEffectlag + Attacks + Attackslag)
coeffs<-olsreg$coefficients
And then I would need to calculate: (Attacks + Attackslag) / (1 - TreatmentEffectlag)
. The problem is that I can do this on R by using (coeffs[3] + coeffs[4]) / (1 - coeffs[2])
but the result is a fixed number without any p-value or confidence interval, just as a calculator would show me.
Does anyone know if there is any function I could use to calculate this with a confidence interval?
Editor note
If the target quantity is a linear function of regression coefficients, then the problem reduces to general linear hypothesis testing where exact inference is possible.