Obsidian | Level 7

## Proc power onewayanova

Using SAS 9.4

I am wanting to do a post hoc power analysis

```  proc power plotonly;
onewayanova
groupmeans = 35.6 | 33.7 | 30.2 | 29 28 | 25.9
stddev = 3.75
groupweights = (2 1 1 1 1)
alpha = 0.025
ntotal = 24
power = .
contrast = (4 -1 -1 -1 -1) (0  1  1 -1 -1)
(0  1 -1  0  0) (0  0  0  1 -1);
plot x=n min=24 max=480;
run;```

. I am using the sample code from SAS below but I am not sure where to get the standard deviation?  If you could please tell me how to find that it would be helpful. Thank you

5 REPLIES 5
Super User

## Re: Proc power onewayanova

You need to provide that based on your knowledge of the underlying data. It can be estimated. There are some cases where post hoc power analysis is appropriate, make sure your case is one - it's usually not considered a good idea at all.
Obsidian | Level 7

## Re: Proc power onewayanova

Yes it is not a good idea to do a post hoc power analysis (almost all of the literature says this), however it is a specific request that I cannot ignore.

If I have 4 groups means cannot I just use those to calculate a standard deviation estimate?

Super User

## Re: Proc power onewayanova

Yes, you can use your data to estimate the standard deviation.
Obsidian | Level 7

## Re: Proc power onewayanova

Would it be appropriate to take the 4 means that I have calculated and run them through a code like below to get the standard deviation or since they are mean values is that an inappropriate way? Thank you

proc sql;
create table want as
select *, std(150.3684, 63.59701, 53.16667, 37.21429 ) as sd_a
from have;
quit;

Super User

## Re: Proc power onewayanova

That's wrong, you can't figure out the standard deviations from aggregated data you need to use the raw data.
Discussion stats
• 5 replies
• 470 views
• 0 likes
• 2 in conversation