[R-sig-ME] Autocorrelation in a GAMM for nightly time series

Andrew Digby andrewdigby at mac.com
Thu Jun 6 23:38:36 CEST 2013


On 7/06/2013, at 02:42 , Gavin Simpson <gavin.simpson at ucl.ac.uk> wrote:

> On Thu, 2013-06-06 at 16:29 +1200, Andrew Digby wrote:
>>> 
>>> From: Ben Bolker <bbolker at gmail.com>
>>> Subject: Re: [R-sig-ME] Autocorrelation in a GAMM for nightly time series
>>> Date: 5 June 2013 13:35:51 NZST
>>> To: r-sig-mixed-models at r-project.org
>>> 
>>> 
>>> Andrew Digby <andrewdigby at ...> writes:
>>> 
>>>> I'm analysing call counts of a nocturnal species in 
>>>> response to temporal and environmental effects. Over a
>>>> period of 3 years I divide each night into 10 equal-length blocks, 
>>>> and count the calls of each sex in each
>>>> block. 
>>> 
>>> [snip]
> <snip/>
>> 
>> Thanks very much for that, Ben. The amount of help you provide through
>> these forums is truly impressive!
> <snip />
>> So thanks to your help the model is improved, although the
>> autocorrelation problem remains. I have a couple of remaining
>> questions regarding this, which I'd really appreciate advice with: 
> 
> Can I just check that you are using the normalised residuals here? The
> default for `resid()` will give you deviance? residuals and won't take
> the covariance matrix into account. The normalised residuals will do
> that:
> 
> resid(mod$lme, type = "normalised")
> 
> See ?resid.lme with the nlme package loaded.
> 
> This often catches peoples out (me included) at first.
> 
> G
> 
> 

Yes, unfortunately I am using type='normalized'. Thanks for the tip though!

Andrew



More information about the R-sig-mixed-models mailing list