BookmarkSubscribeRSS Feed
ammarhm
Lapis Lazuli | Level 10

Guys, I really need help with this:

 

I am trying to do a sample size calculation, for comparison of means of three groups as follows:

 

%let ngroup=34; 	        /*n per group*/
%let sd=15;			/*standard deviation*/
%let power=0.80;	        /*Required power*/
%let m1=20;			/*Mean group 1*/
%let m2=30;			/*Mean group 2*/
%let m3=30;			/*Mean group 3*/
%let alpha=0.05;		/*Mean group 3*/


proc power; 
  onewayanova test = overall
  groupmeans = &m1 | &m2 | &m3 
  stddev = &sd 
  npergroup =  &ngroup 
  power = .
  alpha=α
   plot x=n min=1 max=100 npoints=20;
run;

 

OK so this is telling me that with 34 per group I will get a power of 0.80

Correct me if I am wrong, but this will only tell you how strong your power is to detect overall difference, and not between group differences.

I am also interested in taking into account pairwise comparisons when doing the sample size calculation, I can think of two strategies and I dont know if they are adequate:

1. use  Bonferroni correction dropping the alpha to 0.05/ngroup(3)=0.017

or use contrast but i am not sure if contrasts are right and what /how to use them

Could anyone please please try o help me out with these questions?

1 REPLY 1
ammarhm
Lapis Lazuli | Level 10

Anyone has any suggestions pease?

All help is appreciated

Kind regards

AM

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 1407 views
  • 0 likes
  • 1 in conversation