Hello every one
I have a small issue which is How to exclude some industry from my sample ?
as we know that SIC variable consists of numbers and alphabets (e.g., K1, G05, .. etc)
when i use IF sentence
data real; set rem;
if SIC=j66 then delete;
run;
it does not work
i get this message
NOTE: Variable j66 is uninitialized.
please how can do it
If you don't put quotes around a value then SAS assumes it is a variable hence the note about the variable not initialised:
data real; set rem;
if SIC='j66' then delete;
run;
If you don't put quotes around a value then SAS assumes it is a variable hence the note about the variable not initialised:
data real; set rem;
if SIC='j66' then delete;
run;
You need to put the string J66 in quotes exactly as it appears in the data:
data real;
set rem;
if sic='J66' then delete;
run;
Or what may be quicker:
data real;
set rem (where=(sic ne 'J66'));
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.