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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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