Dear Anna,

Please keep the mailing list in cc.

Yes, you need a new variable with the sampled area. offset() is adding the variable to model while fixing the parameter to 1. So a simple poisson regression glm(Y  ~ offset(log(Area)) + X, family = poisson) would follow this equation.

log(E[Y]) = 1 * log(Area) + b0 + b1 * X + error

or

log(E[Y]) - log(Area) = b0 + b1 * X + error

log(A) - log(B) = log(A / B)

so you are modeling E[Y] / Area. In your case the original counts divided by the samples area = density (number per unit of area)

You can have a random effect for each zone in each lake (1|Lake:Zone) in combination with Zone as a fixed effect, provided that you have sampled multiple zones in most of the lakes.

The Richness model looks similar, assuming that the number of species per area is something meaningful.

Best regards,


ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium
+ 32 2 525 02 51
+ 32 54 43 61 85
Thierry.Onkelinx@inbo.be<mailto:Thierry.Onkelinx@inbo.be>
www.inbo.be<http://www.inbo.be/>

To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey

Van: Belyaeva Anna [mailto:belyaevaanna@hotmail.com]
Verzonden: maandag 26 augustus 2013 13:27
Aan: ONKELINX, Thierry
Onderwerp: RE: [R-sig-ME] lmer function 40 lakes 3 lake zone

Dear Thierry,

Thank you very much for your answer. I just started working with regressions and I have several consequent questions.
There is 15 time difference in the sediment area sampled by 2 different samplers.
Do I need to create a new column with sampled area for each sample? I am not sure howoffset works.
Can I have Zone as a random effect (1|Lake:Zone), when I already used Zone as a fixed effect.
Can I  use the same offset in the models with Richness as the dependent variable? How would model for Richness look?

Sincerely,
Anna
________________________________
From: belyaevaanna@hotmail.com<mailto:belyaevaanna@hotmail.com>
To: thierry.onkelinx@inbo.be<mailto:thierry.onkelinx@inbo.be>
Subject: RE: [R-sig-ME] lmer function 40 lakes 3 lake zone
Date: Mon, 26 Aug 2013 18:13:34 +0800
Dear Thierry,

Thank you very much for answer.
Do you mean I should use or
> From: Thierry.ONKELINX@inbo.be<mailto:Thierry.ONKELINX@inbo.be>
> To: belyaevaanna@hotmail.com<mailto:belyaevaanna@hotmail.com>; r-sig-mixed-models@r-project.org<mailto:r-sig-mixed-models@r-project.org>
> Subject: RE: [R-sign-ME] lmer function 40 lakes 3 lake zone
> Date: Mon, 26 Aug 2013 09:51:58 +0000
>
> Dear Anna,
>
> Use the original counts and add the log(Area) as an offset term. You might want to add the Zone to the fixed effects and maybe its interaction with sediment as well.
>
> glmer(OrignalCounts ~ offset(log(Area)) + Sediment * Zone + (1|Lake) + (1|Lake:Zone), family = poisson, data = ch2)
>
> Best regards,
>
> ir. Thierry Onkelinx
> Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest
> team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
> Kliniekstraat 25
> 1070 Anderlecht
> Belgium
> + 32 2 525 02 51
> + 32 54 43 61 85
> Thierry.Onkelinx@inbo.be<mailto:Thierry.Onkelinx@inbo.be>
> www.inbo.be<http://www.inbo.be>
>
> To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of.
> ~ Sir Ronald Aylmer Fisher
>
> The plural of anecdote is not data.
> ~ Roger Brinner
>
> The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data.
> ~ John Tukey
>
>
> -----Oorspronkelijk bericht-----
> Van: r-sig-mixed-models-bounces@r-project.org<mailto:r-sig-mixed-models-bounces@r-project.org> [mailto:r-sig-mixed-models-bounces@r-project.org] Namens Belyaeva Anna
> Verzonden: maandag 26 augustus 2013 3:23
> Aan: r-sig-mixed-models@r-project.org<mailto:r-sig-mixed-models@r-project.org>
> Onderwerp: [R-sig-ME] lmer function 40 lakes 3 lake zone
>
> Hello all,
> I study benthos from 40 lakes. Each lake was divided into 3 different lake zones based on light penetration formula: Littoral, Sublittoral, Profundal. 5 random sediment samples were taken from the littoral, 5 random samples from sublittoral, 25 random samples profundal. Sediment type and organisms' counts and richness(count of species) was recorded for each sample.
> To complicate more, 2 different types of equipment were used. Littoral and Sublittoral zones were sampled with large-area heavy sampler, but the deepest part of the lake was sampled with small area sampler. I do not know if different type of equipment should figured in the model since all organisms counts were calculated as per sq/m.
> I want to see if there is the sediment effect on total organism counts (or richness) if lake and zone are taken into account. I would consider the Lake to be the random effect. Zone seems to be meaningful; communities within lake zones are very different from each other, but comparable between lakes. Zone in one lake is comparable to lake Zone in different lake. Zone might be random or fixed effect. Zone by itself the very strongly explains variation. There is one sediment type for each sample. There is different number of samples per zone within the lake.
> I think that it is RCBD design. Would you agree?
> Total is the count of invertebrates - Poisson distribution. Sediment has 6 categories. Total I have ~1500 samples.
> lmer(Total ~ Sediment+(1|Lake)+(1|Lake:Zone),family=poisson(link = "log"), na.action=na.omit,data=ch2)
> Sincerely,Anna
> [[alternative HTML version deleted]]
>
> * * * * * * * * * * * * * D I S C L A I M E R * * * * * * * * * * * * *
> Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is door een geldig ondertekend document.
> The views expressed in this message and any annex are purely those of the writer and may not be regarded as stating an official position of INBO, as long as the message is not confirmed by a duly signed document.
* * * * * * * * * * * * * D I S C L A I M E R * * * * * * * * * * * * *
Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is door een geldig ondertekend document.
The views expressed in this message and any annex are purely those of the writer and may not be regarded as stating an official position of INBO, as long as the message is not confirmed by a duly signed document.

	[[alternative HTML version deleted]]

