[R-sig-ME] Spatial correlation in lme

Highland Statistics Ltd highstat at highstat.com
Tue Nov 15 12:15:43 CET 2011




> ------------------------------
>
> Message: 2
> Date: Mon, 14 Nov 2011 12:19:39 -0700
> From: Jeffrey_Warren at fws.gov
> To: r-sig-mixed-models at r-project.org
> Subject: [R-sig-ME] Spatial correlation in lme
> Message-ID:
> 	<OFEB039305.5745B611-ON87257948.006605C0-87257948.006A2BA9 at fws.gov>
> Content-Type: text/plain
>
>
>
> We've created 35 home ranges for individual birds that we tracked during
> the pre-breeding season. Each home range is based on an individual
> utilization distribution (UD) that we've used to predict relative at each
> 100 x 100 m pixel. Each pixel also has associated habitat attributes, such
> as water depth and percent emergent vegetation. We also have bird-level
> variables (age [categorical] and relative body condition [continuous]).
> We're now trying to relate habitat use (UD value) to habitat attributes and
> individual quality (with age and body condition as proxies). We've modeled
> the data with individual bird as a random effect to account for the related
> nature of pixels within an individual's home range. We then imposed a
> rational quadratic correlation structure to the lme model to account for
> the spatial autocorrelation among pixels (corRatio was best fit compared to
> other structures available in nlme). When we look at variograms for each
> model we don't see any improvement in residual correlation, but our beta
> estimates for the effects of habitat on selection change significantly.
>
> Here is what our data look like:


In addition to Ben's remark.....

1. You did not specify a nugget
2. Is there any correlation between some of your covariates and X or Y?
3. You may want to make a sample variogram of your residuals....and then 
choose starting values for the range and nugget.
It may even be an option to chose fixed values for these parameters in 
the variogram. See ?corRatio
This helps quite often.
4. You realise that the spatial correlation is being imposed inside the 
random effect? Makes sense for your data....unless these birdies 
interaction.

Alain

