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.

st: RE: Calculate confidence intervals for log-log models

 From Jason Ferris To "statalist@hsphsun2.harvard.edu" Subject st: RE: Calculate confidence intervals for log-log models Date Tue, 5 Mar 2013 20:26:56 +0000

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 <njcoxstata@gmail.com> 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 <j.ferris@uq.edu.au> 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/