Re: bug in statistical analysis: linear regression



On Mon, 2003-08-18 at 02:28, Christoph Lehmann wrote:
bug in linear regression...see my attached gnumeric file.Sheet number 3,
summary of the linear regression: red background, white letters: 

F Value is wrong : should be 0.9622 instead of #VALUE
second p value is wrong (cannot be > 1) shoud be 0.333 instead of 1.666

Perhaps I am misunderstanding, but the F-value on your sheet is in fact
0.962219. its significance is (incorrectly) #VALUE. THe p-values are
unfortunately completely wrong. 

This has already been fixed in teh 1.1.x branch. You may want to update
to 1.1.19 or 1.1.20 when the latter is released. 
 
Andreas


for comparison, using R:

R-cmdr> RegModel <- lm(V1~V2, data=Dataset)
 
R-cmdr> summary(RegModel)
 
Call:
lm(formula = V1 ~ V2, data = Dataset)
 
Residuals:
    Min      1Q  Median      3Q     Max
-870.36 -275.86  -16.06  191.54  812.94
 
Coefficients:
            Estimate Std. Error t value Pr(>|t|)
(Intercept)  2254.56     415.09   5.432 4.34e-06 ***
V2            -38.60      39.35  -0.981    0.333
---
Signif. codes:  0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
 
Residual standard error: 379.9 on 35 degrees of freedom
Multiple R-Squared: 0.02676,    Adjusted R-squared: -0.001051
F-statistic: 0.9622 on 1 and 35 DF,  p-value: 0.3334
 

R-cmdr> Anova(RegModel)
Anova Table (Type II tests)
 
Response: V1
           Sum Sq Df F value Pr(>F)
V2         138897  1  0.9622 0.3334
Residuals 5052266 35
-- 
Andreas J. Guelzow <aguelzow math concordia ab ca>
Concordia University College of Alberta

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]