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;
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?
Why is WHAT result null? SHOW US a screen capture of the problem.
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
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.
what about this
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.
here is the sample data
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;
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
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.