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

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

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
  • 1042 views
  • 0 likes
  • 2 in conversation