Fluorite | Level 6

## proc glm and coefficient estimate

how to output only one table including the coefficient estimates for each group?

``` proc glm;
by group;
class a;
model y1-y5=a x(a);
output out=pout predicted=py1-py5;
run;```

10 REPLIES 10
Diamond | Level 26

## Re: proc glm and coefficient estimate

Try the /SOLUTION option in the MODEL Statement.

If that's not what you want then:

Explain further. What do you mean by "only one table including the coefficient estimates for each group"?

What is wrong with the output that you get?

--
Paige Miller
Fluorite | Level 6

## Re: proc glm and coefficient estimate

thanks i find this code helps
ods output ParameterEstimates=test1;
Fluorite | Level 6

## Re: proc glm and coefficient estimate

but i still have a problem

when regressing y on x1 and x3 with fixed effect ID AND date, why the result is null:
proc glm data=test ;
absorb id date;
model y=x1 x3/ solution int;
quit;run;

Diamond | Level 26

## Re: proc glm and coefficient estimate

Why is WHAT result null? SHOW US a screen capture of the problem.

--
Paige Miller
Fluorite | Level 6

## Re: proc glm and coefficient estimate

here is the result  and this is stata 's result

y |     Coef.            Std. Err.            t         P>|t|             [95% Conf. Interval]
-------------+----------------------------------------------------------------
x1 |   0.0498584    0.0502977       0.99        0.322            -.0488068 .1485237
x3 |   0.0241822    0.0540281        0.45          0.655           -.0818006 .1301651

Diamond | Level 26

## Re: proc glm and coefficient estimate

Post screen captures in your reply by clicking on the "Insert Photos" icon.

--
Paige Miller
Fluorite | Level 6

## Re: proc glm and coefficient estimate

Diamond | Level 26

## Re: proc glm and coefficient estimate

You have zero degrees of freedom for error. The model you have fit has the maximum number of parameters, and fits perfectly.

So, without seeing the data (because I refuse to download files), I can't advise further. You need to provide A PORTION OF the data as SAS data step code in your message (not as a file that I should download), instructions are here. Probably the problem is due to the ABSORB statement, maybe you don't need both variables in there, maybe you should remove DATE, maybe you should eliminate that ABSORB statement, but I am guessing as I can't see the data.

--
Paige Miller
Fluorite | Level 6

## Re: proc glm and coefficient estimate

here is the sample data

SAS Super FREQ

## Re: proc glm and coefficient estimate

Please include the NObs table. It is possible that you have no valid observations.

The problem could be that you read the data incorrectly. The data you attached seem to be invalid. They look like this:

 31-Dec-03 77546 1 0 1 1 31-Dec-03 10104 1 0 1 1 31-Dec-03 77284 1 0 1 1

In your CSV file, there is only one column, which contains values like

"31-Dec-03 77546 1 0 1 1"

You need to make sure that those numbers are properly read into the variables in your program. Otherwise, the y, x1, and x3 variables might contain missing values.

The other thing you can do is run the following and upload the results:

``````proc print data=test(obs=5);
var id date y x1 x3;
run;``````
Discussion stats
• 10 replies
• 887 views
• 1 like
• 3 in conversation