matplot(venice[["year"]], venice[,-1], xlab="Year", ylab="Sea level (cm)")
y = as.matrix(venice[,paste("r",1:10,sep="")])
fit1 = vgam(y ~ s(year, df=3), gumbel(R=365, mpv=TRUE),
data=venice, trace=TRUE, na.action=na.pass)
head(fitted(fit1))
par(mfrow=c(2,1), xpd=TRUE)
plot(fit1, se=TRUE, lcol="blue", llwd=2, slty="dashed")
par(mfrow=c(1,1), bty="l", xpd=TRUE, las=1)
qtplot(fit1, mpv=TRUE, lcol=c(1,2,5), tcol=c(1,2,5),
llwd=2, pcol="blue", tadj=0.1)
Run the code above in your browser using DataLab