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

📄 heckman.hlp

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 HLP
字号:
{smcl}
{* 03apr2005}{...}
{cmd:help heckman}{right:dialogs:  {dialog heckman_ml}  {dialog heckman_2step}}
{right:also see:  {help heckman postestimation}{space 3}}
{hline}

{title:Title}

{p2colset 5 20 22 2}{...}
{p2col :{hi:[R] heckman} {hline 2}}Heckman selection model{p_end}
{p2colreset}{...}


{title:Syntax}

{phang}Basic syntax

{p 8 16 2}{cmd:heckman} {depvar} [{indepvars}]{cmd:,} 
      {opt sel:ect(varlist_s)} [{opt two:step}]

      or

{p 8 16 2}{cmd:heckman} {depvar} [{indepvars}]{cmd:,} 
      {opt sel:ect(depvar_s = varlist_s)} [{opt two:step}]

{phang}Full syntax for maximum likelihood estimates only

{p 8 16 2}{cmd:heckman} {depvar} [{indepvars}] {ifin} {weight} {cmd:,} 
    {opt sel:ect}{cmd:(}[{it:depvar_s} {cmd:=}] {it:varlist_s} [{cmd:,} 
    {opth off:set(varname)} {opt noc:onstant}]{cmd:)} 
    [{it:{help heckman##heckman_ml_options:heckman_ml_options}}]

{phang}Full syntax for Heckman's two-step consistent estimates only

{p 8 16 2}{cmd:heckman} {depvar} [{indepvars}] {ifin}{opt ,} {opt two:step}
   {opt sel:ect}{cmd:(}[{it:depvar_s} {cmd:=}] {it:varlist_s} 
   [{cmd:,} {opt noc:onstant}]{cmd:)} 
   [{it:{help heckman##heckman_ts_options:heckman_ts_options}}]

{synoptset 28 tabbed}{...}
{marker heckman_ml_options}{...}
{synopthdr :heckman_ml_options}
{synoptline}
{syntab :Model}
{p2coldent :* {opt sel:ect()}}specify selection equation: dependent and independent variables; whether to have constant term and offset variable{p_end}
{synopt :{opt noc:onstant}}supress constant term{p_end}
{synopt :{opth off:set(varname)}}include {it:varname} in model with coefficient constrained to 1{p_end}
{synopt :{cmdab:const:raints(}{it:{help estimation options##constraints():constraints}}{cmd:)}}apply specified linear constraints{p_end}

{syntab :SE/Robust}
{synopt :{opth vce(vcetype)}}{it:vcetype} may be {cmd:oim}, {opt r:obust}, {cmd:opg}, {opt boot:strap}, or {opt jack:knife}{p_end}
{synopt :{opt r:obust}}synonym for {cmd:vce(robust)}{p_end}
{synopt :{opth cl:uster(varname)}}adjust standard errors for intragroup correlation{p_end}

{syntab :Reporting}
{synopt :{opt l:evel(#)}}set confidence level; default is {cmd:level(95)}{p_end}
{synopt :{opt fir:st}}report first-step probit estimates{p_end}
{synopt :{opt noskip}}perform likelihood-ratio test{p_end}
{synopt :{opth ns:hazard(newvar)}}generate nonselection hazard variable{p_end}
{synopt :{opth m:ills(newvar)}}synonym for {opt nshazard()}{p_end}

{syntab :Max options}
{synopt :{it:{help heckman##maximize_options:maximize_options}}}control the maximization process; seldom used{p_end}
{synoptline}
{p2colreset}{...}
{p 4 6 2}*{opt select()} is required.{p_end}
{p 5 9 2}The full specification is{break} 
          {opt sel:ect}{cmd:(}[{it:depvar_s} {cmd:=}] {it:varlist_s} [{cmd:,} {opt off:set(varname)} {opt noc:onstant}]{cmd:)}

{synoptset 28 tabbed}{...}
{marker heckman_ts_options}{...}
{synopthdr :heckman_ts_options}
{synoptline}
{syntab :Model}
{p2coldent :* {opt sel:ect()}}specify selection equation: dependent and independent variables; whether to have constant term{p_end}
{synopt :{opt noc:onstant}}supress constant term{p_end}
{synopt :{opt rhos:igma}}truncate rho to [-1,1] with consistent {sigma}{p_end}
{synopt :{opt rhot:runc}}truncate rho to [-1,1]{p_end}
{synopt :{opt rhol:imited}}truncate rho in limited cases{p_end}
{synopt :{opt rhof:orce}}do not truncate rho{p_end}

{syntab :SE/Robust}
{synopt :{opth vce(vcetype)}}{it:vcetype} may be {opt boot:strap} or {opt jack:knife}{p_end}

{syntab :Reporting}
{synopt :{opt l:evel(#)}}set confidence level; default is {cmd:level(95)}{p_end}
{synopt :{opt fir:st}}report first-step probit estimates{p_end}
{synopt :{opth ns:hazard(newvar)}}generate nonselection hazard variable{p_end}
{synopt :{opth m:ills(newvar)}}synonym for {opt nshazard()}{p_end}
{synoptline}
{p2colreset}{...}
{p 4 6 2}*{opt select()} is required.{p_end}
{p 5 9 2}The full specification is{break}
     {opt sel:ect}{cmd:(}[{it:depvar_s} {cmd:=}] {it:varlist_s} [{cmd:,} {opt noc:onstant}]{cmd:)}

{p 4 6 2}{it:depvar}, {it:indepvars}, {it:varlist_s}, and {it:depvar_s} may
contain time-series operators; see {help tsvarlist}.{p_end}
{p 4 6 2}{cmd:bootstrap}, {cmd:by}, {cmd:jackknife}, {cmd:rolling},
{cmd:statsby}, {cmd:svy}, and {cmd:xi} are allowed; see {help prefix}.{p_end}
{p 4 6 2}{opt pweight}s, {opt aweight}s, {opt fweight}s, and {opt iweight}s
are allowed with maximum likelihood estimation; see {help weight}.  No weights
are allowed if {opt twostep} is specified.{p_end}
{p 4 6 2}See {help heckman postestimation} for features available after
estimation.


{title:Description}

{pstd}
{cmd:heckman} fits regression models with selection using either
Heckman's two-step consistent estimator or full maximum likelihood.


{title:Options for Heckman selection model (ML)}

{dlgtab:Model}

{phang}
{opt select(...)} specifies the variables and options for the selection
equation.  It is an integral part of specifying a Heckman model and is
required.  The selection equation should contain at least one variable that is
not in the outcome equation.

{pmore}
If {it:depvar_s} is specified, it should be coded as 0 or 1, 0 indicating an
observation not selected and 1 indicating a selected observation.  If
{it:depvar_s} is not specified, observations for which {it:depvar} is not
missing are assumed selected, and those for which {it:depvar} is missing are
assumed not selected.

{phang}
{opt noconstant}, {opth offset(varname)}, {opt constraints(constraints)};
see {help estimation options}.

{dlgtab:SE/Robust}

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

{phang}
{opt robust}, {opth cluster(varname)}; see {help estimation options}.
{opt cluster()} can be used with {opt pweight}s to produce estimates for
unstratified cluster-sampled data, but see {helpb "svy:heckman"} for a command
especially designed for survey data.

{marker Reporting}{...}
{dlgtab:Reporting}

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

{phang}
{opt first} specifies that the first-step probit estimates of the
selection equation be displayed before estimation.

{phang}
{opt noskip} specifies that a full maximum-likelihood model with only a
constant for the regression equation be fitted.  This model is not displayed
but is used as the base model to compute a likelihood-ratio test for the model
test statistic displayed in the estimation header.  By default, the overall
model test statistic is an asymptotically equivalent Wald test that all the
parameters in the regression equation being zero (except the constant).  For
many models, this option can substantially increase estimation time.

{phang}
{opth nshazard(newvar)} and {opth mills(newvar)} are synonyms; either will
create a new variable containing the nonselection hazard{hline 2}what Heckman
referred to as the inverse of the Mills' ratio{hline 2}from the
selection equation.  The nonselection hazard is computed from the estimated
parameters of the selection equation.

{marker maximize_options}{...}
{dlgtab:Max options}

{phang}
{it:maximize_options}: {opt dif:ficult}, {opt tech:nique(algorithm_spec)}, 
{opt iter:ate(#)}, [{cmdab:no:}]{opt lo:g}, {opt tr:ace}, {opt hess:ian}, 
{opt grad:ient}, {opt showstep}, {opt tol:erance(#)}, {opt ltol:erance(#)}, 
{opt gtol:erance(#)}, {opt nrtol:erance(#)}, {opt nonrtol:erance}, 
{opt from(init_specs)}; see {help maximize}.  These options are seldom used.


{title:Options for Heckman selection model (two-step)}

{dlgtab:Model}

{phang}
{opt twostep} specifies that Heckman's two-step efficient estimates of
the parameters, standard errors, and covariance matrix be produced.

{phang}
{opt select(...)} specifies the variables and options for the selection
equation.  It is an integral part of specifying a Heckman model and is
required.  The selection equation should contain at least one variable that is
not in the outcome equation.

{pmore}
If {it:depvar_s} is specified, it should be coded as 0 or 1, 0
indicating an observation not selected and 1 indicating a selected
observation.  If {it:depvar_s} is not specified, observations for which
{it:depvar} is not missing are assumed selected, and those for which
{it:depvar} is missing are assumed not selected.

{phang}
{opt noconstant}; see {help estimation options}.

{phang}
{opt rhosigma}, {opt rhotrunc}, {opt rholimited}, and {opt rhoforce} are
rarely used options to specify how the two-step estimator (option 
{opt twostep}) handles unusual cases in which the two-step estimate of rho is
outside the admissible range for a correlation, [-1,1].  When
rho is outside this range, the two-step estimate of the coefficient
variance-covariance matrix may not be positive definite and thus may be
unusable for testing.  The default is {opt rhosigma}.

{pmore}
{opt rhotrunc} specifies that rho be truncated to lie in the range [-1,1].  If
the two-step estimate is less than -1, rho is set to -1; if the two-step
estimate is greater than 1, rho is set to 1.  This truncated value of rho is
used in all computations to estimate the two-step covariance matrix.

{pmore}
{cmd:rhosigma} specifies that rho be truncated, as with option {opt rhotrunc},
and that the estimate of sigma be made consistent with rho_hat, the truncated
estimate of rho.  So, sigma_hat = B_m * rho_hat; see the Methods and Formulas
section of {bf:[R] heckman} for the definition of B_m.  Both the truncated rho
and the new estimate of sigma_hat are used in all computations to estimate the
two-step covariance matrix.

{pmore}
{opt rholimited} specifies that rho be truncated only in computing the
diagonal matrix D as it enters V_twostep and Q; see {bf:[R] heckman} Methods
and Formulas.  In all other computations, the untruncated estimate of rho is
used.

{pmore}
{opt rhoforce} specifies that the two-step estimate of rho be retained, even
if it is outside the admissible range for a correlation.  This may, in rare
cases, lead to a nonpositive-definite covariance matrix.

{pmore}
These options have no effect when estimation is by maximum likelihood, the
default.  They also have no effect when the two-step estimate of rho is in the
range [-1,1].

{dlgtab:SE/Robust}

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

{dlgtab:Reporting}

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

{phang}
{opt first}; see {help heckman##Reporting:above} for details.

{phang}
{opth nshazard(newvar)} and {opth mills(newvar)} are synonyms; see 
{help heckman##Reporting:above} for details.


{title:Remarks}

{pstd}
Heckman estimates all of the parameters in the model:

{pin}(regression equation: y is {it:depvar}, x is {it:varlist}){p_end}
{pin}y = xb + u_1

{pin}(selection equation: Z is {it:varlist_s}){p_end}
{pin}y observed if  Zg + u_2 > 0

	where:
		u_1 ~ N(0, sigma)
		u_2 ~ N(0, 1)
		corr(u_1, u_2) = rho

{pstd}
In the syntax for {cmd:heckman}, {depvar} and {varlist} are the dependent
variable and regressors for the underlying regression model (y = xb), and
{it:varlist_s} are the variables (Z) thought to determine whether {it:depvar}
is selected or observed (selected or not selected).  By default, {cmd:heckman}
assumes that missing values (see {help missing}) of {it:depvar} imply
that the dependent variable is unobserved (not selected).  With some datasets,
it is more convenient to specify a binary variable ({it:depvar_s}) that
identifies the observations for which the dependent is observed/selected
({it:depvar_s}!=0) or not observed ({it:depvar_s}=0); {cmd:heckman} will
accommodate either type of data.


{title:Examples}

{pstd}To obtain full ML estimates:

{phang2}{cmd:. heckman wage educ age, select(married children educ age)}

{pstd}To obtain Heckman's two-step consistent estimates:

{phang2}{cmd:. heckman wage educ age, select(married children educ age) twostep}

{pstd}To define and use each equation separately:

{phang2}{cmd:. global wage_eqn wage educ age}{p_end}
{phang2}{cmd:. global seleqn married children age}{p_end}
{phang2}{cmd:. heckman $wage_eqn, select($seleqn)}

{pstd}To use a variable to identify selection:

{phang2 2}{cmd:. heckman wage educ age, select(wageseen = married children educ age)}

{pstd}To use options:

{phang2}{cmd:. heckman wage educ age, select(married children educ age), [pw=wgt]}{p_end}
{phang2}{cmd:. heckman wage educ age, select(married children educ age) robust}{p_end}
{phang2}{cmd:. heckman $wage_eqn, select($seleqn) cluster(county)}{p_end}
{phang2}{cmd:. heckman $wage_eqn, select($seleqn)}

{phang2}{cmd:. heckman wage educ age, select(married children educ age) first}

{phang2}{cmd:. heckman $wage_eqn, select($seleqn) mills(mymills)}

{phang2}{cmd:. heckman wage educ age, noconstant select(married children educ age)}{p_end}
{phang2}{cmd:. heckman wage educ age, select(married children educ age, noconstant)}


{title:Also see}

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

{psee}
Online:  {help heckman postestimation};{break}
{helpb constraint},
{helpb heckprob},
{helpb probit},
{helpb regress},
{helpb "svy:heckman"},
{helpb tobit},
{helpb treatreg}
{p_end}

⌨️ 快捷键说明

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