📄 suest.hlp
字号:
{smcl}
{* 03apr2005}{...}
{cmd: help suest}{right:dialog: {bf:{dialog suest}}}
{hline}
{title:Title}
{p2colset 5 18 20 2}{...}
{p2col:{hi:[R] suest} {hline 2}}Seemingly unrelated estimation{p_end}
{p2colreset}{...}
{title:Syntax}
{p 8 14 2}
{cmd:suest}
{it:namelist}
[{cmd:,}
{it:options}]
{synoptset 20 tabbed}{...}
{synopthdr}
{synoptline}
{syntab:Model}
{synopt:{opth cl:uster(varname)}}cluster variable{p_end}
{syntab:Reporting}
{synopt:{opt l:evel(#)}}set confidence level; default is {cmd:level(95)}
{p_end}
{synopt:{opt d:ir}}display a table describing the models
{p_end}
{synopt:{opth ef:orm(data_types:string)}}report exponentiated coefficients and label as {it:string}
{p_end}
{synoptline}
{p2colreset}{...}
{p 4 6 2}
where {it:namelist} is a list of one or more names under which
estimation results were saved via {helpb estimates:estimates store}.
Wildcards may be used. {opt *} and {opt _all} refer to all stored
results. A single period ({cmd:.}) may be used to refer to the last
estimation results, even if they have not (yet) been stored.
{p_end}
{title:Description}
{pstd}
{opt suest} is a postestimation command; see {help estcom} and {help postest}.
{pstd}
{opt suest} combines the estimation results{hline 2}parameter estimates
and associated (co)variance matrices{hline 2}stored under {it:namelist} into a
single parameter vector and simultaneous (co)variance matrix of the
sandwich/robust type. This (co)variance matrix is appropriate even if
the estimates were obtained on the same or overlapping data.
{pstd}
Typical applications of {opt suest} are tests for intramodel and cross-model
hypotheses using {helpb test} or {helpb testnl}, for example, a generalized
Hausman specification test. {helpb lincom} and {helpb nlcom} may be used
after {opt suest} to estimate linear combinations and nonlinear functions of
coefficients. {opt suest} may also be used to adjust a standard VCE for
clustering or survey design effects.
{pstd}
Different estimators are allowed, for example, a {helpb regress} model
and a {helpb probit} model; the only requirement is that {helpb predict}
produce equation-level scores with the {opt score} option after an estimation
command. The models may be estimated
on different samples, either due to explicit {opt if} or {opt in} selection or
to missing values. If weights are applied, the same weights (type and
values) should be applied to all models in {it:namelist}. The estimators
should be estimated without {opt robust} or {opt cluster()} options.
{opt suest} returns the robust VCE, has a {opt cluster()} option, and
automatically works with results from the {helpb svy} prefix command (only for
{cmd:vce(linearized)}).
{pstd}
Since {opt suest} posts its results like a proper estimation command, its
results can be stored via {cmd:estimates store}. Moreover, like other
estimation commands, {cmd:suest} typed without arguments replays the results.
{title:Options}
{dlgtab:Model}
{phang}
{opth cluster(varname)}
specifies that the observations are independent across groups (clusters), but
not necessarily independent within groups. {it:varname} specifies to which
group each observation belongs, for example, {cmd:cluster(personid)} in data
with repeated observations on individuals.
{pmore}
{opt cluster()} may not be combined with estimation results from the
{helpb svy} prefix command.
{dlgtab:Reporting}
{phang}
{opt level(#)} specifies the confidence level, as a percentage, for
confidence intervals of the coefficients; see {help level}.
{phang}
{opt dir} displays a table describing the models in {it:namelist}
just like {cmd:estimates dir} {it:namelist}.
{phang}
{opt eform(str)}
displays the coefficient table in
exponentiated form: for each coefficient, exp(b) rather than b is displayed,
and standard errors and confidence intervals are transformed. Display of the
intercept, if any, is suppressed. {it:str} is the table header that will be
displayed above the transformed coefficients and must be 11 characters or
fewer, for example, {cmd:eform("Odds ratio")}.
{title:Using suest}
{pstd}
If you plan to use {opt suest}, you must take precautions
when fitting the original models. These restrictions are relaxed when using
survey data; see {help suest##survey_data:Using suest with survey data}
below.
{phang2}1.
{opt suest} works with estimation commands that allow {helpb predict}
to generate equation-level score variables when supplied
with the {opt score} (or {opt scores}) option. For example,
equation-level score variables are generated after running
{helpb mlogit} by typing
{pin3} {cmd:. predict sc*, scores}
{phang2}2.
Estimation should take place without the options {opt robust} or
{opt cluster()}. {opt suest} always computes the robust estimator of
the (co)variance, and {opt suest} has a {opt cluster()} option.
{pmore2}The within-model covariance matrices computed by {opt suest} are
identical to those obtained by specifying a {opt robust} or
{opt cluster()} option during estimation. {opt suest}, however, also
estimates the between-model covariances of parameter estimates.
{phang2}3.
Finally, the estimation results to be combined should be stored by
{helpb estimates store}.
{pstd}
After estimating and storing a series of estimation results, you
are ready to combine the estimation results with suest,
{p 8 16 2}
{cmd:. suest} {it:name1} [{it:name2} ...] [{cmd:,} {opth cluster(varname)}]
{pstd}
and you can subsequently use postestimation commands, such as {helpb test},
to test hypotheses. Here an important issue is how {opt suest} assigns names
to the equations. If you specify a single model {it:name}, the original equation names are
left unchanged; otherwise, {opt suest} constructs new equation names. The
coefficients of a single-equation model (such as {helpb logit} and
{helpb poisson}) that was {cmd:estimate store}d under name {it:X} are collected under
equation {it:X}. With a multiequation model stored under name {it:X}, {opt suest}
prefixes {it:X}{cmd:_} to an original equation name {it:eq}, forming
{bind:{it:X}{cmd:_}{it:eq}}.
{pstd}
Technical note: in very rare circumstances,
{opt suest} may have to truncate equation names to 32
characters. When equation names are not unique because of truncation, {opt suest}
numbers the equations within models, using equations named {it:X_#}.
{marker survey_data}{...}
{title:Using suest with survey data}
{pstd}
{opt suest} can be used to obtain the variance estimates for a series of
estimators that used the {helpb svy} prefix. To use {opt suest} for this
purpose, perform the following steps:
{phang2}1. Be sure to set the survey design characteristics correctly using
{helpb svyset}. Do not use the {opt vce()} option to change the
default variance estimator from the linearized variance estimator.
{cmd:vce(brr)} and {cmd:vce(jackknife)} are not supported by
{opt suest}.
{phang2}2. Fit the model or models using the {helpb svy} prefix command,
optionally including the subpopulation with the {opt subpop()} option.
{phang2}3. Store the estimation results with {cmd:estimates store} {it:name}.
{title:Remarks on specific commands}
{p 4 4 2}Some estimation commands store or name their results in a slightly
non-standard way, mostly for historical reasons. {cmd:suest} provides
"fixes" in these cases.
{phang}{helpb regress} does not include its ancillary parameter, the residual
variance, in its coefficient vector and (co)variance matrix. Moreover. while
the {opt score} option is allowed with {cmd:predict} after {cmd:regress},
a score variable is generated for the mean but not for the variance parameter.
{cmd:suest} contains special code that assigns the equation name {cmd:mean} to
the coefficients for the mean, adds the equation {cmd:lnvar} for the
log variance, and computes the appropriate score variables.
{title:Example 1: A Hausman test}
{phang}{cmd:. mlogit travmode age gender income}{p_end}
{phang}{cmd:. est store ALL, title(analysis all means of transp.)}{p_end}
{phang}{cmd:. mlogit travmode age gender income if travmode!=2}{p_end}
{phang}{cmd:. est store B, title(analysis excluding travmode==2)}
{cmd:. suest ALL B}
{cmd:. test [ALL1=B1] [ALL3=B3], common}
{pstd}{txt:If the observations are clustered on {cmd:hhid}}
{cmd:. suest All B, cluster(hhid)}
{cmd:. {it:...}}
{title:Example 2: Do coefficients vary between groups? ("Chow test")}
{phang}{cmd:. intreg inc age edu if male}{p_end}
{cmd:. est store Male}
{phang}{cmd:. intreg inc age edu if !male}{p_end}
{cmd:. est store Female}
{cmd:. suest Male Female}
{cmd:. test [Male=Female], cons}
{title:Example 3: A non-linear Hausman-like test}
{phang}{cmd:. probit promotion edu exp {it:...}}{p_end}
{cmd:. est store Promo}
{phang}{cmd:. regress income edu exp {it:...}}{p_end}
{cmd:. est store Inc}
{cmd:. suest Promo Inc}
{phang}{cmd:. testnl [Promo]edu/[Promo]exp = [Inc]edu/[Inc]exp}
{title:Example 4: Using suest with survey data}
{phang}
{cmd:. webuse nhanes2f}
{p_end}
{phang}
{cmd:. svyset psuid [pw=finalwgt], strata(stratid)}
{p_end}
{phang}
{cmd:. svy: ologit health female black age age2}
{p_end}
{phang}
{cmd:. estimates store H5}
{p_end}
{phang}
{cmd:. gen health3 = clip(health,2,4)}
{p_end}
{phang}
{cmd:. svy: ologit health3 female black age age2}
{p_end}
{phang}
{cmd:. estimates store H3}
{p_end}
{phang}
{cmd:. suest H5 H3}
{p_end}
{phang}
{cmd:. test [H5_health=H3_health3]}
{p_end}
{phang}
{cmd:. test ([H5_cut2]_cons=[H3_cut1]_cons) ([H5_cut3]_cons=[H3_cut2]_cons)}
{p_end}
{title:Also see}
{psee}
Manual: {bf:[R] suest}
{psee}Online:
{helpb estimates},
{helpb hausman},
{helpb lincom},
{helpb nlcom},
{helpb _robust},
{helpb test},
{helpb testnl}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -