BookmarkSubscribeRSS Feed
shellp55
Quartz | Level 8

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.

6 REPLIES 6
Reeza
Super User

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

shellp55
Quartz | Level 8

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!

shellp55
Quartz | Level 8

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. 

PGStats
Opal | Level 21

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
shellp55
Quartz | Level 8

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. 

PGStats
Opal | Level 21

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

New Learning Events in April

 

Join us for two new fee-based courses: Administrative Healthcare Data and SAS via Live Web Monday-Thursday, April 24-27 from 1:00 to 4:30 PM ET each day. And Administrative Healthcare Data and SAS: Hands-On Programming Workshop via Live Web on Friday, April 28 from 9:00 AM to 5:00 PM ET.

LEARN MORE

Discussion stats
  • 6 replies
  • 1719 views
  • 0 likes
  • 3 in conversation