I am modeling binominal data with random effects and spatial autocorrelation using
Plotting the residual semivariogram of a model fit without accounting for spatial autocorrelation leads me to the following semivariogram:
Hence, I set up a corSpatial object to account for the spatial autocorrelaton within my data.
correl = corSpatial(value = c(1911, 0.03), form = ~ry + rx, nugget = TRUE, fixed = FALSE, type = "spherical")
After inspecting the fit of the model which accounts for spatial autorcorrelation using the
correl object introduced above, I get the following output when calling
summary() (note that "date" is a random effect):
Correlation Structure: Spherical spatial correlation Formula: ~ry + rx | date Parameter estimate(s): range nugget 329.0934685 0.2516632
I visualized the residuals(?) again in a variogram using
plot(nlme::Variogram(fit5, form = ~rx + ry, data = d, maxDist = 20000, breaks = c(50, 200, 400, 600, 1000, 1500, 2000, seq(2700,29700,by = 1000)), robust = FALSE), smooth = TRUE, span = 0.65, showModel = FALSE)
Leaving me confused.
How do I interpret the
How to deal with the
nlme::Variogram()output showing a totally different shape compared to the resid. svgm/summary() output?
What did I do wrong?