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]

st: Am I using the margins command with ivregress properly?


From   "Sraboni, Esha (IFPRI-Dhaka)" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Am I using the margins command with ivregress properly?
Date   Sun, 16 Mar 2014 08:16:46 +0000

Hi,

I am using instrumental variables regressions with two endogenous regressors. I have used the -ivreg2- command because of its post estimation tests. I am now trying to calculate the elasticities of the dependent variables with respect to the endogenous variables and one other household characteristic- education of household head.  Since the -margins- command cannot be used with ivreg2, I have used ivregress.  I have appended below regression results (for selected variables ) obtained using ivreg2, and elasticities obtained using ivregress. I am not sure if I am using the margins command correctly; given that the IV regression estimates are highly significant, I had expected the IV elasticities to be significant.  I was hoping if you would have any advice on this.


Thanks,

Esha  


**** Dependent variables
local depvar " pccal hhdietscore"
***** endogenous variable 1: score for female
local emp1 "emp_score2" 
**** endogenous variable 2: crop diversity 
local prodvar "num_allcrops"

//regressions

local i=0
foreach y in `depvar' {
local i = `i' + 1
regress `y' `emp1' `prodvar' `hhchars'  [pw=hhweight]
ivreg2 `y' `hhchars' (`emp1' `prodvar' = `z1' `w' ) [pw=hhweight], endog(`emp1' `prodvar') first ffirst 
}

			OLS pccal	IV pccal		OLS hhdietscore	IV hhdietscore
			coef/se	coef/se	coef/se		coef/se

emp_score2		235.364***	891.858***	0.493***		1.938***
			(47.705)	(172.793)	(0.120)			(0.411)
num_allcrops		36.259***	24.510		0.075***		0.142**
			(9.009)		(23.556)	(0.020)			(0.057)
education_hhhead	8.639***	8.514**	0.074***		0.072***
			(3.284)		(3.347)		(0.007)			(0.008)

F			41.928		38.481		26.628			25.084
jp					0.470					0.640
idp					0.000					0.000
widstat					41.798					41.798

//calculating elasticities

local i=0
foreach y in `depvar' {
local i = `i' + 1
qui regress `y' `emp1' `prodvar' `hhchars'  [pw=hhweight]
margins, eyex(`emp1' `prodvar' education_hhhead) atmeans vce(unconditional) post

qui ivregress 2sls `y' `hhchars'  (`emp1' `prodvar' = `z1' `w' ) [pw=hhweight], first 
margins, eyex(`emp1' `prodvar' education_hhhead) atmeans vce(unconditional) post
}

			OLS pccal	IV pccal		OLS hhdietscore	IV hhdietscore
			coef/se	coef/se	coef/se		coef/se

emp_score2		0.063***	0.240		0.035***		0.136
			(0.013)		(224.877)	(0.008)			(139.752)

num_allcrops		0.019***	0.013		0.010***		0.019
			(0.005)		(58.311)	(0.003)			(36.810)

education_hhhead	0.010***	0.010		0.023***		0.022
			(0.004)		(19.390)	(0.002)			(11.434)

note:  *** p<0.01, ** p<0.05, * p<0.1				 



		

*
*   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