0

I have grid (spatialpolygonsdataframe) that I want to draw a GRTS sample from across two strata. I have "treated" and "untreated" cells and I want to draw a sample of 25 from each. Does anyone know of an R function that can draw a stratified spatially balanced sample.

neither grts.polygon in SDraw or grtsarea in spsurvey seem to have this capability

Thanks

edit - I want to draw a sample of the grid cells themselves, not coordinates within grid cells. There are several hundred grid cells, I just need to draw a sample of 25 cells from each strata.

dmcnitt
  • 1
  • 1
  • Does this answer your question? [How to get around error "factor has new levels" in cross-validation glm?](https://stackoverflow.com/questions/57924068/how-to-get-around-error-factor-has-new-levels-in-cross-validation-glm) – Dave2e Aug 27 '20 at 22:12
  • I don't think your question is very clear... Are you drawing coordinates out of polygons? Like say 10 of your polygons are treated and 10 are not, and you want to draw 25 coordinates out of each treatment. And among the 10 treated Polygons, you want stratified random sample? – Ben Toh Aug 27 '20 at 22:19
  • You will have a better chance of arriving at a helpful answer if you provide examples of what have you tried, desired results and reproducible code so people can see errors / wrong results that you are getting. – Konrad Aug 27 '20 at 23:03

0 Answers0