Dummy
by cruz.echevarria@ehu.eus
Dear Gretl users,
I am aware that the following might be trivial, but I am stuck. Suppose that you have a panel data set whose units are countries identified by a numerical variable, say "ccode". And you want to split the sample into two sub-samples: OECD and non-OECD members. I have tried the following:
genr OECD = 0
if ccode == 1
replace OECD = 1
elif ccode == 4
replace OECD = 1
(...)
end
It does not work. I am aware of the piece of warning in the Hansl's manual for Stata users (page 32). But, does anyone know hos I should do this?
Thanks a lot in advance for your cooperation.
Cruz