Hello, I have two gamm question (I am using gamm in mgcv). 1. In have, say 5 time series. Monthly data, 20 year. The 5 time series are from 5 stations. The data are in vectors, so I have fitted something along the lines of: tmp<-gamm(Y ~ s(Year,by=station1)+s(Year,by=station2)+ s(Year,by=station3)+s(Year,by=station4)+ s(Year,by=station5)+ factor(station)*factor(month), correlation=corAR1(form=~MyTime|station), famliy=gaussian) station is just a long vector with ones, twos, threes, fours and fives. MyTime defines the order of time (and has values 1 to 240) This model fits a Year smoother on each station and, and has one auto-regressive parameter (whihc is about 0.3). How woul I allow for 5 different AR1 parameters (one per station)? So far so good. It runs..and get the output. The problem is that the errors from station 1 are correlated with those of station 2 (as they are close in space). Same holds for other stations. The cross-correlation is about 0.5. How do I build in this between-station correlation? So..I have within station auto-correlation (dealt by the AR1 parameter), and between station correlation. Question 2: Why is Simon Wood using in his 2006 book only ML estimation and not REML? I thought that REML was used to compare models with different random components and ML estimation models with different fixed components? Kind regards, Piet Bell
--------------------------------- [[alternative HTML version deleted]] ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.