Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: Test for the difference between two ratios


From   Marcos Sanches <[email protected]>
To   [email protected]
Subject   Re: st: RE: Test for the difference between two ratios
Date   Tue, 25 Oct 2011 23:03:34 -0400

Thanks a lot Shaun, I was able to use lincom to solve my problem, it
worked perfectly!

Marcos








On Tue, Oct 25, 2011 at 9:38 AM, Scholes, Shaun <[email protected]> wrote:
>>
>> 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
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> -----Original Message-----
>> From: [email protected] [mailto:[email protected]] On Behalf Of Marcos Sanches
>> Sent: 25 October 2011 14:15
>> To: [email protected]
>> Subject: st: Test for the difference between two ratios
>>
>> 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
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/statalist/faq
>> *   http://www.ats.ucla.edu/stat/stata/
>>
>>
>>
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/statalist/faq
>> *   http://www.ats.ucla.edu/stat/stata/
>

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index