xtgls.hlp
来自「是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到」· HLP 代码 · 共 208 行
HLP
208 行
{smcl}
{* 07apr2005}{...}
{cmd:help xtgls} {right:dialog: {bf:{dialog xtgls}}{space 15}}
{right:also see: {help xtgls postestimation}}
{hline}
{title:Title}
{p2colset 5 19 21 2}{...}
{p2col :{hi:[XT] xtgls} {hline 2}}Fit panel-data models using GLS{p_end}
{p2colreset}{...}
{title:Syntax}
{p 8 14 2}
{cmd:xtgls} {depvar} [{indepvars}] {ifin} {weight} [{cmd:,} {it:options}]
{synoptset 25 tabbed}{...}
{synopthdr}
{synoptline}
{syntab:Model}
{synopt :{opth "i(varname:varname_i)"}}use {it:varname_i} as the panel ID variable{p_end}
{synopt :{opth "t(varname:varname_t)"}}use {it:varname_t} as the time variable{p_end}
{synopt :{opt nocon:stant}}suppress constant term{p_end}
{synopt :{cmdab:p:anels:(}{cmdab:i:id)}}use i.i.d. error structure{p_end}
{synopt :{cmdab:p:anels:(}{cmdab:h:eteroskedastic)}}use heteroskedastic but uncorrelated error structure{p_end}
{synopt :{cmdab:p:anels:(}{cmdab:c:orrelated)}}use heteroskedastic and correlated error structure{p_end}
{synopt :{cmdab:c:orr:(}{cmdab:i:ndependent)}}use independent autocorrelation structure{p_end}
{synopt :{cmdab:c:orr:(}{cmdab:a:r1}}use AR1 autocorrelation structure{p_end}
{synopt :{cmdab:c:orr:(}{cmdab:p:sar1}}use panel-specific AR1 autocorrelation structure{p_end}
{synopt :{opt rho:type(calc)}}specify method to compute autocorrelation parameter; see {it:Options} for details; seldom used{p_end}
{synopt :{opt igls}}use iterated GLS estimator instead of two-step GLS estimator{p_end}
{synopt :{opt force}}estimate even if observations unequally spaced in time{p_end}
{syntab:SE}
{synopt :{opt nmk}}normalize standard error by N-k instead of N{p_end}
{syntab:Reporting}
{synopt :{opt level(#)}}set confidence level; default is {cmd:level(95)}{p_end}
{syntab:Opt options}
{synopt :{it:{help xtgls##optimize_options:optimize_options}}}control the optimization process; seldom used{p_end}
{synoptline}
{p2colreset}{...}
{phang}
{it:depvar} and {it:indepvars} may contain time-series operators; see {help tsvarlist}.{p_end}
{phang}
{opt bootstrap}, {opt by}, {opt jackknife}, {opt statsby}, and {opt xi} may be used with
{cmd:xtgls}; see {help prefix}.{p_end}
{phang}
{opt aweight}s are allowed; see {help weight}. {p_end}
{phang}
See {help xtgls postestimation} for features available after estimation.{p_end}
{title:Description}
{pstd}
{cmd:xtgls} fits cross-sectional time-series linear models using feasible
generalized least squares. This command allows estimation in the presence of
AR(1) autocorrelation within panels and cross-sectional correlation and
heteroskedasticity across panels.
{title:Options}
{dlgtab:Model}
{phang}
{opth "i(varname:varname_i)"}, {opth "t(varname:varname_t)"}; see
{help estimation options##i():estimation options}.
{pmore}
{cmd:xtgls} does not need to know {opt t()} in all cases, and, in those cases,
specifying {opt t()} makes no difference. We not in the descriptions of the
{opt panels()} and {opt corr()} options when {opt t()} is required. When
{opt t()} is required, the observations must be spaced equally over time;
however, see option {opt force} below.
{phang}
{opt noconstant}; see {help estimation options##noconstant:estimation options}.
{phang}
{opt panels(pdist)} specifies the error structure across panels.
{pmore}
{cmd:panels(iid)} specifies a homoskedastic error structure with no
cross-sectional correlation. This is the default.
{pmore}
{cmd:panels(heteroskedastic)} specifies heteroskedastic error structure with
no cross-sectional correlation.
{pmore}
{cmd:panels(correlated)} specifies
heteroskedastic error structure with cross-sectional correlation. If
{cmd:p(c)} is specified, you must also specify {opt t()}. Note that the
results will be based on a generalized inverse of a singular matrix unless
T>=m (the number of time periods is greater than or equal to the number of
panels).
{phang}
{opt corr(corr)} specifies the assumed autocorrelation within panels.
{pmore}
{cmd:corr(independent)} specifies that there is no
autocorrelation. This is the default.
{pmore}
{cmd:corr(ar1)} specifies that, within panels, there is AR(1) autocorrelation
and that the coefficient of the AR(1) process is common to all the panels. If
{cmd:c(ar1)} is specified, you must also specify {opt t()}.
{pmore}
{cmd:corr(psar1)} specifies that, within
panels, there is AR(1) autocorrelation and that the coefficient of the AR(1)
process is specific to each panel. {opt psar1} stands for panel-specific
AR(1). If {cmd:c(psar1)} is specified, {opt t()} must also be specified.
{phang}
{opt rhotype(calc)} specifies the method to be used to calculate the
autocorrelation parameter:
{p 12 24 2}{opt regress} {space 1} regression using lags; the default{p_end}
{p 12 24 2}{opt dw} {space 6} Durbin-Watson calculation{p_end}
{p 12 24 2}{opt freg} {space 4} regression using leads{p_end}
{p 12 24 2}{opt nagar} {space 3} Nagar calculation{p_end}
{p 12 24 2}{opt theil} {space 3} Theil calculation{p_end}
{p 12 24 2}{opt tscorr} {space 2} time series autocorrelation calculation
{pmore}
All of the calculations are asymptotically equivalent and consistent;
this is a rarely used option.
{phang}
{opt igls} requests an iterated GLS estimator instead of the two-step
GLS estimator in the case of a nonautocorrelated model, or instead of the
three-step GLS estimator in the case of an autocorrelated model. The iterated
GLS estimator converges to the MLE for the {cmd:corr(independent)}
models, but does not for the other {opt corr()} models.
{phang}
{opt force} specifies that estimation is to be forced even though {opt t()} is
not equally spaced. This is relevant only for correlation structures that
require knowledge of {opt t()} and that require observations be equally
spaced.
{dlgtab:SE}
{phang}
{opt nmk} specifies standard errors are to be normalized by N-k, where k is
the number of parameters estimated, rather than N, the number of observations.
Different authors have used one or the other normalization. Greene
recommends N and remarks that whether you use N or N-k does not make the
variance calculation unbiased in these models.
{dlgtab:Reporting}
{phang}
{opt level(#)}; see {help estimation options##level():estimation options}.
{dlgtab:Opt options}
{phang}
{marker optimize_options}
{it:optimize_options} control the iterative optimization process. These options
are seldom used.
{pmore}
{opt iter:ate(#)} specifies the maximum number of iterations. When the number
of iterations equals #, the optimization stops and presents the current results,
even if the convergence tolerance has not been reached. The default value of
{opt iterate()} is 100.
{pmore}
{opt tol:erance(#)} specifies the tolerance for the coefficient vector. When
the relative change in the coefficient vector from one iteration to the next is
less than or equal to #, the optimization process is stopped.
{cmd:tolerance(1e-6)} is the default.
{pmore}
{opt nolog} suppress the display of the iteration log.
{title:Examples}
{phang}{cmd:. iis company}{p_end}
{phang}{cmd:. xtgls invest market stock, panels(hetero)}
{phang}{cmd:. iis company}{p_end}
{phang}{cmd:. tis time}{p_end}
{phang}{cmd:. xtgls invest market stock, panels(correlated)}{p_end}
{phang}{cmd:. xtgls invest market stock, panels(correlated) corr(ar1)}
{title:Also see}
{psee}
Manual: {bf:[XT] xtgls}
{psee}
Online: {help xtgls postestimation};{break}
{help xt}; {helpb newey}, {helpb prais},
{helpb regress}, {helpb "svy:regress"}, {helpb xtdata}, {helpb xtdes},
{helpb xtpcse}, {helpb xtreg}, {helpb xtregar}, {helpb xtsum}, {helpb xttab}
{p_end}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?