13
$\begingroup$

I made a model using repeated measures univariate ANOVA in R.

> g <- aov(bis ~ x1 + x2 + bg.sol + x1:x2:I(bg.sol * k1) + Error(subject), coded)
> summary.lm(g$Within)
Call:
NULL

Residuals:
     Min       1Q   Median       3Q      Max 
-24.7459  -4.8055  -0.1518   5.1696  17.6015 

Coefficients:
                     Estimate Std. Error t value Pr(>|t|)    
x1                     3.1170     0.8444   3.691 0.000275 ***
x2                    -1.0906     0.1230  -8.864  < 2e-16 ***
I(bg.sol * k1)         2.0522     1.0216   2.009 0.045645 *  
x1:x2:I(bg.sol * k1)  -0.3191     0.1254  -2.545 0.011543 *  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 

Residual standard error: 7.256 on 246 degrees of freedom
Multiple R-squared: 0.2743, Adjusted R-squared: 0.2654 
F-statistic: 30.99 on 3 and 246 DF,  p-value: < 2.2e-16 

I calculated confidence limit for each estimates. I thought SE * critical value would work. In case of x1 (continuous variable) 95% confidence limit was,

> 0.8444 * qt(0.975, df = 1)
[1] 10.72912

I'm wondering whether the calculated value is real confidence limit for x1. The estimates for x1 is 3.1170, and the limit is 10.72912. Plus-minus it includes zero value. But P-value showed value less than 0.05!

I want to know where I made an error!

$\endgroup$
5
  • 9
    $\begingroup$ The confidence interval for x1 is 3.1170+c(-1,1)*qt(0.975, df=246)*0.8444, or $(1.45,4.78)$. Your only issue is the degrees of freedom in your qt call. $\endgroup$ Commented Aug 25, 2012 at 10:13
  • 5
    $\begingroup$ Hi, @Max, that seems to be the answer. Would you mind making it an official answer (& perhaps elaborating it a little) so we can upvote it & the OP can accept it? $\endgroup$ Commented Aug 25, 2012 at 13:06
  • $\begingroup$ Hi @Max, please do consider posting this as an answer! (Almost four years later, but still.) $\endgroup$
    – amoeba
    Commented May 12, 2016 at 12:55
  • $\begingroup$ @Max Would you mind writing this up into an official answer to close this thread? $\endgroup$ Commented Sep 20, 2016 at 14:08
  • $\begingroup$ @Max, do you want to turn your comment into an answer? $\endgroup$ Commented Nov 6, 2017 at 12:25

1 Answer 1

1
$\begingroup$

As noted in the comments, the issue here was with the degrees of freedom in the calculation of the critical value.

If you had run the anova(·) with the lm() or aov() output, you do indeed have one degree of freedom listed in that row. But that degree of freedom is for the estimate of the variance. The appropriate degrees of freedom for the confidence interval for the effect (i.e., the partial slope of the MR version of the ANOVA) would be the overall model d.f. (which is indeed 246 for this output).

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.