Dear all,
I´m working with survey data and i need to compute a variable that counts the number of children younger than 3 in a household. I found the following command for doing it but i do not understand what it does in the second step when substracts the age from the variable. Could someone explain it?
egen nchild = total(age <= 3), by(household) replace nchild = nchild - (age <= 3) Thanks!
I´m working with survey data and i need to compute a variable that counts the number of children younger than 3 in a household. I found the following command for doing it but i do not understand what it does in the second step when substracts the age from the variable. Could someone explain it?
egen nchild = total(age <= 3), by(household) replace nchild = nchild - (age <= 3) Thanks!
Comment