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: Calculating elasticities with an endogenous covariate in a translog production function


From   Norman M <normanmva@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Calculating elasticities with an endogenous covariate in a translog production function
Date   Mon, 2 Dec 2013 09:26:30 -0500

I'm sorry for  not providing the code. The basic idea is as follows. I
need to estimate a translog function, that by definition has the
following form:

LnY = b0 + b1*LnK + b2*LnL + b3*LnK*LnL + b4*LnK*LnK + b5*LnL*LnL

where Y is output, K is capital and L is labor. Thus, Y is a function
of K, L, and all possible interactions (K-L, K-K, L-L). Now, K and L
are usually endogenous. For simplicity let's say only K is endogenous,
and let's assume a good instrument is the number of firms in the
market (nfirm).  Using Greene's dataset, the code is Stata should be
as follows:

* Data
use http://www.stata-press.com/data/r12/greene9

* Basic OLS regression (this one works!)
reg lnv c.lnk##c.lnl c.lnk#c.lnk c.lnl#c.lnl

* IV Regression
ivregress 2sls lnv c.lnk##c.lnl c.lnk#c.lnk c.lnl#c.lnl (c.lnk = nfirm)

The error message I got is:

lnk included in both exogenous and endogenous variable lists
r(498);

I'm trying to find a way to carry out this IV estimation. Can somebody help me?

Norman M


On Sat, Nov 30, 2013 at 8:23 AM, Austin Nichols <austinnichols@gmail.com> wrote:
> Norman M <normanmva@gmail.com> :
>
> Neither you nor Jason Russ <jasondruss@gmail.com> makes very clear
> what quantity you want to estimate--is this a regression with log
> output (lny) as the outcome?  In that case, the elasticity is not
> dy/dx but perhaps you want the semielasticity dlny/dx instead?
>
> If you want to increase the chance that someone responds, why not
> follow the explicit guidance in the FAQ and show the command typed in
> Stata?
>
> You might consider simply demeaning all your covariates to make the
> coef on X1 equal to its marginal effect, e.g.
>
> set seed 1
> drawnorm X2 Z e, n(1000) clear
> g X1=e/4+Z
> g y=exp(X2+X1+X1^2/5+X1*X2/100+e)
> g X1X1=X1^2
> g X1X2=X1*X2
> g ZX2=Z*X2
> g ZX1=Z*X1
> g lny=ln(y)
> reg lny c.X1##c.X1 c.X2##c.X2
> margins, dydx(X1)
> foreach v in X1 X2 {
>  su `v', mean
>  g double c`v'=`v'-r(mean)
>  }
> reg lny c.cX1##c.cX1 c.cX2##c.cX2
> margins, dydx(cX1)
> g cX1X1=cX1^2
> g cX1X2=cX1*cX2
> g ZcX2=Z*cX2
> g ZcX1=Z*cX1
> cap ssc inst ivreg2
> ivreg2 lny cX2 (cX1 cX1X1 cX1X2=Z ZcX1 ZcX2)
>
> but consider a -gmm- version for reasons given at
> http://www.stata.com/meeting/snasug08/nichols_gmm.pdf
>
> Why would you want the atmeans option on -margins-?
>
>
> On Fri, Nov 29, 2013 at 5:42 PM, Norman M <normanmva@gmail.com> wrote:
>> Hi everyone,
>>
>> I'm having the same problem that Jason posted, and I did not find a
>> solution in the statalist. I was wondering if someone has a solution.
>
> refers to:
> http://www.stata.com/statalist/archive/2013-10/msg00034.html
> *
> *   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/
*
*   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