We can see there is a good correlation between GDP per capita and EFI. Unsurprisingly, richer countries have a higher degree of freedom. This correlation remains strong and statistically significant at p 0.001.
summary(fit <- lm(Score ~ log(GDP_pc), data = efi2))
##
## Call:
## lm(formula = Score ~ log(GDP_pc), data = efi2)
##
## Residuals:
## Min 1Q Median 3Q Max
## -27.004 -3.869 1.074 4.487 19.358
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 8.1717 4.4695 1.828 0.0694 .
## log(GDP_pc) 5.7028 0.4743 12.024 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 7.317 on 161 degrees of freedom
## Multiple R-squared: 0.4731, Adjusted R-squared: 0.4699
## F-statistic: 144.6 on 1 and 161 DF, p-value: < 2.2e-16