Non-Randomized Randomization

Reply
Regular Contributor
Posts: 152

Non-Randomized Randomization

Hi

I have a list of chart numbers for a chart review.  I used the retain seed methodology to produce a randomized list which nicely split the data out equally among discharge months and patient services to replicate the approximate percentages of the entire database.

However, what if I want to manipulate the volumes per patient service i.e. so that I get less newborn/obstetric cases and a higher volume of medicine charts? 

Thanks very much.

Grand Advisor
Posts: 17,396

Non-Randomized Randomization

I think you want a Stratified random Sample, stratified by the case type.

You can use PROC SURVEYSELECT

See here:

http://www.ats.ucla.edu/stat/sas/faq/statified_samples.htm

Regular Contributor
Posts: 152

Non-Randomized Randomization

Hi Reeza

Thanks very much....I'm not sure I understand fully what the article is telling me to do but I'll give it a try and post back if I have questions.

Thanks again!

Regular Contributor
Posts: 152

Re: Non-Randomized Randomization

Hi

Since posting this I've upgraded to SAS 9.3.  The following code is working in that it provides a 2% sampling per PatServ but what if I want to have different values per PatServ value?  For instance, what I usually do is use a Survey Sample Calculator online to come up with how many charts need to be reviewed for a 95% confidence level and 5% confidence interval.  So I know how many charts I want the total to be but I want to be able to indicate how many per PatServ (either by % or number).

For example, if the sample for a database is 348 charts, I want to be able to indicate 285 (81.9%) of charts are if PatServ 10; 11 (3.2%) if PatServ = 20; 20 (5.7%) if PatServ = 30; etc.

procsort data=&import_result;

by PatServ;

run;

procsurveyselect data = &import_result

method=sys rate=.02 seed=1234

out= &sample_list;

strata PatServ;

run;

Thanks for any assistance. 

Respected Advisor
Posts: 4,609

Re: Non-Randomized Randomization

You need to create a dataset, say mySampSizes,  containing PatServ and _NSIZE_ : the number of units to select from each strata, and use SAMPSIZE=mySampSizes instead of rate=. Or alternatively, you can include a variable _RATE_ and use SAMPRATE=mySampSizes.

PG

PG
Regular Contributor
Posts: 152

Re: Non-Randomized Randomization

Hi PG

Thanks for the quick response.

What I actually did, but I don't know if it is correct, was to include the sample size per PatServ (as it would be in ascending order):

procsort data=&import_result;

by PatServ;

run;

procsurveyselect data= &import_result

out= &sample_list

seed=12345678

sampsize=(285, 11,20, 0,14, 3,0, 11,4, 0,0);

strata PatServ;

run;

This appears to have worked correctly in giving me the number of charts per patient service that I requested.  Conversely, I assume I could indicate samprate() and provide the rates per PatServ. 

Respected Advisor
Posts: 4,609

Re: Non-Randomized Randomization

That works fine, but it's fragile. There is no easy way to tell if the proper sample size is assigned to the right strata. That's why I suggested to use a dataset. In creating such a dataset, you have the opportunity to state the formal rule that decides your sample sizes. It could be something like :

proc sql;

create table mySampSizes as

select PatServ,

case when count(*) < 20 then 0

else ceil(0.1*count(*))

end as _NSIZE_

from &import_result

group by PatServ

order by PatServ;

This way documents your choices and automatically assigns the sample sizes to the proper strata.

PG

PG
Ask a Question
Discussion stats
  • 6 replies
  • 1071 views
  • 0 likes
  • 3 in conversation