ok. These are the models I wrote. I'm attaching the data frame. The
variables mean.biom is the biomass in each count, Trysu_dens is the density
of birds in each count and Plot_name is the id of each plot. Let me know if
I'm not explaining myself adequately.
1) model with random intercept:
m2=lme(Trysu_dens~mean.biom, random=~1|Plot_name, data=try.dens.biom)
2) model with random slope and intercept, centering biomass with the mean
try.dens.biom$mean.biom.c=try.dens.biom$mean.biom-152.46
m2.1=lme(Trysu_dens~mean.biom.c, random=~mean.biom.c|Plot_name,
data=try.dens.biom)
2017-01-26 16:17 GMT-03:00 Ben Bolker <bbolker at gmail.com>:
On 17-01-26 02:11 PM, Joaqu?n Aldabe wrote:
Thanks Ben, I sent all emails to the whole list. See below (in caps lock
for differentiating from the other text). Regards, Joaquin
2017-01-26 15:59 GMT-03:00 Ben Bolker <bbolker at gmail.com
<mailto:bbolker at gmail.com>>:
On Thu, Jan 26, 2017 at 9:38 AM, Joaqu?n Aldabe
<joaquin.aldabe at gmail.com <mailto: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
> with this subject about invertebrate biomass and its
> possible effect on shorebird density. I have a couple of extra
>
> You suggested this:
>
> (1) The relationship between bird density and invert biomass, as
> as the intercept (i.e., expected bird density at
> better invert_biomass=<some sensible reference quantity>).
>
> I tried a quantity considering the lowest value of the
> variable, but the model did not converge. So I wonder if I should
> 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. I USED LME. I DON'T REALLY
KNOW WHAT DO YOU EXACTLY MEAN WITH SENSIBLE REFERENCE QUANTITY. I
THOUGHT IT WAS THE MINIMUM VALUE OF MY X VARIABLE (AS CERO IS NOT A
POSSIBILITY).
The minimum value of your x variable is sensible. The mean or median
would also be sensible. It will change the interpretation of your
intercept parameter, and might improve convergence, but if the model
does converge then it won't change the overall fit of the model.
If you're using lme and re-locating your x variable (i.e. using
I(invert_biomass-ref_value)) doesn't help with convergence, then there
might be something else wrong. We need more information (what was the
error message? What are the general properties of your data?) and
preferably a reproducible example ...
>
> (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
Depends on a number of things. Your original message suggested
that you sampled over the course of 30 days (maybe at different
in different plots?) If this is the case (e.g. you sampled plot 1
days 1, 5, 9, ... and plot 2 on days 2, 6, 10 ...) then it is
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
lmer). If you have a small number of distinct sample days then a
categorical variable makes sense. Whether you specify it as ordered
(default) unordered doesn't affect the overall fit of the model,
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
<mailto: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
>> > 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>
>> > <mailto:bbolker at gmail.com <mailto:bbolker at gmail.com>>>:
>> >
>> > That seems perfectly reasonable. There are a couple of
>> > consider, although you may or may not find that your data
>> > that much complexity.
>> >
>> > (1) The relationship between bird density and invert
>> > well
>> > as the intercept (i.e., expected bird density at
>> > 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
>> > invert biomass, but that will almost certainly overwhelm
>> >
>> > Don't forget to do the standard post-fitting checks: are
>> > residuals *approximately* equal-variance and (even more
>> > approximately)
>> > Normally distributed? Is the relationship between bird
>> > 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
<mailto:joaquin.aldabe at gmail.com <mailto:joaquin.aldabe at gmail.com
>> > > Dear all, I'm interested in modeling the effect of
>> > > the density of a grassland shorebird (they eat
>> > > picked 8 plots and sampled invertebrates and birds 6
>> > > about 30 days. This is, I went to each plot and did
>> > > invertebrates biomass and shorebird density separated in
>> > > five days, as invertebrates biomass may change over time
>> > > that birds density change accordingly.
>> > >
>> > > So, I'm trying to see a general pattern of the effect of
>> > > on the density of this shorebird species at a plot scale.
>> > > not important; I consider them as particular events of a
>> > >
>> > > Is this model correct:
>> > >
>> > > lme(Bird.density~Invertebrate biomass,
>> > >
>> > > Thank you very much,
>> > >
>> > > Joaquin.
>> > >
>> > >
>> > > --
>> > > *Joaqu?n Aldabe*
>> > >
>> > > *Grupo Biodiversidad, Ambiente y Sociedad*
>> > > Centro Universitario de la Regi?n Este, Universidad de la
>> > > 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>
>> > <mailto:R-sig-mixed-models at r-project.org
<mailto:R-sig-mixed-models at r-project.org>> mailing list
>> >
>> >
>> >
>> >
>> > --
>> > *Joaqu?n Aldabe*
>> >
>> > /Grupo Biodiversidad, Ambiente y Sociedad/
>> > Centro Universitario de la Regi?n Este, Universidad de la
>> > 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
>
>
>
>
> --
> Joaqu?n Aldabe
>
> Grupo Biodiversidad, Ambiente y Sociedad
> Centro Universitario de la Regi?n Este, Universidad de la