[R-sig-eco] R-sig-ecology Digest, Vol 36, Issue 2

Robert Rankin robertw.rankin at gmail.com
Fri Mar 4 15:25:26 CET 2011


Hi Bier,

I've also thought about such analyses. I don't have the definitive
answer, but one option may be to look at the analysis on Hawaiian bird
abundance time series in Zuur et al Mixed Effects Models and
Extensions in Ecology with R. They use the gamm function in "mgcv" to
model the time-series where each species has its own smoothing term
for time (substitute plot for birds)

BM1<-gamm(Birds ∼ Rain + ID + s(Time, by = as.numeric(ID ==
"Stilt.Oahu")) +s(Time, by = as.numeric(ID == "Stilt.Maui")) +s(Time,
by = as.numeric(ID == "Coot.Oahu")) +s(Time, by = as.numeric(ID ==
"Coot.Maui")), weights = varIdent(form =∼ 1 | ID))
... where ID is the species name.

To make it analogous to your situation, perhaps the next step would be
to make another model (BM0) where time is the same for all species (in
your case plot), then test whether the reduced model fits as well as
the complex model. e.g.,
BM0<-gamm(Birds ∼ Rain + ID + s(Time))
anova(BM0, BM1)

Robert Rankin
Bird Studies Canada
Port Rowan, ON N0E 1M0


> Subject: [R-sig-eco] Comparing two or more time series
> Message-ID:
> 	<AANLkTikiav_aeEeNVGoq8K2WwH2LOmnMmHje+QYVRcb0 at mail.gmail.com>
>
>
> Dear List,
>
> I have measured temperature and humidity over a short period of time
> at multiple plots simultaneously. I am trying to figure out whether
> these plots actually have different microclimates (i.e having
> different temperature and humidity). Here is what my data look like:
>
>   plot                date temp  hum  dew
> 1  NT1 2011-02-28 15:00:00 31.0 73.5 25.7
> 2  NT1 2011-02-28 15:05:00 30.5 74.5 25.4
> 3  NT1 2011-02-28 15:10:00 30.5 74.0 25.3
> 4  NT1 2011-02-28 15:15:00 30.0 76.5 25.4
> 5  NT1 2011-02-28 15:20:00 30.0 76.0 25.3
> 6  NT1 2011-02-28 15:25:00 29.5 75.5 24.7
>
> All the plots have the same time points. What I did so far is using
> nlme package to run a mixed-effect model to see if "temp" and "hum"
> differ among plots:
>
> lme(temp~plot,random=~1|date,data=bs.site)
> lme(hum~plot,random=~1|date,data=bs.site)
>
> Is this a reasonable analysis to answer the above question? I looked
> around online and have not found a similar analysis, so I was just
> wondering if I misunderstand something here.
>
> Thank you for your time!
>
> Bier Kraichak



More information about the R-sig-ecology mailing list