plot 指令

R 中的廣義加法模型(GAM)之非線性建模

Noam Ross

Senior Research Scientist, EcoHealth Alliance

plot 指令

plot(gam_model)
?plot.gam
R 中的廣義加法模型(GAM)之非線性建模

R 中的廣義加法模型(GAM)之非線性建模

選取偏效應

plot(gam_model, select = c(2, 3))
plot(gam_model, pages = 1)
plot(gam_model, pages = 1, all.terms = TRUE)

R 中的廣義加法模型(GAM)之非線性建模

在圖上顯示資料

plot(gam_model, rug = TRUE)

R 中的廣義加法模型(GAM)之非線性建模

在圖上顯示資料(2)

plot(gam_model, residuals = TRUE)

R 中的廣義加法模型(GAM)之非線性建模

在圖上顯示資料(3)

plot(gam_model, rug = TRUE, residuals = TRUE,
     pch = 1, cex = 1)

R 中的廣義加法模型(GAM)之非線性建模

顯示標準誤

plot(gam_model, se = TRUE)

R 中的廣義加法模型(GAM)之非線性建模

顯示標準誤(2)

plot(gam_model, shade = TRUE)

R 中的廣義加法模型(GAM)之非線性建模

顯示標準誤

plot(gam_model, shade = TRUE, shade.col = "lightblue")

R 中的廣義加法模型(GAM)之非線性建模

轉換標準誤

plot(gam_model, seWithMean = TRUE)

R 中的廣義加法模型(GAM)之非線性建模

轉換標準誤(2)

plot(gam_model, seWithMean = TRUE, shift = coef(gam_model)[1])

R 中的廣義加法模型(GAM)之非線性建模

現在來畫幾張圖吧!

R 中的廣義加法模型(GAM)之非線性建模

Preparing Video For Download...