-------------------------------------------------------------------------------------------------------------
Setup
. webuse klein
Estimate system by three-stage least squares
. reg3 (consump wagepriv wagegovt) (wagepriv consump govt capital1)
-------------------------------------------------------------------------------------------------------------
Setup
. webuse supDem
Store equations in global macros
. global demand "(qDemand: quantity price pcompete income)"
. global supply "(qSupply: quantity price praw)"
Estimate system, specifying price as endogenous
. reg3 $demand $supply, endog(price)
-------------------------------------------------------------------------------------------------------------
Setup
. webuse klein
Store equations and variable lists in global macros
. global conseqn "(consump profits profits1 wagetot)"
. global inveqn "(invest profits profits1 capital1)"
. global wageqn "(wagepriv totinc totinc1 year)"
. global enlist "wagetot profits totinc"
. global exlist "taxnetx wagegovt govt"
Estimate system, specifying lists of endogenous and exogenous variables; iterate until estimates converge
. reg3 $conseqn $inveqn $wageqn, endog($enlist) exog($exlist) ireg3
Modify consumption equation
. global conseqn "(consump profits profits1 wagepriv wagegovt)"
Constrain coefficients of wagepriv and wagegovt in consumption equation to be equal
. constraint 1 [consump]wagepriv = [consump]wagegovt
Estimate system under constraint
. reg3 $conseqn $inveqn $wageqn, endog($enlist) exog($exlist) constr(1) ireg3
|