有个问题向大家请教,恳请各位老师、同学、高人指点,非常感谢:
背景:有甲、乙两个地方,甲地男、女人数分别为112、223,乙地男、女人数分别为150、280, 试问甲乙两地性别构成是否有显著差异?
我知道这个可以用卡方检验来解决 (112/223 versus 150/280),或者直接比较两地男生百分率的差别112/(112+223)versus 150/(150+280)。可以用SAS里面的Frequency Procedure来分析。
问题:有甲、乙两个地方,人口数分别为335、430,医院病床数分别为881、936,试问两地每百人占有病床数有无显著差异?881/335 versus 936/430
请问这个可以用什么方法来解决呢?可以用Stata里面的什么Procedure呢,下面这个建议是否正确呢?
Hi all,
This might be a simple question but I did not manage to find the
answer to it. I have two variables, say X and Y, so I calculated the
ratio:
svy: ratio x/y
svy: ratio x/y if gender ==1
svy: ratio x/y if gender ==2
Now, what I want to do is to test whether this ratio is the same for,
say, males and females. I would be grateful if someone could shed some
light on how to do this..
Thanks a lot!
Marcos, try avoid using if when using svy commands for subpopulations. Instead you should use the over command: e.g
svy:ratio x/y,over(gender)
Having done that it appears as though you can use the lincom command to test the difference between the two ratios.
An excellent example using lincom after svy:mean can be found in the STATA manual for survey data: section "svy postestimation".
Hope this helps
Shaun
万分感谢!