Question on the 12 industry classification program
Posted: 22 March 2014 09:08 AM   [ Ignore ]
Sr. Member
RankRankRankRank
Total Posts:  169
Joined  2011-09-20

Dear Joost,

I was using the ind_ff12.sas from the link provided on the repository to add industry dummies to my data.

My question is:

  if &sic; > . and &ind;_code = . then &ind_code=12;

when we ask sic>.  what does the program do here? is that okey to compare missing values with something else?

i think the logic of this program here is if missing sic code, no industry dummy will be given, correct?

thanks a lot,
Zenghui

 

 Signature 

Zenghui
A humble student of business

Profile
 
 
Posted: 23 March 2014 03:35 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  901
Joined  2011-09-19

hi Zenghui,

It is confusing smile

In SAS, missing values are still numeric (but smaller than any number). So, instead of testing for “variable ne . ” the code in this macro tests if the industry code is larger than ‘missing’.

That specific line in the macro will set all non-missing industries that have not yet been categorized into industry code 12 (other).

best regards,

Joost

 Signature 

To reply/post new questions: Please use the group WRDS/SAS on Google Groups! http://groups.google.com/d/forum/wrdssas

Profile
 
 
Posted: 24 March 2014 08:36 AM   [ Ignore ]   [ # 2 ]
Sr. Member
RankRankRankRank
Total Posts:  169
Joined  2011-09-20

Joost,

Thanks a lot. It is very clear now.

Best,
Zenghui

 Signature 

Zenghui
A humble student of business

Profile