Contents
- 1 How can I apply GLM and GAM to spatially autocorrelated data?
- 2 When does spatial autocorrelation occur in a dataset?
- 3 Which is the best metric to plot autocorrelation?
- 4 How can you account for potential spatial autocorrelation?
- 5 What should I know before starting spatial regression?
- 6 Can a GAM be used to change the model?
- 7 Do you need to use ANOVA with Gamm?
- 8 How does spatial autocorrelation ( global Moran’s I ) work?
- 9 How is the global Moran’s I statistic calculated?
GLMs and GAMs with autocorrelated data are types of mixed models that account for non-independece among sampling units. As several pointed out, there are several good packages for this purpose including nlme, lme4, MASS, glmmTMB.
When does spatial autocorrelation occur in a dataset?
Spatial autocorrelation (SAC) is when there are spatial patterns in the dataset (Hassall & Sherratt, 2011; Radil, 2011). This can be both positive (nearby cases are similar), neutral (neighbor cases have no particular relationship, absence of SAC), or negative (nearby cases are dissimilar).
How are variograms used in spatial autocorrelation analysis?
Variograms are useful tools to calculate a resolution that will yield the most information without violating model assumptions of independence. After data collection, variograms can justify succinctly whether or not subsequent analysis should account for spatial autocorrelation.
Which is the best metric to plot autocorrelation?
Ecologists tend to plot a metric called Moran’s I, where 0 indicates no correlation. Geoscientists tend to use variograms, which plot the inverse pattern. I prefer the “variogram” function in gstat, for several reasons.
How can you account for potential spatial autocorrelation?
To account for potential spatial autocorrelation you can include the geographical position, i.e. the latitude-longitude interaction term in the analyses (Wood, S.N., 2006. Generalized additive models: an introduction with R. London: Taylor & Francis, CRC Press, 384 pp. ISBN, 978-7-58488-474-3.)
Which is better for spatial regression, SPAMM or glmmtmb?
The biggest issues with glmmTMB for spatial data are that model fitting is particularly slower than spaMM, deriving unconditional predictions (without spatial effects) is currently not possible and so DHARMa does not work properly and we need to do some stats wizardy to interprete and predict from a fitted model.
What should I know before starting spatial regression?
First off, before plunging into spatial regression models you should first check that your covariates do not already take into account the spatial patterns present in your data.
Can a GAM be used to change the model?
You may also not see much of a change in the model if the residual spatial correlation from the GAM ( gam ()) was orthogonal or not non-linearly correlated with the smooth covariates: the correlation functions enter the model through the covariance structure of the response, not through the mean structure.
What kind of error structure does Gamm have?
From what I understand, GAMM has a random error or a spatial autocorrelation error structure. I am trying to run a GAMM model with a spatial autocorrelation error structure such as the corExp (see https://stat.ethz.ch/R-manual/R-devel/library/nlme/html/corClasses.html ).
Do you need to use ANOVA with Gamm?
If you want to look at residuals from the gamm () that include the correlation function effect, then you need to use: Also, if you want to compare a model with and without the structure, you’ll need to use anova () on the $lme components of the models, hence you’ll need to refit the gam () model using gamm (), just leave off the correlation part.
How does spatial autocorrelation ( global Moran’s I ) work?
Similarly, global spatial statistics, including the Spatial Autocorrelation (Global Moran’s I) tool, are most effective when the spatial processes being measured are consistent across the study area. Results will then be a good representation/summary of the overall spatial pattern.
Is the spatial autocorrelation tool an inferential statistic?
The Spatial Autocorrelation (Global Moran’s I) tool is an inferential statistic, which means that the results of the analysis are always interpreted within the context of its null hypothesis.
How is the global Moran’s I statistic calculated?
The math behind the Global Moran’s I statistic is shown above. The tool computes the mean and variance for the attribute being evaluated. Then, for each feature value, it subtracts the mean, creating a deviation from the mean.