⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hausman.hlp

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 HLP
字号:
{smcl}
{* 06apr2005}{...}
{cmd:help hausman}{right:dialog:  {bf:{dialog hausman}}}
{hline}

{title:Title}

{p2colset 5 20 22 2}{...}
{p2col :{hi:[R] hausman} {hline 2}}Hausman specification test{p_end}
{p2colreset}{...}


{title:Syntax}

{p 8 16 2}
{cmd:hausman} {it:name-consistent} [{it:name-efficient}]
[{cmd:,} {it:options}]

{synoptset 24 tabbed}{...}
{synopthdr}
{synoptline}
{syntab :Main}
{synopt :{opt c:onstant}}include estimated intercepts in comparison; default is to exclude{p_end}
{synopt :{opt a:lleqs}}use all equations to peform test; default is first equation only{p_end}
{synopt :{opt sk:ipeqs(eqlist)}}skip specified equations when performing test{p_end}
{synopt :{opt eq:uations(matchlist)}}associate/compare the specified (by number) pairs of equations{p_end}
{synopt :{opt sig:mamore}}base (co)variance matrices on common estimate of disturbance variance (sigma2){p_end}
{synopt :{opt force}}force performance of test, even though assumptions are not met{p_end}
{synopt :{opt df(#)}}use {it:#} degrees of freedom{p_end}

{syntab :Advanced}
{synopt :{opt tcon:sistent(string)}}consistent estimator column header{p_end}
{synopt :{opt teff:icient(string)}}efficient estimator column header{p_end}
{synoptline}
{p2colreset}{...}

{phang} where {it:name-consistent} and {it:name-efficient} are names under
which estimation results were saved via {helpb estimates store}.{p_end}
{phang}A period ({cmd:.}) may be used to refer to the last estimation results,
even if these were not already stored.{p_end}
{phang}Not specifying {it:name-efficient} is equivalent to specifying the last
estimation results as "{cmd:.}".


{title:Description}

{pstd}
{cmd:hausman} performs Hausman's specification test.  To use {cmd:hausman},
one has to perform the following steps.

{p 6 10 2}(1) obtain an estimator that is consistent whether or not the
              hypothesis is true;
{p_end}
{p 6 10 2}(2) store the estimation results under a {it:name-consistent} using
              {helpb estimates store};
{p_end}
{p 6 10 2}(3) obtain an estimator that is {hi:efficient} (and {hi:consistent})
              under the hypothesis that you are testing, but {hi:inconsistent}
              otherwise;
{p_end}
{p 6 10 2}(4) store the estimation results under a {it:name-efficient} using
              {helpb estimates store};
{p_end}
{p 6 10 2}(5) use {cmd:hausman} to perform the test

{p 14 14 2}{cmd:hausman} {it:name-consistent} {it:name-efficient} [{cmd:,} {it:options}]

{pstd}
The order of computing the two estimators may be reversed. You have to be
careful though to specify to {cmd:hausman} the models in the order
"always consistent" first and "efficient under H0" second. It is possible
to skip storing the second model and refer to the last estimation results
by a period ({cmd:.}).

{pstd}
{cmd:hausman} may be used in any context.  The order in which you specify
the regressors in each model does not matter, but it is your responsibility
to assure that the estimators and models are comparable, and satisfy the
theoretical conditions (see (1) and (3) above).


{title:Options}

{dlgtab:Main}

{phang}
{opt constant} specifies that the estimated intercept(s) be included in
the model comparison; by default, they are excluded.  The default behavior is
appropriate for models in which the constant does not have a common
interpretation across the two models.

{phang}
{opt alleqs} specifies that all the equations in the models be used to
perform the Hausman test; by default, only the first equation is used.

{phang}
{opt skipeqs(eqlist)} specifies in {it:eqlist} the names of equations to be
excluded from the test.  Equation numbers are not allowed in this context, as
the equation names, along with the variable names, are used to identify common
coefficients.

{phang}
{opt equations(matchlist)} specifies, by number, the pairs of equations that
are to be compared.

{pmore}
The {it:matchlist} in {opt equations()} should follow the syntax

{pmore2}
{it:#c}{cmd::}{it:#e} [{cmd:,}{it:#c}{cmd::}{it:#e}[{cmd:,} {it:...}]]

{pmore}
where {it:#c}({it:#e}) is an equation number of the always-consistent
(efficient under H0) estimator.  For instance {cmd:equations(1:1)},
{cmd:equations(1:1, 2:2)}, or {cmd:equations(1:2)}.

{pmore}
If {opt equations()} is not specified, then equations are matched on equation
names.

{pmore}
{opt equations()} handles the situation in which one estimator uses equation
names and the other does not.  For instance, {cmd:equations(1:2)} means that
equation 1 of the always-consistent estimator is to be tested against equation
2 of the efficient estimator.  {cmd:equations(1:1, 2:2)} means that equation 1
is to be tested against equation 1 and that equation 2 is to be tested against
equation 2.  If {opt equations()} is specified, options {opt alleqs} and 
{opt skipeqs} are ignored.

{phang}
{opt sigmamore} allows you to specify that the two covariance matrices used in
the test be based on a common estimate of disturbance variance 
(sigma2){hline 2}the variance from the efficient estimator.  This option
provides a proper estimate of the contrast variance for so-called tests of
exogeneity and overidentification in instrumental variables regression.  This
option can only be specified when both estimators save {cmd:e(sigma)} or
{cmd:e(rmse)}.

{phang}
{opt force} specifies that the Hausman test be performed, even though the
assumptions of the Hausman test seem not to be met, for example, because the
estimators were p-weighted.

{phang}
{opt df(#)} specifies the degrees of freedom for the Hausman test.  The
default is the matrix rank of the variance of the difference between the
coefficients of the two estimators.

{dlgtab:Advanced}

{phang}
{opt tconsistent(string)} and {opt tefficient(string)} are formatting options.
They allow you to specify the headers of the columns of coefficients that
default to the names of the models.  These options will be primarily of
interest to programmers.


{title:Remark:  An alternative to hausman}

{pstd}
The assumption that one of the estimators is efficient (i.e., has minimal
asymptotic variance) is a demanding one.  It is violated, for instance, if
your observations are clustered or pweighted, or if your model is somehow
misspecified.  Moreover, even if the assumption is satisfied, there may be a
"small sample" problem with the Hausman test.  Hausman's test is based on
estimating the variance var(b-B) of the difference of the estimators by the
difference var(b)-var(B) of the variances.  Under the assumptions (1) and (3),
var(b)-var(B) is a consistent estimator of var(b-B), but it is not necessarily
positive definite "in finite samples", i.e., in your application.  If this is
the case, the Hausman test is undefined.  Unfortunately, this is not a rare
event.  Stata supports a generalized Hausman test that overcomes both of these
problems.  See {helpb suest} for details.


{title:Examples}

    Typing

{phang2}{cmd:. xtreg lny educ age, fe}{p_end}
{phang2}{cmd:. est store fixed}{p_end}
{phang2}{cmd:. xtreg lny educ age sex, re}{p_end}
{phang2}{cmd:. hausman fixed .}

{pstd} presents Hausman's specification test, which tests the
appropriateness of the random-effects estimator ({cmd:xtreg, re}).

    Typing

{phang2}{cmd:. mlogit travmode age gender income}{p_end}
{phang2}{cmd:. est store all}{p_end}
{phang2}{cmd:. mlogit travmode age gender income if travmode != 2}{p_end}
{phang2}{cmd:. est store partial}{p_end}
{phang2}{cmd:. hausman partial all, alleqs constant}

{pstd}will perform a Hausman test for independence of irrelevant
alternatives (IIA).

{pstd}When one estimator uses equation names and the other does not,
specify the {cmd:equations()} option to force the
comparison.  This is illustrated in the comparison of the OLS estimator
and the estimator of the {cmd:regress} part of the {cmd:heckman} model

{phang2}{cmd:. regress mpg price}{p_end}
{phang2}{cmd:. est store reg}{p_end}
{phang2}{cmd:. heckman mpg price, sel(foreign=weight)}{p_end}
{phang2}{cmd:. hausman reg ., eq(1:1)}

{pstd}Comparison of the {cmd:probit} and selection model of the
{cmd:heckman}

{phang2}{cmd:. probit foreign weight}{p_end}
{phang2}{cmd:. est store probit_for}{p_end}
{phang2}{cmd:. heckman mpg price, sel(foreign=weight)}{p_end}
{phang2}{cmd:. hausman probit_for ., eq(1:2)}

{pstd}Multiple comparison with the {cmd:equations()} option

{phang2}{cmd:. reg3 (weight mpg price = foreign rep)}{p_end}
{phang2}{cmd:. est store full}{p_end}
{phang2}{cmd:. reg3 (mpg price = foreign rep)}{p_end}
{phang2}{cmd:. hausman . full, eq(1:2, 2:3)}


{title:Also see}

{psee}
Manual:  {bf:[R] hausman}

{psee}
Online:  {helpb lrtest}, {helpb suest},
{helpb test}, {helpb xtreg}, {helpb xtregar}
{p_end}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -