BookmarkSubscribeRSS Feed
Marwa_Se
Obsidian | Level 7

Hello guys !

 

I have to realize a Bernoulli Sampling, with a rate of error = 5%,

95% for the level of confidence, and 50% for the estimated probability

 

I based my approach on the proc surveyselect by specifying the METHOD=BERNOULLI

 

But I don’t know how to integrate the others parameters (rate of error, level of confidence and estimated probability) in order to obtain a fixed number of samples every time I execute my SAS query

 

Are you here statisticians ??  Woman Embarassed

 

Thank u in advance for ur answers Woman Happy

 

 Marwa

6 REPLIES 6
Reeza
Super User

Sampling usually doesn't have an error rate when doing random sampling from a data set AFAIK...simulations usually do have the parameters you're listing. I'm trying to understand what you're trying to do here but not quite getting it. 

Marwa_Se
Obsidian | Level 7

Thank u for ur answer @Reeza i'm talking about the couple (level of confidence, marging error) which evaluate the level of the risk on my dataset,

 

i explained my problem better on the discussion bellow...

Reeza
Super User

I think you need to use PROC POWER to determine your sample size using whatever rate you have that you're checking for, that's a key component. Then you'll use PROC SURVEYSELECT to actually select the random sample. 

 

 

Rick_SAS
SAS Super FREQ

Could this be a "power and sample size" problem? If so, look at PROC POWER. It sounds like you are considering random samples from a Bernoulli distribution with p=0.5. But then I'm not sure what you want. PROC POWER can answer questions such as "how large a sample must be" in order to be confident that you can detect some effect. See the ONESAMPLEFREQ example for PROC POWER.

Marwa_Se
Obsidian | Level 7

Hello Rick,

 

Thank you for your help Woman Happy

 

Actually i would like to extract from a database, a sample for compliance monitoring, therefore,  i need to obtain a representative sample statistically valid,

 

We have been asked to apply "Bernoulli" on the database and to fix it’s statistical parameters as follow:

 

1- Estimated probability of character = 50%  -> in order to vary downward the sample size

 

2- The level of confidence= 95% and the marging error=5% -> Because the control is based on an activity evaluated with a very high risk

 

I’ve never used the proc power I’m not sure if it answers my questions but I will look at your examples and try to match with my problem...

 

Marwa,

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1698 views
  • 3 likes
  • 4 in conversation