Dear R users, I'm applying a correlation structure in a mixed model (nmle function) to control for spatial correlation between land parcels that are adjacent to each other. I generated X,Y coordinates in ArcGIS for each land parcel and used them in the correlation form like this:
test.exp<-corExp(1, form = ~ X + Y) test.exp<- Initialize(test.exp,dataset) However, the correlation Matrix generated does not look right. Here is a portion of the matrix, in which all correlations are 0: > corMatrix(pdxspc.exp)[1:5, 1:5] [,1] [,2] [,3] [,4] [,5] [1,] 1 0 0 0 0 [2,] 0 1 0 0 0 [3,] 0 0 1 0 0 [4,] 0 0 0 1 0 [5,] 0 0 0 0 1 It seems I'm not using the X Y coordinates correctly in the form. I saw two examples that used "east" and "north" in their form. But I do not quite know what "east" and "north" are. Any help would be greatly appreciated. Best Gary [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.