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: Re: st: simulated value of a ratio does not compare to manually calculated value


From   "Ariel Linden, DrPH" <[email protected]>
To   <[email protected]>
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 <[email protected]>
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 <[email protected]>:
>
> 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
> <[email protected]> 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/


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