sformat22zizi.com

22zizi.com  时间:2021-03-17  阅读:()
Titlestata.
comxtgee—Fitpopulation-averagedpanel-datamodelsbyusingGEESyntaxMenuDescriptionOptionsRemarksandexamplesStoredresultsMethodsandformulasReferencesAlsoseeSyntaxxtgeedepvarindepvarsifinweight,optionsoptionsDescriptionModelfamily(family)distributionofdepvarlink(link)linkfunctionModel2exposure(varname)includeln(varname)inmodelwithcoefcientconstrainedto1offset(varname)includevarnameinmodelwithcoefcientconstrainedto1noconstantsuppressconstanttermasisretainperfectpredictorvariablesforceestimateevenifobservationsunequallyspacedintimeCorrelationcorr(correlation)within-groupcorrelationstructureSE/Robustvce(vcetype)vcetypemaybeconventional,robust,bootstrap,orjackknifenmpusedivisorNPinsteadofthedefaultNrgfmultiplytherobustvarianceestimateby(N1)/(NP)scale(parm)overridesthedefaultscaleparameter;parmmaybex2,dev,phi,or#Reportinglevel(#)setcondencelevel;defaultislevel(95)eformreportexponentiatedcoefcientsdisplayoptionscontrolcolumnformats,rowspacing,linewidth,displayofomittedvariablesandbaseandemptycells,andfactor-variablelabelingOptimizationoptimizeoptionscontroltheoptimizationprocess;seldomusednodisplaysuppressdisplayofheaderandcoefcientscoeflegenddisplaylegendinsteadofstatistics12xtgee—Fitpopulation-averagedpanel-datamodelsbyusingGEEApanelvariablemustbespecied.
Correlationstructuresotherthanexchangeableandindependentrequirethatatimevariablealsobespecied.
Usextset;see[XT]xtset.
indepvarsmaycontainfactorvariables;see[U]11.
4.
3Factorvariables.
depvarandindepvarsmaycontaintime-seriesoperators;see[U]11.
4varlists.
by,mfp,miestimate,andstatsbyareallowed;see[U]11.
1.
10Prexcommands.
vce(bootstrap)andvce(jackknife)arenotallowedwiththemiestimateprex;see[MI]miestimate.
iweights,fweights,andpweightsareallowed;see[U]11.
1.
6weight.
Weightsmustbeconstantwithinpanel.
nodisplayandcoeflegenddonotappearinthedialogbox.
See[U]20Estimationandpostestimationcommandsformorecapabilitiesofestimationcommands.
familyDescriptiongaussianGaussian(normal);family(normal)isasynonymigaussianinverseGaussianbinomial#|varnameBernoulli/binomialpoissonPoissonnbinomial#negativebinomialgammagammalinkLinkfunction/denitionidentityidentity;y=yloglog;ln(y)logitlogit;ln{y/(1y)},naturallogoftheoddsprobitprobit;Φ1(y),whereΦ()isthenormalcumulativedistributioncloglogcloglog;ln{ln(1y)}power#power;ykwithk1ifnotspeciedopower#oddspower;[{y/(1y)}k1]/kwithk1ifnotspeciednbinomialnegativebinomial;ln{y/(y+α)}reciprocalreciprocal;1/ycorrelationDescriptionexchangeableexchangeableindependentindependentunstructuredunstructuredfixedmatnameuser-speciedar#autoregressiveoforder#stationary#stationaryoforder#nonstationary#nonstationaryoforder#MenuStatistics>Longitudinal/paneldata>Generalizedestimatingequations(GEE)>Generalizedestimatingequations(GEE)xtgee—Fitpopulation-averagedpanel-datamodelsbyusingGEE3Descriptionxtgeetspopulation-averagedpanel-datamodels.
Inparticular,xtgeetsgeneralizedlinearmodelsandallowsyoutospecifythewithin-groupcorrelationstructureforthepanels.
See[R]logisticand[R]regressforlistsofrelatedestimationcommands.
OptionsModelfamily(family)speciesthedistributionofdepvar;family(gaussian)isthedefault.
link(link)speciesthelinkfunction;thedefaultisthecanonicallinkforthefamily()specied(exceptforfamily(nbinomial)).
Model2exposure(varname)andoffset(varname)aredifferentwaysofspecifyingthesamething.
exposure()speciesavariablethatreectstheamountofexposureoverwhichthedepvareventswereobservedforeachobservation;ln(varname)withcoefcientconstrainedtobe1isenteredintotheregressionequation.
offset()speciesavariablethatistobeentereddirectlyintothelog-linkfunctionwithitscoefcientconstrainedtobe1;thus,exposureisassumedtobeevarname.
IfyouwerettingaPoissonregressionmodel,family(poisson)link(log),forinstance,youwouldaccountforexposuretimebyspecifyingoffset()containingthelogofexposuretime.
noconstantspeciesthatthelinearpredictorhasnointerceptterm,thusforcingitthroughtheoriginonthescaledenedbythelinkfunction.
asisforcesretentionofperfectpredictorvariablesandtheirassociated,perfectlypredictedobservationsandmayproduceinstabilitiesinmaximization;see[R]probit.
Thisoptionisonlyallowedwithoptionfamily(binomial)withadenominatorof1.
forcespeciesthatestimationbeforcedeventhoughthetimevariableisnotequallyspaced.
Thisisrelevantonlyforcorrelationstructuresthatrequireknowledgeofthetimevariable.
Thesecorrelationstructuresrequirethatobservationsbeequallyspacedsothatcalculationsbasedonlagscorrespondtoaconstanttimechange.
Ifyouspecifyatimevariableindicatingthatobservationsarenotequallyspaced,the(timedependent)modelwillnotbet.
Ifyoualsospecifyforce,themodelwillbet,anditwillbeassumedthatthelagsbasedonthedataorderedbythetimevariableareappropriate.
Correlationcorr(correlation)speciesthewithin-groupcorrelationstructure;thedefaultcorrespondstotheequal-correlationmodel,corr(exchangeable).
Whenyouspecifyacorrelationstructurethatrequiresalag,youindicatethelagafterthestructure'snamewithorwithoutablank;forexample,corr(ar1)orcorr(ar1).
Ifyouspecifythexedcorrelationstructure,youspecifythenameofthematrixcontainingtheassumedcorrelationsfollowingthewordfixed,forexample,corr(fixedmyr).
4xtgee—Fitpopulation-averagedpanel-datamodelsbyusingGEESE/Robustvce(vcetype)speciesthetypeofstandarderrorreported,whichincludestypesthatarederivedfromasymptotictheory(conventional),thatarerobusttosomekindsofmisspecication(robust),andthatusebootstraporjackknifemethods(bootstrap,jackknife);see[XT]vceoptions.
vce(conventional),thedefault,usestheconventionallyderivedvarianceestimatorforgeneralizedleast-squaresregression.
vce(robust)speciesthattheHuber/White/sandwichestimatorofvarianceistobeusedinplaceofthedefaultconventionalvarianceestimator(seeMethodsandformulasbelow).
Useofthisoptioncausesxtgeetoproducevalidstandarderrorsevenifthecorrelationswithingrouparenotashypothesizedbythespeciedcorrelationstructure.
Underanoncanonicallink,itdoes,however,requirethatthemodelcorrectlyspeciesthemean.
Theresultingstandarderrorsarethuslabeled"semirobust"insteadof"robust"inthiscase.
Althoughthereisnovce(clusterclustvar)option,resultsareasifthisoptionwereincludedandyouspeciedclusteringonthepanelvariable.
nmp;see[XT]vceoptions.
rgfspeciesthattherobustvarianceestimateismultipliedby(N1)/(NP),whereNisthetotalnumberofobservationsandPisthenumberofcoefcientsestimated.
Thisoptioncanbeusedonlywithfamily(gaussian)whenvce(robust)iseitherspeciedorimpliedbytheuseofpweights.
Usingthisoptionimpliesthattherobustvarianceestimateisnotinvarianttothescaleofanyweightsused.
scale(x2|dev|phi|#);see[XT]vceoptions.
Reportinglevel(#);see[R]estimationoptions.
eformdisplaystheexponentiatedcoefcientsandcorrespondingstandarderrorsandcondenceintervalsasdescribedin[R]maximize.
Forfamily(binomial)link(logit)(thatis,logisticregression),exponentiationresultsinoddsratios;forfamily(poisson)link(log)(thatis,Poissonregression),exponentiatedcoefcientsareincidence-rateratios.
displayoptions:noomitted,vsquish,noemptycells,baselevels,allbaselevels,nofvla-bel,fvwrap(#),fvwrapon(style),cformat(%fmt),pformat(%fmt),sformat(%fmt),andnolstretch;see[R]estimationoptions.
Optimizationoptimizeoptionscontroltheiterativeoptimizationprocess.
Theseoptionsareseldomused.
iterate(#)speciesthemaximumnumberofiterations.
Whenthenumberofiterationsequals#,theoptimizationstopsandpresentsthecurrentresults,evenifconvergencehasnotbeenreached.
Thedefaultisiterate(100).
tolerance(#)speciesthetoleranceforthecoefcientvector.
Whentherelativechangeinthecoefcientvectorfromoneiterationtothenextislessthanorequalto#,theoptimizationprocessisstopped.
tolerance(1e-6)isthedefault.
nologsuppressesdisplayoftheiterationlog.
tracespeciesthatthecurrentestimatesbeprintedateachiteration.
Thefollowingoptionsareavailablewithxtgeebutarenotshowninthedialogbox:nodisplayisforprogrammers.
Itsuppressesdisplayoftheheaderandcoefcients.
coeflegend;see[R]estimationoptions.
xtgee—Fitpopulation-averagedpanel-datamodelsbyusingGEE5Remarksandexamplesstata.
comForathoroughintroductiontoGEEintheestimationofGLM,seeHardinandHilbe(2013).
MoreinformationonlinearmodelsispresentedinNelderandWedderburn(1972).
Finally,therehavebeenseveralilluminatingarticlesonvariousapplicationsofGEEinZeger,Liang,andAlbert(1988);ZegerandLiang(1986),andLiang(1987).
Pendergastetal.
(1996)surveysthecurrentmethodsforanalyzingclustereddatainregardtobinaryresponsedata.
OurimplementationfollowsthatofLiangandZeger(1986).
xtgeetsgeneralizedlinearmodelsofyitwithcovariatesxitgE(yit)=xitβ,yFwithparametersθitfori=1,mandt=1,ni,wherethereareniobservationsforeachgroupidentieri.
g()iscalledthelinkfunction,andFisthedistributionalfamily.
Substitutingvariousdenitionsforg()andFresultsinawidearrayofmodels.
Forinstance,ifyitisdistributedGaussian(normal)andg()istheidentityfunction,wehaveE(yit)=xitβ,yN()yieldinglinearregression,random-effectsregression,orotherregression-relatedmodels,dependingonwhatweassumeforthecorrelationstructure.
Ifg()isthelogitfunctionandyitisdistributedBernoulli(binomial),wehavelogitE(yit)=xitβ,yBernoulliorlogisticregression.
Ifg()isthenaturallogfunctionandyitisdistributedPoisson,wehavelnE(yit)=xitβ,yPoissonorPoissonregression,alsoknownasthelog-linearmodel.
Othercombinationsarepossible.
Youspecifythelinkfunctionwiththelink()option,thedistributionalfamilywithfamily(),andtheassumedwithin-groupcorrelationstructurewithcorr().
Thebinomialdistributioncanbespeciedascase1family(binomial),case2family(binomial#),orcase3family(binomialvarname).
Incase2,#isthevalueofthebinomialdenominatorN,thenumberoftrials.
Specifyingfamily(binomial1)isthesameasspecifyingfamily(binomial);bothmeanthatyhastheBernoullidistributionwithvalues0and1only.
Incase3,varnameisthevariablecontainingthebinomialdenominator,thusallowingthenumberoftrialstovaryacrossobservations.
Thenegativebinomialdistributionmustbespeciedasfamily(nbinomial#),where#denotesthevalueoftheparameterαinthenegativebinomialdistribution.
Theresultswillbeconditionalonthisvalue.
Youdonothavetospecifybothfamily()andlink();thedefaultlink()isthecanonicallinkforthespeciedfamily()(excludingfamily(nbinomial)):FamilyDefaultlinkfamily(binomial)link(logit)family(gamma)link(reciprocal)family(gaussian)link(identity)family(igaussian)link(power-2)family(nbinomial)link(log)family(poisson)link(log)6xtgee—Fitpopulation-averagedpanel-datamodelsbyusingGEEThecanonicallinkforthenegativebinomialfamilyisobtainedbyspecifyinglink(nbinomial).
Ifyouspecifybothfamily()andlink(),notallcombinationsmakesense.
Youmaychooseamongthefollowingcombinations:GaussianInverseBinomialPoissonNegativeGammaGaussianBinomialIdentityxxxxxxLogxxxxxxLogitxProbitxC.
log-logxPowerxxxxxxOddsPowerxNeg.
binom.
xReciprocalxxxxYouspecifytheassumedwithin-groupcorrelationstructurewiththecorr()option.
Forexample,callRtheworkingcorrelationmatrixformodelingthewithin-groupcorrelation,asquaremax{ni}*max{ni}matrix.
corr()speciesthestructureofR.
LetRt,sdenotethet,selement.
TheindependentstructureisdenedasRt,s=1ift=s0otherwiseThecorr(exchangeable)structure(correspondingtoequal-correlationmodels)isdenedasRt,s=1ift=sρotherwiseThecorr(arg)structureisdenedastheusualcorrelationmatrixforanAR(g)model.
Thisissometimescalledmultiplicativecorrelation.
Forexample,anAR(1)modelisgivenbyRt,s=1ift=sρ|ts|otherwiseThecorr(stationaryg)structureisastationary(g)model.
Forexample,astationary(1)modelisgivenbyRt,s=1ift=sρif|ts|=10otherwiseThecorr(nonstationaryg)structureisanonstationary(g)modelthatimposesonlythecon-straintsthattheelementsoftheworkingcorrelationmatrixalongthediagonalbe1andtheelementsoutsidethegthbandbezero,Rt,s=1ift=sρtsif0F=0.
0000Residual2265.
7458416081.
14089583R-squared=0.
2087AdjR-squared=0.
2085Total2863.
2905216084.
178021047RootMSE=.
37536ln_wageCoef.
Std.
Err.
tP>|t|[95%Conf.
Interval]grade.
0724483.
001422950.
910.
000.
0696592.
0752374age.
1064874.
008364412.
730.
000.
0900922.
1228825c.
age#c.
age-.
0016931.
0001655-10.
230.
000-.
0020174-.
0013688_cons-.
8681487.
1024896-8.
470.
000-1.
06904-.
6672577xtgee—Fitpopulation-averagedpanel-datamodelsbyusingGEE9.
xtgeeln_wgradeagec.
age#c.
age,corr(indep)nmpIteration1:tolerance=1.
285e-12GEEpopulation-averagedmodelNumberofobs=16085Groupvariable:idcodeNumberofgroups=3913Link:identityObspergroup:min=1Family:Gaussianavg=4.
1Correlation:independentmax=9Waldchi2(3)=4241.
04Scaleparameter:.
1408958Prob>chi2=0.
0000Pearsonchi2(16081):2265.
75Deviance=2265.
75Dispersion(Pearson):.
1408958Dispersion=.
1408958ln_wageCoef.
Std.
Err.
zP>|z|[95%Conf.
Interval]grade.
0724483.
001422950.
910.
000.
0696594.
0752372age.
1064874.
008364412.
730.
000.
0900935.
1228812c.
age#c.
age-.
0016931.
0001655-10.
230.
000-.
0020174-.
0013688_cons-.
8681487.
1024896-8.
470.
000-1.
069025-.
6672728Whennmpisspecied,thecoefcientsandthestandarderrorsproducedbytheestimatorsarethesame.
Moreover,thescaleparameterestimatefromthextgeecommandequalstheMSEcalculationfromregress;bothareestimatesofthevarianceoftheresiduals.
Example2TheidentitylinkandGaussianfamilyproduceregression-typemodels.
Withtheindependentcorrelationstructure,wereproduceordinaryleastsquares.
Withtheexchangeablecorrelationstructure,weproduceanequal-correlationlinearregressionestimator.
xtgee,fam(gauss)link(ident)corr(exch)isasymptoticallyequivalenttotheweighted-GLSestimatorprovidedbyxtreg,reandtothefullmaximum-likelihoodestimatorprovidedbyxtreg,mle.
Inbalanceddata,xtgee,fam(gauss)link(ident)corr(exch)andxtreg,mleproducethesameresults.
Withunbalanceddata,theresultsareclosebutdifferbecausethetwoestimatorshandleunbalanceddatadifferently.
Forbothbalancedandunbalanceddata,theresultsproducedbyxtgee,fam(gauss)link(ident)corr(exch)andxtreg,mledifferfromthoseproducedbyxtreg,re.
Belowwedemonstratetheuseofthethreeestimatorswithunbalanceddata.
Webeginwithxtgee;showthemaximumlikelihoodestimatorxtreg,mle;showtheGLSestimatorxtreg,re;andnallyshowxtgeewiththevce(robust)option.
10xtgee—Fitpopulation-averagedpanel-datamodelsbyusingGEE.
xtgeeln_wgradeagec.
age#c.
age,nologGEEpopulation-averagedmodelNumberofobs=16085Groupvariable:idcodeNumberofgroups=3913Link:identityObspergroup:min=1Family:Gaussianavg=4.
1Correlation:exchangeablemax=9Waldchi2(3)=2918.
26Scaleparameter:.
1416586Prob>chi2=0.
0000ln_wageCoef.
Std.
Err.
zP>|z|[95%Conf.
Interval]grade.
0717731.
0021134.
020.
000.
0676377.
0759086age.
1077645.
00688515.
650.
000.
0942701.
1212589c.
age#c.
age-.
0016381.
0001362-12.
030.
000-.
001905-.
0013712_cons-.
9480449.
0869277-10.
910.
000-1.
11842-.
7776698.
xtregln_wgradeagec.
age#c.
age,mleFittingconstant-onlymodel:Iteration0:loglikelihood=-6035.
2751Iteration1:loglikelihood=-5870.
6718Iteration2:loglikelihood=-5858.
9478Iteration3:loglikelihood=-5858.
8244Iteration4:loglikelihood=-5858.
8244Fittingfullmodel:Iteration0:loglikelihood=-4591.
9241Iteration1:loglikelihood=-4562.
4406Iteration2:loglikelihood=-4562.
3526Iteration3:loglikelihood=-4562.
3525Random-effectsMLregressionNumberofobs=16085Groupvariable:idcodeNumberofgroups=3913Randomeffectsu_i~GaussianObspergroup:min=1avg=4.
1max=9LRchi2(3)=2592.
94Loglikelihood=-4562.
3525Prob>chi2=0.
0000ln_wageCoef.
Std.
Err.
zP>|z|[95%Conf.
Interval]grade.
0717747.
00214233.
510.
000.
0675765.
075973age.
1077899.
006826615.
790.
000.
0944101.
1211697c.
age#c.
age-.
0016364.
000135-12.
120.
000-.
0019011-.
0013718_cons-.
9500833.
086384-11.
000.
000-1.
119393-.
7807737/sigma_u.
2689639.
0040854.
2610748.
2770915/sigma_e.
2669944.
0017113.
2636613.
2703696rho.
5036748.
0086449.
4867329.
52061Likelihood-ratiotestofsigma_u=0:chibar2(01)=4996.
22Prob>=chibar2=0.
000xtgee—Fitpopulation-averagedpanel-datamodelsbyusingGEE11.
xtregln_wgradeagec.
age#c.
age,reRandom-effectsGLSregressionNumberofobs=16085Groupvariable:idcodeNumberofgroups=3913R-sq:within=0.
0983Obspergroup:min=1between=0.
2946avg=4.
1overall=0.
2076max=9Waldchi2(3)=2875.
02corr(u_i,X)=0(assumed)Prob>chi2=0.
0000ln_wageCoef.
Std.
Err.
zP>|z|[95%Conf.
Interval]grade.
0717757.
002166633.
130.
000.
0675294.
0760221age.
1078042.
006812515.
820.
000.
0944519.
1211566c.
age#c.
age-.
0016355.
0001347-12.
140.
000-.
0018996-.
0013714_cons-.
9512118.
0863139-11.
020.
000-1.
120384-.
7820397sigma_u.
27383747sigma_e.
26624266rho.
51405959(fractionofvarianceduetou_i).
xtgeeln_wgradeagec.
age#c.
age,vce(robust)nologGEEpopulation-averagedmodelNumberofobs=16085Groupvariable:idcodeNumberofgroups=3913Link:identityObspergroup:min=1Family:Gaussianavg=4.
1Correlation:exchangeablemax=9Waldchi2(3)=2031.
28Scaleparameter:.
1416586Prob>chi2=0.
0000(Std.
Err.
adjustedforclusteringonidcode)Robustln_wageCoef.
Std.
Err.
zP>|z|[95%Conf.
Interval]grade.
0717731.
002334130.
750.
000.
0671983.
0763479age.
1077645.
009809710.
990.
000.
0885379.
1269911c.
age#c.
age-.
0016381.
0001964-8.
340.
000-.
002023-.
0012532_cons-.
9480449.
1195009-7.
930.
000-1.
182262-.
7138274In[R]regress,regress,vce(clusterclustvar)mayproduceinefcientcoefcientestimateswithvalidstandarderrorsforrandom-effectsmodels.
Thesestandarderrorsarerobusttomodelmisspecication.
Thevce(robust)optionofxtgee,ontheotherhand,requiresthatthemodelcorrectlyspecifythemeanandthelinkfunctionwhenthenoncanonicallinkisused.
12xtgee—Fitpopulation-averagedpanel-datamodelsbyusingGEEStoredresultsxtgeestoresthefollowingine():Scalarse(N)numberofobservationse(Ng)numberofgroupse(dfm)modeldegreesoffreedome(chi2)χ2e(p)signicancee(dfpear)degreesoffreedomforPearsonχ2e(chi2dev)χ2testofdeviancee(chi2dis)χ2testofdeviancedispersione(deviance)deviancee(dispers)deviancedispersione(phi)scaleparametere(gmin)smallestgroupsizee(gavg)averagegroupsizee(gmax)largestgroupsizee(tol)targettolerancee(dif)achievedtolerancee(rank)rankofe(V)e(rc)returncodeMacrose(cmd)xtgeee(cmdline)commandastypede(depvar)nameofdependentvariablee(ivar)variabledenotinggroupse(tvar)variabledenotingtimewithingroupse(model)pae(family)distributionfamilye(link)linkfunctione(corr)correlationstructuree(scale)x2,dev,phi,or#;scaleparametere(wtype)weighttypee(wexp)weightexpressione(offset)linearoffsetvariablee(chi2type)Wald;typeofmodelχ2teste(vce)vcetypespeciedinvce()e(vcetype)titleusedtolabelStd.
Err.
e(nmp)nmp,ifspeciede(properties)bVe(estatcmd)programusedtoimplementestate(predict)programusedtoimplementpredicte(marginsnotok)predictionsdisallowedbymarginse(asbalanced)factorvariablesfvsetasasbalancede(asobserved)factorvariablesfvsetasasobservedMatricese(b)coefcientvectore(R)estimatedworkingcorrelationmatrixe(V)variance–covariancematrixoftheestimatorse(Vmodelbased)model-basedvarianceFunctionse(sample)marksestimationsamplextgee—Fitpopulation-averagedpanel-datamodelsbyusingGEE13MethodsandformulasMethodsandformulasarepresentedunderthefollowingheadings:IntroductionCalculatingGEEforGLMCorrelationstructuresNonstationaryandunstructuredIntroductionxtgeetsgeneralizedlinearmodelsforpaneldatawiththeGEEapproachdescribedinLiangandZeger(1986).
Arelatedmethod,referredtoasGEE2,isdescribedinZhaoandPrentice(1990)andPrenticeandZhao(1991).
TheGEE2methodattemptstogainefciencyintheestimationofβbyspecifyingaparametricmodelforαandthenassumesthatthemodelsforboththemeananddependencyparametersarecorrect.
Thusthereisatradeoffinrobustnessforefciency.
ThepreliminaryworkofLiang,Zeger,andQaqish(1992),however,indicatesthatthereislittleefciencygainedwiththisalternativeapproach.
IntheGLMapproach(seeMcCullaghandNelder[1989]),weassumethath(i,j)=xTi,jβVar(yi,j)=g(i,j)φi=E(yi)={h1(xTi,1β)h1(xTi,niβ)}TAi=diag{g(i,1)g(i,ni)}Cov(yi)=φAiforindependentobservations.
Intheabsenceofaconvenientlikelihoodfunctionwithwhichtowork,wecanrelyonamultivariateanalogofthequasiscorefunctionintroducedbyWedderburn(1974):Sβ(β,α)=mi=1iβTVar(yi)1(yii)=0WecansolveforcorrelationparametersαbysimultaneouslysolvingSα(β,α)=mi=1ηiαTH1i(Wiηi)=0IntheGEEapproachtoGLM,weletRi(α)bea"working"correlationmatrixdependingontheparametersinα(seetheCorrelationstructuressectionforthenumberofparameters),andweestimateβbysolvingtheGEE,U(β)=mi=1iβTV1i(α)(yii)=0whereVi(α)=A1/2iRi(α)A1/2i14xtgee—Fitpopulation-averagedpanel-datamodelsbyusingGEETosolvethisequation,weneedonlyacrudeapproximationofthevariancematrix,whichwecanobtainfromaTaylorseriesexpansion,whereCov(yi)=LiZiDiZTiLi+φAi=ViLi=diag{h1(u)/u,u=xTi,jβ,j=1,ni}whichallowsthatDi≈(ZTiZi)1ZiL1i(yii)(yii)TφAiL1iZTi(ZiZi)1φ=mi=1nij=1(yi,ji,j)2(Li,j)2ZTi,jDiZi,jg(i,j)CalculatingGEEforGLMUsingthenotationfromLiangandZeger(1986),letyi=(yi,1,yi,ni)Tbetheni*1vectorofoutcomevalues,andletXi=(xi,1,xi,ni)Tbetheni*pmatrixofcovariatevaluesfortheithsubjecti=1,m.
Weassumethatthemarginaldensityforyi,jmaybewritteninexponentialfamilynotationasf(yi,j)=exp[{yi,jθi,ja(θi,j)+b(yi,j)}φ]whereθi,j=h(ηi,j),ηi,j=xi,jβ.
Underthisformulation,thersttwomomentsaregivenbyE(yi,j)=a(θi,j),Var(yi,j)=a(θi,j)/φInwhatfollows,weletni=nwithoutlossofgenerality.
Wedenethequantities,assumingthatwehaveann*nworkingcorrelationmatrixR(α),i=diag(dθi,j/dηi,j)n*nmatrixAi=diag{a(θi,j)}n*nmatrixSi=yia(θi)n*1matrixDi=AiiXin*pmatrixVi=A1/2iR(α)A1/2in*nmatrixsuchthattheGEEbecomesmi=1DTiV1iSi=0Wethenhavethatβj+1=βjmi=1DTi(βj)V1i(βj)Di(βj)1mi=1DTi(βj)V1i(βj)Si(βj)wherethetermmi=1DTi(βj)V1i(βj)Di(βj)1xtgee—Fitpopulation-averagedpanel-datamodelsbyusingGEE15iswhatwecalltheconventionalvarianceestimate.
Itisusedtocalculatethestandarderrorsifthevce(robust)optionisnotspecied.
ThiscommandsupportstheclusteredversionoftheHuber/White/sandwichestimatorofthevariancewithpanelstreatedasclusterswhenvce(robust)isspecied.
See[P]robust,particularlyMaximumlikelihoodestimatorsandMethodsandformulas.
LiangandZeger(1986)alsodiscussthecalculationoftherobustvarianceestimator.
Denethefollowing:D=(DT1DTm)S=(ST1STm)TV=nm*nmblockdiagonalmatrixwithViZ=DβSAtagiveniteration,thecorrelationparametersαandscaleparameterφcanbeestimatedfromthecurrentPearsonresiduals,denedbyri,j={yi,ja(θi,j)}/{a(θi,j)}1/2whereθi,jdependsonthecurrentvalueforβ.
Wecanthenestimateφbyφ1=mi=1nij=1r2i,j/(Np)Asthisgeneralderivationiscomplicated,let'sfollowthederivationoftheGaussianfamilywiththeidentitylink(regression)toillustratethegeneralization.
Aftermakingappropriatesubstitutions,wewillseeafamiliarupdatingequation.
First,werewritetheupdatingequationforβasβj+1=βjZ11Z2andthenderiveZ1andZ2.
Z1=mi=1DTi(βj)V1i(βj)Di(βj)=mi=1XTiTiATi{A1/2iR(α)A1/2i}1AiiXi=mi=1XTidiagθi,j(Xβ)diag{a(θi,j)}diag{a(θi,j)}1/2R(α)diag{a(θi,j)}1/21diag{a(θi,j)}diagθi,j(Xβ)Xi=mi=1XTiII(III)1IIXi=mi=1XTiXi=XTX16xtgee—Fitpopulation-averagedpanel-datamodelsbyusingGEEZ2=mi=1DTi(βj)V1i(βj)Si(βj)=mi=1XTiTiATi{A1/2iR(α)A1/2i}1yiXiβj=mi=1XTidiagθi,j(Xβ)diag{a(θi,j)}diag{a(θi,j)}1/2R(α)diag{a(θi,j)}1/21yiXiβj=mi=1XTiII(III)1(yiXiβj)=mi=1XTi(yiXiβj)=XTsjSo,wemaywritetheupdateformulaasβj+1=βj(XTX)1XTsjwhichisthesameformulaforGLSinregression.
CorrelationstructuresTheworkingcorrelationmatrixRisafunctionofαandismoreaccuratelywrittenasR(α).
Dependingontheassumedcorrelationstructure,αmightbeIndependentnoparameterstoestimateExchangeableαisascalarAutoregressiveαisavectorStationaryαisavectorNonstationaryαisamatrixUnstructuredαisamatrixAlso,throughouttheestimationofageneralunbalancedpanel,itismorepropertodiscussRi,whichistheupperleftni*nisubmatrixoftheultimatelystoredmatrixine(R),max{ni}*max{ni}.
Theonlypanelsthatenterintotheestimationforalag-dependentcorrelationstructurearethosewithni>g(assumingalagofg).
xtgeedropspanelswithtoofewobservations(andmentionswhenitdoesso).
IndependentTheworkingcorrelationmatrixRisanidentitymatrix.
Exchangeableα=mi=1nij=1nik=1ri,jri,knij=1r2i,jmi=1{ni(ni1)}mi=1nij=1r2i,jmi=1niandtheworkingcorrelationmatrixisgivenbyRs,t=1s=tαotherwisextgee—Fitpopulation-averagedpanel-datamodelsbyusingGEE17AutoregressiveandstationaryThesetwostructuresrequiregparameterstobeestimatedsothatαisavectoroflengthg+1(therstelementofαis1).
α=mi=1nij=1r2i,jni,ni1j=1ri,jri,j+1ninigj=1ri,jri,j+gnimi=1nij=1r2i,jniTheworkingcorrelationmatrixfortheARmodeliscalculatedasafunctionofToeplitzmatricesformedfromtheαvector;seeNewton(1988).
TheworkingcorrelationmatrixforthestationarymodelisgivenbyRs,t=α1,|st|if|st|≤g0otherwiseNonstationaryandunstructuredThesetwocorrelationstructuresrequireamatrixofparameters.
αisestimated(wherewereplaceri,j=0wheneveri>niorj>ni)asα=mi=1mN11,1r2i,1N11,2ri,1ri,2···N11,nri,1ri,nN12,1ri,2ri,1N12,2r2i,2···N12,nri,2ri,n.
.
.
.
.
.
.
.
.
.
.
.
N1n,1ri,niri,1N1n,2ri,niri,2···N1n,nr2i,nmi=1nij=1r2i,jniwhereNp,q=mi=1I(i,p,q)andI(i,p,q)=1ifpanelihasvalidobservationsattimespandq0otherwisewhereNi,j=min(Ni,Nj),Ni=numberofpanelsobservedattimei,andn=max(n1,n2,nm).
TheworkingcorrelationmatrixforthenonstationarymodelisgivenbyRs,t=1ifs=tαs,tif0<|st|≤g0otherwiseTheworkingcorrelationmatrixfortheunstructuredmodelisgivenbyRs,t=1ifs=tαs,totherwisesuchthattheunstructuredmodelisequaltothenonstationarymodelatlagg=n1,wherethepanelsarebalancedwithni=nforalli.
18xtgee—Fitpopulation-averagedpanel-datamodelsbyusingGEEReferencesCaria,M.
P.
,M.
R.
Galanti,R.
Bellocco,andN.
J.
Horton.
2011.
Theimpactofdifferentsourcesofbodymassindexassessmentonsmokingonset:Anapplicationofmultiple-sourceinformationmodels.
StataJournal11:386–402.
Cui,J.
2007.
QICprogramandmodelselectioninGEEanalyses.
StataJournal7:209–220.
Hardin,J.
W.
,andJ.
M.
Hilbe.
2013.
GeneralizedEstimatingEquations.
2nded.
BocaRaton,FL:Chapman&Hall/CRC.
Hosmer,D.
W.
,Jr.
,S.
A.
Lemeshow,andR.
X.
Sturdivant.
2013.
AppliedLogisticRegression.
3rded.
Hoboken,NJ:Wiley.
Kleinbaum,D.
G.
,andM.
Klein.
2010.
LogisticRegression:ASelf-LearningText.
3rded.
NewYork:Springer.
Liang,K.
-Y.
1987.
Estimatingfunctionsandapproximateconditionallikelihood.
Biometrika4:695–702.
Liang,K.
-Y.
,andS.
L.
Zeger.
1986.
Longitudinaldataanalysisusinggeneralizedlinearmodels.
Biometrika73:13–22.
Liang,K.
-Y.
,S.
L.
Zeger,andB.
Qaqish.
1992.
Multivariateregressionanalysesforcategoricaldata.
JournaloftheRoyalStatisticalSociety,SeriesB54:3–40.
McCullagh,P.
,andJ.
A.
Nelder.
1989.
GeneralizedLinearModels.
2nded.
London:Chapman&Hall/CRC.
Nelder,J.
A.
,andR.
W.
M.
Wedderburn.
1972.
Generalizedlinearmodels.
JournaloftheRoyalStatisticalSociety,SeriesA135:370–384.
Newton,H.
J.
1988.
TIMESLAB:ATimeSeriesAnalysisLaboratory.
Belmont,CA:Wadsworth.
Pendergast,J.
F.
,S.
J.
Gange,M.
A.
Newton,M.
J.
Lindstrom,M.
Palta,andM.
R.
Fisher.
1996.
Asurveyofmethodsforanalyzingclusteredbinaryresponsedata.
InternationalStatisticalReview64:89–118.
Prentice,R.
L.
,andL.
P.
Zhao.
1991.
Estimatingequationsforparametersinmeansandcovariancesofmultivariatediscreteandcontinuousresponses.
Biometrics47:825–839.
Rabe-Hesketh,S.
,A.
Pickles,andC.
Taylor.
2000.
sg129:Generalizedlinearlatentandmixedmodels.
StataTechnicalBulletin53:47–57.
ReprintedinStataTechnicalBulletinReprints,vol.
9,pp.
293–307.
CollegeStation,TX:StataPress.
Rabe-Hesketh,S.
,A.
Skrondal,andA.
Pickles.
2002.
Reliableestimationofgeneralizedlinearmixedmodelsusingadaptivequadrature.
StataJournal2:1–21.
Shults,J.
,S.
J.
Ratcliffe,andM.
Leonard.
2007.
Improvedgeneralizedestimatingequationanalysisviaxtqlsforquasi-leastsquaresinStata.
StataJournal7:147–166.
Twisk,J.
W.
R.
2013.
AppliedLongitudinalDataAnalysisforEpidemiology:APracticalGuide.
2nded.
Cambridge:CambridgeUniversityPress.
Wedderburn,R.
W.
M.
1974.
Quasi-likelihoodfunctions,generalizedlinearmodels,andtheGauss–Newtonmethod.
Biometrika61:439–447.
Zeger,S.
L.
,andK.
-Y.
Liang.
1986.
Longitudinaldataanalysisfordiscreteandcontinuousoutcomes.
Biometrics42:121–130.
Zeger,S.
L.
,K.
-Y.
Liang,andP.
S.
Albert.
1988.
Modelsforlongitudinaldata:Ageneralizedestimatingequationapproach.
Biometrics44:1049–1060.
Zhao,L.
P.
,andR.
L.
Prentice.
1990.
Correlatedbinaryregressionusingaquadraticexponentialmodel.
Biometrika77:642–648.
xtgee—Fitpopulation-averagedpanel-datamodelsbyusingGEE19Alsosee[XT]xtgeepostestimation—Postestimationtoolsforxtgee[XT]xtcloglog—Random-effectsandpopulation-averagedcloglogmodels[XT]xtlogit—Fixed-effects,random-effects,andpopulation-averagedlogitmodels[XT]xtnbreg—Fixed-effects,random-effects,&population-averagednegativebinomialmodels[XT]xtpoisson—Fixed-effects,random-effects,andpopulation-averagedPoissonmodels[XT]xtprobit—Random-effectsandpopulation-averagedprobitmodels[XT]xtreg—Fixed-,between-,andrandom-effectsandpopulation-averagedlinearmodels[XT]xtregar—Fixed-andrandom-effectslinearmodelswithanAR(1)disturbance[XT]xtset—Declaredatatobepaneldata[MI]estimation—Estimationcommandsforusewithmiestimate[R]glm—Generalizedlinearmodels[R]logistic—Logisticregression,reportingoddsratios[R]regress—Linearregression[U]20Estimationandpostestimationcommands

NameCheap黑色星期五和网络礼拜一

如果我们较早关注NameCheap商家的朋友应该记得前几年商家黑色星期五和网络星期一的时候大促采用的闪购活动,每一个小时轮番变化一次促销活动而且限量的。那时候会导致拥挤官网打不开迟缓的问题。从去年开始,包括今年,NameCheap商家比较直接的告诉你黑色星期五和网络星期一为期6天的活动。没有给你限量的活动,只有限时六天,这个是到11月29日。如果我们有需要新注册、转入域名的可以参加,优惠力度还是比...

A2Hosting三年付$1.99/月,庆祝18周年/WordPress共享主机最高优惠81%/100GB SSD空间/无限流量

A2Hosting主机,A2Hosting怎么样?A2Hosting是UK2集团下属公司,成立于2003年的老牌国外主机商,产品包括虚拟主机、VPS和独立服务器等,数据中心提供包括美国、新加坡softlayer和荷兰三个地区机房。A2Hosting在国外是一家非常大非常有名气的终合型主机商,拥有几百万的客户,非常值得信赖,国外主机论坛对它家的虚拟主机评价非常不错,当前,A2Hosting主机庆祝1...

华纳云不限流量¥324/年,香港双向CN2(GIA)云服务器/1核1G/50G存储/2Mbps

华纳云(HNCloud Limited)是一家专业的全球数据中心基础服务提供商,总部在香港,隶属于香港联合通讯国际有限公司,拥有香港政府颁发的商业登记证明,保证用户的安全性和合规性。 华纳云是APNIC 和 ARIN 会员单位。主要提供香港和美国机房的VPS云服务器和独立服务器。商家支持支付宝、网银、Paypal付款。华纳云主要面向国内用户群,所以线路质量还是不错的,客户使用体验总体反响还是比较好...

22zizi.com为你推荐
云爆发什么是蒸汽云爆炸?要具备那些条件?access数据库ACCESS数据库有什么用杰景新特杰德特这个英雄怎么样同ip域名两个网站同一个IP怎么绑定两个域名www.7788dy.comwww.tom365.com这个免费的电影网站有毒吗?www.se222se.com原来的www站到底222eee怎么了莫非不是不能222eee在收视com了,/?求解斗城网女追男有多易?喜欢你,可我不知道你喜不喜欢我!!平安夜希望有他陪我过javlibrary.comsony home network library官方下载地址ename.com怎么样才能拥有自己的网站啊?就想WWW.XXXX.COM的那种!干支论坛查天干地支
域名买卖 vps论坛 gomezpeer 中国特价网 卡巴斯基永久免费版 150邮箱 坐公交投2700元 linux空间 刀片服务器的优势 699美元 135邮箱 双11秒杀 1g内存 免费全能主机 中国电信宽带测速器 重庆电信服务器托管 金主 测速电信 七十九刀 winds 更多