Hi Mark,
to have independent random effects I think you have to move to the library
gamm4 which rely on lme4.
Then, I think you may try to specify your model approximately like this:

mdl <- gamm(logchl ~s(t,bs="cc",k=n.tknots), random= ~ (1|pixel) +
(1|season), data=dat)

I'm not completely sure it works, but it may be worth to try

Best
Valerio

On Fri, Nov 2, 2012 at 10:23 AM, Mark Payne <markpayneatwork@gmail.com>wrote:

> Hi,
>
> I am having some problems with specifying my model with gamm in the mgcv
> package that I'm sure someone here can answer easily.. The model is
> basically a cyclic seasonal cycle (chlorophyll measurements), with random
> effects to account for interannual  ("season") and spatial ("pixel")
> variability.  I currently have the model setup in mgcv::gam as:
>
> mdl <- gam(logchl ~s(t,bs="cc",k=n.tknots)  + s(pixel,bs="re") +
> s(season,bs="re"),
>                     data=dat)
>
> I would like to move this over to gamm, so that I can introduce
> correlations between the "season" random effects (which are clearly
> correlated). However, this doesn't seem to be working quite as intended. I
> specify the gamm call as:
>
> mdl <- gamm(logchl ~s(t,bs="cc",k=n.tknots),
>                        random=list(pixel=~1,season=~1))
>
> However, when I do this, I end up with season  nested inside the pixel
> random effect (ie "season %in% pixel %in% g" and "pixel %in% g"), whereas
> in fact I would like them to be independent of each other ("season %in% g"
> and "pixel %in% g"). How should I specify the random argument to achieve
> this?
>
> A second question:
>
> I would like to have an AR1 structure in the season random-effect, but the
> problem is that I don't always have data for every season i.e. there are
> gaps in the sequence. What is the best way to achieve this?
>
> Best wishes,
>
> Mark
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>

	[[alternative HTML version deleted]]

