Edgar,

Based on the information provided its difficult to thoroughly answer your
question. But I will assume that you have samples within each year, say
weekly or monthly. Based on this I would say that you can treat the years as
a random effect but I dont think that I would do it the way that you have
specified

LMM2 <- lmer(Op_Obj ~ BOAT
+ (1 + BOAT | fYEAR), data=YM, family=gaussian, na.action=na.omit,
verbose=T)

Which tests for a difference in Op_Obj across boats and allowing that
difference to vary from year to year. Instead I think you are interested in
whether Op_Obj (either average or as a function of other predictors
measured) and you want to allow that relationship to vary by both boat and
year. So I would suggest that if you want to allow the relationship to vary
from year to year that you also include boat as a random variable. I believe
the syntax is like this:


LMM2 <- lmer(Op_Obj ~ 1 +(1|BOAT)+(1| fYEAR), data=YM)

Which is basically an anova design where you allow the intercept to vary by
boat and year. If you are interested in covariates you would include them in
place of the 1 on the "fixed" effects side of the model. And if you wanted
to allow their slopes to vary you would include them in place of the 1's on
the "random" effects side of the model.

There always seems to be a good discussion going in the mixed effects
discussion group as to the definition of fixed and random effects and how to
model them (e.g http://andrewgelman.com/2010/12/so-called_fixed/) but I am
curious as to what advice others on this list have.

Cheers,
Chris Parker

On Fri, Aug 19, 2011 at 11:05 AM, Elizabeth Green <bessie.bug@gmail.com>wrote:

>
> On Aug 19, 2011, at 2:00 AM, r-sig-ecology-request@r-**project.org<r-sig-ecology-request@r-project.org>wrote:
>
>
>>  1. Random effects in a linear mix model (Edgar Torres)
>>
>>
> Edgar, the random effects represent the variable that has an effect, but
> not an effect that is likely to be biologically interesting, in this case,
> your fishing vessel. The effects you want to test are the fixed effects, in
> this case time, because you want to see how your variable varies by year,
> accounting for the random effects of the different vessels fishing.
>
> bessie
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~**~~~~~~~~~~~~~~~~~~
> Bessie Green
>  907-388-4496
> http://mercury.bio.uaf.edu/~**elizabeth_green/<http://mercury.bio.uaf.edu/%7Eelizabeth_green/>
>
> ______________________________**_________________
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/**listinfo/r-sig-ecology<https://stat.ethz.ch/mailman/listinfo/r-sig-ecology>
>

	[[alternative HTML version deleted]]

