c:ms:2023:schedule:w10.lecture.note

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
c:ms:2023:schedule:w10.lecture.note [2023/05/08 01:52] – [R. output] hkimscilc:ms:2023:schedule:w10.lecture.note [2024/05/13 08:54] (current) – [R code] hkimscil
Line 88: Line 88:
 b <- lm.mod2$coefficients[2] b <- lm.mod2$coefficients[2]
 a <- lm.mod2$coefficients[1] a <- lm.mod2$coefficients[1]
 +
 +b
 +
 +
 +# y추정치 y.hat = a + bx 
  
 ggplot(data=df, aes(x,y)) + ggplot(data=df, aes(x,y)) +
Line 105: Line 110:
  
 y.hat <- lm.mod2$fitted.values y.hat <- lm.mod2$fitted.values
 +# 참고로 
 +# y.hat2 <- a + b*x
 +head(y.hat)
 +head(y.hat2)
 +
 y.hat - mean(df$y) y.hat - mean(df$y)
 explained <- y.hat - mean(df$y) explained <- y.hat - mean(df$y)
Line 675: Line 685:
 ====== R. Graph output ====== ====== R. Graph output ======
  
-{{:c:ms:2023:schedule:pasted:20230508-011521.png}} +{{:c:ms:2023:schedule:pasted:20230508-015307.png}} 
-{{:c:ms:2023:schedule:pasted:20230508-012035.png}} +{{:c:ms:2023:schedule:pasted:20230508-015319.png}} 
-{{:c:ms:2023:schedule:pasted:20230508-012048.png}}+{{:c:ms:2023:schedule:pasted:20230508-015331.png}} 
 +{{:c:ms:2023:schedule:pasted:20230508-015343.png}} 
 + 
 + 
 +{{:c:ms:2023:schedule:pasted:20230508-015354.png}} 
 +{{:c:ms:2023:schedule:pasted:20230508-015408.png}} 
 +{{:c:ms:2023:schedule:pasted:20230508-015444.png}} 
 +{{:c:ms:2023:schedule:pasted:20230508-015501.png}} 
 + 
 +############################## 
 + 
 +{{:c:ms:2023:schedule:pasted:20230508-015429.png}} 
  
-{{:c:ms:2023:schedule:pasted:20230508-012105.png}} 
-{{:c:ms:2023:schedule:pasted:20230508-012122.png}} 
-{{:c:ms:2023:schedule:pasted:20230508-012145.png}} 
-{{:c:ms:2023:schedule:pasted:20230508-012200.png}} 
c/ms/2023/schedule/w10.lecture.note.1683478331.txt.gz · Last modified: 2023/05/08 01:52 by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki