Hello,
I have the dataset below where i_sex is female or male and i_scghqd is a question about whether people fell capable about taking decisions.
I used the command svy linearized: tabulate i_sex i_scghqd to calculate the percentage of men and women that answer to the question. However, the percentages that I obtained are the ones related to the total number of individuals in the sample. I would like to know the comand to calculate the percentage of men tand women hat answer to the question in comparation to the total number of men and women (respectively) in the sample.
Can you help me with this? Thank you in advance.
Best regards
I have the dataset below where i_sex is female or male and i_scghqd is a question about whether people fell capable about taking decisions.
I used the command svy linearized: tabulate i_sex i_scghqd to calculate the percentage of men and women that answer to the question. However, the percentages that I obtained are the ones related to the total number of individuals in the sample. I would like to know the comand to calculate the percentage of men tand women hat answer to the question in comparation to the total number of men and women (respectively) in the sample.
Can you help me with this? Thank you in advance.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long(pidp pid) byte(i_sex i_scghqd) 76165 10689869 2 2 732365 15752658 1 4 1587125 17870879 2 2 4849085 176725733 1 2 68002725 10023526 2 2 68008847 -8 2 2 68010887 -8 2 2 68029931 -8 1 1 68031967 -8 2 2 68035365 10403086 1 2 68035367 -8 1 2 68041487 -8 2 2 68041491 -8 1 1 68045567 -8 2 2 68051007 -8 1 2 68051011 -8 2 2 68058487 -8 1 2 68058491 -8 2 2 68060531 -8 2 2 68060533 160066204 2 3 68060537 160066239 1 2 68063247 -8 2 2 68063927 -8 2 2 68063931 -8 1 2 68064605 10653872 1 2 68064609 10653902 2 2 68068007 -8 1 2 68068082 -8 1 2 68097245 10913629 2 1 68097927 -8 2 2 68120367 -8 2 2 68120375 -8 2 2 68125127 -8 2 2 68125131 -8 1 2 68125135 -8 2 2 68133285 11218193 2 2 68133289 11218282 2 3 68136009 11234989 2 2 68137365 11240547 2 2 68138045 11242787 1 2 68138049 11242817 2 2 68138051 -8 2 2 68144847 -8 1 2 68144851 -8 2 2 68148247 -8 1 2 68150971 -8 2 2 68150975 -8 1 2 68155047 -8 2 2 68155051 -8 1 2 68157771 -8 2 2 68159131 -8 2 2 68160485 11418567 2 3 68160489 11418591 1 2 68173407 -8 2 2 68180887 -8 2 3 68184971 -8 2 2 68185647 -8 2 2 68187687 -8 1 2 68187691 -8 2 2 68191771 -8 2 2 68193127 -8 2 2 68195167 -8 1 2 68195171 -8 2 2 68195851 -8 2 2 68197887 -8 2 2 68197899 -8 2 2 68197903 -8 1 1 68199247 -8 1 2 68207407 -8 2 2 68207411 -8 1 2 68211487 -8 1 2 68214207 -8 1 2 68216247 -8 2 2 68218287 -8 1 2 68231223 -8 2 2 68238011 -8 2 1 68262487 -8 1 2 68266567 -8 2 2 68278127 -8 2 2 68288327 -8 2 2 68288331 -8 1 2 68291731 -8 2 2 68293087 -8 2 2 68293091 -8 1 2 68293095 -8 1 1 68293099 -8 1 2 68293168 -8 1 2 68294447 -8 1 2 68294451 -8 2 2 68297845 12521361 1 2 68297849 12521396 2 2 68297857 12521469 2 1 68299207 -8 2 2 68302611 -8 2 2 68309407 -8 2 2 68321647 -8 1 2 68321651 -8 2 2 68322327 -8 2 2 68322331 -8 1 2 68329807 -8 2 2 end label values pid pid label def pid -8 "inapplicable", modify label values i_sex i_sex label def i_sex 1 "male", modify label def i_sex 2 "female", modify label values i_scghqd i_scghqd label def i_scghqd 1 "More so than usual", modify label def i_scghqd 2 "Same as usual", modify label def i_scghqd 3 "Less so than usual", modify label def i_scghqd 4 "Much less capable", modify
Comment