1
$\begingroup$

I'm given the least squares model:

Y = B0 + B1x1 + B2x2 + B3x1x2
Y = 12 -2x1 + 7x2 +5x1x2

n = 20

as well as some RSS's

> sum( lm( y ~ 1 )$residuals^2 )                                  #$ (to fix display bug)
[1] 456 
> sum( lm( y ~ x1 )$residuals^2 )                                 #$
[1] 320 
> sum( lm( y ~ x2 )$residuals^2 )                                 #$
[1] 360 
> sum( lm( y ~ x1 + x2 )$residuals^2 )                            #$
[1] 288 
> sum( lm( y ~ x1 + x2 + I(x1*x2) )$residuals^2 )                 #$
[1] 240

So, I know the least squares estimate for B3 is 5.

I did ANOVA on the full model versus the model where B3 = 0. I found the F statistic for B3 = 0 to be 3.2.

Now I need to find a 95% confidence interval for B3. I'm not sure where to go from here.

$\endgroup$
5
  • 2
    $\begingroup$ The F-statistics you found there should be useful. Try to calculate the p-value of this ANOVA test. The resultant p-value should also be the p-value of the interaction term in your model 5. Now, you have the p-value and the point estimate, and you know that regression coefficients are tested with t-statistics, and you also know the df is 1... you should be able to deduct what the standard error of the interaction term is. $\endgroup$ Oct 17, 2013 at 23:17
  • 1
    $\begingroup$ why not look at the output of summary(lm(y ~ x1 + x2 + I(x1*x2))) for the standard error? Also, the I() is unnecessary. $\endgroup$
    – ndoogan
    Oct 17, 2013 at 23:48
  • 1
    $\begingroup$ @ndoogan +1, but the * operator in R formulas includes the main effects, while : represents the interaction-only. That is the formula y ~ x1*x2 is equivalent to y ~ x1 + x2 + x1:x2 $\endgroup$
    – Glen_b
    Oct 18, 2013 at 2:25
  • 1
    $\begingroup$ ?confint will generate one from the model (though it's easy by hand from the output, as ndoogan suggests). $\endgroup$
    – Glen_b
    Oct 18, 2013 at 2:27
  • 1
    $\begingroup$ @Glen_b you are exactly right. However, if the main effects are already present in the formula, the x1*x2 notation will not re-add them. $\endgroup$
    – ndoogan
    Oct 18, 2013 at 13:05

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.