Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #################################################################
- # LM Income Pop Pct on Pop GratePct #
- #################################################################
- #What is the correlation coefficient btwn pop growth and inc growth ? -0.2849001
- cor( pop_inc_2$Growth_rate_pct , pop_inc_2$pop_growth_rate_pct )
- str(pop_inc_2)
- lmodel<- lm( pop_inc_2$Income_growth_rate_pct ~ pop_inc_2$pop_growth_rate_pct )
- #The Intercept and the slope
- lmodel$coefficients
- #Intercept Slope
- # 15.444791 -4.176237
- cor(pop_inc_2$Income_growth_rate_pct , pop_inc_2$pop_growth_rate_pct ) # -0.2849001
- summary(lmodel)
- > summary(lmodel)
- Call:
- lm(formula = pop_inc_2$Income_growth_rate_pct ~ pop_inc_2$pop_growth_rate_pct)
- Residuals:
- Min 1Q Median 3Q Max
- -25.0923 -5.5882 0.6319 4.7839 17.0080
- Coefficients:
- Estimate Std. Error t value Pr(>|t|)
- (Intercept) 15.445 2.721 5.676 0.000000884 ***
- pop_inc_2$pop_growth_rate_pct -4.176 2.072 -2.016 0.0497 *
- ---
- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
- Residual standard error: 8.723 on 46 degrees of freedom
- Multiple R-squared: 0.08117, Adjusted R-squared: 0.06119
- F-statistic: 4.064 on 1 and 46 DF, p-value: 0.04968
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement