spind: spind: Spatial Methods and Indices

spindR Documentation

spind: Spatial Methods and Indices

Description

The spind package provides convenient implementation of Generalized estimating equations (GEEs) and Wavelet-revised models (WRMs) in the context of spatial models. It also provides tools for multi-model inference, stepwise model selection, and spatially corrected model diagnostics. This help section provides brief descriptions of each function and is organized by the type of model they apply to or the scenarios in which you might use them. Of course, these are recommendations - feel free to use them as you see fit. For a more detailed description of the package and its functions, please see the vignette Intro to spind (browseVignettes('spind')).

GEEs

The GEE function fits spatial models using a generalized estimating equation and a set of gridded data. The package also includes S3 methods for summary and predict so you can interact with these models in the same way you might interact with a glm or lm.

WRMs

The WRM function fits spatial models using a wavelet-revised model and a set of gridded data. The package also includes S3 methods for summary and predict so you can interact with these models in the same way you might interact with a glm or lm. There are also a number of helper functions that help you fine tune the fitting process that are specific to WRMs. Please see the documentation for WRM for more details on those.

WRM also has a few other features specific to it. For example, if you are interested in viewing the variance or covariance of your variables as a function of level, covar.plot is useful. upscale will plot your matrices as a function of level so you can examine the effect of cluster resolution on your results.

Multi-model inference and stepwise model selection

spind includes a couple of functions to help you find the best fit for your data. The first two are multimodel inference tools specific to GEEs and WRMs and are called mmiGEE and mmiWMRR. These generate outputs very similar to those from the MuMIn package. If you would like to see how variable importance changes as a function of the scale of the WMRR, you can call rvi.plot. This will generate a model selection table for each degree of level (from 1 to maxlevel) and then plot the weight of each variable as a function of level.

spind also includes a function for stepwise model selection that is loosely based on step and stepAIC. step.spind differs from these in that it is specific to classes WRM and GEE. It performs model selection using AIC or AICc for WRMs and QIC for GEEs.

Spatial indices of goodness of fit

Finally, spind has a number of functions that provide spatially corrected goodness of fit diagnostics for any type of model (i.e. they are not specific to classes WRM or GEE). These first appeared in spind v1.0 and have not been updated in this release. The first two are divided into whether or not they are threshold dependent or not. Threshold dependent metrics can be calculated using th.dep and threshold independent metrics can be calculated using th.indep.

acfft calculates spatial autocorrelation of residuals from a model using Moran's I. You can set the number of distance bins you'd like to examine using dmax argument and the size of those bins using lim1 and lim2.

Conclusion

The vignette titled Intro to spind provides more information on these functions and some example workflows that will demonstrate them in greater depth than this document. Of course, if you have suggestions on how to improve this document or any of the other ones in here, please don't hesitate to contact us.


levisc8/spind documentation built on April 3, 2024, 4:52 a.m.