Inconsistent b0 in linear regression between Jamovi and R
Posted: Wed Mar 13, 2019 9:29 pm
Hi,
I was comparing Jamovi with R and I find a striking difference of the intercept when I do a linear model,
Say I have:
"Picture",30
"Picture",35
"Picture",45
"Picture",40
"Picture",50
"Picture",35
"Picture",55
"Picture",25
"Picture",30
"Picture",45
"Picture",40
"Picture",50
"Real Spider",40
"Real Spider",35
"Real Spider",50
"Real Spider",55
"Real Spider",65
"Real Spider",55
"Real Spider",50
"Real Spider",35
"Real Spider",30
"Real Spider",50
"Real Spider",60
"Real Spider",39
Jamovi is giving me:
Predictor Estimate SE t p
Intercept 43.50 2.08 20.90 < .001
Group:
Real Spider – Picture 7.00 4.16 1.68 0.107
But R,
With:
m1 <- lm(Anxiety ~ Group, data=spiderLong)
summary(m1)
R version 3.5.0 (2018-04-23) -- "Joy in Playing"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
> m1 <- lm(Anxiety ~ Group, data=spiderLong)
> summary(m1)
Call:
lm(formula = Anxiety ~ Group, data = spiderLong)
Residuals:
Min 1Q Median 3Q Max
-17.0 -8.5 1.5 8.0 18.0
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 40.000 2.944 13.587 3.53e-12 ***
GroupReal Spider 7.000 4.163 1.681 0.107
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 10.2 on 22 degrees of freedom
Multiple R-squared: 0.1139, Adjusted R-squared: 0.07359
F-statistic: 2.827 on 1 and 22 DF, p-value: 0.1068
Why the intercept is giving 40 in one case and 43.5 in the other??
Thanks for any hint!
José
I was comparing Jamovi with R and I find a striking difference of the intercept when I do a linear model,
Say I have:
"Picture",30
"Picture",35
"Picture",45
"Picture",40
"Picture",50
"Picture",35
"Picture",55
"Picture",25
"Picture",30
"Picture",45
"Picture",40
"Picture",50
"Real Spider",40
"Real Spider",35
"Real Spider",50
"Real Spider",55
"Real Spider",65
"Real Spider",55
"Real Spider",50
"Real Spider",35
"Real Spider",30
"Real Spider",50
"Real Spider",60
"Real Spider",39
Jamovi is giving me:
Predictor Estimate SE t p
Intercept 43.50 2.08 20.90 < .001
Group:
Real Spider – Picture 7.00 4.16 1.68 0.107
But R,
With:
m1 <- lm(Anxiety ~ Group, data=spiderLong)
summary(m1)
R version 3.5.0 (2018-04-23) -- "Joy in Playing"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
> m1 <- lm(Anxiety ~ Group, data=spiderLong)
> summary(m1)
Call:
lm(formula = Anxiety ~ Group, data = spiderLong)
Residuals:
Min 1Q Median 3Q Max
-17.0 -8.5 1.5 8.0 18.0
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 40.000 2.944 13.587 3.53e-12 ***
GroupReal Spider 7.000 4.163 1.681 0.107
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 10.2 on 22 degrees of freedom
Multiple R-squared: 0.1139, Adjusted R-squared: 0.07359
F-statistic: 2.827 on 1 and 22 DF, p-value: 0.1068
Why the intercept is giving 40 in one case and 43.5 in the other??
Thanks for any hint!
José