Hi all,
I'm running a one way ANOVA analysis in SAS based on the following code:
proc anova data=dt;
class SERINDEX;
model Value0USNumdec = SERINDEX;
run;
The output returns:
The SAS System |
4 | 0.00220000 | 0.00055000 | 27.50 | <.0001 |
20 | 0.00040000 | 0.00002000 | ||
24 | 0.00260000 |
0.846154 | 0.912681 | 0.004472 | 0.490000 |
4 | 0.00220000 | 0.00055000 | 27.50 | <.0001 |
As an R user, I'm used to get the DF, Variance component (VC), CV (as percentage), SD and Root MSE both for the model and for the error when I perform an one-way ANOVA analysis.
How can I specify this output in SAS? The user guide for Proc Anova has nothing on it. I also looked at the proc Varcomp or proc mixed procedures but they seem not to give the output I need as well.
You really ought to format your output so that it is readable, that will help us and thus you get better answers and quicker answers. For output, a screen capture is fine (and readable).
I'm used to get the DF, Variance component (VC), CV (as percentage), SD and Root MSE both for the model and for the error
I do not know what the "variance component (VC)" in a one-way ANOVA means. Can you explain/provide a formula?
The SD**2 is the "Mean Square" column. There is no such thing as a root MSE both for the model and for the error. It only exists for the error, and is shown. The DF and CV are shown.
This is the R output I'm used to where the "estimates" for the errors and the model are shown. I wanted to create a similar output in SAS where, for both the error and the model I have the DF, SD and CV (%). Is there any option or another proc statement that I can use to obtained something similar to the image above?
I asked you to explain what VC means in a one-way ANOVA, or provide the formula, I don't see that.
Everything else you ask for is in the ANOVA output, or can be computed from the ANOVA output.
There is nothing in SAS that produces this exact output; but you can of course program something to produce this exact output (although I am skeptical that matching the R output appearance exactly is necessary, or worth the effort)
Looking at this output, i notice a line for total, one for the one-way factor and one for the error. The total variance is that obtained from a null model (no effects). The error variance is the residual error after fitting the model, and the attributed variance component for the one-way factor is the difference between those two. Now comes the tricky part to think about, and it comes from the usual definition of variance component - the variance that is attributable to some random effect. Now if you assume that SERINDEX is a random effect (and thus that this is a simplified nested model), then that value in the R output is then a random variance component.
But in PROC ANOVA, SERINDEX would be fit as a fixed, non-nested effect. Perhaps PROC NESTED would give you what you want. Without the dataset it is hard to tell.
SteveDenham
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.