You can output the results from proc glm
in a (several) table(s).
To retrieve the output of proc glm
, one can use the ods trace statement
to track the object(s) output of proc glm
. For more information, please consider reading the ODS TRACE Statement documentation.
proc glm
output 6 objects: NObs
, OverallANOVA
, FitStatistics
, ModelANOVA
, ModelANOVA
and ParameterEstimates
.
29 ods trace on;
30 proc glm data=sashelp.cars;
31 model length = mpg_city ;
32 quit;
Output Added:
-------------
Name: NObs
Label: Number of Observations
Template: STAT.GLM.NObsNotitle
Path: GLM.Data.NObs
-------------
Output Added:
-------------
Name: OverallANOVA
Label: Overall ANOVA
Template: stat.GLM.OverallANOVA
Path: GLM.ANOVA.Length.OverallANOVA
-------------
Output Added:
-------------
Name: FitStatistics
Label: Fit Statistics
Template: stat.GLM.FitStatistics
Path: GLM.ANOVA.Length.FitStatistics
-------------
Output Added:
-------------
Name: ModelANOVA
Label: Type I Model ANOVA
Template: stat.GLM.Tests
Path: GLM.ANOVA.Length.ModelANOVA
-------------
Output Added:
-------------
Name: ModelANOVA
Label: Type III Model ANOVA
Template: stat.GLM.Tests
Path: GLM.ANOVA.Length.ModelANOVA
-------------
Output Added:
-------------
Name: ParameterEstimates
Label: Solution
Template: stat.GLM.Estimates
Path: GLM.ANOVA.Length.ParameterEstimates
-------------
I induce that by a,b and # points
you are pointing to the estimate
parameter that can be found in the ParameterEstimates
object. The coefficient of determination however can be found in the FitStatistics
object.
Let's say you want to run many proc glm
and append the results in a single table (actually two, considering that you will end up with one table for the estimates and one for the coefficients of determination). You can create a macro that will take the result of each proc glm
and append it to a table.
%macro glm(y, x);
ods output ParameterEstimates=temp_parameters FitStatistics=temp_fit;
proc glm data=sashelp.cars;
model &y. = &x. ;
quit;
proc append data=temp_parameters base=parameters;run;
proc append data=temp_fit base=fit;run;
proc datasets lib=work nolist nodetails; delete temp_:;run;
%mend;
%glm(length, mpg_city);
%glm(length, cylinders);
%glm(length, weight);
The two final tables are created, one populated with the estimates (parameters
table) and one populated with the coefficient of determination (fit
table).
parameters
table:

fit
table:

Unfortunately, without more information about your problem and no data, I can't assist further.