Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay committed Sep 8, 2017
1 parent f08519f commit 5be15dc
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,31 @@
[![Last-changedate](https://img.shields.io/badge/last%20change-2017--05--09-yellowgreen.svg)](/commits/master)

# KrigLinCaution
## An R package in support of publication, "Kriging Models for Linear Networks and non-Euclidean Distances: Cautions, Solutions, and a Comment on Ladle et al. (2016)."
## An R package in support of publication, "Spatial Autoregressive Models for Statistical Inference from Ecological Data."

#### Jay M. Ver Hoef<sup>a</sup>
#### Jay M. Ver Hoef<sup>a</sup>, Erin E. Peterson<sup>b</sup>

#### <sup>a</sup>NOAA Fisheries (NMFS) Alaska Fisheries Science Center
#### <sup>b</sup>ARC Centre for Excellence in Mathematical and Statistical Frontiers (ACEMS) and the Institute for Future Environments, Queensland University of Technology

As a scientific work, and in keeping with common scientific practicies, I kindly request that you cite my research project and applicable publications if you use my work(s) or data in your publications or presentations. Additionally, I strongly encourage and welcome collaboration to promote use of these data in the proper context and scope. The publication is currently submitted:

#### Ver Hoef, Jay. M. Kriging Models for Linear Networks and non-Euclidean Distances: Cautions, Solutions, and a Comment on Ladle et al. (2016). In preparation for *Methods in Ecology and Evolution*.
#### Ver Hoef, J. M., Peterson, E. E., Hooten, M. B., Hanks, E. M., and Fortin, M-J. Spatial Autoregressive Models for Statistical Inference from Ecological Data. Submitted to *Ecological Monographs*.


Executive Summary
Abstract
-----------------

1. There are now many examples where ecological researchers used non-Euclidean distance metrics in geostatistical models that were designed for Euclidean distance, such as those used for kriging. This can lead to problems where predictions have negative variance estimates. Technically, this occurs because the spatial covariance matrix, which depends on the geostatistical models, is not guaranteed to be positive definite when non-Euclidean distance metrics are used.
2. I give a quick review of kriging and illustrate the problem with several fabricated examples, including locations on a circle, locations on a linear dichotomous network like streams, and locations on a linear trail or road network. I re-examine the linear network distance models from Ladle et al. (2016) and show that they are not guaranteed to have a positive definite covariance matrix.
3. I introduce the reduced rank method, also called predictive process models, fixed-rank kriging, and spatial basis functions, for creating valid spatial covariance matrices with non-Euclidean distance metrics. It has an additional advantage of fast computation for large data sets.
4. I re-analyze the data of Ladle et al. (2016), showing that their fitted models, which used linear network distance in a geostatistical model without any nugget effect, had poor predictive performance compared to a model using Euclidean distance with a nugget effect, and it also had improper coverage for the prediction intervals. The reduced rank approach using linear network distances had the best predictive performance and had proper coverage for the prediction intervals.
Ecological data often exhibit spatial pattern, which can be modeled as autocorrelation. Conditional autoregressive (CAR) and simultaneous autoregressive (SAR) models are network-based models (also known as graphical models) specifically designed to model spatially autocorrelated data based on neighborhood relationships. We identify and discuss six different types of practical ecological inference using CAR and SAR models, including: 1) model selection, 2) spatial regression, 3) estimation of autocorrelation, 4) estimation of other connectivity parameters, 5) spatial prediction, and 6) spatial smoothing. We compare CAR and SAR models, showing their development and connection to partial correlations. Special cases, such as the intrinsic autoregressive model (IAR), are described. CAR and SAR models depend on weight matrices, whose practical development uses neighborhood definition and row-standardization. Weight matrices can also include ecological covariates and connectivity structures, which we emphasize, but have been rarely used. Trends in harbor seals (\emph{Phoca vitulina}) in southeastern Alaska from 463 polygons, some with missing data, are used to illustrate the six inference types. We develop a variety of weight matrices and CAR and SAR spatial regression models are fit using maximum likelihood and Bayesian methods. Profile likelihood graphs illustrate inference for covariance parameters. The same data set is used for both prediction and smoothing, and the relative merits of each are discussed. We show the nonstationary variances and correlations of a CAR model and demonstrate the effect of row-standardization. We include several take-home messages for CAR and SAR models, including 1) choosing between CAR and IAR models, 2) modeling ecological effects in the covariance matrix, 3) the appeal of spatial smoothing, and 4) how to handle isolated neighbors. We highlight several reasons why ecologists will want to make use of autoregressive models, both directly and in hierarchical models, and not only in explicit spatial settings, but also for more general connectivity models.

Installation
------------

Installation of this R data package is done through the `devtools::install_github()` function or by downloading the [source package from the latest release](https://github.com/jayverhoef/KrigLinCaution).
Installation of this R data package is done through the `devtools::install_github()` function or by downloading the [source package from the latest release](https://github.com/jayverhoef/spAReco).

```
library("devtools")
install_github("jayverhoef/KrigLinCaution")
install_github("jayverhoef/spAReco")
```

Run R Scripts
Expand All @@ -41,25 +39,25 @@ Run R Scripts
The knitr document used to create the manuscript can be found here on your computer system:

```
system.file("doc/KrigLinCaution.Rnw", package = "KrigLinCaution")
system.file("doc/spARecoEM2.Rnw", package = "spAReco")
```

which contains all of the R code embedded in the Latex manuscript. Stripping out the R code with the "purl" command yields a pure R script, which can be found here:

```
system.file("doc/KrigLinCaution.R", package = "KrigLinCaution")
system.file("doc/spAReco.R", package = "spAReco")
```

To run the whole script from within R use:

```
source(system.file("doc/KrigLinCaution.R", package = "KrigLinCaution"))
source(system.file("doc/spAReco.R", package = "spAReco"))
```

A pure Latex document can be found here:

```
system.file("doc/KrigLinCaution.R", package = "KrigLinCaution")
system.file("doc/spAReco.tex", package = "spAReco")
```

-------------
Expand Down

0 comments on commit 5be15dc

Please sign in to comment.