Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Programming
- /
- SAS Procedures
- /
- proc glm and coefficient estimate

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 03-30-2022 08:43 AM
(2536 views)

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

thanks i find this code helps

ods output ParameterEstimates=test1;

ods output ParameterEstimates=test1;

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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;

the data is uploading...

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;

the data is uploading...

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

Some of us cannot download attachments. Other people will not download attachments.

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

what about this

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

here is the sample data

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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;
```

**SAS Innovate 2025** is scheduled for May 6-9 in Orlando, FL. Sign up to be **first to learn** about the agenda and registration!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Ready to level-up your skills? Choose your own adventure.