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?
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
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.
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
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.