R code used at VAPMS Selected Applications of Mathematical Statistics, summer semester 2018/2019.

Class 8

Generalized additive models:
library (mgcv)
attach (cars)
m <- gam (dist ~ s(speed))
plot (m)
m <- gam (dist ~ s(speed), family=poisson)

m <- gam (pm25 ~ s(temp,k=10) + s(wind))
m <- gam (pm25 ~ temp + s(wind))


Created: Tue Dec 1 2015
Last modified: Fri Apr 26 17:22:28 CEST 2019