1.  Title

2.  Officially, a "statistic" is any function of data. The mean is such
    a function, and it often serves as a summary statistic. However, the
    science of Statistics is mostly concerned with inference. For
    inference, we assume a model for the phenomenon that we are
    studying, and we use statistics to estimate parameters of that
    model, and assess our confidence in those parameter estimates

3.  What about this word "model?" We use models in various ways;
    sometimes to represent what an object looks like, and sometimes to
    see how it functions.

4.  The field of spatial statistics is ultimately concerned with taking
    complex real objects and making a simple representation of them as
    points, lines, or polygons. We then assume measurements come from
    this representation, and that there are functional relationships
    among measurement, either to other measured variables or to each
    other through their spatial relationships. Together, we create a
    representational model, a functional model, and a probability model.
    This situation is more complex than slide 3, but we strive to do
    inference in the same way. That is, we specify the form of the
    model, but we don't know the values of the parameters. We use data
    and statistics to estimate these parameters, which is known as
    inference.

5.  Let's take slide 4, and consider each model one at a time. First,
    let's see how we represent spatial data. Here is some notation often
    used in spatial statistics.

6.  The 3 most common types of spatial data.

7.  Examples of geostatistical data. The data are measured values at
    points (the spatial representation of the location), where the
    underlying surface is spatially continuous. Because that surface is
    continuous, we could choose an infinite number of samples, and
    predict at an infinite number of locations.

8.  Examples of lattice data. The data are measured values, usually in
    polygons (the spatial representation of the location), but in any
    situation where underlying "surface" is a finite set of locations.
    Prediction of unsampled locations is often not a goal here, because
    we've measured all of them. Typically, we smooth the observed
    spatial measurements.

9.  Examples of spatial point patterns. The data are the points
    themselves (the spatial representation of the location). There are
    not measurements at the points. In geostatistics, we choose the
    sample points; here, the points themselves are the random
    quantities.

10. Now, let's look at the functional models in slide 4. As biologists
    and scientists, we usually want to create models that establish
    relationships among variables. The most common models are linear,
    but nonlinear models are becoming more common. The term prediction
    is used when we are "predicting" potentially observable quantities;
    that is, the response variable in our models. That is, we have gone
    out and measured some of these. We assume that these values come
    from some model, and there are parameters in that model. We use the
    term "estimate" when estimating these parameters. Because they are
    parameters in a model, they are not directly observable.

11. Finally, we get to the heart of spatial statistics. The probability
    model. This probability model is spatially autocorrelated. But watch
    out; that word "autocorrelation" has many uses, and my experience is
    that people often use it but with different meanings. This causes
    some confusion and lack of communication. Here are 5 distinct
    definitions.

12. Let's concentrate on 4 of the meanings (the Fourier one is not often
    confused with the rest). We can have 1) autocorrelated data, 2) as
    stochastic process with autocorrelated errors, 3) a model for how
    autocorrelation is related to distance, and 4) an autocorrelation
    statistic (a function of data displayed in relation to distance).

13. Autocorrelation Models. The things that we actually need to worry
    about are the autocorrelation models, and how to estimate them.
    There are several ways to display autocorrelation models, and they
    have associated terms. In geostatistics, the terms are nugget,
    partial sill, sill, and range. This slide shows the relationships
    between autocovariance, (semi)variogram, and autocorrelation
    functions.

14. Autocorrelated Processes. This slide shows that a model with trend
    and uncorrelated errors can produce data that look very similar to
    no trend but autocorrelated errors. I have showed the formulas in
    the cells so you can simulate data yourselves in EXCEL. It is very
    easy to create this simple stochastic process with autocorrelated
    errors.

15. Autocorrelated Processes. If you do it yourself, use F9 to
    re-simulate the data. Notice that the trend model always trends up,
    creating autocorrelated data but there is not autocorrelation model
    for the errors. The model with autocorrelated errors can wander up
    and down, but is constrained by the fact that values should be
    similar to their neighbors.

