User Tools

Site Tools


c:ma:2016:quiz04_answer

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
c:ma:2016:quiz04_answer [2016/12/26 12:57] hkimscilc:ma:2016:quiz04_answer [2016/12/26 15:37] hkimscil
Line 392: Line 392:
 male을 의미한다. male을 의미한다.
  
-23.+24.
 plot(cats$Bwt,cats$Hwt) plot(cats$Bwt,cats$Hwt)
 +
 +25, 26.
 +> c.lm<-lm(cats$Hwt~cats$Bwt)
 +> summary(c.lm)
 +
 +Call:
 +lm(formula = cats$Hwt ~ cats$Bwt)
 +
 +Residuals:
 +    Min      1Q  Median      3Q     Max 
 +-3.5694 -0.9634 -0.0921  1.0426  5.1238 
 +
 +Coefficients:
 +            Estimate Std. Error t value Pr(>|t|)    
 +(Intercept)  -0.3567     0.6923  -0.515    0.607    
 +cats$Bwt      4.0341     0.2503  16.119   <2e-16 ***
 +---
 +Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
 +
 +Residual standard error: 1.452 on 142 degrees of freedom
 +Multiple R-squared:  0.6466, Adjusted R-squared:  0.6441 
 +F-statistic: 259.8 on 1 and 142 DF,  p-value: < 2.2e-16
 +
 +Bwt는 Hwt에 영향을 미친다고 할 수 있다 (F(1, 142) = 259.8,  
 +p < 0.001). Bwt는 Hwt의 총 분산 중 약 65%를 (0.6466) 설명
 +한다. 
 +
 +27.
 +0.6466
 +
 +28.
 +64.66%
 +
 +29.
 +abline(c.lm,col="red")
 +
 +
 +30, 31.
 +
 +30,31.
 +> st.lm<-lm(st$Murder~st$Population+st$Income+st$Illiteracy)
 +> summary(st.lm)
 +
 +Call:
 +lm(formula = st$Murder ~ st$Population + st$Income + st$Illiteracy)
 +
 +Residuals:
 +    Min      1Q  Median      3Q     Max 
 +-4.7846 -1.6768 -0.0839  1.4783  7.6417 
 +
 +Coefficients:
 +               Estimate Std. Error t value Pr(>|t|)    
 +(Intercept)   1.3402721  3.3694210   0.398   0.6926    
 +st$Population 0.0002219  0.0000842   2.635   0.0114 *  
 +st$Income     0.0000644  0.0006762   0.095   0.9245    
 +st$Illiteracy 4.1109188  0.6706786   6.129 1.85e-07 ***
 +---
 +Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
 +
 +Residual standard error: 2.507 on 46 degrees of freedom
 +Multiple R-squared:  0.5669, Adjusted R-squared:  0.5387 
 +F-statistic: 20.07 on 3 and 46 DF,  p-value: 1.84e-08
 +
 +먼저 F값의 p-value를 통해 통계적으로 유의미한 모델임을 알 수 있다. 즉, 
 +Population, Income, Illiteracy가 Murder에 영향을 주는 것으로 판단
 +할 수 있다 (F(3,46) = 20.07, p < .001). 또한 세개의 독립변수(예측변인)은 
 +종속변인 Murder의 총 분산 중 약 57% (0.5669)를 설명하는데 기여한다. 
 +각 변인의 기여도를 보면 Population과 Illiteracy의 t-value에 해당하느
 +p 값은 0.05보다 작으므로 유의미한 기여를 한다고 판달 할 수 있다. 그러나, 
 +Income의 경우 p 값이 0.9245로 0.05보다 커서 유의미한 기여를 한다고 볼 수 
 +없다.
 +
 +32. 
 +R square = 0.5669
 +종속변인인 Murder의 분산 중 독립변인인 세가지 변인(Population,
 +Income,Illiteracy)으로 인해 설명되는정도라고 볼 수 있다.
  
  
Line 401: Line 477:
  
 23.  23. 
-{{:c:ma:2016/plot_bwt_hwt.jpg}}+{{plot_bwt_hwt.png?400}} 
 +{{plot_bwt_hwt2.png?400}} 
  
c/ma/2016/quiz04_answer.txt · Last modified: 2016/12/26 15:38 by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki