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: RE: Calculate confidence intervals for log-log models


From   Richard Goldstein <[email protected]>
To   [email protected]
Subject   Re: st: RE: Calculate confidence intervals for log-log models
Date   Tue, 05 Mar 2013 15:33:56 -0500

I don't know that this actually makes a lot of sense, but here is how to
do it: (1) don't use -lincom- as that is for linear combinations and
powers are not linear; (2) us -nlcom- as in

 nlcom 1.1^_b[lnx]

Rich

On 3/5/13 3:26 PM, Jason Ferris wrote:
> Hi Nick,
> 
> Sorry for my ambiguity.  And thank you for your response.
> 
> Before, I start writing my own code to do this I will attempt to clarify.
> 
> Yes I transformed both Y and X with a natural log transformation ln(y) and ln(x)
> 
> I then regress lny on lnx
> 
> OLS example of a result:
> 
> ------------------------------------------------------------------------------
>          lny |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
> -------------+----------------------------------------------------------------
>          lnx |   2.105722   .0817271    25.77   0.000     1.942802    2.268642
>        _cons |  -3.032146   .4274653    -7.09   0.000    -3.884282   -2.180009
> ------------------------------------------------------------------------------
> 
> To calculate a 10% change on lnx (with confidence intervals) when I type
> lincom 1.1^lnx - I get the message 'not possible with text'
> 
> I would like to construct a table highlighting percentage changes in lny with a series of percentage changes (10,25...) in lnx
> 
> Kind regards,
> 
> Jason
> 
> On Tue, 5 Mar 2013 12:49:28 +0000 Nick Cox <[email protected]> wrote:
> 
> Not really clear what you are doing but I guess that you are
> transforming first. Either way, something like
> 
> _b[ln(y)]
> 
> makes no sense to Stata as
> 
> ln(y)
> 
> can't be a variable name.
> 
> I fear you need to write your own code.
> 
> Nick
> 
> On Tue, Mar 5, 2013 at 11:30 AM, Jason Ferris <[email protected]> wrote:
> 
>> I have run a series of log-log OLS models - ln(y)=ln(x)+cons - and would like to present a table of percentage change at 10%, 25%, 50%, & 75% with corresponding changes in the confidence intervals.
>>
>> Is there a way to do this in Stata or a ado file that I could utilise.
>>
>> When trying to use lincom (.e.g., 1.1^_b[ln(x)] - I get a 'not possible with test' error.  What are the alternatives besides doing it all by hand?
*
*   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