16. Why spatial statistics? In the first process (top), all random
    variable are HIGHLY correlated (they are all equal). A realization
    (pattern) is generated by taking the outcome of a single random
    variable and setting all others equal to it. It will be hard to get
    a good estimate of the mean, mu, in this case. In the second process
    (bottom), all random variables are independent. In this case, the
    sample average converges rapidly to the mean parameter mu. So, in
    general, positive autocorrelation (which is largely the case) makes
    it harder to do estimation. However, consider predicting the 6^th^
    value. In this case, we get perfect prediction using the
    autocorrelated model. So, in general, positive autocorrelation is
    beneficial for prediction. Why spatial statistics? To use
    autocorrelation for prediction, and get our confidence intervals
    correct when the errors are autocorrelated.

17. Why spatial statistics? When errors are independent, the prediction
    is equal to the fit. When errors are autocorrelated, prediction is
    different than the fit. The same properties as above are generally
    true: for independent errors the fit is better than for
    autocorrelated error, but for independent errors the prediction is
    worse than for autocorrelated errors.

18. Goals of Spatial Statistics. Inference on a random variable at a
    location that has not been measured is termed "prediction."
    Inference for parameters of a model is termed "estimation." We will
    use the linear model. Although linear models are not perfect, they
    provide useful approximations in many cases. We can categorize some
    goals of our modeling. Mapping and sampling are part of prediction,
    and regression and designed experiments are part of estimation.

19. Why do we need autocorrelation models? With just a few parameters,
    we can model a whole covariance matrix.

20. How do we estimate the parameters in the autocorrelation models?
    Here are a few named methods, but I won't get into them here.

21. Can we use any decreasing function as an autocorrelation model? If
    we try some, such as the linear-with-sill, and we use Euclidean
    distance measured in 2-D space, then the "covariance" matrix really
    isn't a covariance matrix. For example, if you tried to do kriging
    in 2-D using the linear-with-sill model, your kriging variances
    might be negative, which is a bit embarrassing (for a statistician).

22. Here is stream network, where we represent a stream as a line, and
    samples on a stream as points.

23. Suppose that we have a stream network like the one shown on the
    left, and suppose that we want to measure distance along the stream,
    not 2-D Euclidean distance. Then some models that work in 1-D (like
    the linear-with-sill), and even some that work in 2-D, like the
    spherical, will not give a valid "covariance" matrix. On the right,
    as the range parameter increases, the linear-with-sill and spherical
    models have a negative minimum eigenvalue, which can cause, you
    guessed it, those nasty negative variances again!

24. Now, let's look at some examples. I'll order my examples by goals,
    rather than models. One of the goals is mapping (a subset of
    prediction). Basically, we want to predict the value at unsampled
    locations.

25. Each prediction will have a kriging variance. Assuming the
    predictions are normally-distributed, we can give the quantiles of
    prediction (prediction intervals are much like confidence intervals
    and try to "capture" the true value).

26. Lower and upper 95% prediction intervals for kriging maps of ozone
    in California.

27. By the same logic, using a normal distribution, we can compute the
    probability of exceeding some threshold value (e.g., an EPA value
    that causes some action, such as treated gasoline to lower
    emissions). These are called probability maps.

28. My experience is that mapping is not as interesting to ecologists,
    biologists, and many scientists, as spatial regression. Here, we
    want to do the same thing as normal regression, except that we are
    worried that the errors may be spatially autocorrelated.

29. This example has many covariates that are suspected to affect lizard
    abundance.

30. In spatial regression, we are interested in estimation. That is,
    estimating the coefficients that relate lizard abundance to
    covariates. After fitting some models, we ended up with two
    covariates that seemed to have a significant effect on lizard
    abundance.

31. As in any good modeling, we should check our models. When using
    regression, the data may look fine, but the lack of fit shows up in
    the residuals. Here, it is clear there is an outlier (look at the
    histogram and boxplot in the previous slide).

32. Case-deletion diagnostics can be adapted to spatial models.

33. After removing the outlier, the residuals look fine.

