BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Radwan
Quartz | Level 8

Hello 

when I run this code 

proc reg noprint data=found1 outest=regress1;
model TACC1=  part1 part2 part3/ r;
by year induscode; run;

the sas program gave me this message 

 

NOTE: The above message was for the following BY group:
year=2008 indusCode=G60
ERROR: No valid observations are found.
NOTE: The above message was for the following BY group:
year=2009 indusCode=C24
ERROR: No valid observations are found.
NOTE: The above message was for the following BY group:
year=2016 indusCode=E49
ERROR: No valid observations are found.
NOTE: The above message was for the following BY group:
year=2017 indusCode=B10
ERROR: No valid observations are found.
NOTE: The above message was for the following BY group:
year=2017 indusCode=O80
ERROR: No valid observations are found.
NOTE: The above message was for the following BY group:
year=2017 indusCode=R88
NOTE: Interactivity disabled with BY processing.
NOTE: PROCEDURE REG used (Total process time):
real time 0.80 seconds
cpu time 0.68 seconds

NOTE: The data set WORK.REGRESS2 has 1296 observations and 11 variables.

 

 I got the results  but i m doubted about this message.

please what does it mean?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
PeterClemmensen
Tourmaline | Level 20

Well, I can't see your data. But you have to dig in a little deeper to find out. For example, what data do you get when you run this?

 

data test;
   set found1;
   where year=2008 and indusCode='G60';
run;

If it is all missing for your regression variables, then you have your answer

View solution in original post

4 REPLIES 4
PeterClemmensen
Tourmaline | Level 20

This happens because you do not have valid data for some of your by groups. Below is a very simple example where I added an observation to the sashelp.class data set with the sex variable value 'T'. Then I set the height and weight variables to missing and run a similar regression and use sex as a BY variable..

 

data regdata;
   set sashelp.class end=eof;
   output;
   if eof then do;
      SEX='T';
      call missing(height, weight);
      output;
   end;
run;

proc sort data=regdata;
   by sex;
run;

proc reg data=regdata noprint;
   model weight=height;
   by sex;
run;

 

To clarify..  You will get regression results to interpret on. But not for the by-groups that do not have valid data.

Radwan
Quartz | Level 8
Ok but what kind of non validity of  the data?
PeterClemmensen
Tourmaline | Level 20

Well, I can't see your data. But you have to dig in a little deeper to find out. For example, what data do you get when you run this?

 

data test;
   set found1;
   where year=2008 and indusCode='G60';
run;

If it is all missing for your regression variables, then you have your answer

Reeza
Super User
FYI - I've updated your subject here to make it more descriptive. Please do the same to your other open post: https://communities.sas.com/t5/SAS-Procedures/a-new-question/m-p/532382

SAS Innovate 2025: Save the Date

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

Save the date!

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
  • 4 replies
  • 2178 views
  • 2 likes
  • 3 in conversation