Looks ok to me, provided that you want averages (on log scale) taken over the
the observed covariate values. If you want variances for the means you could
always do something like the following...
Xa <- model.matrix(~as.factor(year)-1)
Xa <- t(Xa)/colSums(Xa) ## Xa%*%fitted(g1) gives required a
R-help,
Sorry for posting again the same question (dated 26-03-2007) but
all my mails have been sent to the recycle bin without possibility
of recovering and thus I don't know if anyone has answer my query.
Here is the original message:
I'm applying a gam model (package mgcv) to predict
relativ
R-help,
I'm applying a gam model (package mgcv) to predict
relative abundances of a fish species.
The covariates are year, month, vessel and statistical rectangle.
The model looks like this:
g1 <- gam(log(cpue) ~ s(rekt1) + s(year) + s(mon) + s(reg1), data =
dataTest)
Once the model is fitt