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


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   RE: st: AW: confidence interval of a ratio of coefficients
Date   Thu, 8 Apr 2010 21:52:37 +0200

<>

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: [email protected]
[mailto:[email protected]] On Behalf Of Steve Samuels
Sent: Donnerstag, 8. April 2010 21:40
To: [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 <[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 <[email protected]>
wrote:
>>
>> <>
>>
>>
>>
>> *************
>> sysuse auto, clear
>> logit foreign rep78 price weight
>> nlcom (ratio: _b[price]/_b[weight])
>> *************
>>
>>
>>
>> HTH
>> Martin
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: [email protected]
[mailto:[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:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/statalist/faq
>> *   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/
>>
>
>
>
> --
> Steven Samuels
> [email protected]
> 18 Cantine's Island
> Saugerties NY 12477
> USA
> Voice: 845-246-0774
> Fax:    206-202-4783
>



-- 
Steven Samuels
[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
*   http://www.stata.com/support/statalist/faq
*   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