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

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

From |
"Ariel Linden, DrPH" <ariel.linden@gmail.com> |

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

Subject |
re: Re: st: simulated value of a ratio does not compare to manually calculated value |

Date |
Sat, 27 Apr 2013 10:12:35 -0400 |

Jeph and Austin, You are absolutely correct! I didn't even consider that simple fact! Thanks for bringing it to my attention. Ariel Date: Fri, 26 Apr 2013 16:44:32 -0400 From: Jeph Herrin <stata@spandrel.net> Subject: Re: st: simulated value of a ratio does not compare to manually calculated value More specifically, if you run the original code and list the values, it is clear that mse_ratio=mse_true/mse_tt: +--------------------------------+ | mse_true mse_tt mse_ra~o | |--------------------------------| | .003547 .0322058 .1101363 | | .0006413 .0662122 .0096851 | | .0053084 .0249331 .2129068 | | .0013864 .0317399 .0436803 | | .000913 .0238286 .0383137 | | .0022051 .0287689 .0766471 | | .0147754 .0337151 .4382421 | | .0133145 .0008774 15.17555 | | .0006873 .0390971 .0175787 | | .0054993 .0493028 .1115405 | | .0007968 .0217611 .0366142 | | .0030441 .0083029 .3666291 | | .0020152 .064011 .0314826 | | .0016439 .0557283 .0294992 | | .0008482 .0004691 1.808224 | | .00004 .0477381 .0008388 | | .0030498 .0468981 .0650293 | On 4/26/2013 4:36 PM, Austin Nichols wrote: > Ariel Linden, DrPH <ariel.linden@gmail.com>: > > The mean of a ratio generically does not equal the ratio of the means. > Put > sc mse_t* > corr mse_t* > g r=mse_tr/mse_tt > su r mse_true mse_tt mse_ratio > > On Fri, Apr 26, 2013 at 4:28 PM, Ariel Linden, DrPH > <ariel.linden@gmail.com> wrote: >> Hi All, >> >> Below is a simulation that I am running in which I generate a ratio >> (mse_ratio) which is simply the ratio of the mse_true / mse_tt >> >> When running the simulation, the mse_ratio does not calculate correctly, >> even though each component does come through correctly... >> >> More specifically, you can see from the output below that the mse_true = >> .0038127, and the mse_tt = .0352618 , which should >> elicit a ratio of .10812551 >> >> However, the mse_ratio value is 91.79034. >> >> I cannot figure out what in my code is not working here... Any help is >> appreciated... See my code below... >> >> Thanks in advance! >> >> Ariel * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/

- Prev by Date:
**Re: st: Reshaping dataset** - Next by Date:
**Re: st: competing risks with repeated ordered events** - Previous by thread:
**Re: st: simulated value of a ratio does not compare to manually calculated value** - Next by thread:
**st: foreign language symbols not recognized in string variables** - Index(es):