Tag Archives: inference

Generalized Least Squares regression: regression models with spatial autocorrelation

This is the R code for performing Generalized Least Squares regression without (mod0) and with spatial autocorrelation (mod1), using the gls function in the library nlme: # first load the nlme library library(nlme) # read data (forest recovery after forest fire) # 30000 cells from satellite imagery datos