📄 ivreg.hlp
字号:
{smcl}
{* 08mar2005}{...}
{cmd:help ivreg}{right:dialogs: {bf:{dialog ivreg}}{space 15}}
{right:also see: {help ivreg postestimation}}
{hline}
{title:Title}
{p2colset 5 18 20 2}{...}
{p2col :{hi:[R] ivreg} {hline 2}}Instrumental variables (two-stage
least-squares) regression{p_end}
{p2colreset}{...}
{title:Syntax}
{p 8 14 2}
{cmd:ivreg} {depvar} [{it:{help varlist:varlist1}}]
{cmd:(}{it:varlist2} {cmd:=} {it:varlist_iv}{cmd:)} {ifin} {weight}
[{cmd:,} {it:options}]
{synoptset 20 tabbed}{...}
{synopthdr}
{synoptline}
{syntab :Model}
{synopt :{opt noc:onstant}}suppress constant term{p_end}
{synopt :{opt h:ascons}}has user-supplied constant{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 :{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 first}}report first-stage estimates{p_end}
{synopt :{opt b:eta}}report normalized beta coefficients{p_end}
{synopt :{opt nohe:ader}}display only the coefficient table{p_end}
{synopt :{opth dep:name(varname)}}substitute dependent variable name{p_end}
{synopt :{opt ef:orm(string)}}report exponentiated coefficients and use
{it:string} to label them{p_end}
{p2coldent :+ {opt ms:e1}}force MSE to be 1{p_end}
{synoptline}
{p2colreset}{...}
{p 4 6 2}+ {opt mse1} does not appear in the dialog box.{p_end}
{p 4 6 2}{it:depvar}, {it:varlist1}, {it:varlist2}, and {it:varlist_iv} 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}{cmd:aweight}s, {cmd:fweight}s, {cmd:iweight}s, and {cmd:pweight}s
are allowed; see {help weight}.{p_end}
{p 4 6 2}See {help ivreg postestimation} for features available after estimation.
{title:Description}
{pstd}
{cmd:ivreg} fits a linear regression model using instrumental
variables (or two-stage least squares) of {depvar} on
{it:{help varlist:varlist1}} and {it:varlist2}, using {it:varlist_iv} (along
with {it:varlist1}) as instruments for {it:varlist2}.
{pstd}
In the language of two-stage least squares, {it:varlist1} and
{it:varlist_iv} are the exogenous variables, and {it:varlist2} are the
endogenous variables.
{title:Options}
{dlgtab:Model}
{phang}
{opt noconstant}; see {help estimation options}.
{phang}
{opt hascons} indicates that a user-defined constant or its equivalent is
specified among the independent variables. Be careful when specifying this
option, as resulting estimates may not be as accurate as they otherwise would
be. See {helpb regress} for more information.
{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:ivreg"} for a command
especially designed for survey data.
{dlgtab:Reporting}
{phang}
{opt level(#)}; see {help estimation options}.
{phang}
{opt first} requests that the first-stage regression results be displayed.
{phang}
{opt beta} asks that normalized beta coefficients be reported
instead of confidence intervals.
{phang}
{opt noheader} suppresses the display of the ANOVA table and summary
statistics at the top of the output, displaying only the coefficient table.
This option is often used in programs and ado-files.
{phang}
{opth depname(varname)} is used only in programs and ado-files that employ
{cmd:ivreg} to fit models other than instrumental variable regression.
{opt depname()} may be specified only at estimation time. {it:varname} is
recorded as the identity of the dependent variable, even though the estimates
are calculated using {it:depvar}. This affects the labeling of the
output{hline 2}not the results calculated{hline 2}but could affect subsequent
calculations made by {opt predict}, where the residual would be calculated as
deviations from {it:varname} rather than {it:depvar}. {opt depname()} is most
typically used when {it:depvar} is a temporary variable (see {help macro})
used as a proxy for {it:varname}.
{phang}
{opt eform(string)} is used only in programs and ado-files that employ
{cmd:ivreg} to fit models other than instrumental variable regression.
{opt eform()} specifies that the coefficient table be displayed in
"exponentiated form", as defined in {help maximize}, and that {it:string}
be used to label the exponentiated coefficients in the table.
{pstd}
The following option is available with {cmd:ivreg} but is not shown in the
dialog box:
{phang}
{opt mse1} is used only in programs and ado-files that employ {cmd:ivreg} to
fit models other than instrumental variables regression. {opt mse1} sets the
mean squared error to 1, thus forcing the variance-covariance matrix of
the estimators to be (X'DX)^-1 (see {bf:[R] matsize}) and
affecting calculated standard errors. Degrees of freedom for t
statistics are calculated as n rather than n-k.
{title:Examples}
{phang}{cmd:. ivreg y1 (y2 = z1 z2 z3) x1 x2 x3}{p_end}
{phang}{cmd:. ivreg y1 x1 x2 x3 (y2 = z1 z2 z3)}
{phang}{cmd:. ivreg y1 x1 x2 (y2 y3 = z1 z2 z3)}
{phang}{cmd:. ivreg y1 x1 x2 (y2 = z1 z2 z3) x3}
{phang}{cmd:. test x1 x2}{p_end}
{phang}{cmd:. test x3=5}{p_end}
{phang}{cmd:. test y2=x3-x2}{p_end}
{phang}{cmd:. predict y1hat}
{phang}{cmd:. ivreg y1 (y2 = z1 z2 z3) x1 x2 x3 [fw=pop]}
{phang}{cmd:. ivreg y1 (y2 = z1 z2 z3) x1 x2 x3, robust}{p_end}
{phang}{cmd:. ivreg y1 (y2 = z1 z2 z3) x1 x2 x3, robust cluster(patid)}
{title:Also see}
{psee}
Manual: {bf:[R] ivreg}
{psee}
Online: {help ivreg_postestimation};{break}
{helpb anova},
{helpb areg},
{helpb cnsreg},
{helpb ivprobit},
{helpb ivtobit},
{helpb mvreg},
{helpb qreg},
{helpb reg3},
{helpb regress},
{helpb _robust},
{helpb rreg},
{helpb sureg},
{helpb "svy:ivreg"},
{helpb xtreg},
{helpb xtregar}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -