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: IVQR with two endogenous regressors using -ivqreg-


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: IVQR with two endogenous regressors using -ivqreg-
Date   Fri, 31 May 2013 17:24:13 +0100

You are in strange territory here.

First, it is hard for anyone else even to look at this code as
-findit- can't find it and you don't give a location. Longstanding
Statalist practice is to explain where user-written software can be
found, as the FAQ does spell out.  You do clearly state that you only
hope for attention from people familiar with the program, but that's
our convention. (Sometimes people not familiar with a program can look
inside quickly and say something helpful.)

Second, it sounds as if -ivqreg- creates permanent variables without
reference to what you asked. Is that documented in the help? It's not
going to help you at all, but I'll opine that's poor programming
practice if undocumented, and a sign that you have (what shall we say)
a program that is work in progress.

Third, if this program is documented then there should be an author
email for support. I have not been following closely but there have
been various questions about this program and I've not noticed an
author replying. If that's so, the clear implication is that the
author is not on Statalist and it is a good idea to contact him, her
or them directly.

Nick
[email protected]


On 31 May 2013 17:08, Katie Farrin <[email protected]> wrote:
> Hi, Statalisters,
>
> I am using the -ivqreg- user-written command to evaluate the effects
> of source-specific income increases on nutritional outcomes.  However,
> I have two endogenous regressors, a dummy that indicates that a
> household has chosen to farm tobacco and a (continuous) variable for
> tobacco profits; these endogenous regressors are clearly related but
> not the same.
>
> I would like to instrument the endogenous dummy variable with GIS data
> on the distance to the nearest tobacco auction floor and the tobacco
> profits with the deviation from ten-year average rainfall.   I use the
> following code in Stata:
>
> *instumental variables quantile regression
> ivqreg ln_dietarydiversity maize_thousands emp_inc_thousands
> bus_profits_thousands livestock_thousands remittances_thousands /*
> */ ln_price_tomato age_hh_head male married durables_thousands
> years_education hh_size /*
> */ chitipa karonga nkhatabay rumphi mzimba kasungu nkhotakota ntchisi
> dowa salima mchinji dedza ntcheu /*
> */ mangochi machinga zomba chiradzulu blanytyre mwanza thyolo mulanje
> phalombe chikwawa nsanje balaka /*
> */ March April May June August September October November
> (tobacco_thousands tobacco=deviation_tot_rainfall_wet_2010
> dist_auction), robust first
>
> I have two questions:
> (1) when running this code I get a conformability error (r(503)), and
> I do not know why this is occurring (this is very similar to the code
> I run for regular QR using -bsqreg- without any problems) - any advice
> would be greatly appreciated on how to run this code without
> generating such an error;
>
> (2) when I run the code, before the error message, Stata saves two new
> variables to my working data set, "dhat" and "iner."  I have looked at
> the user-written -ivqreg- but cannot figure out what these are (I am
> assuming they are predicted values, but of what I do not know because
> they are not similar in range to my endogenous variable values) - if
> anyone is familiar with -ivqreg- and could give me some insight as to
> what these variables are I'd appreciate it.
*
*   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