📄 xtmixed_postestimation.hlp
字号:
{smcl}
{* *! version 1.0.0 09jun2005}{...}
{cmd:help xtmixed postestimation}{right:dialogs: {bf:{dialog xtmixed_p:predict}} {bf:{dialog xtmixed_estat:estat}}}
{right:also see: {helpb xtmixed} }
{hline}
{title:Title}
{p2colset 5 36 38 2}{...}
{p2col :{hi:[XT] xtmixed postestimation} {hline 2}}Postestimation tools for
xtmixed{p_end}
{p2colreset}{...}
{title:Description}
{pstd}
The following postestimation commands are of special interest after
{cmd:xtmixed}:
{synoptset 14 tabbed}{...}
{p2coldent :command}description{p_end}
{synoptline}
{synopt :{helpb xtmixed postestimation##estatgroup:estat group}}summarizes
the composition of the nested groups{p_end}
{synopt :{helpb xtmixed postestimation##estatcov:estat recov}}{cmd:estat}
{cmd:recovariance} displays the estimated random-effects covariance matrix{p_end}
{synoptline}
{p2colreset}{...}
{pstd}
In addition, the following standard postestimation commands are available:
{synoptset 14 tabbed}{...}
{p2coldent :command}description{p_end}
{synoptline}
{p2coldent:* {helpb adjust}}adjusted predictions of xb or probabilities{p_end}
INCLUDE help post_estat
INCLUDE help post_estimates
INCLUDE help post_hausman
INCLUDE help post_lincom
INCLUDE help post_lrtest
INCLUDE help post_mfx
INCLUDE help post_nlcom
{synopt :{helpb xtmixed postestimation##predict:predict}}predictions, residuals, influence statistics, and other diagnostic measures{p_end}
INCLUDE help post_predictnl
INCLUDE help post_test
INCLUDE help post_testnl
{synoptline}
{p2colreset}{...}
{p 4 6 2}
* {cmd:adjust} will not work with time-series operators.
{title:Special-interest postestimation commands}
{pstd}
{cmd:estat group} reports number of groups, and minimum, average, and maximum
group sizes for each level of the model. Model levels are identified by
the corresponding group variable in the data. Since groups are treated
as nested, the information in this summary may differ from what you would
get had you {cmd:tabulate}d each group variable yourself.
{pstd}
{cmd:estat recovariance} displays the estimated variance-covariance matrix
of the random effects for each level. Random effects can either be
random intercepts, in which case the corresponding rows and columns
of the matrix are labeled as _cons, or random coefficients in which case
the label is the name of the associated variable in the data.
{marker predict}{...}
{title:Syntax for predict}
{p 4 4 2}
Syntax for obtaining best linear unbiased predictions (BLUPs) of random
effects:
{p 8 16 2}
{cmd:predict} {dtype} {{it:stub*}{c |}{it:newvar1} ... {it:newvarq}} {ifin}
{cmd:,} {opt ref:fects} [{opt l:evel(levelvar)}]
{p 4 4 2}
Syntax for obtaining other predictions:
{p 8 16 2}
{cmd:predict} {dtype} {newvar} {ifin}
[{cmd:,} {it:statistic} {opt l:evel(levelvar)}]
{synoptset 13 tabbed}{...}
{synopthdr :statistic}
{synoptline}
{syntab :Main}
{synopt :{cmd:xb}}xb, linear predictor for the {it:fixed} portion of the
model{p_end}
{synopt :{cmd:stdp}}standard error of the fixed-portion linear
prediction xb{p_end}
{synopt :{opt fit:ted}}fitted values, linear predictor of the fixed
portion plus contributions based on predicted random
effects
{p_end}
{synopt :{opt r:esiduals}}residuals, response minus fitted values
{p_end}
{synopt :{opt rsta:ndard}}standardized residuals{p_end}
{synoptline}
{p2colreset}{...}
INCLUDE help esample
{title:Options for predict}
{dlgtab:Main}
{phang}
{opt xb} calculates the linear prediction for the fixed portion of the
model.
{phang}
{opt stdp} calculates the standard error of the fixed-portion linear prediction.
{phang}
{opt level(levelvar)} specifies the level in the model at which
predictions involving random effects are to be obtained; see below for the
specifics. {it:levelvar} is the name of the model level, and is either the
name of the variable describing the grouping at that level or {cmd:_all}, a
special designation for a group comprised of all the estimation data.
{phang}
{opt reffects} calculates best linear unbiased predictions (BLUPs) of the
random effects. By default, BLUPs for all random effects in the model
are calculated. However, if option {opt level(levelvar)} is specified, then
BLUPs for only level {it:levelvar} in the model are calculated. For example,
if {cmd:class}es are nested within {cmd:school}s, then
{p 12 16 2}{cmd:. predict b*, reffects level(school)}{p_end}
{pmore}
would be used to obtain BLUPs at the {cmd:school} level. You must specify
{it:q} new variables, where {it:q} is the number of random-effects terms
in the model (or level). However, it is much easier to just specify
{it:stub*} and let Stata name the variables {it:stub1}...{it:stubq} for you.
{phang}
{opt fitted} calculates fitted values, which are equal to the fixed-portion
linear predictor {it:plus} contributions based on predicted
random effects, or in mixed-model notation, xb + Zu. By default, the fitted
values take into account random effects from all levels in the model, however,
if option {opt level(levelvar)} is specified, then the fitted values are
fitted beginning at the top-most level down to and including level
{it:levelvar}. For example, if {cmd:class}es are nested within {cmd:school}s,
then
{p 12 16 2}{cmd:. predict yhat1, fitted level(school)}{p_end}
{pmore}
would produce school-level predictions. That is, the predictions
would incorporate school-specific random effects, but not those for
each class nested within each school.
{phang}
{opt residuals} calculates residuals, equal to the responses minus fitted
values. By default, the fitted values take into account random effects
from all levels in the model, however, if option {opt level(levelvar)} is
specified, then the fitted values are fitted beginning at the top-most
level down to and including level {it:levelvar}.
{phang}
{opt rstandard} calculates standardized residuals, equal to the residuals
described above divided by the estimated residual standard deviation
(listed as sd(Residual) in {cmd:xtmixed} output).
{marker estatgroup}{...}
{title:Syntax for estat group}
{p 8 14 2}
{cmd:estat} {opt gr:oup}
{marker estatcov}{...}
{title:Syntax for estat recovariance}
{p 8 14 2}
{cmd:estat} {opt recov:ariance} [{cmd:,} {it:recov_options}]
{synoptset 18 tabbed}{...}
{synopthdr :recov_options}
{synoptline}
{syntab :Main}
{synopt :{opt l:evel(levelvar)}}display
the random-effects covariance/correlation matrix for level {it:levelvar}
{p_end}
{synopt :{opt corr:elation}}display matrix as a correlation matrix{p_end}
{synopt :{it:matlist_options}}style options for displaying the
matrix; see {help matlist:matlist}{p_end}
{synoptline}
{p2colreset}{...}
{title:Options for estat recovariance}
{dlgtab:Main}
{phang}
{opt level(levelvar)} specifies the level in the model for which the
random-effects covariance matrix is to be displayed. By default, the
covariance matrices for all levels in the model are displayed. {it:levelvar}
is the name of the model level, and is either the name of variable describing
the grouping at that level or {cmd:_all}, a special designation for a group
comprised of all the estimation data.
{phang}
{opt correlation} displays the covariance matrix as a correlation matrix.
{phang}
{it:matlist_options} control how the matrix (or matrices) are displayed. See
{help matlist} for details.
{title:Examples}
{phang}{cmd:. predict u*, reffects}{p_end}
{phang}{cmd:. predict yhat, fitted}{p_end}
{phang}{cmd:. estat group}{p_end}
{phang}{cmd:. estat recovariance, border}{p_end}
{phang}{cmd:. predict r, resid level(school)}{p_end}
{title:Also see}
{psee}
Manual: {bf:[XT] xtmixed postestimation}
{psee}
Online: {helpb xtmixed};{break}
{helpb adjust}, {helpb estimates}, {helpb hausman}, {helpb lincom},
{helpb lrtest}, {helpb matlist}, {helpb mfx}, {helpb nlcom}, {helpb predictnl},
{helpb test}, {helpb testnl}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -