Hi!
I have an issue with my dummies that I try to create. I am looking into unequal bequests and want a dummy for when the bequest is not equal.
I have 4 different groups for different numbers of children among the deceased, and for 2, 4 and 5 children I have no problem as these are finite values (0.5, 0.25, 0.2) but when try to do the same for the group with 3 children I cannot get it to work. I believe this is because 1/3 is not a finite number. This is the command I have tried:
* create dummy for if bequest is equally divided
generate equalbequest = 0
replace equalbequest = 1 if share_bequest != 0.5 & a_antal_barn == 2 & year == 2004
replace equalbequest = 1 if share_bequest != .3333333 & a_antal_barn == 3 & year == 2004
replace equalbequest = 1 if share_bequest != 0.25 & a_antal_barn == 4 & year == 2004
replace equalbequest = 1 if share_bequest != 0.2 & a_antal_barn == 5 & year == 2004
replace equalbequest = . if missing(a_antal_barn)
replace equalbequest = . if year !=2004
I have also tried to set != 1/3 and != (1/3).
Does anyone have any suggestions to what I should do?
Best,
Anna
I have an issue with my dummies that I try to create. I am looking into unequal bequests and want a dummy for when the bequest is not equal.
I have 4 different groups for different numbers of children among the deceased, and for 2, 4 and 5 children I have no problem as these are finite values (0.5, 0.25, 0.2) but when try to do the same for the group with 3 children I cannot get it to work. I believe this is because 1/3 is not a finite number. This is the command I have tried:
* create dummy for if bequest is equally divided
generate equalbequest = 0
replace equalbequest = 1 if share_bequest != 0.5 & a_antal_barn == 2 & year == 2004
replace equalbequest = 1 if share_bequest != .3333333 & a_antal_barn == 3 & year == 2004
replace equalbequest = 1 if share_bequest != 0.25 & a_antal_barn == 4 & year == 2004
replace equalbequest = 1 if share_bequest != 0.2 & a_antal_barn == 5 & year == 2004
replace equalbequest = . if missing(a_antal_barn)
replace equalbequest = . if year !=2004
I have also tried to set != 1/3 and != (1/3).
Does anyone have any suggestions to what I should do?
Best,
Anna
Comment