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: AW: st: AW: confidence interval of a ratio of coefficients


From   Shehzad Ali <[email protected]>
To   [email protected]
Subject   Re: AW: st: AW: confidence interval of a ratio of coefficients
Date   Fri, 9 Apr 2010 14:41:24 +0000 (GMT)

Thank you, Steve, Martin and Arne. This is most helpful.

Is this correct that Arne's -wtp- module can be used for ratio of a set of any two coefficients, i.e. one of the coefficients doesn't necessarily have to be associated with cost?

Many thanks,
Shehzad



----- Original Message ----
> From: Martin Weiss <[email protected]>
> To: [email protected]
> Sent: Fri, 9 April, 2010 15:35:03
> Subject: AW: st: AW: confidence interval of a ratio of coefficients
> 
> 
<> 

" The bootstrap command should have been:
bootstrap 
> ratio = (-_b[price]/_b[weight]), rep(500): logit foreign
price weight 
> rep78"


Where is the difference to your earlier 
> command?


HTH
Martin

-----Ursprüngliche 
> Nachricht-----
Von: > href="mailto:[email protected]";>[email protected]
[mailto:> ymailto="mailto:[email protected]"; 
> href="mailto:[email protected]";>[email protected]] 
> Im Auftrag von Steve Samuels
Gesendet: Freitag, 9. April 2010 16:30
An: > ymailto="mailto:[email protected]"; 
> href="mailto:[email protected]";>[email protected]
Betreff: 
> Re: st: AW: confidence interval of a ratio of coefficients

The bootstrap 
> command should have been:
bootstrap ratio = (-_b[price]/_b[weight]), 
> rep(500): logit foreign
price weight rep78

