!!!GAM 一般化加法モデル(Generalized Additive Model) *非線形な分布を表す一つの曲線を求めようというのでなく、 *分割して、より単純な分布を足したものとしてとらえる。 !!mgcvパッケージ:Mixed GAM Computation Vehicle with Automatic Smoothness Estimation https://cran.r-project.org/web/packages/mgcv/index.html {{pre gam.model <- gam(目的変数 ~ s(変数)+s(変数)+s(変数)+s(変数),data=dat) summary(gam.model) plot(model) }} * 説明変数を s() に入れる ** sはsmooth 平滑化 * オプションで kの値を明示的に設定 ** デフォルトは自動で変数の数に応じて設定される !!gamパッケージ https://cran.r-project.org/web/packages/gam/index.html !!References https://qiita.com/tabintone/items/96afd222d92e876c51d1 https://qiita.com/purple_jp/items/5d138f5652f469dbfe9f https://www.jstage.jst.go.jp/article/jbhmk/34/1/34_1_111/_pdf