Hi guys:
I have many ANOVAs to be run and each of them has its respective p value and R squares.
All ANOVAs have the same amount of observations, this means thar ERROR I and III could be taken to make part of the table i need to get
There we go, we have 3 ANOVA, everyone is a different answer on each environment:
data have;
input order environment country$ observation;
cards;
1 1 a 11.7062885827733
2 1 a 12.5326186073177
3 1 a 12.1121866473611
4 1 a 10.6770770786762
5 1 b 12.7272303160372
6 1 b 12.5069020572854
7 1 b 10.3801953337563
8 1 b 11.3699075949466
9 1 b 14.7913170706891
10 2 c 11.7957215280586
11 2 c 12.7967928055036
12 2 c 12.3156597291194
13 2 c 11.4903775240095
14 2 c 12.2868489869184
15 2 d 12.0244581514243
16 2 d 11.2738963155379
17 2 d 11.2017213686765
18 2 d 12.6084387827896
19 2 d 13.2818434423956
20 3 e 12.7756560519949
21 3 e 11.0392289428102
22 3 e 12.0000826320338
23 3 e 11.139270842614
24 3 e 13.5663343765743
25 3 f 11.7650627921355
26 3 f 12.6102709811389
27 3 f 11.5515913330262
28 3 f 14.0639297127507
29 3 f 12.3158309468017
proc glm data = have;
where environment = 1;
class country order;
model observation = country order;
random order;
means country / duncan tukey lines;
run;
quit;
proc glm data = have;
where environment = 2;
class country order;
model observation = country order;
random order;
means country / duncan tukey lines;
run;
quit;
proc glm data = have;
where environment = 3;
class country order;
model observation = country order;
random order;
means country / duncan tukey lines;
run;
quit;
now, we have to mount a new table containing:
Environment | rsquared | P value Model | P value Error I | p value ERROR III |
1 | ||||
2 | ||||
3 |
IMPORTANT INFORMATION IN BIG CAPS
DATA PRESENTED HERE IS ENOUGH TO ACCOMPLISH THE PUZZLE, NO NEED TO GET MORE DETAILS.
Thanks for the help
Bets regards, always
Anything that appears in the results from these procedures should be available using ODS OUTPUT to place the values from one or more objects into data sets. Once you have the data sets you combine them using data step code most likely.
However since your data step as posted does not run correctly as posted we have no data set to test anything.
Sort your data BY Environment;
Use BY Environment in the Proc GLM to reduce the number of data sets you are creating.
proc sort data=have; by environment; run; proc glm data = have; ods output overallanova=work.pvalues fitstatistics=work.rsquare ; by environment; class country order; model observation = country order; random order; means country / duncan tukey lines; run; quit;
We can't show you code to combine these two tables to have Rsquare and Pvalue in same data set because you have said we can't ask you what the *bleep" you output data set is supposed to look like.
We can't ask "What P-value" where none of your groups of environment have enough observations and generate warnings of
WARNING: Mean separation procedures will not be carried out due to zero degrees of freedom for the specified error source.
Since I can't ask questions ... I can't give you an answer nor can I even help you move towards an answer. Why are questions not allowed? I'd like to help...
Anything that appears in the results from these procedures should be available using ODS OUTPUT to place the values from one or more objects into data sets. Once you have the data sets you combine them using data step code most likely.
However since your data step as posted does not run correctly as posted we have no data set to test anything.
Sort your data BY Environment;
Use BY Environment in the Proc GLM to reduce the number of data sets you are creating.
proc sort data=have; by environment; run; proc glm data = have; ods output overallanova=work.pvalues fitstatistics=work.rsquare ; by environment; class country order; model observation = country order; random order; means country / duncan tukey lines; run; quit;
We can't show you code to combine these two tables to have Rsquare and Pvalue in same data set because you have said we can't ask you what the *bleep" you output data set is supposed to look like.
We can't ask "What P-value" where none of your groups of environment have enough observations and generate warnings of
WARNING: Mean separation procedures will not be carried out due to zero degrees of freedom for the specified error source.
Run the example code with your data.
Check the results in the datasets Work.Rsquare and Work.Pvalue.
If you mean by a different procedure then the approach is likely the same but the details may differ as not all procedures create the same ODS output objects. Use ODS TRACE on/off; around procedure code to see the names of the objects created that you can use to create data sets with ODS OUTPUT.
@jonatan_velarde wrote:
Thanks for the feedback,
Assuming that p values could be obtain, using other dataset.
How could it be done?
Thanks one more time
Awesome!!1 YOu nailed it!!!
ODS OUTPUT was the answer i was expecting to solve the question!!!
Congratulations and thanks!!!
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.