Presentation is loading. Please wait.

Presentation is loading. Please wait.

GRTS for the Average Joe: A GRTS Sampler for Windows Trent McDonald Monitoring Science Symposium Denver, CO 21-24 Sep 2004.

Similar presentations


Presentation on theme: "GRTS for the Average Joe: A GRTS Sampler for Windows Trent McDonald Monitoring Science Symposium Denver, CO 21-24 Sep 2004."— Presentation transcript:

1 GRTS for the Average Joe: A GRTS Sampler for Windows Trent McDonald Monitoring Science Symposium Denver, CO 21-24 Sep 2004

2 Outline Motivation for the GRTS sampler Description of the sampler, S-Draw Examples Performance Planned modifications

3 Motivation Basic hypotheses: –Average Joe understands the utility of GRTS samples –Average Joe does not totally understand the inner workings of GRTS sampling –Average Joe could not draw a GRTS sample if his life depended on it.

4 Motivation A GRTS sampler was needed because: –Average Joe should be able to draw GRTS samples –I should be able to draw GRTS samples

5 S-Draw Windows application Written in Fortran 95 –Amazing speed –Cross-platform portability ok –Cross-language calls easy (S-Plus, R, C++) Used Lahey compiler Also S-DrawB

6 S-Draw Draws samples of –Discrete units (finite populations) –Located in either 1-D or 2-D Examples: –1-D: River segments located by river mile –2-D: Grid cells located in an area –2-D: River segments located by coordinates of their midpoints

7 S-Draw Coordinates of units are specified in a text file –i.e., the sampling frame is a ASCII file Sampling frame can optionally contain weights and IDs

8 S-Draw Frame Formats: Sample StructureData Included in Frame Pre- defined1-D2-D Sample weights Coordin- atesID's Order of fields in frame file Yes x wgt id Yes Nox wgt Yes NoYesx id Yes No x YesNoYes wgt id YesNoYesNowgt YesNo Yesid YesNo [# lines counted] Yes x y wgt id Yes Nox y wgt YesNoYes x y id YesNoYesNox y Yes*Yes- k1 … kK wgt id Yes*Yes-Nok1 … kK wgt Yes*No-Yesk1 … kK id Yes* No- k1 … kK * K specified on the first line of the frame file

9 S-Draw Example frame: Eagle study STARTPNT_XSTARTPNT_YLINE_IDIDENDPNT_XENDPNT_Y -42101445726701439-4202454572670 -42129545746702440-4198024574670 -42124545766703441-4198024576670 -42119645786704442-4198024578670 -42129245806705443-4198024580670 -42168745826706444-4198024582670 -42280645846707445-4198024584670 -42312245866708446-4198024586670 -42297245886709447-4198024588670 -422836459067010448-4198024590670 -422352459267011449-4198024592670 -421284459467012450-4198024594670 Columns following frame data ignored

10 S-Draw Does the quadrant-recursive mapping of Stevens and Olsen (2004): 0 n 14 23 4312 1 2 3 4 2 1 3 4

11 S-Draw Pixelsize = size of smallest quadrant in recursive map S-Draw allows user to specify pixelsize

12 S-Draw Line segment (0,n] sampled using a systematic sample –Random start between (0,1] –Step size = 1.0 0 n 1 2 3 u1u1 u2u2 u3u3 u4u4 Random start = 0.19

13 S-Draw Reverse-hierarchical ordering of sample optionally applied –Convert sample order to base-4: 100 10 =01200 4 –Reverse base-4 digits: 01200 4 =00210 4 –Convert back to base-10: 00210 4 =36 10 –Sort sample on base-10 numbers

14 S-Draw Users can pre-define the hierarchical sort keys Digits within each level of the hierarchy are randomly permuted, and sample is drawn as usual Allows use of a general recursive map –Triangular-recursive –IDs like: state.county.watershed.segment

15 S-Draw Triangular-recursive mapping: 1 2 3 4

16 Examples C:\>s-drawb –n 20 –popsize 100 –Will produce 1-D GRTS sample of size 20 assuming units are located at coordinates 1, 2, …, 100 C:\>s-drawb –n 20 –popsize 100 –pixelsize 100 –Will produce a simple random sample of size 20 C:\>s-drawb –n 20 –popsize 100 –nrand –Will produce a fixed-size systematic sample

17 Examples Golden eagle sample: –Dense grid of transect start points spaced 2km north-south, 100km east-west –No-fly transect portions eliminated, new transect start created –Frame: 27,078 starting points over western US 2-D coordinates and IDs –Desire sample of 416 transects 208 primary, 208 alternate

18 Examples 2-D Coordinates and ID in frame Sample size Frame file

19 Examples

20 Performance GRTS sample of size 500 from 100,000 took 4.2 seconds on my laptop GRTS sample of size 500 from 1,000,000 took 44.3 seconds Algorithms approximately O(N) Runs should take ~ 4.45e-5(N) seconds –N=5,000,000: ~3.7 minutes

21 Enhancements An S-Plus and R interface Ability to read.e00 file, and ArcGIS binary files Ability to take a true point sample


Download ppt "GRTS for the Average Joe: A GRTS Sampler for Windows Trent McDonald Monitoring Science Symposium Denver, CO 21-24 Sep 2004."

Similar presentations


Ads by Google