LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2010, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 21 Jan 2010 14:54:43 -0600
Reply-To:     Sudo Ku <crafty876@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Sudo Ku <crafty876@HOTMAIL.COM>
Subject:      Sampling Problem
Content-Type: text/plain; charset="Windows-1252"

Hello: I have the following data that I would like to randomly sample records from: Order Lot Grain Class Weight 00209 0 Canola 21313.550 00214 0 Canola 10488.960 00203 1 Canola 5414.664 00140 0 OatNCC 9359.426 00218 0 Canola 26250.000 00204 0 Wheat CWRS 8157.350 00204 0 Wheat CWRS 7599.205 00204 0 Wheat CWRS 10160.540 00204 0 Wheat CWRS 6020.755 00213 2 Canola 27006.395 00219 0 Canola 8191.057 00219 0 Canola 12964.728 00216 1 Canola 25607.506 00210 0 Wheat CWRS 17821.145 00207 1 Barley 28111.276 00207 2 Barley 1538.731 00217 0 Wheat CWRW 18600.000 00215 0 Peas 5850.000 00020 1 ADurum 26424.020 00021 1 ADurum 45550.000 00022 2 ADurum 5502.830 00022 1 ADurum 29973.816 00025 1 Soybns 544.295 00026 0 Flax 14147.310 00999 0 BlyNCC 213.979 I would like to sample all the different grains and classes at set rate, and have a minimum and maximum number of samples drawn each time I sample, and Proc Surveyselect would work great in instances like this.

The tricky part is that my client is looking for rare event items, and feels he may find more if he samples the larger weight orders, so for example the first 3 canola orders he would prefer order 209 lot # 0 (21,313 tonnes) to order 203 lot # 1 (5,414 tonnes). Also the average weight of many of the shipments will be related to the grain (and class) shipped, so for example order 215 lot #0 Peas (5850 tones) relative to all other Pea shipments during made during the year will be huge. Finally, at the end of the year the client would like the sampling rate on all the shipments and all the grains/Classes to be close to x%. I will have ~29 different grain (Subclass) groups I would need to sample from and in the largest group there may be 1000 orders a year in the smaller group there could be none....

I have a couple of other sampling programs I have made and I have done sampling (using survey select) by grain grouping but I have never added the weighting to sample for larger cargoes. I realized I havn't included all the information or even challenges in this email. For example I plan on running this program monthly so there will have to be some sort of forecastsing for the number (and maybe even weight) of orders of each grain throughout the year but I could have a large historical data to test out some of my sampling strategies. I’m not looking for the exact sas code to do this per se but hoping to get a general sense of the procedures and calculations that may be involved. Thanks for the help. Kevin

_________________________________________________________________ Say Happy New Year with Messenger for Mobile. http://go.microsoft.com/?linkid=9706117


Back to: Top of message | Previous page | Main SAS-L page