[R] Dummy (factor) based on a pair of variables

Serguei Kaniovski Serguei.Kaniovski at wifo.ac.at
Sat Apr 18 13:52:35 CEST 2009


Bernardo: this is not quite what I am looking for,

Let the data be:
y,i,j
1,AUT,BEL
2,AUT,GER
3,BEL,GER

then the dummies sould look like:

y,i,j,d_AUT,d_BEL,d_GER
1,AUT,BEL,1,1,0
2,AUT,GER,1,0,1
3,BEL,GER,0,1,1

I can generate the above dummies but can this design be imputed in a 
reg. model directly?

Serguei




More information about the R-help mailing list