SAS Ods Output for Anova

685 Views Asked by At

I created an Anova and want to save the mean, standard deviation, F-statistics and the p-Value in a new data set. This is my current code:

ODS OUTPUT means=anova;
PROC ANOVA DATA= multiple_sclerosis;
CLASS ms_form;
MODEL eq5d = ms_form;
MEANS ms_form;
RUN;
quit;
ods output close;

Thanks for any help!

2

There are 2 best solutions below

0
Joe On

You can add ODS TRACE ON; before your code to see the names of the tables that it outputs. In this case, I think you want the ModelANOVA table (the second table in the Output/Results window).

ODS OUTPUT means=anova modelAnova=model;
PROC ANOVA DATA= sashelp.cars;
  CLASS cylinders;
  MODEL mpg_highway=cylinders;
  MEANS cylinders;
RUN;
quit;
ods output close;
0
Grigory P On

You have to add "outstat=" statement. Try this:

PROC ANOVA DATA= multiple_sclerosis;
CLASS ms_form;
MODEL eq5d = ms_form;
MEANS ms_form;
OUTSTAT = <output library>.<output table>; /* <--- */
RUN;