# Multivariate example
data(venice)
y = as.matrix(venice[,paste("r", 1:10, sep="")])
fit1 = vgam(y[,1:2] ~ s(year, df=3), gev(zero=2:3), venice, trace=TRUE)
coef(fit1, matrix=TRUE)
fitted(fit1)[1:4,]
par(mfrow=c(1,2), las=1)
plot(fit1, se=TRUE, lcol="blue", scol="forestgreen",
main="Fitted mu(year) function (centered)")
with(venice, matplot(year, y[,1:2], ylab="Sea level (cm)", col=1:2,
main="Highest 2 annual sealevels + fitted 95 percentile"))
with(venice, lines(year, fitted(fit1)[,1], lty="dashed", col="blue"))
# Univariate example
data(oxtemp)
(fit = vglm(maxtemp ~ 1, egev, data=oxtemp, trace=TRUE))
fitted(fit)[1:3,]
coef(fit, mat=TRUE)
Coef(fit)
vcov(fit)
vcov(fit, untransform=TRUE)
sqrt(diag(vcov(fit))) # Approximate standard errors
rlplot(fit)
Run the code above in your browser using DataLab