Example: air traffic controller

Title stata.com xtreg — Fixed-, between-, and random ...

Fixed-, between-, and random -effects and population-averaged linear modelsDescriptionQuick startMenuSyntaxOptions for RE modelOptions for BE modelOptions for FE modelOptions for MLE modelOptions for PA modelRemarks and examplesStored resultsMethods and formulasAcknowledgmentsReferencesAlso seeDescriptionxtregfits regression models to panel data. In particular,xtregwith thebeoption fits random -effects models by using the between regression estimator; with thefeoption, it fits fixed-effectsmodels (by using the within regression estimator); and with thereoption, it fits random -effectsmodels by using theGLSestimator (producing a matrix-weighted average of the between and withinresults). See [XT]xtdatafor a faster way to fit fixed- and random -effects startRandom-effects linear regression byGLSofyonx1andxt2usingxtsetdataxtreg y x1 x2As above, but estimate by maximum likelihoodxtreg y x1 x2, mleFixed-effects model with cluster robust standard errors for panels nested withincvarxtreg y x1 x2, fe vce(cluster cvar)Population-averaged model with an exchangeable within-panel correlation structurextreg y x1 x2, paAs abo

vce(vcetype) vcetype may be conventional, robust, bootstrap, or jackknife nmp use divisor N P instead of the default N rgf multiply the robust variance estimate by (N 1)=(N P)

Tags:

  Bootstrap

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Title stata.com xtreg — Fixed-, between-, and random ...

1 Fixed-, between-, and random -effects and population-averaged linear modelsDescriptionQuick startMenuSyntaxOptions for RE modelOptions for BE modelOptions for FE modelOptions for MLE modelOptions for PA modelRemarks and examplesStored resultsMethods and formulasAcknowledgmentsReferencesAlso seeDescriptionxtregfits regression models to panel data. In particular,xtregwith thebeoption fits random -effects models by using the between regression estimator; with thefeoption, it fits fixed-effectsmodels (by using the within regression estimator); and with thereoption, it fits random -effectsmodels by using theGLSestimator (producing a matrix-weighted average of the between and withinresults). See [XT]xtdatafor a faster way to fit fixed- and random -effects startRandom-effects linear regression byGLSofyonx1andxt2usingxtsetdataxtreg y x1 x2As above, but estimate by maximum likelihoodxtreg y x1 x2, mleFixed-effects model with cluster robust standard errors for panels nested withincvarxtreg y x1 x2, fe vce(cluster cvar)Population-averaged model with an exchangeable within-panel correlation structurextreg y x1 x2, paAs above, but specify an autoregressive correlation structure of order 1xtreg y x1 x2, pa corr(ar 1)Between-effects modelxtreg y x1 x2, beMenuStatistics>Longitudinal/panel data>Linear models>Linear regression (FE, RE, PA, BE)

