Hello people,
I am trying to replicate this SAS code in STATA:
if 0<=literacy<63.82 then litcat1=1;
if 63.82<=literacy<68.81 then litcat1=2;
if 68.81<=literacy<73.258 then litcat1=3;
if 73.258<=literacy<78.829 then litcat1=4;
if 78.829<=literacy then litcat1=5;
if litcat1=1 then litcat=1;
if litcat1 in(2,3,4) then litcat=2;
if litcat1=5 then litcat=3;
I have tried the xtile with the if options but STATA says "weights not allowed"
What should I do?
I am trying to replicate this SAS code in STATA:
if 0<=literacy<63.82 then litcat1=1;
if 63.82<=literacy<68.81 then litcat1=2;
if 68.81<=literacy<73.258 then litcat1=3;
if 73.258<=literacy<78.829 then litcat1=4;
if 78.829<=literacy then litcat1=5;
if litcat1=1 then litcat=1;
if litcat1 in(2,3,4) then litcat=2;
if litcat1=5 then litcat=3;
I have tried the xtile with the if options but STATA says "weights not allowed"
What should I do?
Comment