You could model both types of variability (temporal and spatial) through PROC GLIMMIX, with temporal correlation handled as an R-side structure and spatial as a G-side structure. To add on to PG's comment, from the long dataset, create a concatenated variable from the longitude and latitude, sort on this variable, and use either first. in a datastep or select unique in PROC SQL to get a dataset with only single wells. Process through SURVEYSELECT, and then merge back against the original data. This should put Selected=1 on all records for the random sample. From there the analysis can operate on a WHERE= basis. Steve Denham
... View more