Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: adding to X to make ln(X) nonmissing [was BTSCS and Non-linear MLE programming]


From   aslihan arslan <aslihanarslan@yahoo.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: adding to X to make ln(X) nonmissing [was BTSCS and Non-linear MLE programming]
Date   Thu, 1 Feb 2007 18:01:29 -0800 (PST)

Thanks for the very useful discussion about this
issue. 
For those who wonder why this keeps coming up: 
The zero inputs problem arises frequently in
development economics while estimating production
functions for farmers, who do not necessarily use
positive amounts of all inputs (e.g. hired labor,
fertilizer). Authors usually do not have enough
degrees of freedom to use more flexible production
functions, are interested in marginal product of labor
that is easily obtained by log-CD. Some have shown
that Cobb-Douglas does a good job as compared to other
functional forms (Jacoby, 93; Skoufias, 94). These
authors also add +1 to make log(x) defined. 

Soloaga (1999) uses the MLE technique to estimate the
(positive) constant alpha to be added to x. The alpha
measures the degree of "non-essentiality" of the
inputs that have zero values for some farmers,
therefore is potentially interesting. However, it may
be a bad answer to the question of "Do you trust the
data, or the model?". 

In sum, I was trying to compare the results of the old
tricks with the MLE approach using my farm household
data. Thanks for the online FAQ about "Linear
regression with interval constraints", I am trying to
figure out a way to translate the constraint on a
coefficient in linear models, to a constraint on a
parameter in a non-linear ml model. 

Some of the suggested tricks may come in handy too, 
Thanks,
Aslihan

References:  1. Jacoby, Hanan G, 1993.
"Shadow Wages and Peasant Family Labour Supply: An
Econometric Application to the Peruvian Sierra,"
Review of Economic Studies, vol. 60(4), pages 903-21.
(http://www.economics.utoronto.ca/brandt/ECO2703/papers/Jacoby_1993_Shadow_Review.pdf)

2. Skoufias, Emmanuel, 1994. "Using Shadow Wages to
Estimate Labor Supply of Agricultural Households",    
American Journal of Agricultural Economics, Vol. 76,
No. 2., pp. 215-227.
(http://links.jstor.org/sici?sici=0002-9092%28199405%2976%3A2%3C215%3AUSWTEL%3E2.0.CO%3B2-Z)


3. Soloaga, Isidro, 1999. "The Treatment of
Non-Essential Inputs in a Cobb-Douglas Technology: An
Application to Mexican Rural Household-Level Data",
World Bank Policy Research Working Paper, No. 2499.
Available at SSRN: http://ssrn.com/abstract=632569

--- Austin Nichols <austinnichols@gmail.com> wrote:

> In re: adding alpha to X to make ln(X) nonmissing
> Why does this operation come up so often, when it is
> so often a bad
> idea?  I have seen several papers this week that add
> some constant to
> X so that ln(X) can be regressed on some variables,
> or some variable
> can be regressed on it.  Wouldn't you be just as
> well off imputing
> 2*atan(X)-2*atan(1) or somesuch?  Is there a
> well-known good reference
> on this subject?
> 
> Just now, when looking up the ref for an adjacent
> thread on btscs.ado,
> I ran across Oneal & Russett (2001) which
> acknowledges that Beck,
> Katz, and Tucker (1998) pointed out an error, and
> then replies to
> another critique with this (p.480):
> "
> Before taking the logarithm [of trade volume in
> $millions] we assigned
> a different value to the trade variable for dyads
> that report no
> trade.  Some value must be imputed because the
> logarithm of zero is
> undefined.  We use $100,000 [so really it was
> ln(0.1)]; Green, Kim,
> and Yoon used $1.  It is this that accounts for most
> of the
> differences between our results and theirs.
> "
> Oneal, John R. and Bruce Russett. 2001. Clear and
> Clean: The Fixed
> Effects of the Liberal Peace. International
> Organization, Vol. 55, No.
> 2. (Spring, 2001), pp. 469-485.
>
http://links.jstor.org/sici?sici=0020-8183%28200121%2955%3A2%3C469%3ACACTFE%3E2.0.CO%3B2-A
> 
> Green, Donald P., Soo Yeon Kim, and David H. Yoon.
> 2001. "Dirty Pool."
> International Organization, Vol. 55, No. 2. (Spring,
> 2001), pp.
> 441-468.
>
http://links.jstor.org/sici?sici=0020-8183%28200121%2955%3A2%3C441%3ADP%3E2.0.CO%3B2-N
> 
> Beck, Nathaniel, Jonathan N. Katz and Richard
> Tucker. 1998. Taking
> Time Seriously: Time-Series-Cross-Section Analysis
> with a Binary
> Dependent Variable. American Journal of Political
> Science, 42:
> 1260-1288.
> 
> See also:
> ssc install transint
> h transint
>
http://www.stata.com/statalist/archive/2006-11/msg00294.html
> 
> Nick Cox <n.j.cox@durham.ac.uk> wrote:
> > I think the objection to that is that it is
> > dimensionally unbalanced. That is, X2 and
> > whatever is added to it should have the same units
> > and the same dimensions. (Perhaps economists don't
> > care about these things, but my wannabe physicist
> > persona does.)
> 
> > Rodrigo A. Alfaro  wrote:
> >
> > > following Maarten suggestion:
> > > lnY=B0+B1*lnX1+B2*ln (X2+exp(alpha))+epsilon??
> > >
> > > Maarten buis wrote:
> > >
> > > > However, Nick just explained that you do not
> need to do that, and I
> > > > agree. Adding some constant to a variable so
> that the log doesn't
> > > > become zero is making an error, maybe or maybe
> not a necessary error
> > > > but still an error, why do you expect your
> data to be able to inform
> > > > you about an error?
> 
> Nick Cox <n.j.cox@durham.ac.uk> wrote:
> 
> I would forget about the constraint. If your
> specification
> is sensible a positive value for alpha will emerge
> from the
> estimation. If it doesn't you have a signal that the
> apecification
> is suspect in that regard.
> 
> Alternatively, just try log(x + 1). The extra degree
> of freedom
> might come in handy. I used to think log(x + 1) was
> a fudge but
> I now regard it more fondly. It's a function that
> goes to 0 as x goes
> to 0 from above and it behaves like log x as x gets
> very large,
> so it is fairly well motivated.
> *
> *   For searches and help try:
> *  
> http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 





 
____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index