R_Adj.r.squared - RとLinuxと...

RとLinuxと...


R_Adj.r.squared

Baayen から. 調整済み R2 が大きな値でも,残差からはモデルが適切ではないと判断される例.

残差からモデルは適切ではない
# p.249
alice.g <- alice.growth@data$data
par(mfrow = c(2,2), bg = "white")
plot(log(alice.g$Tokens), log(alice.g$Types)) #
alice.g.lm <- lm( log(alice.g$Types) ~ 
    log(alice.g$Tokens))
abline(alice.g.lm , col = "darkgrey")
r <- round(summary(alice.g.lm)$adj.r.squared,dig = 3)
mtext(substitute(R^2 == r.swap, list(r.swap = r))) 
plot(log(alice.g$Tokens), resid(alice.g.lm))
abline(h= 0)
mtext("Residuals")
z <- zipf.fnc(alice, plot = T)
plot(log(z$rank), log(z$frequency), type = "S")
z.lm <- lm(log(z$frequency) ~ log(z$rank))
abline(z.lm, col= "darkgrey")
r <- round(summary(z.lm)$adj.r.squared,dig = 3)
mtext(substitute(R^2 == r.swap, list(r.swap = r))) 
plot( log(z$rank), resid(z.lm))
abline(h= 0)
mtext("Residuals")
 
添付ファイル: filebaayen248.png 326件 [詳細]
 
Link: R_Baayen(58d) Rの備忘録(1461d) 日録2007_10月(3691d)
Last-modified: 2007-10-08 (月) 14:15:26 (3724d)