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.
summary(lm(y ~ x1 + x2 + I(x1*x2)))
for the standard error? Also, theI()
is unnecessary. $\endgroup$*
operator in R formulas includes the main effects, while:
represents the interaction-only. That is the formulay ~ x1*x2
is equivalent toy ~ x1 + x2 + x1:x2
$\endgroup$?confint
will generate one from the model (though it's easy by hand from the output, as ndoogan suggests). $\endgroup$