Grazia,
In case Mark's concise answer proved a bit too concise,
the following Stata-8.2-compatible code produces the Wald
test of exogeneity reported by the ivprobit cmd included
at the end (checkable in Stata 9 only):
use http://fmwww.bc.edu/ec-p/data/wooldridge/mroz.dta, clear
unab endog: educ huseduc
unab exclude: kids* age husage
unab include: hushrs huswage
local i
local vhat
foreach v of local endog {
local e: list endog - v
reg `v' `e' `exclude' `include'
local i=`i'+1
predict vhat`i', resid
}
unab vhat: vhat*
probit inlf `endog' `include' `vhat'
testparm `vhat'
ivprobit inlf `include' (`endog'=`exclude'), two
> -----Original Message-----
> I get the following message: "invalid 'twostage' " .
This is because the ivprob in Stata 8.2 is a user-written command that doesn't support this option, and the ivprobit in Stata 9 that the manual refers to is Stata's official ivprobit and does support this option.
You either need to update to Stata 9, or do the test by hand in Stata 8.
Cheers,
Mark
*
* 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/