Advertisement
JF11579

OncomeGrowth Pct on PopGrow Pct

May 2nd, 2020
1,662
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 1.37 KB | None | 0 0
  1. #################################################################
  2. #      LM Income Pop Pct on Pop GratePct                        #
  3. #################################################################
  4. #What is the correlation coefficient btwn pop growth and inc growth ?  -0.2849001  
  5. cor(  pop_inc_2$Growth_rate_pct , pop_inc_2$pop_growth_rate_pct )
  6. str(pop_inc_2)
  7.  
  8. lmodel<- lm( pop_inc_2$Income_growth_rate_pct  ~ pop_inc_2$pop_growth_rate_pct   )
  9.  
  10. #The Intercept  and the slope
  11. lmodel$coefficients
  12. #Intercept             Slope
  13. # 15.444791            -4.176237
  14.  
  15. cor(pop_inc_2$Income_growth_rate_pct ,  pop_inc_2$pop_growth_rate_pct )  # -0.2849001
  16.  
  17. summary(lmodel)
  18.  
  19. > summary(lmodel)
  20.  
  21. Call:
  22. lm(formula = pop_inc_2$Income_growth_rate_pct ~ pop_inc_2$pop_growth_rate_pct)
  23.  
  24. Residuals:
  25.      Min       1Q   Median       3Q      Max
  26. -25.0923  -5.5882   0.6319   4.7839  17.0080
  27.  
  28. Coefficients:
  29.                               Estimate Std. Error t value    Pr(>|t|)    
  30. (Intercept)                     15.445      2.721   5.676 0.000000884 ***
  31. pop_inc_2$pop_growth_rate_pct   -4.176      2.072  -2.016      0.0497 *  
  32. ---
  33. Signif. codes:  0***0.001**0.01*0.05 ‘.’ 0.1 ‘ ’ 1
  34.  
  35. Residual standard error: 8.723 on 46 degrees of freedom
  36. Multiple R-squared:  0.08117,   Adjusted R-squared:  0.06119
  37. F-statistic: 4.064 on 1 and 46 DF,  p-value: 0.04968
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement