BookmarkSubscribeRSS Feed
tebert
Obsidian | Level 7

I have a data set with 84 variables, and a treatment variable with 4 states (a, b, c and d). For variable 1, I want to know if there are mean differences between the 4 treatments. I then test variable 2, and so forth. I use proc GLIMMIX, and an lsmeans statement with adjust=tukey. For the variables that show no significant differences, is there a way to get SAS to calculate the sample size that would be needed to get a significant outcome?  I would be happy if I could get the calculation for all of the variables and then process the output by hand to get only the non-significant variables.

 

There will be a sample size needed to get a significant difference between a and b, and this will be different than the sample size necessary to get b different than d. There are six possible values, but I am mostly just interested in the smallest value that will give at least one significant difference.

 

The SAS code looks like this, where the independent variable in NumPrbs, and trt is short for treatment :

 

Proc glimmix plots=residualpanel;

class trt;

model NumPrbs=trt;

lsmeans trt/adjust=tukey pdiff lines;

title 'ANOVA & LSD of NumPrbs';

 

 

Here is data from NumPrbs. Values are not integer because the data were transformed:

a5.291503
a4.472136
a6.78233
a5.477226
a3.316625
a3.741657
a4.795832
a2.645751
a5.385165
a4.690416
a5.91608
a3.464102
a2.236068
a4.242641
a3.605551
a2
a3.316625
a3.464102
a4.472136
a3
a3.162278
a4.242641
b6.557439
b6.164414
b7.141428
b5.830952
b1.732051
b2.236068
b7.071068
b4.898979
b2.236068
b4.795832
b2.44949
b4
b5.477226
b5.291503
b5.291503
b4.898979
b4.358899
b6.324555
b4.358899
b5.656854
b3.605551
b3.316625
b6.324555
c8.660254
c3.316625
c4.582576
c4.472136
c5.09902
c7
c2.44949
c4.898979
c3
c4.898979
c1.732051
c5.477226
c2.828427
c3.162278
c7.28011
c4.242641
c6.557439
c5.09902
c4.242641
c6.164414
c2.645751
c4.690416
c4.795832
c2.236068
d5.385165
d4.358899
d5.477226
d2.236068
d5.567764
d3.162278
d3.741657
d2.236068
d4.582576
d8.944272
d6.78233
d5.385165
d7.483315
d5.477226
d8.831761
d4.123106
d6.164414
d6.78233
d3.162278
d6
1 REPLY 1
sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

A power analysis would answer your question about sample size. For this model (a one-way ANOVA), you could use the GLMPOWER procedure.

 

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
  • 1524 views
  • 0 likes
  • 2 in conversation