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

From |
"Zurab Sajaia" <zsajaia@hotmail.com> |

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

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

Date |
Wed, 17 Oct 2007 12:17:55 -0400 |

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: difference between estimated ratios of x/y and ax/ay***From:*"Michael Blasnik" <michael.blasnik@verizon.net>

- Prev by Date:
**Re: st: [Mata newbie] optimize() vs -ml-** - Next by Date:
**Re: st: programming graphs in stata** - Previous by thread:
**st: PERL-Phyton scripts within Stata - Can Stata call another program?** - Next by thread:
**st: Re: difference between estimated ratios of x/y and ax/ay** - Index(es):

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