Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

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

From |
"Scholes, Shaun" <s.scholes@ucl.ac.uk> |

To |
"statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: Test for the difference between two ratios |

Date |
Tue, 25 Oct 2011 13:38:27 +0000 |

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: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Marcos Sanches Sent: 25 October 2011 14:15 To: statalist@hsphsun2.harvard.edu 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/

**References**:**st: Test for the difference between two ratios***From:*Marcos Sanches <msanches35@gmail.com>

- Prev by Date:
**st: RE: Multiple endogenous variables IV. Estimating the first stage regression with only a subset of the instruments** - Next by Date:
**st: RE: converting files** - Previous by thread:
**st: Test for the difference between two ratios** - Next by thread:
**Re: st: RE: Test for the difference between two ratios** - Index(es):