Dealing with spatial autocorrelation in DSMs

David L. Miller (University of Rhode Island)

RUWPA Research Talk

29 July 2013

Outline

DSM refresher (I)

DSM refresher (II)

DSM refresher (III)

DSM refresher (IV)

DSM refresher (V)

What is spatial autocorrelation (SA)?

Example data - Nantucket Sound

Nantucket Sound

plot of chunk unnamed-chunk-3

Transects

plot of chunk unnamed-chunk-4

How does SA manifest itself in DSMs?

What do per-segment counts look like?

plot of chunk unnamed-chunk-5

Heirarchical nature

Detecting SA

Fitting a simple (and not very good!) model:

ltdu.tw <- dsm(N ~ s(x, y, k = 100), ddf.obj = NULL, 
  seg.dat1, obs.dat1, strip.width = (107 * 2)/1000, 
  select = TRUE, method = "REML", family = Tweedie(p = 1.5))

Residual autocorrelogram in dsm

dsm.cor(ltdu.tw, max.lag = 18, Transect.Label = "tr.s.id", 
  Segment.Label = "segment", ylim = c(-0.1, 1), resid.type = "scaled.pearson")

plot of chunk unnamed-chunk-8

Dealing with SA in dsm

Correlation structures

Correlation structures (II)

Model formulation

\[ N_i = \color{green}{\mathbf{X_i\beta}} + \color{blue}{\sum_k f_k(\mathbf{x}_i)} + \color{red}{\mathbf{Z_ib}} + \color{purple}{e_i} \]

AR and ARMA

Correlation structures in dsm

ltdu.tw.cor <- dsm(N~ s(x,y,k=100),
             ddf.obj=NULL, seg.dat1, obs.dat1,
             strip.width=(107*2)/1000,engine="gamm",
             correlation=corAR1(form=~segment|tr.s.id),
             family=Tweedie(p=1.5))

Did that do anything?

What is the value of \(\phi\)?

intervals(ltdu.tw.cor$lme)
## Approximate 95% confidence intervals
## 
##  Fixed effects:
##                lower   est. upper
## X(Intercept)  4.0253 4.1231 4.221
## Xs(x,y)Fx1   -0.8451 0.2259 1.297
## Xs(x,y)Fx2   -0.6111 0.5179 1.647
## attr(,"label")
## [1] "Fixed effects:"
## 
##  Random Effects:
##   Level: g 
##            lower est. upper
## sd(Xr - 1)  1375 2010  2932
## 
##  Correlation structure:
##       lower   est.  upper
## Phi1 0.1103 0.1537 0.1964
## attr(,"label")
## [1] "Correlation structure:"
## 
##  Within-group standard error:
## lower  est. upper 
## 4.777 4.925 5.078

AR(p) models

ltdu.tw.cor2 <- dsm(N~ s(x,y,k=100),
             ddf.obj=NULL, seg.dat1, obs.dat1,
             strip.width=(107*2)/1000,engine="gamm",
             correlation=corARMA(p=2,form=~segment|tr.s.id),
             family=Tweedie(p=1.5))

AR(p) models - dsm.cor

plot of chunk unnamed-chunk-12

What are the values of the \(\phi\)s?

intervals(ltdu.tw.cor$lme)
## Approximate 95% confidence intervals
## 
##  Fixed effects:
##                lower   est. upper
## X(Intercept)  4.0189 4.1296 4.240
## Xs(x,y)Fx1   -0.7741 0.2647 1.303
## Xs(x,y)Fx2   -0.5512 0.5989 1.749
## attr(,"label")
## [1] "Fixed effects:"
## 
##  Random Effects:
##   Level: g 
##            lower est. upper
## sd(Xr - 1)  1368 1991  2893
## 
##  Correlation structure:
##         lower     est.    upper
## Phi1  0.10547  0.13736 0.149715
## Phi2  0.02723  0.06401 0.089353
## Phi3  0.06255  0.10842 0.147595
## Phi4 -0.01678  0.02502 0.063891
## Phi5 -0.09576 -0.04454 0.006907
## attr(,"label")
## [1] "Correlation structure:"
## 
##  Within-group standard error:
## lower  est. upper 
## 4.730 4.881 5.038

Limitations

Conclusions