>
>> head(hrdata)
>      XMIN   XMAX    YMIN    YMAX  BirdID DEP SUB H2O EDGE    UDval Age
> BCIndex Year_  logUDval
> 1 430400 430500 4942900 4943000 1653957   0   0   0    0 0.012085   1
> -18.82793     0 -4.415790
> 2 430400 430500 4943000 4943100 1653957   0   0   0    0 0.012856   1
> -18.82793     0 -4.353945
> 3 430400 430500 4943100 4943200 1653957   0   0   0    0 0.014132   1
> -18.82793     0 -4.259314
> 4 430400 430500 4943200 4943300 1653957   0   0   0    0 0.014939   1
> -18.82793     0 -4.203780
> 5 430400 430500 4943300 4943400 1653957   0   0   0    0 0.016364   1
> -18.82793     0 -4.112671
> 6 430400 430500 4943400 4943500 1653957   0   0   0    0 0.017369   1
> -18.82793     0 -4.053068
>
> Model statements:
> Form<- formula(logUDval ~ DEP + EDGE + SUB:H2O + Year_ + Age + BCIndex)
> m1.lme<-lme(Form, random = ~ 1|BirdID, method="REML", data=hrdata)
> m1.lme.ratio<-lme(Form, random = ~ 1|BirdID, correlation = corRatio(form =
> ~XMIN + YMIN), method="REML", data=hrdata)
>
> Model summaries:
>
> Summary of LME with no spatial autocorrelation structure
>
> Linear mixed-effects model fit by REML
>   Data: hrdata
>         AIC      BIC    logLik
>    50535.09 50605.97 -25258.54
>
> Random effects:
>   Formula: ~1 | BirdID
>          (Intercept)  Residual
> StdDev:   0.6385548 0.8809287
>
> Fixed effects: list(Form)
>                    Value             Std.Error         DF    t-value
> p-value
> (Intercept)       -1.8712232  0.20935222  19415  -8.938158        0.0000
> DEP               0.0014205   0.00028237  19415       5.030507    0.0000
> EDGE              0.0028367   0.00029345  19415       9.666943    0.0000
> Year_1      -0.3690599  0.23942499        31    -1.541443   0.1334
> Age1        -0.2452163  0.23423909        31    -1.046863   0.3033
> BCIndex           0.0018829   0.00283624        31    0.663880    0.5117
> SUB:H2O           0.0037672   0.00030599  19415       12.311448   0.0000
>   Correlation:
>          (Intr) DEP    EDGE   Year_1 Age1   BCIndx
> DEP     -0.018
> EDGE    -0.018 -0.201
> Year_1  -0.667 -0.016  0.002
> Age1    -0.740  0.001 -0.002  0.361
> BCIndex -0.011 -0.003  0.003  0.105 -0.085
> SUB:H2O -0.014 -0.433  0.069  0.010 -0.002 -0.003
>
> Standardized Within-Group Residuals:
>         Min         Q1        Med         Q3        Max
> -1.8954412 -0.8640309 -0.0985262  0.7541542  2.8349462
>
> Number of Observations: 19453
> Number of Groups: 35
>
> ************************************************************************
>
> Summary of LME with rational quadratic spatial autocorrelation structure
>
> Linear mixed-effects model fit by REML
>   Data: hrdata
>          AIC       BIC   logLik
>    -74203.99 -74125.23 37111.99
>
> Random effects:
>   Formula: ~1 | BirdID
>          (Intercept)  Residual
> StdDev:   0.5266185 0.5505424
>
> Correlation Structure: Rational quadratic spatial correlation
>   Formula: ~XMIN + YMIN | BirdID
>   Parameter estimate(s):
>     range
> 405.6316
> Fixed effects: list(Form)
>                    Value             Std.Error         DF
> t-value           p-value
> (Intercept)  -2.4777143 0.18583575  19415             -13.332819   0.0000
> DEP          -0.0000045       0.00001259  19415             -0.357142
> 0.7210
> EDGE          0.0000032       0.00000281  19415             1.150247
> 0.2501
> Year_1       -0.3041446       0.21134054        31          -1.439121
> 0.1601
> Age1              -0.2356964  0.20706315        31          -1.138283
> 0.2637
> BCIndex            0.0013983  0.00250764        31           0.557623
> 0.5811
> SUB:H2O     -0.0000001  0.00000827  19415             -0.006635   0.9947
>   Correlation:
>          (Intr) DEP    EDGE   Year_1 Age1   BCIndx
> DEP     -0.001
> EDGE     0.000 -0.283
> Year_1  -0.672 -0.001  0.001
> Age1    -0.743  0.000  0.000  0.368
> BCIndex -0.012  0.000  0.001  0.102 -0.079
> SUB:H2O -0.001 -0.287  0.267  0.001  0.000  0.001
>
> Standardized Within-Group Residuals:
>         Min         Q1        Med         Q3        Max
> -1.5110519 -0.2035459  1.0313164  2.4303284  5.6538601
>
> Number of Observations: 19453
> Number of Groups: 35
>
>
> We don't understand why there appears to be no improvement in spatial
> autocorrelation but our results have changed so dramatically. Any ideas on
> why we're running into this issue would be greatly appreciated.
>
> Thanks,
>
> Jeff Warren
> Wildlife Biologist
> 27650 B South Valley Rd
> Lima, Montana 59739
> (406) 276-3536 ext. 304
> (406) 548-8487 cell
>
> "Without data, all you are is just another person with an opinion"
> --Unknown
> 	[[alternative HTML version deleted]]
>
>





-- 

Dr. Alain F. Zuur
First author of:

1. Analysing Ecological Data (2007).
Zuur, AF, Ieno, EN and Smith, GM. Springer. 680 p.
URL: www.springer.com/0-387-45967-7


2. Mixed effects models and extensions in ecology with R. (2009).
Zuur, AF, Ieno, EN, Walker, N, Saveliev, AA, and Smith, GM. Springer.
http://www.springer.com/life+sci/ecology/book/978-0-387-87457-9


3. A Beginner's Guide to R (2009).
Zuur, AF, Ieno, EN, Meesters, EHWG. Springer
http://www.springer.com/statistics/computational/book/978-0-387-93836-3


Other books: http://www.highstat.com/books.htm


Statistical consultancy, courses, data analysis and software
Highland Statistics Ltd.
6 Laverock road
UK - AB41 6FN Newburgh
Tel: 0044 1358 788177
Email: highstat at highstat.com
URL: www.highstat.com
URL: www.brodgar.com




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