34. Cross-validation is another diagnostic. We remove each datum, one at
    a time, and then predict is with all of the other data. If the
    regression and autocorrelation models are working well, we should
    see predictions near the true values, and hence a 1 to 1 plot. In
    reality, it is not that perfect, and the slope is often less than
    one because spatial prediction tends to "smooth."

35. So far, we have assumed that the autocorrelation model depends only
    on distance. It is possible that the errors are more autocorrelated
    in one direction than another. We can model this as well, with 2
    extra parameters, and this is call anisotropy. When direction
    doesn't matter, it is called isotropy.

36. Now, we can try some model selection. Do we need an anisotropic
    model for the lizard data? One way to assess the models is by
    summarizing cross-validation results. There is no evidence of bias
    for either model. RMSPE is the square root of the average difference
    squared between the true and predicted values. Just remember that
    smaller is better. The RMSPE is lower for the anisotropic model,
    meaning the the cross-validation predictions are, in general, closer
    to the true values. The confidence coverage is a little better for
    the anisotropic model as well. So the anisotropic model seems like
    the better one.

37. Other popular model selection criteria that can be used.

38. A comparison of AIC, RMSPE, and actual coverage of the 95%
    prediction interval during cross-validation. It looks like the
    anisotropic exponential model is best based on both AIC and RMSPE,
    and has proper prediction intervals.

39. Inference in the spatial regression. The anisotropic exponential
    model of autocorrelation among the random errors has 5 parameters,
    and the estimates are shown here. This affects the estimate of the
    relationship between lizard abundance and ant abundance and sandy
    soils. The estimated coefficients are shown here, along with
    standard errors, t-values, and a test that the null hypothesis of
    the effect is 0. Note that without using spatial modeling, many more
    covariates were estimated to be "significantly" related to lizard
    abundance.

40. Some references on spatial regression that I have been involved
    with.

41. Now let's move on to spatial designed experiments. The data will
    come from some glades in the Ozarks.

42. Here's Noel Cressie sitting on one of these glades back in 1989.

43. Let's play a little game. In the upper left, the numbers indicate
    the number of vascular plant species in each plot. Now, suppose that
    we had applied some treatments (such as fire at different times of
    the year), and their true effect is given in the table on the left.
    Then the observed data are shown at the bottom. All we get to use is
    the treatment type and the observed values (true value + true
    treatment). Our goal is to estimate some contrasts of those
    treatments. The 5 contrasts that we will consider are shown in the
    upper right.

44. Just a reminder of where we are. Designed experiments, from a linear
    model viewpoint, are pretty much just like regression. Our goal is
    to estimate the treatment effects (and the contrasts), which are
    parameters, just like regression parameters, but we also have the
    autocorrelated errors, with a model of spatial autocorrelation.

45. We can choose from a variety of spatial models of autocorrelation.
    Because the plots are polygons, we can choose from lattice models
    (CAR, SAR, more on those later), or geostatistical models
    (exponential, spherical, which you've already seen). Lattice models
    use the idea of neighbors, rather than distance. Here,
    geostatistical models use distance from centroids of polygons.

46. A comparison of contrast estimates assuming independence, and
    spatial models, where we use geostatistical models and lattice
    models, and both classical likelihood estimation and Bayesian
    estimation methods. There is not a great deal of difference among
    the spatial methods. In general, their confidence intervals are
    narrower than independence models (OLS). In general, their estimates
    are closer to the true value. One interesting exception is
    contrast 5. Note that treatments 4 and 5 are spatially clustered and
    separated. Hence, the difference between treatments 4 and 5 could be
    due to spatial effects, or treatment effects. The spatial models
    "recognize" that this is a bad design for estimating contrast 5. OLS
    makes no distinction between contrasts 4 and 5.

47. In the last slide, we examined one random application of treatments.
    What happens if we do it 1600 times? Do the spatial methods work on
    average the way they are supposed to?

48. Here is the mean-squared error (MSE), 95% confidence interval
    coverage, and the power to detect non-zero differences, for each of
    the 5 contrasts. MSE is the average difference squared between the
    true and estimated values. Just remember that small is better.
    Values shaded in pink and red are signficantly different from what
    they should be. The main thing to notice is that the MSE is much
    smaller for spatial REML than classical ANOVA, but it still has the
    proper coverage for it's confidence intervals. Hence, it is much
    more powerful than ANOVA. Plain maximum likelihood estimation has
    bias problems.

49. Some references for that I have been involved with.

50. Last goal is sampling. Here is an example using moose surveys.

51. One of the big differences between classical sampling and spatial
    models for sampling is what is assumed to be random, and what is
    assumed to be fixed. Classical sampling assumes the pattern is
    fixed, and samples are taken randomly.

52. The two models used in the previous slide. The second is a
    stochastic process which is exactly the one that you can create
    using EXCEL as in slides 14 and 15.

53. Let's consider 2 situations: 1) the underlying population is
    spatially continuous, and 2), the underlying population is spatially
    discrete, and we'll compare classical sampling to geostatistics for
    each case.

