### Friday, March 10, 2006

## st: qvf command for count data

I'm having a problem running a regression with the qvf command. This is the error message I keep getting

no me vars for specified instruments r(198);

My syntax is of the form

qvf y x1 x2 x3 x4 (z1 x3 x4), family(nbinomial) robust cluster (A);

(basically I want to run the 2nd stage using OLS and the 1st stage using the neg binomial regression since z1 (dep var) is a count variable). So, z1 is the instrument variable.

I tried putting z1 at the end (i.e. (x3 x4 z1)) but get the same error.

I also ran it using the ivreg command instead

i.e.

ivreg y x1 x2 x3 x4 (z1 = x3 x4), robust cluster (A);

..........And it works! I understand you don't put an = sign in the qvf command

Can you please help with the above problem? Also, do I need to include the link command? Is my family(nbinomial) command ok? How does STATA know that the nbinomial applies to the 1st stage?

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

Tag: statalist