Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: ivprobit first stage

From   "Austin Nichols" <>
Subject   Re: st: RE: ivprobit first stage
Date   Fri, 28 Jul 2006 11:20:45 -0400

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, 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.

*   For searches and help try:

© Copyright 1996–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index