[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Michael Blasnik" <michael.blasnik@verizon.net> |

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

Subject |
st: Re: difference between estimated ratios of x/y and ax/ay |

Date |
Wed, 17 Oct 2007 12:44:13 -0400 |

..

It's not rounding and its not an error. The ratio estimate is the sum of the numerator divided by the sum of the denominator (appropriately weighted if weights are specified), it is not the average of the ratio. So, unless the variable trunk is a constant, it will most likely lead to a different estimate of the ratio.

Michael Blasnik

----- Original Message ----- From: "Zurab Sajaia" <zsajaia@hotmail.com>

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

Sent: Wednesday, October 17, 2007 12:17 PM

Subject: st: difference between estimated ratios of x/y and ax/ay

Dear All,

I was estimating ratio of two variables (in fact, svy : ratio, but problem is the same for both) and after noticing that both numerator and denominator contained same component I decided to check whether canceling it would affect the results. To my surprise it did. Lets consider this example:

sysuse auto, clear

. ratio weight / length

...

_ratio_1 | 16.06673 .2807194 15.50726 16.6262

...

.generate double wa = weight * trunk

.generate double la = length * trunk

.ratio wa / la

...

_ratio_1 | 16.48413 .2797573 15.92658 17.04169

...

Have anybody experienced similar case? does this thing come purely from numerical, rounding issues or there is something bigger (I can't think of any though)?

Any insight would be appreciated.

Thanks

Zurab

* * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**st: Re: Re: difference between estimated ratios of x/y and ax/ay***From:*"Zurab Sajaia" <zsajaia@hotmail.com>

**References**:**st: difference between estimated ratios of x/y and ax/ay***From:*"Zurab Sajaia" <zsajaia@hotmail.com>

- Prev by Date:
**Re: st: [Mata newbie] optimize() vs -ml-** - Next by Date:
**st: Re: Re: difference between estimated ratios of x/y and ax/ay** - Previous by thread:
**st: difference between estimated ratios of x/y and ax/ay** - Next by thread:
**st: Re: Re: difference between estimated ratios of x/y and ax/ay** - Index(es):

© Copyright 1996–2014 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |