SAS Procedures

Help using Base SAS procedures
BookmarkSubscribeRSS Feed
rickw
Calcite | Level 5
Hi,

I want to add noobs and rsquare to parameter estimates.

I know we could use ODS parameter estimates to create the parameter estimates table. However, I want No of obs used, read and Rsqaure also added to this table .. Is there any option in ODS that does it ?

I am using the following code:

ods listing close;
ods output ParameterEstimates=Parameter_Estimates(drop = model dependent df label);

proc reg data = temp;
model &dep = &indep_vars;
by &group_by;
run;

ods listing;


Thank you.
6 REPLIES 6
Paige
Quartz | Level 8
You would need to output other ODS tables that contain R-square and N
rickw
Calcite | Level 5
Thank you. ODS did the job 🙂
rickw
Calcite | Level 5
Hi,

When I am running regression using by group processing, SAS stops working when there are less no. of observations in a group.


Is there any way I could tell sas to continue executing for the remainder of the observations rather than stopping.??

Thanks.
Paige
Quartz | Level 8
I don't observe this.

Could you provide more details? Or a copy of the log?

What do you mean by "stops working"?
What do you mean by "less no. of observations in a group"?
rickw
Calcite | Level 5
I get the following error:

ERROR: No valid observations are found.
NOTE: The above message was for the following BY group:
Segment=a1 HR_Class=sec2
ERROR: No valid observations are found.
NOTE: The above message was for the following BY group:
Segment=a1 HR_Class=sec3
ERROR: No valid observations are found.
NOTE: The above message was for the following BY group:
Segment=a3 HR_Class=sec1
NOTE: Interactivity disabled with BY processing.
NOTE: PROCEDURE REG used (Total process time):
real time 3.54 seconds

However, I see that my program produces the files that I need to export even though the error message is there. Are the results outputted correct in this case??

Thanks.
Paige
Quartz | Level 8
> I see that my program produces the files that I
> need to export even though the error message is
> there. Are the results outputted correct in this
> case??

They are correct in my example.

sas-innovate-white.png

Our biggest data and AI event of the year.

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.

 

Register now!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 6 replies
  • 1776 views
  • 0 likes
  • 2 in conversation