DATA Step, Macro, Functions and more

How to extract model SS from GLM

Accepted Solution Solved
Reply
Contributor
Posts: 23
Accepted Solution

How to extract model SS from GLM

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.


Accepted Solutions
Solution
4 weeks ago
Community Manager
Posts: 3,378

Re: How to extract model SS from GLM


All Replies
Respected Advisor
Posts: 2,802

Re: How to extract model SS from GLM

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

--
Paige Miller
Solution
4 weeks ago
Community Manager
Posts: 3,378

Re: How to extract model SS from GLM

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 111 views
  • 1 like
  • 3 in conversation