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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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