广义倾向得分匹配法:Stata程序+实例论文 - 图文 下载本文

358EstimatingtheGPSandthedose–responsefunction

b.WithineachtreatmentintervalGk,k=1,...,K,computetheGPSatauser-speci?edrepresentativepoint(e.g.,themean,themedian,oranotherpercentile)ofthetreatmentvariable,whichwedenotebytGk,foreachunit.Letr(tGk,Xi)bethevalueoftheGPScomputedattGk∈Gkforuniti.c.Foreachk,k=1,...,K,blockonthescoresr(tGk,Xi),usingmintervals,de?nedbythequantilesoforderj/m,j=1,...,m?1,oftheGPSevalu-(k)(k)

atedattGk,r(tGk,Xi),i=1,...,N.LetB1,...,BmdenotethemGPSintervalsforthekthtreatmentinterval,Gk.d.WithineachintervalBj,j=1,...,m,calculatethemeandi?erenceofeachcovariatebetweenunitsthatbelongtothetreatmentinterval,Gk,{i:Ti∈

(k)

Gk},andunitsthatareinthesameGPSinterval,{i:r(tGk,Xi)∈Bj},but

/Gk}.belongtoanothertreatmentinterval,{i:Ti∈e.Combinethemdi?erencesinmeans,calculatedinstepd,byusingaweighted

average,withweightsgivenbythenumberofobservationsineachGPSin-(k)

tervalBj,j=1,...,m.Speci?cally,thefollowingweightedaverageiscalculatedforeachofthepcovariatesXl,l=1,...,p:

m1??

NB(k){xl,j(Gk)?xl,j(Gck)}jNj=1(k)

whereNB(k)isthenumberofobservationsintheBj

j

(k)

GPS

interval;xl,j(Gk)

(k)

isthemeanofthecovariateXlforunitsi,suchthatr(tGk,Xi)∈Bjand

??

Ti∈Gk;andxl,j(Gck)isthemeanofthecovariateXlforunitsi,suchthat

(k)

/Gk.Theteststatisticsweusetoevaluatether(tGk,Xi??)∈BjandTi??∈

balancingpropertyarefunctionsofthisweightedaverage.

f.ForeachGk,k=1,...,K,teststatistics(theStudent’ststatisticsortheBayesfactors)arecalculatedandshownintheResultswindow.Finally,themostextremevalueoftheteststatistics(thehighestabsolutevalueoftheStudent’ststatisticsorthelowestvalueoftheBayesfactors)iscomparedwithreferencevalues,andtheuserisinformedoftheextenttowhichthebalancingpropertyissupportedbythedata.

3.2

EstimatingtheconditionalexpectationoftheoutcomegiventhetreatmentandGPS

Inthesecondstage,wemodeltheconditionalexpectationoftheoutcome,Yi,givenTiandRi,asa?exiblefunctionofitstwoarguments.Weusepolynomialapproximationsofordernothigherthanthree.Speci?cally,themostcomplexmodelweconsideris

?{E(Yi|Ti,Ri)}=ψ(Ti,Ri;α)

23+α6·Ri+α7·Ti·Ri=α0+α1·Ti+α2·Ti2+α3·Ti3+α4·Ri+α5·Ri

M.BiaandA.Mattei359

where?(·)isalinkfunctionthatrelatesthepredictor,ψ(Ti,Ri;α),totheconditionalexpectation,E(Yi|Ti,Ri).

Weassumethatthemaine?ectsofTiandRicannotberemovedsothatwehave18possiblesubmodels.Theprogramdoseresponsemodel.adode?nesallthesemodels

??i.When?ttingtheselectedandestimateseachofthembyusingtheestimatedGPS,R

model,theprogramtakesintoaccountthenatureoftheoutcomevariable—whichmaybebinary,categorical(nominalorordinal),orcontinuous—bychoosingtheappropriatelinkfunction.

AsHiranoandImbens(2004)emphasize,thereisnodirectmeaningtotheestimatedcoe?cientsintheselectedmodel,exceptthattestingwhetherallcoe?cientsinvolvingtheGPSareequaltozerocanbeinterpretedasatestofwhetherthecovariatesintroduceanybias.

3.3Estimatingthedose–responsefunction

Thelaststepconsistsofaveragingtheestimatedregressionfunctionoverthescorefunctionevaluatedatthedesiredlevelofthetreatment.Speci?cally,inordertoobtainanestimateoftheentiredose–responsefunction,weestimatetheaveragepotentialoutcomeforeachlevelofthetreatmentweareinterestedinas

NN??1????1???1??????E{Y(t)}=???}β{t,r??(t,Xi)}=ψ{t,r??(t,Xi);αNi=1Ni=1

whereα??isthevectoroftheestimatedparametersinthesecondstage.

Theprogramdoseresponse.adoestimatesthedose–responsefunctionaccordingto

thefollowingalgorithm:

1.EstimatetheGPS,verifythenormalmodelusedfortheGPS,andtestthebalancingpropertycallingtheroutinegpscore.ado.2.Estimatetheconditionalexpectationoftheoutcome,giventhetreatmentandtheGPS,bycallingtheroutinedoseresponsemodel.ado.3.Estimatetheaveragepotentialoutcomeforeachlevelofthetreatmenttheuserisinterestedin.4.Estimatestandarderrorsofthedose–responsefunctionviabootstrapping.25.Plottheestimateddose–responsefunctionand,ifrequested,itscon?denceinter-vals.

2.HiranoandImbens(2004)statethatasymptoticstandarderrorsoftheestimateddose–responsefunctioncouldbecalculatedbyusingexpansionsbasedontheestimatingequations;theseshouldtakeintoaccounttheestimationoftheGPSaswellastheαparameters.Forpracticalreasons,ourprogramusesbootstrapmethodstoobtainstandarderrorsandcon?denceintervalsofthedose–responsefunctionthattakeintoaccountestimationoftheGPSandtheαparameters.

360EstimatingtheGPSandthedose–responsefunction

Someremarksonstep4ofthealgorithmcanbeuseful.Whenbootstrappedstandarderrorsarerequested,byactivatingtheappropriateoption(seesections4and5),thebootstrapencompassesboththeestimationoftheGPSbasedonthespeci?cationgivenbytheuserandtheestimationoftheαparameters.ReestimatingtheGPSandtheαparametersateachreplicationofthebootstrapprocedureallowsustoaccountfortheuncertaintyassociatedwiththeestimationoftheGPSandtheαparameters.

Typically,userswould?rstidentifyatransformationofthetreatmentvariableandaspeci?cationofthefunctionhin(1),satisfyingthenormalityassumptionandthebalancingproperty,respectively(byusing,forinstance,theroutinegpscore.ado),andthenprovideexactlythistransformationandthisspeci?cationintheinputtothepro-gramdoseresponse.ado.

4Syntax

??if????

in????

??

weight,t(varname)gpscore(newvar)

predict(newvar)sigma(newvar)cutpoints(varname)index(string)

??

nqgps(#)ttransf(transformation)normaltest(test)normlevel(#)

??

testvarlist(varlist)test(type)flag(#)detailgpscorevarlist

????????????

inweight,outcome(varname)doseresponsemodeltreatvarGPSvarif

??

cmd(regressioncmd)regtypet(string)regtypegps(type)

??

interaction(#)doseresponsevarlist

??if????

in????

??

weight,outcome(varname)t(varname)

gpscore(newvar)predict(newvar)sigma(newvar)cutpoints(varname)index(string)nqgps(#)doseresponse(newvarlist)??

ttransf(transformation)normaltest(test)normlevel(#)testvarlist(varlist)test(type)flag(#)cmd(regressioncmd)regtypet(type)regtypegps(type)interaction(#)tpoints(vector)npoints(#)delta(#)filename(?lename)bootstrap(string)bootreps(#)

??

analysis(string)analysislevel(#)graph(?lename)detailInthegpscoreanddoseresponsecommands,theargumentvarlistrepresentsthelistofcontrolvariables,whichareusedtoestimatetheGPS.Inthedoseresponsemodelcommand,thevariablelistconsistsofonlytwovariables:thetreatmentvariable(treatvar)andtheGPS(GPSvar).

M.BiaandA.Mattei361

5Options

Wedescribeonlytheoptionsforthedoseresponsecommand,becausetheyincludealltheoptionsforthegpscorecommandandthedoseresponsemodelcommand.There-fore,alltheoptionsdescribedinsections5.1and5.2applytodoseresponse,andwespecify,ifapplicable,whethertheoptionalsoappliestogpscoreordoseresponsemodel.

5.1Required

outcome(varname)(doseresponsemodel)speci?esthatvarnameistheoutcomevari-able.t(varname)(gpscore)speci?esthatvarnameisthetreatmentvariable.gpscore(newvar)(gpscore)speci?esthevariablenamefortheestimatedGPS.predict(newvar)(gpscore)createsanewvariabletoholdthe?ttedvaluesofthetreatmentvariable.sigma(newvar)(gpscore)createsanewvariabletoholdthemaximumlikelihoodesti-mateoftheconditionalstandarderrorofthetreatmentgiventhecovariates.cutpoints(varname)(gpscore)dividesthesetofpotentialtreatmentvalues,T,intointervalsaccordingtothesampledistributionofthetreatmentvariable,cuttingatvarnamequantiles.index(string)(gpscore)speci?estherepresentativepointofthetreatmentvariableatwhichtheGPShastobeevaluatedwithineachtreatmentinterval.stringidenti-?eseitherthemean(string=mean)orapercentile(string=p1,...,p100)ofthetreatment.nqgps(#)(gpscore)speci?esthatthevaluesoftheGPSevaluatedattherepresen-tativepointindex(string)ofeachtreatmentintervalhavetobedividedinto#(#∈{1,...,100})intervals,de?nedbythequantilesoftheGPSevaluatedattherepresentativepointindex(string).doseresponse(newvarlist)speci?esthevariablename(s)fortheestimateddose–responsefunction(s).

(Continuedonnextpage)