Stata 15 help for newey

[TS] newey -- Regression with Newey-West standard errors

Syntax

newey depvar [indepvars] [if] [in] [weight] , lag(#) [options]

options Description ------------------------------------------------------------------------- Model * lag(#) set maximum lag order of autocorrelation noconstant suppress constant term

Reporting level(#) set confidence level; default is level(95) display_options control columns and column formats, row spacing, line width, display of omitted variables and base and empty cells, and factor-variable labeling

coeflegend display legend instead of statistics ------------------------------------------------------------------------- * lag(#) is required. You must tsset your data before using newey; see [TS] tsset. indepvars may contain factor variables; see fvvarlist. depvar and indepvars may contain time-series operators; see tsvarlist. by, rolling, and statsby are allowed; see prefix. aweights are allowed; see weight. coeflegend does not appear in the dialog box. See [TS] newey postestimation for features available after estimation.

Menu

Statistics > Time series > Regression with Newey-West std. errors

Description

newey produces Newey-West standard errors for coefficients estimated by OLS regression. The error structure is assumed to be heteroskedastic and possibly autocorrelated up to some lag.

Options

+-------+ ----+ Model +------------------------------------------------------------

lag(#) specifies the maximum lag to be considered in the autocorrelation structure. If you specify lag(0), the output is the same as regress, vce(robust). lag() is required.

noconstant; see [R] estimation options.

+-----------+ ----+ Reporting +--------------------------------------------------------

level(#); see [R] estimation options.

display_options: noci, nopvalues, noomitted, vsquish, noemptycells, baselevels, allbaselevels, nofvlabel, fvwrap(#), fvwrapon(style), cformat(%fmt), pformat(%fmt), sformat(%fmt), and nolstretch; see [R] estimation options.

The following option is available with newey but is not shown in the dialog box:

coeflegend; see [R] estimation options.

Examples

Setup . webuse idle2 . tsset time

Regression with Newey-West standard errors with 3 as maximum lag order of autocorrelation . newey usr idle, lag(3)

Replay results with 99% confidence interval . newey, level(99)

Stored results

newey stores the following in e():

Scalars e(N) number of observations e(df_m) model degrees of freedom e(df_r) residual degrees of freedom e(F) F statistic e(lag) maximum lag e(rank) rank of e(V)

Macros e(cmd) newey e(cmdline) command as typed e(depvar) name of dependent variable e(wtype) weight type e(wexp) weight expression e(title) title in estimation output e(vcetype) title used to label Std. Err. e(properties) b V e(estat_cmd) program used to implement estat e(predict) program used to implement predict e(asbalanced) factor variables fvset as asbalanced e(asobserved) factor variables fvset as asobserved

Matrices e(b) coefficient vector e(V) variance-covariance matrix of the estimators

Functions e(sample) marks estimation sample


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index