Colleagues
I have a database for each addresses, about the time uses of all people over 10 years of age (time_pro_individual). And, I want to be able to perform a subtraction of the time spent by the woman (head of household or spouse) less the time spent by the man (or her husband) within the same address.
so far I have only been able to estimate the total amount of time spent on an activity by men and women (ie, a wife and her husband, or vice versa) for each household (variable time_product_housing)
Description of variables:
Directory: is the identifier of each dwelling.
sequence: is the identifier of each domicile within the same dwelling
codigodom: is the union of directory + sequence (this is the variable that I have been using)
p6020 refers to sex: 1 man and 2 woman
p425 refers to relationship of parentage: 1 is head of household and 2 is spouse
time_pro_individual: is the time spent in an activity "x" (in minutes)
time_product_housing is the total time spent on activity "x" by the head of household and his / her relationship.
Dataex
----------------------- copy starting from the next line -----------------------
------------------ copy up to and including the previous line ------------------
in turn, would like to be able to divide the sum of the total time spent by all women over the total time spent in that activity by all the individuals at the base (men and women)
I appreciate your help
Moses
I have a database for each addresses, about the time uses of all people over 10 years of age (time_pro_individual). And, I want to be able to perform a subtraction of the time spent by the woman (head of household or spouse) less the time spent by the man (or her husband) within the same address.
so far I have only been able to estimate the total amount of time spent on an activity by men and women (ie, a wife and her husband, or vice versa) for each household (variable time_product_housing)
Description of variables:
Directory: is the identifier of each dwelling.
sequence: is the identifier of each domicile within the same dwelling
codigodom: is the union of directory + sequence (this is the variable that I have been using)
p6020 refers to sex: 1 man and 2 woman
p425 refers to relationship of parentage: 1 is head of household and 2 is spouse
time_pro_individual: is the time spent in an activity "x" (in minutes)
time_product_housing is the total time spent on activity "x" by the head of household and his / her relationship.
Dataex
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input double(DIRECTORIO SECUENCIA_P) long codigodom double(p6020 p425) float(time_pro_individual time_product_housing) 2915591 1 29155911 2 1 0 0 2915592 1 29155921 2 1 90 90 2915593 1 29155931 2 1 30 30 2915593 1 29155931 2 3 0 . 2915593 1 29155931 2 3 0 . 2915594 1 29155941 1 1 0 180 2915594 1 29155941 2 2 180 180 2915594 1 29155941 1 3 0 . 2915594 1 29155941 1 3 0 . 2915595 1 29155951 1 1 30 30 2915595 1 29155951 2 2 0 30 2915595 1 29155951 1 3 0 . 2915596 1 29155961 1 1 210 300 2915596 1 29155961 2 2 90 300 2915596 1 29155961 1 3 0 . 2915597 1 29155971 1 1 0 240 2915597 1 29155971 2 2 240 240 2915597 1 29155971 2 3 300 . 2915597 1 29155971 2 4 0 . 2915598 1 29155981 2 1 60 60 2915598 1 29155981 1 3 0 . 2915599 1 29155991 1 1 0 120 2915599 1 29155991 2 2 120 120 2915600 1 29156001 1 1 0 0 2915600 1 29156001 2 5 210 . 2915600 1 29156001 1 8 30 . 2915601 1 29156011 1 1 0 120 2915601 1 29156011 2 2 120 120 2915601 1 29156011 1 3 60 . 2915601 1 29156011 2 3 0 . 2915602 1 29156021 1 1 0 390 2915602 1 29156021 2 2 390 390 2915602 1 29156021 1 3 0 . 2915602 1 29156021 1 3 0 . 2915602 1 29156021 1 5 0 . 2915602 1 29156021 1 6 10 . 2915603 1 29156031 2 1 35 35 2915603 1 29156031 1 3 0 . 2915604 1 29156041 2 1 70 70 2915604 2 29156042 1 1 0 0 2915604 2 29156042 1 6 0 . 2915604 2 29156042 1 6 0 . 2915605 1 29156051 2 1 135 135 2915605 1 29156051 1 3 0 . 2915605 1 29156051 1 3 0 . 2915606 1 29156061 1 1 0 10 2915606 1 29156061 2 2 10 10 2915606 1 29156061 1 3 0 . 2915607 1 29156071 1 1 60 135 2915607 1 29156071 2 2 75 135 2915608 1 29156081 1 1 0 150 2915608 1 29156081 2 2 150 150 2915608 1 29156081 2 3 0 . 2915608 1 29156081 1 4 0 . 2915609 1 29156091 1 1 0 150 2915609 1 29156091 2 2 150 150 2915609 1 29156091 2 3 0 . 2915610 1 29156101 2 1 155 195 2915610 1 29156101 1 2 40 195 2915610 1 29156101 2 4 170 . 2915611 1 29156111 2 1 25 25 2915611 1 29156111 1 3 40 . 2915611 1 29156111 1 3 0 . 2915611 1 29156111 2 5 40 . 2915611 1 29156111 2 8 140 . 2915612 1 29156121 1 1 0 120 2915612 1 29156121 2 2 120 120 2915612 1 29156121 2 3 90 . 2915612 1 29156121 2 3 90 . 2915614 1 29156141 1 1 2 62 2915614 1 29156141 2 2 60 62 2915614 1 29156141 1 3 0 . 2915614 1 29156141 1 3 0 . 2915615 1 29156151 2 1 240 240 2915615 1 29156151 1 3 0 . 2915615 1 29156151 2 3 0 . 2915615 1 29156151 2 3 250 . 2915615 1 29156151 1 4 0 . 2915616 1 29156161 1 1 30 30 2915616 1 29156161 2 2 0 30 2915616 1 29156161 1 3 5 . 2915618 1 29156181 1 1 0 0 2915618 1 29156181 1 3 0 . 2915618 1 29156181 2 3 0 . 2915618 1 29156181 2 3 10 . 2915618 1 29156181 1 4 0 . 2915619 1 29156191 2 1 0 0 2915619 1 29156191 1 3 0 . 2915619 1 29156191 2 3 120 . 2915619 1 29156191 1 4 0 . 2915620 1 29156201 1 1 2 2 2915620 1 29156201 2 5 220 . 2915621 1 29156211 1 1 0 0 2915621 1 29156211 1 10 0 . 2915622 1 29156221 2 1 0 0 2915622 1 29156221 1 2 0 0 2915622 1 29156221 2 3 0 . 2915622 1 29156221 1 3 0 . 2915622 1 29156221 2 5 0 . 2915623 1 29156231 1 1 80 80 end label values p6020 p6020 label def p6020 1 "hombre", modify label def p6020 2 "mujer", modify label values p425 p425 label def p425 1 "jefe(a) del hogar", modify label def p425 2 "esposo(a) o compañero(a)", modify label def p425 3 "hijo(a), hijastro(a)", modify label def p425 4 "nieto(a)", modify label def p425 5 "padre, madre, suegro(a)", modify label def p425 6 "hermano(a), hermanastro(a)", modify label def p425 8 "otro pariente del jefe(a)", modify label def p425 10 "otro no pariente", modify
in turn, would like to be able to divide the sum of the total time spent by all women over the total time spent in that activity by all the individuals at the base (men and women)
I appreciate your help
Moses
Comment