Arnaud Trollé
2011-Jul-26 12:15 UTC
[R] How to compare two residual variances coming from two independent simple regression analyses ?
Hello, I'd like to compare the predictive power of two independent simple regression models, which relate to data sets with different numbers of points (n1 and n2). I think I could use a F-test to compare both residual variances, but I don't know whether it's a good idea or not. To my opinion, the numbers of degrees of freedom for the F-test would be respectively the number of degrees of freedom of the greater residual variance (in the numerator of the F-statistic), e.g. n1-2, and the number of degrees of freedom for the smaller residual variance (in the denominator of the F-statistic), e.g. n2-2 ; but I'm not sure about what quantities to put in the numerator and the denominator of the F-statistic. Indeed, for two sample variances, the formula to calculate the F-statistic would be (n1*s1²/(n1-1))/(n2*s2²/(n2-1)), with s1 and s2 being sample variances, but what happens when variances are residual variances coming from two independent simple regression analyses ? Is there any function in R that would enable me to perform this kind of test ? Could anyone help me to solve these issues ? Thank you in advance, Scoubi. [[alternative HTML version deleted]]