BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Thank you for the potential help.

I posted this in another forum tree, and I am sorry for that. However, I feel quite lost. I have a very long list of genes that I would like to run an ANOVA on. I am running a blocked ANOVA using the GLM command. That was the was the easy part.

proc glm data=Sample.Expression;
by gene;
class block conc;
model exp= block conc;
run;

This generates a long list of results. I can look through this list, and find the p-value for each gene to see if it is changed due to treatment conditions (conc). Is it possible to make a list of each gene and this p-value?

Thank you again, let me know if there is anything I can do.
Dez
1 REPLY 1
MartinJohansen
Calcite | Level 5
Hi Dez,

If I understand your problem correctly the solution is quite simple.
By enclosing your procedure call in "ods trace on" and "ods trace off" you can see the ods table names of all tables in the output in your log. Then you just need to identify the table which contains the results you need and output it to a data set.
I have created an example using the sashelp.class data in which I create a data set of (type III) p values for the effect of height on weight for each gender.

ods trace on;
proc glm data = class_sorted;
by sex;
class age;
model weight = age height;
run;quit;
ods trace off;

ods output ModelANOVA = glm_output(where=(Source = 'Height' and HypothesisType = 3));
proc glm data = class_sorted;
by sex;
class age;
model weight = age height;
run;quit;

I hope this helps you.
Best wishes,
Martin

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 957 views
  • 0 likes
  • 2 in conversation