Help using Base SAS procedures

Proc reg append no obs and rsq

Reply
Occasional Contributor
Posts: 9

Proc reg append no obs and rsq

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.
Super Contributor
Posts: 281

Re: Proc reg append no obs and rsq

You would need to output other ODS tables that contain R-square and N
Occasional Contributor
Posts: 9

Re: Proc reg append no obs and rsq

Thank you. ODS did the job Smiley Happy
Occasional Contributor
Posts: 9

Re: Proc reg append no obs and rsq

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.
Super Contributor
Posts: 281

Re: Proc reg append no obs and rsq

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"?
Occasional Contributor
Posts: 9

Re: Proc reg append no obs and rsq

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.
Super Contributor
Posts: 281

Re: Proc reg append no obs and rsq

> 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.
Ask a Question
Discussion stats
  • 6 replies
  • 197 views
  • 0 likes
  • 2 in conversation