2 12 xtreg Fixed-, between-, and random -effects and population-averaged linear modelsSyntaxGLS random -effects (RE) modelxtregdepvar[indepvars] [if] [in] [, reREoptions]Between-effects (BE) modelxtregdepvar[indepvars] [if] [in], be[BEoptions]Fixed-effects (FE) modelxtregdepvar[indepvars] [if] [in] [weight], fe[FEoptions]ML random -effects (MLE) modelxtregdepvar[indepvars] [if] [in] [weight], mle[MLEoptions]Population-averaged (PA) modelxtregdepvar[indepvars] [if] [in] [weight], pa[PAoptions]REoptionsDescriptionModelre use random -effects estimator; the defaultsause Swamy Arora estimator of the variance componentsSE/Robustvce(vcetype)vcetypema y beconventional,robust,clusterclustvar,bo otstrap, orjackknifeReportinglevel(#)set confidence level; default islevel(95)thetareport displayoptionscontrol columns and column formats, row spacing, line width,display of omitted variables and base and empty cells, andfactor-variable labelingcoeflegenddisplay legend instead of statisticsxtreg Fixed-, between-, and random -effects and population-averaged linear models 3 BEoptionsDescriptionModelbeuse between-effects estimatorwlsuse weighted least squaresSEvce(vcetype)vcetypemay beconventional, bootstrap , orjackknifeReportinglevel(#)set confidence level.

3 Default islevel(95)displayoptionscontrol columns and column formats, row spacing, line width,display of omitted variables and base and empty cells, andfactor-variable labelingcoeflegenddisplay legend instead of statisticsFEoptionsDescriptionModelfeuse fixed-effects estimatorSE/Robustvce(vcetype)vcetypemay beconventional,robust,clusterclustvar,bo otstrap,orjackknifeReportinglevel(#)set confidence level; default islevel(95)displayoptionscontrol columns and column formats, row spacing, line width,display of omitted variables and base and empty cells, andfactor-variable labelingcoeflegenddisplay legend instead of statisticsMLEoptionsDescriptionModelnoco nstantsuppress constant termmleuseMLrandom-effects estimatorSE/Robustvce(vcetype)vcetypemay beoim,robust,clusterclustvar, bootstrap ,o rjackknifeReportinglevel(#)set confidence level; default islevel(95)displayoptionscontrol columns and column formats, row spacing, line width,display of omitted variables and base and empty cells, andfactor-variable labelingMaximizationmaximizeoptionscontr ol the maximization process.

4 Seldom usedcoeflegenddisplay legend instead of statistics4 xtreg Fixed-, between-, and random -effects and population-averaged linear modelsPAoptionsDescriptionModelnoconstan tsuppress constant termpause population-averaged estimatoroffset(varname)includevarnamein model with coefficient constrained to 1 Correlationcorr(correlation)within-panel correlation structureforceestimate even if observations unequally spaced in timeSE/Robustvce(vcetype)vcetypemay beconventional,robust, bootstrap , orjackknifenmpuse divisorN Pinstead of the defaultNrgfmultiply the robust variance estimate by(N 1)/(N P)scale(parm)overrides the default scale parameter;parmmay bex2,dev,phi, or#Reportinglevel(#)set confidence level; default islevel(95)displayoptionscontrol columns and column formats, row spacing, line width,display of omitted variables and base and empty cells, andfactor-variable labelingOptimizationoptimizeoptionscontr ol the optimization process; seldom usedcoeflegenddisplay legend instead of statisticscorrelationDescriptionexchange ableexchangeableindependentindependentun structuredunstructuredfixedmatnameuser-s pecifiedar#autoregressive of order#stationary#stationary of order#nonstationary#nonstationary of order#A panel variable must be specified.

5 Forxtreg, pa, correlation structures other thanexchangeableandindependentrequire that a time variable also be specified. Usextset; see [XT] contain factor variables; see[U] Factor contain time-series operators; see[U] Time-series ,by,collect,mi estimate, andstatsbyare allowed; see[U] Prefix commands. For more details, see[BAYES]bayes: allowed for the between-effects, fixed-effects, and maximum-likelihood ( bootstrap )andvce(jackknife)are not allowed with themi estimateprefix; see [MI]mi ,fweights, andpweights are allowed for the fixed-effects ,fweights, andpweightsare allowed for the population-averaged are allowed for the maximum-likelihood random -effects(MLE) model. See[U] weight. Weights must be constant within not appear in the dialog [U] 20 Estimation and postestimation commandsfor more capabilities of estimation Fixed-, between-, and random -effects and population-averaged linear models 5 Options for RE model Model re, the default, requests theGLSrandom-effects that the small-sample Swamy Arora estimator individual-level variance component beused instead of the default consistent estimator.

6 Seextreg, reinMethods and formulasfor details. SE/Robust vce(vcetype)specifies the type of standard error reported, which includes types that are derived fromasymptotic theory (conventional), that are robust to some kinds of misspecification (robust),that allow for intragroup correlation (clusterclustvar), and that use bootstrap or jackknife methods( bootstrap ,jackknife); see [XT] (conventional), the default, uses the conventionally derived variance estimator for generalizedleast-squares (robust)is equivalent to specifyingvce(clusterpanelvar); seextreg, reinMethods and formulas. Reporting level(#); see [R]Estimation that the output include the estimated value of used in combining the between andfixed estimators. For balanced data, this is a constant, and for unbalanced data, a summary of thevalues is presented in the header of the :noci,nopvalues,noomitted,vsquish,noempt ycells,baselevels,allbaselevels,nofvlabe l,fvwrap(#),fvwrapon(style),cformat(%fmt ),pformat(%fmt),sformat(%fmt), andnolstretch; see [R]Estimation following option is available withxtregbut is not shown in the dialog box:coeflegend; see [R]Estimation for BE model Model berequests the between regression that, for unbalanced data, weighted least squares be used rather than the methods produce consistent estimates.

7 The true variance of the between-effects residual is 2 +Ti 2 (seextreg, beinMethods and formulasbelow).WLSproduces a stabilized varianceof 2 /Ti+ 2 , which is also not constant. Thus the choice betweenOLSandWLSamounts towhich is more : xtreg , beis rarely used anyway, but between estimates are an ingredient in the random -effects estimate. Our implementation ofxtreg, reuses theOLSestimates for this ingredient,based on our judgment that 2 is large relative to 2 in most models. Formally, only a consistentestimate of the between estimates is xtreg Fixed-, between-, and random -effects and population-averaged linear models SE vce(vcetype)specifies the type of standard error reported, which includes types that are derived fromasymptotic theory (conventional) and that use bootstrap or jackknife methods ( bootstrap ,jackknife); see [XT] (conventional), the default, uses the conventionally derived variance estimator for generalizedleast-squares regression.

8 Reporting level(#); see [R]Estimation :noci,nopvalues,noomitted,vsquish,noempt ycells,baselevels,allbaselevels,nofvlabe l,fvwrap(#),fvwrapon(style),cformat(%fmt ),pformat(%fmt),sformat(%fmt), andnolstretch; see [R]Estimation following option is available withxtregbut is not shown in the dialog box:coeflegend; see [R]Estimation for FE model Model ferequests the fixed-effects (within) regression estimator. SE/Robust vce(vcetype)specifies the type of standard error reported, which includes types that are derived fromasymptotic theory (conventional), that are robust to some kinds of misspecification (robust),that allow for intragroup correlation (clusterclustvar), and that use bootstrap or jackknife methods( bootstrap ,jackknife); see [XT] (conventional), the default, uses the conventionally derived variance estimator for generalizedleast-squares (robust)is equivalent to specifyingvce(clusterpanelvar); seextreg, feinMethods and formulas.

9 Reporting level(#); see [R]Estimation :noci,nopvalues,noomitted,vsquish,noempt ycells,baselevels,allbaselevels,nofvlabe l,fvwrap(#),fvwrapon(style),cformat(%fmt ),pformat(%fmt),sformat(%fmt), andnolstretch; see [R]Estimation following option is available withxtregbut is not shown in the dialog box:coeflegend; see [R]Estimation Fixed-, between-, and random -effects and population-averaged linear models 7 Options for MLE model Model noconstant; see [R]Estimation the maximum-likelihood random -effects estimator. SE/Robust vce(vcetype)specifies the type of standard error reported, which includes types that are derivedfrom asymptotic theory (oim), that are robust to some kinds of misspecification (robust), thatallow for intragroup correlation (clusterclustvar), and that use bootstrap or jackknife methods( bootstrap ,jackknife); see [XT]vceoptions.

10 Reporting level(#); see [R]Estimation :noci,nopvalues,noomitted,vsquish,noempt ycells,baselevels,allbaselevels,nofvlabe l,fvwrap(#),fvwrapon(style),cformat(%fmt ),pformat(%fmt),sformat(%fmt), andnolstretch; see [R]Estimation options. Maximization maximizeoptions:iterate(#),[no]log,trace ,tolerance(#),ltolerance(#), andfrom(initspecs); see [R]Maximize. These options are seldom following option is available withxtregbut is not shown in the dialog box:coeflegend; see [R]Estimation for PA model Model noconstant; see [R]Estimation the population-averaged estimator. For linear regression, this is the same as a random -effectsestimator (both interpretations hold). xtreg , pais equivalent toxtgee, family(gaussian) link(id) corr(exchangeable), whichare the defaults for , paallows all the relevantxtgeeoptions suchasvce(robust).


Related search queries