modeling question
On Thu, Jan 26, 2017 at 9:38 AM, Joaqu?n Aldabe
<joaquin.aldabe at gmail.com> wrote:
Dear Ben, it's me again
(I don't mind if you cc: me, but this is really a question to the list. Probably better to frame it as "I sent this to the list and Ben Bolker said ...")
with this subject about invertebrate biomass and its possible effect on shorebird density. I have a couple of extra doubts about your recommendations:
You suggested this: (1) The relationship between bird density and invert biomass, as well as the intercept (i.e., expected bird density at invert_biomass=0, or better invert_biomass=<some sensible reference quantity>). I tried a quantity considering the lowest value of the invertebrate biomass variable, but the model did not converge. So I wonder if I should pick this value or a different one?
Hmm, is this with lme or lmer? Can you give more detail? If it's lmer, it's quite likely a false positive.
(2) The relationship might be changing over time? lme(Bird.density~Invertebrate biomass+sample_time, random=~invert_biomass|Plot_identity, data=) How should I treat sample time? Is it a ordered categorical variable?
Depends on a number of things. Your original message suggested that you sampled over the course of 30 days (maybe at different times in different plots?) If this is the case (e.g. you sampled plot 1 on days 1, 5, 9, ... and plot 2 on days 2, 6, 10 ...) then it is probably most sensible to treat time as a numeric variable (i.e., assume a linear trend over days) and possibly a random effect with days as a grouping variable (in which case you might have to switch from lme to lmer). If you have a small number of distinct sample days then a categorical variable makes sense. Whether you specify it as ordered or (default) unordered doesn't affect the overall fit of the model, just the particular contrasts that get tested with respect to the time variable.
Thankyou very much. Joaquin 2017-01-16 19:49 GMT-03:00 Ben Bolker <bbolker at gmail.com>:
Center your biomass variable on this value: either create a mydata$invert_biomass_c <- mydata$invert_biomass-ref_value or include it directly in your formula: bird_dens ~ I(invert_biomass-ref_value), ... On 17-01-16 05:44 PM, Joaqu?n Aldabe wrote:
Thankyou very much Ben. Can you please suggest a way of fixing some
sensible reference quantity for Invertebrate biomass?
All the best,
Joaqu?n
2017-01-16 18:59 GMT-03:00 Ben Bolker <bbolker at gmail.com
<mailto:bbolker at gmail.com>>:
That seems perfectly reasonable. There are a couple of things to
consider, although you may or may not find that your data supports
that much complexity.
(1) The relationship between bird density and invert biomass, as
well
as the intercept (i.e., expected bird density at invert_biomass=0,
or
better invert_biomass=<some sensible reference quantity>)
lme(Bird.density~Invertebrate biomass,
random=~invert_biomass|Plot_identity, data=)
(2) The relationship might be changing over time?
lme(Bird.density~Invertebrate biomass+sample_time,
random=~invert_biomass|Plot_identity, data=)
(3) In principle you could consider random effects of both time and
invert biomass, but that will almost certainly overwhelm your data.
Don't forget to do the standard post-fitting checks: are your
residuals *approximately* equal-variance and (even more
approximately)
Normally distributed? Is the relationship between bird density and
invert biomass *approximately* linear? (See ?plot.lme)
On Mon, Jan 16, 2017 at 2:06 PM, Joaqu?n Aldabe
<joaquin.aldabe at gmail.com <mailto:joaquin.aldabe at gmail.com>> wrote:
> Dear all, I'm interested in modeling the effect of invertebrate
biomass on
> the density of a grassland shorebird (they eat invertebrates). For
this, I
> picked 8 plots and sampled invertebrates and birds 6 times in each
plot for
> about 30 days. This is, I went to each plot and did repeated
measures of
> invertebrates biomass and shorebird density separated in time by
four or
> five days, as invertebrates biomass may change over time and it is
expected
> that birds density change accordingly.
>
> So, I'm trying to see a general pattern of the effect of changes
in biomass
> on the density of this shorebird species at a plot scale. Plot
identity is
> not important; I consider them as particular events of a random
process.
>
> Is this model correct:
>
> lme(Bird.density~Invertebrate biomass, random=~1|Plot_identity,
data=)
>
> Thank you very much,
>
> Joaquin.
>
>
> --
> *Joaqu?n Aldabe*
>
> *Grupo Biodiversidad, Ambiente y Sociedad*
> Centro Universitario de la Regi?n Este, Universidad de la
Rep?blica
> Ruta 15 (y Ruta 9), Km 28.500, Departamento de Rocha
>
> *Departamento de Conservaci?n*
> Aves Uruguay
> BirdLife International
> Canelones 1164, Montevideo
>
> https://sites.google.com/site/joaquin.aldabe
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org
<mailto:R-sig-mixed-models at r-project.org> mailing list
<https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models> -- *Joaqu?n Aldabe* /Grupo Biodiversidad, Ambiente y Sociedad/ Centro Universitario de la Regi?n Este, Universidad de la Rep?blica Ruta 15 (y Ruta 9), Km 28.500, Departamento de Rocha /Departamento de Conservaci?n/ Aves Uruguay BirdLife International Canelones 1164, Montevideo https://sites.google.com/site/joaquin.aldabe <https://sites.google.com/site/perfilprofesionaljoaquinaldabe>
-- Joaqu?n Aldabe Grupo Biodiversidad, Ambiente y Sociedad Centro Universitario de la Regi?n Este, Universidad de la Rep?blica Ruta 15 (y Ruta 9), Km 28.500, Departamento de Rocha Departamento de Conservaci?n Aves Uruguay BirdLife International Canelones 1164, Montevideo https://sites.google.com/site/joaquin.aldabe