Hi StackExchange community,

I would like to ask how to perform a statistic test on the sum of coefficients in regression analysis in R, possibly using a Wald test.

As per my data, I have the historical price of gold and a dummy variable that represents whether a certain date indicating economic uncertainty or not. The equation is shown below:

Stock Return(t) = α + Gold Return(t) + (Gold Return(t) x Dummy(t)) + e


R(t) = α + β1Xi + β2XiXii + e

I would like to see whether the sum of β1 + β2 is statistically significant, possibly using t-stat and Walt tests.

Thank you very much for your consideration in advance.