ymat <- as.matrix(venice[, paste("r", 1:10, sep = "")])
fit1 <- vgam(ymat ~ s(year, df = 3), gumbel(R = 365, mpv = TRUE),
data = venice, trace = TRUE, na.action = na.pass)
head(fitted(fit1))
if (FALSE) 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),
lwd = 2, pcol = "blue", tadj = 0.4, ylab = "Sea level (cm)")
qtplot(fit1, perc = 97, mpv = FALSE, lcol = 3, tcol = 3,
lwd = 2, tadj = 0.4, add = TRUE) -> saved
head(saved@post$qtplot$fitted)
Run the code above in your browser using DataLab