Steve
On Fri, Apr 9, 
> 2010 at 10:07 AM, Steve Samuels <> href="mailto:[email protected]";>[email protected]> wrote:
> 
> Thanks, Arne!
>
> Steve
> :
> 
> ************************************
> sysuse auto, clear
> set seed 
> 2940688
> logit foreign price weight rep78
>
> nlcom  - 
> _b[price]/_b[weight]  //ratio
>
> logit foreign price weight 
> rep78
> wtp   price weight, delta
> wtp   price weight, 
> fieller
> wtp   price weight, krinsky reps(2000)
>
> bootstrap 
> ratio = (-_b[price]/_b[weight]), rep(500): logit foreign price
weight 
> rep78
> estat bootstrap, bc
> 
> *****************************
>
>
>
> On Fri, Apr 9, 
> 2010 at 8:56 AM, Arne Risa Hole <> href="mailto:[email protected]";>[email protected]> wrote:
>> 
> Steve, Martin and Shehzad,
>>
>> I've written the -wtp- module 
> (available from SSC) with this
>> particular problem in mind. It 
> calculates CIs for the ratio of two
>> coefficients using either the 
> delta method, Fieller's method or the
>> parametric bootstrap. I've 
> done some simulations to investigate which
>> method is more accurate, 
> they are reported in the paper referenced in
>> the -wtp- help 
> file.
>>
>> Arne
>>
>> On 9 April 2010 
> 13:14, Steve Samuels <> href="mailto:[email protected]";>[email protected]> 
> wrote:
>>> The following paper
>>> (> href="http://mrvar.fdv.uni-lj.si/pub/mz/mz1.1/cedilnik.pdf"; target=_blank 
> >http://mrvar.fdv.uni-lj.si/pub/mz/mz1.1/cedilnik.pdf)  shows that 
> the
>>> distribution of the ratio of two jointly-Normal variables is 
> far from
>>> simple.  This suggests to me that a bootstrap may be 
> the best approach
>>> to the CI that Shehzad originally asked 
> for.
>>>
>>> Steve
>>>
>>> On 
> Thu, Apr 8, 2010 at 5:29 PM, Steve Samuels <> ymailto="mailto:[email protected]"; 
> href="mailto:[email protected]";>[email protected]>
wrote:
>>>> 
> Martin,
>>>>
>>>> I have to withdraw that code. It 
> gives incorrect results if the ratio
>>>> is negative. So, your 
> original -nlcom- statement is  Shehzad's best
>>>> approach.   
> Note, however that the confidence intervals for the ratio
>>>> 
> and  for 1/ratio are not compatible (perhaps "consonant" is the 
> better
>>>> word).  One set of limits cannot be derived by 
> inverting the endpoints
>>>> of the other 
> set.
>>>>
>>>> 
> Steve
>>>>
>>>>
>>>> 
> ********************
>>>> sysuse auto, clear
>>>> 
> logit foreign rep78 price weight
>>>>
>>>> nlcom 
> _b[price]/_b[weight]  //ratio
>>>> nlcom _b[weight]/_b[price] // 
> 1/ratio
>>>> 
> ***********************
>>>>
>>>>
>>>>
>>>>
>>>> 
> On Thu, Apr 8, 2010 at 3:52 PM, Martin Weiss <> ymailto="mailto:[email protected]"; 
> href="mailto:[email protected]";>[email protected]>
wrote:
>>>>>
>>>>> 
> <>
>>>>>
>>>>> 
> Steve,
>>>>>
>>>>> are you following your 
> own script with this code, or is it necessary
for
>>>>> 
> Shehzad to obtain a correct 
> answer?
>>>>>
>>>>> 
> HTH
>>>>> 
> Martin
>>>>>
>>>>>
>>>>> 
> -----Original Message-----
>>>>> From: > ymailto="mailto:[email protected]"; 
> href="mailto:[email protected]";>[email protected]
>>>>> 
> [mailto:> href="mailto:[email protected]";>[email protected]] 
> On Behalf Of Steve
Samuels
>>>>> Sent: Donnerstag, 8. April 
> 2010 21:40
>>>>> To: > ymailto="mailto:[email protected]"; 
> href="mailto:[email protected]";>[email protected]
>>>>> 
> Subject: Re: st: AW: confidence interval of a ratio of 
> coefficients
>>>>>
>>>>> Here are some 
> details.  It's necessary to operate on the log of the
>>>>> 
> absolute value of the ratio and attach the sign 
> afterwards:
>>>>>
>>>>> 
> *************
>>>>> sysuse auto, clear
>>>>> 
> logit foreign rep78 price weight
>>>>> local sgn = 
> sign(_b[price]/_b[weight])
>>>>>
>>>>> nlcom 
> _b[price]/_b[weight]  //ratio
>>>>> nlcom log(abs( 
> _b[price]/_b[weight]))  //log ratio
>>>>> return 
> list
>>>>> local lratio = el(r(b),1,1)
>>>>> 
> local ratio = `sgn'*exp(`lratio')
>>>>> local bound = 
> invnormal(1-.05/2)*sqrt(el(r(V),1,1))
>>>>> local llim = 
> exp(`lratio' -`bound')
>>>>> local ulim = exp(`lratio' + 
> `bound')
>>>>> di "ratio =  " `ratio'   " llimit = " `llim'  " 
>  ulimit = " `ulim'
>>>>> 
>  *************
>>>>>
>>>>>
>>>>> 
> On Wed, Apr 7, 2010 at 1:21 PM, Steve Samuels <> ymailto="mailto:[email protected]"; 
> href="mailto:[email protected]";>[email protected]>
wrote:
>>>>>> 
> Martin is right, but I think that this calculation is better done 
> on
>>>>>> the log  of the  ratio and then converted back to 
> the ratio scale.
 In
>>>>>> that way, the CIs for  x/y 
> and y/x  will be 
> compatible.
>>>>>>
>>>>>> 
> Steve
>>>>>>
>>>>>> On Wed, Apr 7, 
> 2010 at 11:53 AM, Martin Weiss <> href="mailto:[email protected]";>[email protected]>
>>>>> 
> wrote:
>>>>>>>
>>>>>>> 
> <>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 
> *************
>>>>>>> sysuse auto, 
> clear
>>>>>>> logit foreign rep78 price 
> weight
>>>>>>> nlcom (ratio: 
> _b[price]/_b[weight])
>>>>>>> 
> *************
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 
> HTH
>>>>>>> 
> Martin
>>>>>>>
>>>>>>>
>>>>>>> 
> -----Ursprüngliche Nachricht-----
>>>>>>> Von: > ymailto="mailto:[email protected]"; 
> href="mailto:[email protected]";>[email protected]
>>>>> 
> [mailto:> href="mailto:[email protected]";>[email protected]] 
> Im Auftrag von Shehzad
Ali
>>>>>>> Gesendet: 
> Mittwoch, 7. April 2010 17:50
>>>>>>> An: Stata 
> List
>>>>>>> Betreff: st: confidence interval of a ratio 
> of coefficients
>>>>>>>
>>>>>>> 
> Dear listers,
>>>>>>>
>>>>>>> I 
> am modelling choice behaviour using a logit model. I want 
> to
calculate
>>>>> the marginal rates of subsititution of 
> the attributes of choice
alternatives
>>>>> by taking the 
> ratio of coefficients (similar to what people do when
>>>>> 
> calculating willingness to pay estimates by taking 
> attribute/cost
>>>>> coefficients). I need help with 
> calculating the confidence interval
around
>>>>> the ratio 
> of two 
> coefficients.
>>>>>>>
>>>>>>> 
> Any help would be appreciated.
>>>>>>> 
> Shehzad
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 
> *
>>>>>>> *   For searches and help 
> try:
>>>>>>> *   > href="http://www.stata.com/help.cgi?search"; target=_blank 
> >http://www.stata.com/help.cgi?search
>>>>>>> *   > href="http://www.stata.com/support/statalist/faq"; target=_blank 
> >http://www.stata.com/support/statalist/faq
>>>>>>> 
> *   > >http://www.ats.ucla.edu/stat/stata/
>>>>>>>
>>>>>>>
>>>>>>> 
> *
>>>>>>> *   For searches and help 
> try:
>>>>>>> *   > href="http://www.stata.com/help.cgi?search"; target=_blank 
> >http://www.stata.com/help.cgi?search
>>>>>>> *   > href="http://www.stata.com/support/statalist/faq"; target=_blank 
> >http://www.stata.com/support/statalist/faq
>>>>>>> 
> *   > >http://www.ats.ucla.edu/stat/stata/
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> 
> --
>>>>>> Steven Samuels
>>>>>> > ymailto="mailto:[email protected]"; 
> href="mailto:[email protected]";>[email protected]
>>>>>> 
> 18 Cantine's Island
>>>>>> Saugerties NY 
> 12477
>>>>>> USA
>>>>>> Voice: 
> 845-246-0774
>>>>>> Fax:   
>  206-202-4783
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> 
> --
>>>>> Steven Samuels
>>>>> > ymailto="mailto:[email protected]"; 
> href="mailto:[email protected]";>[email protected]
>>>>> 
> 18 Cantine's Island
>>>>> Saugerties NY 
> 12477
>>>>> USA
>>>>> Voice: 
> 845-246-0774
>>>>> Fax:   
>  206-202-4783
>>>>>
>>>>> 
> *
>>>>> *   For searches and help try:
>>>>> 
> *   > >http://www.stata.com/help.cgi?search
>>>>> *   > href="http://www.stata.com/support/statalist/faq"; target=_blank 
> >http://www.stata.com/support/statalist/faq
>>>>> *   > href="http://www.ats.ucla.edu/stat/stata/"; target=_blank 
> >http://www.ats.ucla.edu/stat/stata/
>>>>>
>>>>>
>>>>> 
> *
>>>>> *   For searches and help try:
>>>>> 
> *   > >http://www.stata.com/help.cgi?search
>>>>> *   > href="http://www.stata.com/support/statalist/faq"; target=_blank 
> >http://www.stata.com/support/statalist/faq
>>>>> *   > href="http://www.ats.ucla.edu/stat/stata/"; target=_blank 
> >http://www.ats.ucla.edu/stat/stata/
>>>>>
>>>>
>>>>
>>>>
>>>> 
> --
>>>> Steven Samuels
>>>> > ymailto="mailto:[email protected]"; 
> href="mailto:[email protected]";>[email protected]
>>>> 18 
> Cantine's Island
>>>> Saugerties NY 12477
>>>> 
> USA
>>>> Voice: 845-246-0774
>>>> Fax:   
>  206-202-4783
>>>>
>>>
>>>
>>>
>>> 
> --
>>> Steven Samuels
>>> > ymailto="mailto:[email protected]"; 
> href="mailto:[email protected]";>[email protected]
>>> 18 
> Cantine's Island
>>> Saugerties NY 12477
>>> 
> USA
>>> Voice: 845-246-0774
>>> Fax:   
>  206-202-4783
>>>
>>> *
>>> *   For searches 
> and help try:
>>> *   > target=_blank >http://www.stata.com/help.cgi?search
>>> *   > href="http://www.stata.com/support/statalist/faq"; target=_blank 
> >http://www.stata.com/support/statalist/faq
>>> *   > href="http://www.ats.ucla.edu/stat/stata/"; target=_blank 
> >http://www.ats.ucla.edu/stat/stata/
>>>
>>
>> 
> *
>> *   For searches and help try:
>> *   > href="http://www.stata.com/help.cgi?search"; target=_blank 
> >http://www.stata.com/help.cgi?search
>> *   > href="http://www.stata.com/support/statalist/faq"; target=_blank 
> >http://www.stata.com/support/statalist/faq
>> *   > href="http://www.ats.ucla.edu/stat/stata/"; target=_blank 
> >http://www.ats.ucla.edu/stat/stata/
>>
>
>
>
> 
> --
> Steven Samuels
> > href="mailto:[email protected]";>[email protected]
> 18 Cantine's 
> Island
> Saugerties NY 12477
> USA
> Voice: 
> 845-246-0774
> Fax:    206-202-4783
>



-- 
Steven 
> Samuels
> href="mailto:[email protected]";>[email protected]
18 Cantine's 
> Island
Saugerties NY 12477
USA
Voice: 845-246-0774
Fax:    
> 206-202-4783

*
*  For searches and help try:
*  > href="http://www.stata.com/help.cgi?search"; target=_blank 
> >http://www.stata.com/help.cgi?search
*  > href="http://www.stata.com/support/statalist/faq"; target=_blank 
> >http://www.stata.com/support/statalist/faq
*  > href="http://www.ats.ucla.edu/stat/stata/"; target=_blank 
> >http://www.ats.ucla.edu/stat/stata/


*
*  For searches 
> and help try:
*  > target=_blank >http://www.stata.com/help.cgi?search
*  > href="http://www.stata.com/support/statalist/faq"; target=_blank 
> >http://www.stata.com/support/statalist/faq
*  > href="http://www.ats.ucla.edu/stat/stata/"; target=_blank 
> >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/


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