Wooldridge Session 2
Wooldridge Session 2
Models
J eff Wooldridge
MichiganStateUniversity
ProgrammeEvaluationfor PolicyAnalysis
Institutefor Fiscal Studies
J une2012
1. General Approach
2. Nonlinear ModelswithAdditiveErrors
3. ModelswithIntrinsicNonlinearity
4. Special Regressor Methodsfor BinaryResponse
1
1. General Approach
Withmodelsthat arenonlinear inparameters, thelinear projection
approachtoCF estimationrarelyworks(unlessthemodel happensto
belinear intheEEVs).
If u
1
isavector of structural errors, y
2
isthevector of EEVs, andz
isthevector of exogenousvariables, weat least havetomodel
Eu
1
|y
2
,z andoftenDu
1
|y
2
,z (inaparametriccontext).
Animportant simplificationiswhen
y
2
g
2
z,
2
v
2
(1)
wherev
2
isindependent of z. Unfortunately, thisrulesout discretey
2
.
2
Withdiscretenessiny
2
, difficult toget bywithout modelingDy
2
|z.
Inmanycases particularlywheny
2
iscontinuous onehasachoice
betweentwo-stepcontrol functionestimatorsandone-stepestimators
that estimateparametersat thesametime. (Typicallythesehavea
quasi-LIML flavor.)
Moreradical suggestionsaretousegeneralizedresidualsinnonlinear
modelsasanapproximatesolutiontoendogeneity.
3
2. Nonlinear Models with Additive Errors
Suppose
y
1
g
1
y
2
,z
1
,
1
u
1
y
2
g
2
z,
2
v
2
and
Eu
1
|v
2
,z Eu
1
|v
2
v
2
1
Assumewehaveenoughrelevant elementsinz
2
soidentification
holds.
4
WecanbaseaCF approachon
Ey
1
|y
2
,z g
1
y
2
,z
1
,
1
v
2
1
(2)
Estimate
2
bymultivariatenonlinear least squares, or anMLE, toget
v
i2
y
i2
g
2
z
i
,
2
.
Insecondstep, estimate
1
and
1
byNLSusingthemeanfunctionin
(2).
Easiest wheny
2
z
2
v
2
socanuselinear estimationinfirst stage.
Canallowavector y
1
, asinBlundell andRobin(1999, J ournal of
AppliedEconometrics): expendituresharesystemwithtotal
expenditureendogenous.
5
Inprinciplecanhavey
2
discreteprovidedwecanfindEu
1
|y
2
,z.
If y
2
isbinary, canhavenonlinear switchingregression but with
additivenoise.
Example: Exponential function:
y
1
exp
1
1
y
2
z
1
1
y
2
z
1
1
u
1
y
2
v
1
y
2
1z
2
e
2
0
Usuallymorenatural for theunobservablestobeinsidethe
exponential function. Andwhat if y
1
issomethinglikeacount variable?
Sameissuearisesinshareequations.
6
3. Models with Intrinsic Nonlinearity
Typicallythreeapproachestononlinear modelswithEEVs.
(1) Pluginfittedvaluesfromafirst stepestimationinanattempt to
mimic2SLSinlinear model. Usuallydoesnot produceconsistent
estimatorsbecausetheimpliedformof Ey
1
|z or Dy
1
|z isincorrect.
(2) CF approach: Pluginresidualsinanattempt toobtainEy
1
|y
2
,z or
Dy
1
|y
2
,z.
(3) MaximumLikelihood(oftenlimitedinformation): Usemodelsfor
Dy
1
|y
2
,z andDy
2
|z jointly.
All strategiesaremoredifficult withnonlinear modelswheny
2
is
discrete.
7
Binary and Fractional Responses
Probit model:
y
1
1
1
y
2
z
1
1
u
1
0, (3)
whereu
1
|z Normal0,1. Analysisgoesthroughif wereplacez
1
,y
2
withanyknownfunctionx
1
g
1
z
1
,y
2
.
TheRivers-Vuong(1988) approachistomakea
homoskedastic-normal assumptiononthereducedformfor y
2
,
y
2
z
2
v
2
, v
2
|z Normal0,
2
2
. (4)
8
RV approachcomesclosetorequiring
u
1
,v
2
independent of z. (5)
If wealsoassume
u
1
,v
2
BivariateNormal (6)
with
1
Corru
1
,v
2
, thenwecanproceedwithMLE basedon
fy
1
,y
2
|z. A CF approachisavailable, too, basedon
Py
1
1|y
2
,z
1
y
2
z
1
1
1
v
2
(7)
whereeachcoefficient ismultipliedby1
1
2
1/2
.
9
TheRivers-VuongCF approachis
(i) OLSof y
i2
onz
i
, toobtaintheresiduals, v
i2
.
(ii) Probit of y
i1
onz
i1
,y
i2
,v
i2
toestimatethescaledcoefficients. A
simplet test onv
2
isvalidtotest H
0
:
1
0.
10
Canrecover theoriginal coefficients, whichappear inthepartial
effects seeWooldridge(2010, Chapter 15). Or, obtainaveragepartial
effectsbydifferentiatingtheestimatedaveragestructural function:
ASFz
1
,y
2
N
1
i1
N
x
1
1
v
i2
, (8)
that is, weaverageout thereducedformresiduals, v
i2
.
Cover theASF inmoredetail later.
11
Thetwo-stepCF approacheasilyextendstofractional responses:
0 y
1
1. Modifythemodel as
Ey
1
|y
2
,z,q
1
x
1
1
q
1
, (9)
wherex
1
isafunctionof y
2
,z
1
andq
1
containsunobservables.
Assumeq
1
1
v
2
e
1
whereDe
1
|z,v
2
Normal0,
e
1
2
.
Usethesame two-stepestimator asfor probit. (InStata, gl m
commandinsecondstage.) Inthiscase, must obtainAPEsfromthe
ASF in(8).
12
Ininference, assumeonlythat themeaniscorrectlyspecified. (Use
sandwichinBernoulli quasi-LL.)
Toaccount for first-stageestimation, thebootstrapisconvenient.
NoIV proceduresavailableunlessassumethat, say, thelog-odds
transformof y
1
islinear inx
1
1
andanadditiveerror independent of z.
13
CF hasclear advantagesover plug-in approach, eveninbinary
responsecase. Supposerather thanconditioningonv
2
alongwithz (and
thereforey
2
) toobtain Py
1
1|z,y
2
weuse
Py
1
1|z
1
z
2
z
1
1
/
1
1
2
Var
1
v
2
u
1
2
. (ii)
Probit of y
i1
on
i2
, z
i1
. Harder toestimateAPEsandtest for
endogeneity.
14
Danger withplugginginfittedvaluesfor y
2
isthat onemight be
temptedtoplug
2
intononlinear functions, sayy
2
2
or y
2
z
1
, anduse
probit insecondstage. Doesnot result inconsistent estimationof the
scaledparametersor thepartial effects.
AddingtheCF v
2
solvestheendogeneityproblemregardlessof how
y
2
appears.
15
Example: Marriedwomensfractionof hoursworked.
. use mr oz
. gen f r achour s hour s/ 8736
. sumf r achour s
Var i abl e | Obs Mean St d. Dev. Mi n Max
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
f r achour s | 753 . 0847729 . 0997383 0 . 5666209
16
. r eg nwi f ei nc educ exper exper sq ki dsl t 6 ki dsge6 age huseduc husage
Sour ce | SS df MS Number of obs 753
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - F( 8, 744) 23. 77
Model | 20722. 898 8 2590. 36225 Pr ob F 0. 0000
Resi dual | 81074. 2176 744 108. 970723 R- squar ed 0. 2036
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Adj R- squar ed 0. 1950
Tot al | 101797. 116 752 135. 368505 Root MSE 10. 439
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
nwi f ei nc | Coef . St d. Er r . t P| t | [ 95%Conf . I nt er val ]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
educ | . 6721947 . 2138002 3. 14 0. 002 . 2524713 1. 091918
exper | - . 3133239 . 1383094 - 2. 27 0. 024 - . 5848472 - . 0418007
exper sq | - . 0003769 . 0045239 - 0. 08 0. 934 - . 0092581 . 0085043
ki dsl t 6 | . 9004389 . 8265936 1. 09 0. 276 - . 7222947 2. 523172
ki dsge6 | . 4462001 . 3225308 1. 38 0. 167 - . 1869788 1. 079379
age | . 2819309 . 1075901 2. 62 0. 009 . 0707146 . 4931472
huseduc | 1. 188289 . 1617589 7. 35 0. 000 . 8707307 1. 505847
husage | . 0681739 . 1047836 0. 65 0. 515 - . 1375328 . 2738806
_cons | - 15. 46223 3. 9566 - 3. 91 0. 000 - 23. 22965 - 7. 694796
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
. pr edi ct v2h, r esi d
17
. gl mf r achour s educ exper exper sq ki dsl t 6 ki dsge6 age nwi f ei nc v2h, f am( bi n)
l i nk( pr obi t ) r obust
not e: f r achour s has noni nt eger val ues
Gener al i zed l i near model s No. of obs 753
Opt i mi zat i on : ML Resi dual df 744
Scal e par amet er 1
Devi ance 77. 29713199 ( 1/ df ) Devi ance . 103894
Pear son 83. 04923963 ( 1/ df ) Pear son . 1116253
Var i ance f unct i on: V( u) u*( 1- u/ 1) [ Bi nomi al ]
Li nk f unct i on : g( u) i nvnor m( u) [ Pr obi t ]
AI C . 4338013
Log pseudol i kel i hood - 154. 3261842 BI C - 4851. 007
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| Robust
f r achour s | Coef . St d. Er r . z P| z| [ 95%Conf . I nt er val ]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
educ | . 0437229 . 0169339 2. 58 0. 010 . 010533 . 0769128
exper | . 0610646 . 0096466 6. 33 0. 000 . 0421576 . 0799717
exper sq | - . 00096 . 0002691 - 3. 57 0. 000 - . 0014875 - . 0004326
ki dsl t 6 | - . 4323608 . 0782645 - 5. 52 0. 000 - . 5857565 - . 2789651
ki dsge6 | - . 0149373 . 0202283 - 0. 74 0. 460 - . 0545841 . 0247095
age | - . 0219292 . 0043658 - 5. 02 0. 000 - . 030486 - . 0133725
nwi f ei nc | - . 0131868 . 0083704 - 1. 58 0. 115 - . 0295925 . 0032189
v2h | . 0102264 . 0085828 1. 19 0. 233 - . 0065957 . 0270485
_cons | - 1. 169224 . 2397377 - 4. 88 0. 000 - 1. 639102 - . 6993472
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
18
. f r aci vp f r achour s educ exper exper sq ki dsl t 6 ki dsge6 age
( nwi f ei nc huseduc husage)
Fi t t i ng exogenous pr obi t model
not e: f r achour s has noni nt eger val ues
Pr obi t model wi t h endogenous r egr essor s Number of obs 753
Wal d chi 2( 7) 240. 78
Log pseudol i kel i hood - 3034. 3388 Pr ob chi 2 0. 0000
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| Robust
| Coef . St d. Er r . z P| z| [ 95%Conf . I nt er val ]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
nwi f ei nc | - . 0131207 . 0083969 - 1. 56 0. 118 - . 0295782 . 0033369
educ | . 0434908 . 0169655 2. 56 0. 010 . 0102389 . 0767427
exper | . 060721 . 0098379 6. 17 0. 000 . 041439 . 0800029
exper sq | - . 0009547 . 0002655 - 3. 60 0. 000 - . 0014751 - . 0004342
ki dsl t 6 | - . 4299361 . 0802032 - 5. 36 0. 000 - . 5871314 - . 2727408
ki dsge6 | - . 0148507 . 0205881 - 0. 72 0. 471 - . 0552025 . 0255012
age | - . 0218038 . 0045701 - 4. 77 0. 000 - . 030761 - . 0128465
_cons | - 1. 162787 . 2390717 - 4. 86 0. 000 - 1. 631359 - . 6942151
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/ at hr ho | . 1059984 . 0906159 1. 17 0. 242 - . 0716056 . 2836024
/ l nsi gma | 2. 339528 . 0633955 36. 90 0. 000 2. 215275 2. 463781
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
r ho | . 1056032 . 0896054 - . 0714835 . 2762359
si gma | 10. 37633 . 657813 9. 163926 11. 74915
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
I nst r ument ed: nwi f ei nc
I nst r ument s: educ exper exper sq ki dsl t 6 ki dsge6 age huseduc husage
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Wal d t est of exogenei t y ( / at hr ho 0) : chi 2( 1) 1. 37 Pr ob chi 2 0. 2421
19
What arethelimitstotheCF approach? Consider
Ey
1
|z,y
2
,q
1
1
y
2
z
1
1
q
1
(10)
wherey
2
isdiscrete. Rivers-Vuongapproachdoesnot generallywork
(evenif y
1
isbinary).
Neither doesplugginginprobit fittedvalues, assuming
Py
2
1|z z
2
(11)
Inother words, donot trytomimic2SLSasfollows: (i) Doprobit of y
2
onz andget thefittedprobabilities,
2
z
2
. (ii) Doprobit of y
1
onz
1
,
2
, that is, just replacey
2
with
2
.
20
Theonlystrategythat worksunder traditional assumptionsis
maximumlikelihoodestimationbasedonfy
1
|y
2
,zfy
2
|z. [Perhaps
thisiswhysome, suchasAngrist (2001), promotethenotionof just
usinglinear probabilitymodelsestimatedby2SLS.]
Bivariateprobit softwarecanbeusedtoestimatetheprobit model
withabinaryendogenousvariable. Wooldridge(2011) showsthat the
samequasi-LIML isconsistent wheny
1
isfractional if (10) holds.
Canalsodoafull switchingregressionwheny
1
isfractional. Use
heckprobit quasi-LLs.
21
A CF approachbasedongeneralizeresidualscanbejustifiedfor
small amountsof endogeneity. Consider
Ey
1
|y
2
,z,q
1
x
1
1
q
1
(11)
and
y
2
1z
2
e
2
0 (12)
q
1
,e
1
jointlynormal andindependent of z.
Let
gr
i2
y
i2
z
i
2
1 y
i2
z
i
2
(13)
bethegeneralizedresidualsfromtheprobit estimation.
22
Thevariableadditiontest (essentiallyscoretest) for thenull that q
1
ande
2
areuncorrelatedcanbeobtainedbyprobit of y
i1
onthemean
function
x
i1
1
1
gr
i2
(14)
andusearobust t statisticfor
1
. (Get scaledestimatesof
1
and
1
.)
23
Wooldridge(2011) suggeststhat thiscanapproximatetheAPEs,
obtainedfromtheestimatedaveragestructural function:
ASFy
2
,z
1
N
1
i1
N
x
1
1
1
gr
i2
(15)
Simulationssuggest thiscanworkprettywell, evenif theamount of
endogeneityisnot small.
24
If wehavetwosourcesof unobservables, addaninteraction:
Ey
1
|y
2
,z x
1
1
1
gr
2
1
y
2
gr
2
ASFy
2
,z
1
N
1
i1
N
x
1
1
1
gr
i2
1
y
2
gr
i2
(16)
(17)
Twodf test of null that y
2
isexogenous.
25
Multinomial Responses
Recent pushbyPetrinandTrain(2010), amongothers, tousecontrol
functionmethodswherethesecondstepestimationissomethingsimple
suchasmultinomial logit, or nestedlogit rather thanbeingderived
fromastructural model. So, if wehavereducedforms
y
2
z
2
v
2
, (18)
thenwejumpdirectlytoconvenient modelsfor Py
1
j|z
1
,y
2
,v
2
.
Theaveragestructural functionsareobtainedbyaveragingtheresponse
probabilitiesacrossv
i2
.
26
Canusethesameapproachwhenwehaveavector of shares, sayy
1
,
addinguptounity. (NamandWooldridge, 2012.) Themultinomial
distributionisinthelinear exponential family.
Nogenerallyacceptablewaytohandlediscretey
2
, except by
specifyingafull set of distributions.
Might approximatebyaddinggeneralizedresidualsascontrol
functionstostandardmodels(suchasMNL).
27
Exponential Models
IV andCF approachesavailablefor exponential models. For y
1
0
(couldbeacount) write
Ey
1
|y
2
,z,r
1
expx
1
1
q
1
, (19)
whereq
1
istheomittedvariableindependent of z. x
1
canbeany
functionof y
2
,z
1
.
CF methodcanbebasedon
Ey
1
|y
2
,z expx
1
1
Eexpq
1
|y
2
,z. (20)
28
For continuousy
2
, canfindEexpq
1
|y
2
,z whenDy
2
|z is
homoskedasticnormal (Wooldridge, 1997) andwhenDy
2
|z followsa
probit (Terza, 1998).
Intheprobit case,
Ey
1
|y
2
,z expx
1
1
hy
2
,z
2
,
1
(21)
hy
2
,z
2
,
1
exp
1
2
/2y
2
1
z
2
/z
2
1 y
2
1
1
z
2
/1 z
2
.
(22)
Canusetwo-stepNLS, where
2
isobtainedfromprobit. If y
1
is
count, useaQMLE inthelinear exponential family, suchasPoissonor
geometric.
29
CanshowtheVAT scoretest isobtainedfromthemeanfunction
expx
i1
1
1
gr
i
(23)
where
gr
i2
y
i2
z
i
2
1 y
i2
z
i
i1
N
expx
1
1
1
gr
i2
N
1
i1
N
exp
1
gr
i2
expx
1
Addy
i2
gr
i2
for aswithingregressionversion:
Ey
i1
|y
i2
,z
i
expx
i1
1
1
gr
i
1
y
i2
gr
i2
(24)
31
IV methodsthat workfor anyy
2
without distributional assumptions
areavailable[Mullahy(1997)]. If
Ey
1
|y
2
,z,q
1
expx
1
1
q
1
(25)
andq
1
isindependent of z then
Eexpx
1
1
y
1
|z Eexpq
1
|z 1, (26)
whereEexpq
1
1isanormalization. Themoment conditionsare
Eexpx
1
1
y
1
1|z 0. (27)
Requiresnonlinear IV methods. Howtoapproximatetheoptimal
instruments?
32
Quantile Regression
Suppose
y
1
1
y
2
z
1
1
u
1
, (28)
wherey
2
isendogenousandz isexogenous, withz
1
z.
Amemiyas(1982) two-stageLADestimator isaplug-inestimator.
Reducedformfor y
2
,
y
2
z
2
v
2
. (29)
First stepappliesOLSor LADto(29), andgetsfittedvalues,
y
i2
z
i
2
. Theseareinsertedfor y
i2
togiveLADof y
i1
onz
i1
,
i2
.
2SLADreliesonsymmetryof thecompositeerror
1
v
2
u
1
givenz.
33
If Du
1
,v
2
|z iscentrallysymmetric canuseacontrol function
approach, asinLee(2007). Write
u
1
1
v
2
e
1
, (30)
wheree
1
givenz wouldhaveasymmetricdistribution. Get LAD
residualsv
i2
y
i2
z
i
2
anddoLADof y
i1
onz
i1
,y
i2
,v
i2
. Uset test on
v
i2
totest null that y
2
isexogenous.
Interpretationof LADincontext of omittedvariablesisdifficult
unlesslotsof symmetryassumed.
SeeLee(2007) for discussionof general quantiles.
34
4. Special RegressorMethods for Binary Response
Lewbel (2000) showedhowtosemi-parametricallyestimate
parametersinbinaryresponsemodelsif aregressor withcertain
propertiesisavailable. DongandLewbel (2012) haverecentlyrelaxed
thoseconditionssomewhat.
Let y
1
beabinaryresponse:
y
1
1w
1
y
2
2
z
1
1
u
1
0
1w
1
x
1
1
u
1
0
(31)
wherew
1
isthespecial regressor normalizedtohaveunitycoefficient
andassumedtobecontinuouslydistributed.
35
Inwillingness-to-payapplications, w
1
cost, wherecost isthe
amoungthat anewproject will cost. Thensomeonepreferstheproject
if
y
1
1wtp cost
Instudiesthat elicit WTP, cost isoftenset completelyexogenously:
independent of everythingelse, includingy
2
.
DongandLewbel (2012) assumew
1
, likez
1
, isexogenousin(31),
andthat therearesuitableinstruments:
Ew
1
u
1
0, Ez
u
1
0 (32)
36
Needusual rankconditionif wehadlinear model without w
1
: rank
Ez
x
1
K
1
.
Setupismoregeneral but theyalsowritealinear equation
w
1
y
2
1
z
2
r
1
Ey
2
r
1
0, Ez
r
1
0
(33)
andthenrequire(at aminimum)
Er
1
u
1
0. (34)
Condition(34), alongwithpreviousassumptions, meansw
1
must be
excludedfromthereducedformfor y
2
(whichisatestablerestriction).
37
Toseethis, multiply(33) byu
1
, takeexpectations, imposeexogeneity
onw
1
andz, anduse(31):
Eu
1
w
1
Eu
1
y
2
1
Eu
1
z
2
Eu
1
r
1
or
0 Eu
1
y
2
1
(35)
For thisequationtoholdexcept byflukeweneed
1
0 (andinthe
caseof ascalar y
2
thisistherequirement). From(33) thismeansy
2
and
w
1
areuncorrelatedafter z hasbeenpartialledout. Thisimpliesw
1
does
not appear inthereducedformfor y
2
oncez isincluded.
38
Caneasilytest theDong-Lewbel identificationassumptiononthe
special regressor. Canholdif w
1
dependsonz providedthat w
1
is
independent of y
2
conditional onz.
InWTP studies, meanswecanalloww
1
todependonz but not y
2
.
DongandLewbel application: y
1
isdecisiontomigrate, y
2
ishome
ownershipdummy. Thespecial regressor isage. But doesage really
havenopartial effect onhomeownershipgiventheother exogenous
variables?
39
If theassumptionshold, D-L showthat, under regularityconditions
(includingwidesupport for w
1
),
s
1
x
1
1
e
1
Ez
e
1
0
(36)
where
s
1
y
1
1w
1
0
fw
1
|y
2
,z
(37)
wheref|y
2
,z isthedensityof w
1
giveny
2
,z.
40
EstimatethisdensitybyMLE or nonparametrics:
i1
y
i1
1w
i1
0
f
w
i1
|y
i2
,z
i