xtgee.hlp

来自「是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到」· HLP 代码 · 共 315 行

HLP
315
字号
{smcl}
{* 07apr2005}{...}
{cmd:help xtgee} {right:dialog:  {bf:{dialog xtgee}}{space 15}}
{right:also see:  {help xtgee postestimation}}
{hline}

{title:Title}

{p2colset 5 19 21 2}{...}
{p2col :{hi:[XT] xtgee} {hline 2}}Fit population-averaged panel-data models using GEE{p_end}
{p2colreset}{...}


{title:Syntax}

{p 8 14 2}
{cmd:xtgee} {depvar} [{indepvars}] {ifin} {weight} [{cmd:,} {it:options}]

{synoptset 21 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 :{cmdab:f:amily(}{it:{help xtgee##family:family}}{cmd:)}}distribution of {depvar}{p_end}
{synopt :{cmdab:l:ink(}{it:{help xtgee##link:link}}{cmd:)}}link function{p_end}

{syntab:Model 2}
{synopt :{opth e:xposure(varname)}}include ln({it:varname}) in model with coefficient constrained to 1{p_end}
{synopt :{opth off:set(varname)}}include {it:varname} in model with coefficient constrained to 1{p_end}
{synopt :{opt nocon:stant}}suppress constant term{p_end}
{synopt :{opt force}}estimate even if observations unequally spaced in time{p_end}

{syntab:Correlation}
{synopt :{cmdab:c:orr(}{it:{help xtgee##correlation:correlation}}{cmd:)}}within-group correlation structure{p_end}

{syntab:SE/Robust}
{synopt :{opth vce(vcetype)}}{it:vcetype} may be {opt r:obust}, {opt boot:strap}, or {opt jack:knife}{p_end}
{synopt :{opt r:obust}}synonym for {cmd:vce(robust)}{p_end}
{synopt :{opt nmp}}use divisor N-P instead of the default N{p_end}
{synopt :{opt rgf}}multiply the robust variance estimate by (N-1)/(N-P){p_end}
{synopt :{cmdab:s:cale(x2)}}set scale parameter to Pearson chi-squared statistic{p_end}
{synopt :{cmdab:s:cale(dev)}}set scale parameter to deviance divided by degrees of freedom{p_end}
{synopt :{cmdab:s:cale(phi)}}do not rescale the variance{p_end}
{synopt :{opt scale(#)}}set scale parameter to {it:#}{p_end}

{syntab:Reporting}
{synopt :{opt level(#)}}set confidence level; default is {cmd:level(95)}{p_end}
{synopt :{opt ef:orm}}report exponentiated coefficients{p_end}

{syntab:Opt options}
{synopt :{it:{help xtgee##optimize_options:optimize_options}}}control the optimization process; seldom used{p_end}

{p2coldent :+ {opt nodis:play}}suppress display of header and coefficients{p_end}
{synoptline}
{p2colreset}{...}
{p 4 6 2} + {opt nodisplay} is not shown in the dialog box.{p_end}
{p 4 6 2}{it:depvar} and {it:indepvars} may contain time-series operators; see {help tsvarlist}.{p_end}
{p 4 6 2}{opt bootstrap}, {opt by}, {opt jackknife}, {opt statsby}, and {opt xi} may be used with
{cmd:xtgee}; see {help prefix}.{p_end}
{p 4 6 2} {opt iweight}s, {opt fweight}s, and {opt pweight}s are allowed; see
{help weight}.  Weights must be constant within panels.{p_end}
{p 4 6 2}
See {help xtgee postestimation} for features available after estimation.{p_end}

{marker family}{...}
{synoptset 23}{...}
{synopthdr :family}
{synoptline}
{synopt :{opt gau:ssian}}Gaussian (normal); {cmd:family(normal)} is a synonym{p_end}
{synopt :{opt ig:aussian}}inverse Gaussian{p_end}
{synopt :{opt b:inomial}[{it:#}|{varname}]}Bernoulli/binomial{p_end}
{synopt :{opt p:oisson}}Poisson{p_end}
{synopt :{opt nb:inomial}[{it:#}]}negative binomial{p_end}
{synopt :{opt gam:ma}}gamma{p_end}
{synoptline}
{p2colreset}{...}

{marker link}{...}
{synoptset 23}{...}
{synopthdr :link}
{synoptline}
{synopt :{opt i:dentity}}identity; y=y{p_end}
{synopt :{opt log}}log; ln(y){p_end}
{synopt :{opt logi:t}}logit; ln{y/(1-y)}, natural log of the odds{p_end}
{synopt :{opt p:robit}}probit; inverse Gaussian cumulative{p_end}
{synopt :{opt cl:oglog}}cloglog; ln{-ln(1-y)}{p_end}
{synopt :{opt pow:er}[{it:#}]}power; y^k with k=#; #=1 if not specified{p_end}
{synopt :{opt opo:wer}[{it:#}]}odds power; [{y/(1-y)}^k - 1]/k with k=#; #=1 if not specified{p_end}
{synopt :{opt nb:inomial}}negative binomial{p_end}
{synopt :{opt rec:iprocal}}reciprocal; 1/y{p_end}
{synoptline}
{p2colreset}{...}

{marker correlation}{...}
{synoptset 23}{...}
{synopthdr :correlation}
{synoptline}
{synopt :{opt exc:hangeable}}exchangeable{p_end}
{synopt :{opt ind:ependent}}exchangeable{p_end}
{synopt :{opt uns:tructured}}unstructured{p_end}
{synopt :{opt fix:ed} {it:matname}}user-specified{p_end}
{synopt :{opt ar} {it:#}}autoregressive of order {it:#}{p_end}
{synopt :{opt sta:tionary} {it:#}}stationary of order {it:#}{p_end}
{synopt :{opt non:stationary} {it:#}}nonstationary of order {it:#}{p_end}
{synoptline}
{p2colreset}{...}


{title:Description}

{pstd}
{cmd:xtgee} fits population-averaged panel-data models.  In particular,
{cmd:xtgee} fits general linear models and allows you to specify the
within-group correlation structure for the panels.

{pstd}
See {help logistic estimation commands} and {helpb regress} for lists
of related estimation commands.


{title:Options}

{dlgtab:Model}

{phang}
{opth "i(varname:varname_i)"}, {opth "t(varname:varname_t)"}; see 
   {help estimation options##i():estimation options}.

{pmore}
{cmd:xtgee} does not need to know {opt t()} for the {cmd:corr(independent)}
and {cmd:corr(exchangeable)} correlation structures.  Whether you specify 
{opt t()} makes no difference in these two cases.

{phang}
{opt family(family)} specifies the distribution of {depvar};
{cmd:family(gaussian)} is the default.

{phang}
{opt link(link)} specifies the link function; the default is
the canonical link for the {opt family()} specified.

{dlgtab:Model 2}

{phang}
{opth exposure(varname)} and {opth offset(varname)} are different ways of
specifying the same thing.  {opt exposure()} specifies a variable that reflects
the amount of exposure over which the {depvar} events were observed for each
observation; ln({it:varname}) with coefficient constrained to be 1 is entered
into the regression equation.  {opt offset()} specifies a variable that is to
be entered directly into the log-link function with its coefficient
constrained to be 1; thus, exposure is assumed to be e^varname.  If you were
fitting a Poisson regression model, {cmd:family(poisson) link(log)}, for
instance, you would account for exposure time for specifying {opt offset()}
containing the log of exposure time.

{phang}
{opt noconstant} specifies that the linear predictor has no intercept term,
thus forcing it through the origin on the scale defined by the link function.

{phang}
{opt force} specifies that estimation 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:Correlation}

{phang}
{opt corr(correlation)}; see {help estimation options##corr():estimation options}.

{dlgtab:SE/Robust}

{phang}
{opt vce(vcetype)}; see {it:{help vce_option}}.

{phang}
{opt robust} specifies that the Huber/White/sandwich estimator of variance is
to be used in place of the default GLS variance estimator; see 
{bf:[XT] xtgee}.  This produces valid standard errors even if the correlations
within group are not as hypothesized by the specified correlation structure.
It does, however, require that the model correctly specifies the mean.  As
such, the resulting standard errors are labeled "semi-robust" instead of
"robust".  Note that although there is no {opt cluster()} option, results are
as if there were a {opt cluster()} option and you specified clustering on 
{opt i()}.

{pmore}
{cmd:vce(robust)} is a synonym for {opt robust}.

{phang}
{opt nmp}; see {help estimation options##nmp:estimation options}.

{phang}
{opt rgf} specifies that the robust variance estimate is multiplied by
(N-1)/(N-P), where N = # of observations, and P = # of coefficients estimated.
This option can be used only with {cmd:family(gaussian)} when {opt robust} is
either specified or implied by the use of {opt pweight}s.  Using this option
implies that the robust variance estimate is not invariant to the scale of any
weights used.

{phang}
{cmd:scale(x2}|{cmd:dev}|{it:#}|{cmd:phi)} overrides the default scale
parameter of {cmd:scale(1)}; see {help estimation options##scale():estimation options}.

{dlgtab:Reporting}

{phang}
{opt level(#)}; see {help estimation options##level():estimation options}.

{phang}
{opt eform} displays the exponentiated coefficients and corresponding standard
erros and confidence intervals as described in {helpb maximize}.  For
{cmd:family(binomial) link(logit)} (i.e., logistic regression), exponentiation
results in odds ratios; for {cmd:family(poisson) link(log)} (i.e., Poisson
regression), exponentiated coefficients are incidence-rate ratios.

{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.

{pmore}
{opt tr:ace} specifies that the current estimates should be printed at each
iteration.

{pstd}
The following option is available with {cmd:xtgee} but is not shown in the
dialog box:

{phang}
{opt nodisplay} is for programmers.  It suppresses the display of the header
and coefficients.


{title:Examples}

    {cmd:. iis id}
{phang}{cmd:. xtgee ln_w grade age age2}{p_end}
{phang}{cmd:. xtgee ln_w grade age age2, robust}{p_end}
    {cmd:. xtcorr}

    {cmd:. iis id}
    {cmd:. tis time}
{phang}{cmd:. xtgee ln_w grade age age2, corr(unstr)}{p_end}
    {cmd:. xtcorr}
{phang}{cmd:. xtgee ln_w grade age age2, corr(stationary)}{p_end}
    {cmd:. xtcorr}

    {cmd:. iis id}
    {cmd:. tis time}
{phang}{cmd:. xtgee union age grade not_smsa south, fam(bin) link(probit)}{p_end}
{phang}{cmd:. xtgee union age grade not_smsa south, fam(bin) link(probit) robust}{p_end}
{phang}{cmd:. xtgee union age grade not_smsa south, f(bin) l(probit) c(ar1) robust}{p_end}
{phang}{cmd:. xtcorr, compact}


{title:Correlation structures and the allowed spacing of observations within panel}

{center:{space 16}{hline 2}characteristics allowed{hline 2}}
{center:{space 29}Unequal       }
{center:Correlation     Unbalanced   spacing   Gaps}
{center:{hline 43}}
{center:independent        yes         yes      yes}
{center:exchangeable       yes         yes      yes}
{center:ar k               yes (*)     no       no }
{center:stationary k       yes (*)     no       no }
{center:nonstationary k    yes (*)     no       no }
{center:unstructured       yes         yes      yes}
{center:fixed              yes         yes      yes}
{center:{hline 43}}
{center:(*) All panels must have at least k+1 obs. }


    Definitions:

{phang2}1.  Panels are balanced if each has the same number of observations.

{phang2}2.  Panels are equally spaced if the interval between observations is
constant.

{phang2}3.  Panels have gaps if some observations are missing.


{title:Also see}

{psee}
Manual:  {bf:[XT] xtgee}

{psee}
Online:  {help xtgee postestimation};{break}
{helpb glm}, {helpb logistic}, {helpb prais}, {helpb regress}, {helpb svy}, 
{help xt},
{helpb xtcloglog}, {helpb xtdata}, {helpb xtdes}, {helpb xtgls}, 
{helpb xtintreg}, {helpb xtlogit}, {helpb xtnbreg}, {helpb xtpcse}, 
{helpb xtpoisson}, {helpb xtprobit}, {helpb xtreg}, {helpb xtregar}, 
{helpb xtsum}, {helpb xttab}, {helpb xttobit}
{p_end}

⌨️ 快捷键说明

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