Thank you for your support, but I managed to solve it in a different way. Via menu;
add < define new variable < newvariable=(oldvariable=1) where the variable in brackets is the variable that has the 1-value! Kind Regards, Laurent Schuermans 2010/12/16 Allin Cottrell <cottrell(a)wfu.edu> > On Thu, 16 Dec 2010, Laurent Schuermans wrote: > > > I have a bunch of dichotomious variables with categories 1 and 2 > > that I want to recode to 0 and 1, which is easier for > > interpretation, but I don't know how to do this. > > If you have a series y containing just 1s and 2s, and you want the > 1s to become zeros and the 2s to become 1s then just subtract 1: > > y -= 1 > > Take a look at the "dummify" command for more complex recoding > needs. > > Allin Cottrell > > _______________________________________________ > Gretl-users mailing list > Gretl-users(a)lists.wfu.edu > http://lists.wfu.edu/mailman/listinfo/gretl-users >
Thank you for your support, but I managed to solve it in a different way. Via menu;
add < define new variable < newvariable=(oldvariable=1)
where the variable in brackets is the variable that has the 1-value!
Kind Regards,
Laurent Schuermans
2010/12/16 Allin Cottrell <cottr...@wfu.edu>
On Thu, 16 Dec 2010, Laurent Schuermans wrote:If you have a series y containing just 1s and 2s, and you want the
> I have a bunch of dichotomious variables with categories 1 and 2
> that I want to recode to 0 and 1, which is easier for
> interpretation, but I don't know how to do this.
1s to become zeros and the 2s to become 1s then just subtract 1:
y -= 1
Take a look at the "dummify" command for more complex recoding
needs.
Allin Cottrell
_______________________________________________
Gretl-users mailing list
gretl-us...@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users