54. Here is an example of a spatially continuous population; snow depth
    over a large region in Alaska. Here we see the connection between
    sampling and prediction. Sampling from a geostatistical viewpoint is
    predicting the *average* value over a region, rather than at a
    single point.

55. Here is a fixed continuous surface. The bluer areas are lower, and
    the redder areas are higher values. The white circles are locations
    of random samples. Now, let's see which does better, classical
    sampling estimators or a geostatistical estimator (called block
    kriging) for estimating the average value of the surface (I know the
    true value because I created the surface from sines and cosines and
    was able to calculate the integral). I then too 1000 random samples
    to assess the average performance of each method.

56. Here we see RMSPE again. The lower the RMSPE, the better. We can see
    that block kriging does better than simple random sampling, but
    still has valid 80% confidence intervals.

57. Now let's consider case 2), where the underlying population is
    spatially discrete, and we'll compare classical sampling to
    geostatistics for each case.

58. Here is an example. Again we see the connection between sampling and
    prediction. Sampling from a geostatistical viewpoint is predicting
    the *average* value in a set of sample units, rather than at a
    single sample unit.

59. Here is an example of vascular plant species richness in 200 plots.
    We know what the true average is -- now let's take 1000 different
    samples of 100 and compare the average performance of classical
    sampling to a geostatistical method.

60. Here we see RMSPE again. The lower the RMSPE, the better. We can see
    that finite population block kriging does better than simple random
    sampling, but still has valid 80% confidence intervals.

61. In the last example, the underlying population was fixed (it did not
    change from one random sample to the next). Hence, we can't really
    assess fixed designs (because nothing would change; neither the
    population nor the sample). Here, we simulate the population from a
    stochastic process 1000 times, and then take a random sample of 50,
    but also use a fixed sample design shown by the green squares. Two
    of 1000 simulations are shown, with larger values as larger redder
    circles, and smaller values as smaller bluer circles.

62. Performance results. The lower the RMSPE, the better. The spatial
    models are better than classical random sampling, but still have
    valid 80% confidence intervals. The fixed design of systematically
    placed pairs is better than a random sample when using
    geostatistical methods.

63. A real example from a moose survey in Alaska. We used a stratified
    design.

64. Flying the survey and counting moose.

65. Tracks of airplanes within the plots.

66. The modeled autocorrelation, shown here as a semivariogram.

67. The estimates, using both stratified random sampling and finite
    population block kriging. For the estimate of the total number of
    moose, there is not a big difference between the two. However, when
    estimating a small area, the spatial method does better. The ability
    to estimate populations within small subareas is a big advantage for
    the spatial methods.

68. A summary of my experience on some of the advantages and
    disadvantages of using geostatistical methods for sampling.

69. Some reference that I have been involved with.

70. Doing good science means building good models, and then doing valid
    inference on these models. As models get more complicated, it is
    necessary to form collaborations. Generally, the scientist is on the
    left of this slide, helping to guide the question, the measurements,
    and realistic models that attack the question. The statistician
    collaborates on what kinds of models are feasible for inference, and
    then uses data to do the inference. Then the scientist needs to
    interpret the results that hopefully shed new light on the question.