BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
tebert
Obsidian | Level 7

I am running a MANOVA in proc GLM. I would like to extract the model sums of squares into a new data set. How is this done? I can do this the hard way using this code:

%macro repete (new, in=inone);
%do i=2000 %to 5000 %by 5;
data &new; Set &new;
if LeafCa le &i/1000 THEN GROUP=1; ELSE GROUP=2;
PROC Glm outstat=twos;
 CLASS GROUP;
MODEL AvgStarchugdivmm2=GROUP SPAD  SLAcm2divg  LeafP   LeafFeppm  SoilBufferpH6inch;
%end;
%mend repete;
%repete(one, in=one);
run;

 

 

I can then copy and paste the results into Excel, and extract the model SS from there. While slow, I will do that if I must. It is a Cate-Nelson analysis.

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

Blog post to support the answer from @PaigeMiller:

 

ODS OUTPUT: Store any statistic created by any SAS procedure

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26

You can use ODS OUTPUT to obtain any statistic from any SAS PROC in a SAS data set.

--
Paige Miller
ChrisHemedinger
Community Manager

Blog post to support the answer from @PaigeMiller:

 

ODS OUTPUT: Store any statistic created by any SAS procedure

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 2 replies
  • 879 views
  • 1 like
  • 3 in conversation