Hello list, I'm modeling counts of organisms over time at eleven locations. I'd like to account for temporal autocorrelation in the counts (assuming it's present), which I'm exploring (and fitting) using gstat's variogram function on the residuals of a generalized linear model not incorporating any kind of correlation structure. As the example below illustrates, I'm finding that the classical variogram estimator looks quite different from the robust (Cressie) estimator. Furthermore, a fit of most variogram models to the classic variogram produces singularity errors (with good reason based on the variogram plot) while a decent exponential model (e.g.) can be fitted to the robust variogram. Unfortunately, it seems as though nlme:::lme (which I'm using for the generalized model) only uses the classical variogram when fitting correlation structures. Thus, my questions: (1) Is the use of the robust estimator for constructing the correlation structure justified in this case? (2) If so, is it appropriate to fit the the robust variogram model in, e.g., gstat, and then specify/fix the correlation structure in the lme fit? Thanks very much for considering, Adam Smith Dept. Natural Resources Science University of Rhode Island # Code to recreate example # Download data datURL <- "https://www.dropbox.com/s/54q9ocwztt3swap/rsiggeo_variogram.csv" dat <- repmis::source_data(datURL, sep = ",", header = TRUE) # Convert to appropriate class # Y coordinates are arbitrarily assigned values for each of # 11 sites (count locations; assumed independent); Y coords # were assigned such that each site is separated from others # by more than the cutoff distance used in variogram construction coordinates(dat) <- ~x+y # Classic variogram model with example exponential fit varClassic <- variogram(resid ~ 1, dat, cutoff = 180, width = 180/25) # Note singularity error; starting values determine 'fit' expClassic <- fit.variogram(varClassic, model = vgm(1, "Exp", 1, 0)) plot(varClassic, expClassic) # Robust (Cressie) variogram model with example exponential fit varCressie <- variogram(resid ~ 1, dat, cutoff = 180, width = 180/25, cressie=TRUE) expCressie <- fit.variogram(varCressie, model = vgm(0.3, "Exp", 50, 0.1)) plot(varCressie, expCressie) -- View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Classical-or-robust-variogram-to-model-temporal-autocorrelation-tp7586831.html Sent from the R-sig-geo mailing list archive at Nabble.com.
Classical or robust variogram to model temporal autocorrelation?
1 message · adamsmith