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

📄 logistic_postestimation.hlp

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 HLP
📖 第 1 页 / 共 2 页
字号:
{smcl}
{* 22mar2005}{...}
{cmd:help logistic postestimation}{...}
{right:dialogs:  {bf:{dialog logit_estat:estat}}  {bf:{dialog lroc}}   }
{right:{bf:{dialog lsens}}  {bf:{dialog logistic_p:predict}}}
{right:also see:  {helpb logistic}      }
{hline}

{title:Title}

{p2colset 5 36 38 2}{...}
{p2col :{hi:[R] logistic postestimation} {hline 2}}Postestimation tools for
logistic{p_end}
{p2colreset}{...}


{title:Description}

{pstd}
The following postestimation commands are of special interest after
{cmd:logistic}:

{synoptset 14 tabbed}{...}
{p2coldent :command}description{p_end}
{synoptline}
{synopt :{helpb logistic postestimation##estatclas:estat clas}}{cmd:estat} {cmd:classification} reports various summary statistics, including the classification table{p_end}
{synopt :{helpb logistic postestimation##estatgof:estat gof}}Pearson or Hosmer-Lemeshow goodness-of-fit test{p_end}
{synopt :{helpb logistic postestimation##lroc:lroc}}graphs the ROC curve and calculates the area under the curve{p_end}
{synopt :{helpb logistic postestimation##lsens:lsens}}graphs sensitivity and specificity versus probability cutoff{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_lincom
INCLUDE help post_linktest
INCLUDE help post_lrtest
INCLUDE help post_mfx
INCLUDE help post_nlcom
{synopt :{helpb logistic postestimation##predict:predict}}predictions, residuals, influence statistics, and other diagnostic measures{p_end}
INCLUDE help post_predictnl
INCLUDE help post_suest
INCLUDE help post_test
INCLUDE help post_testnl
{synoptline}
{p2colreset}{...}
{p 4 6 2}
* {cmd:adjust} does not work with time-series operators.


{title:Special-interest postestimation commands}

{pstd}
{cmd:estat classification} reports various summary statistics, including the
classification table.

{pstd}
{cmd:estat gof} reports the Pearson goodness-of-fit test or the
Hosmer-Lemeshow goodness-of-fit test.

{pstd}
{cmd:lroc} graphs the ROC curve and calculates the area under the curve.

{pstd}
{cmd:lsens} graphs sensitivity and specificity versus probability cutoff and
optionally creates new variables containing these data.

{pstd}
{cmd:estat classification}, {cmd:estat gof}, {cmd:lroc}, and {cmd:lsens}
produce statistics and graphs either for the estimation sample or for any
set of observations.  However, they always use the estimation sample by
default.  When weights, {opt if}, or {opt in} are used with
{cmd:logistic}, it is not necessary to repeat them with these commands when
you want statistics computed for the estimation sample.  Specify {opt if},
{opt in}, or the {opt all} option only when you want statistics computed for a
set of observations other than the estimation sample.  Specify weights (only
{opt fweight}s are allowed with these commands) only when you want to use a
different set of weights.

{pstd}
By default, {cmd:estat classification}, {cmd:estat gof}, {cmd:lroc}, and
{cmd:lsens} use the last model fitted by {cmd:logistic}.  You may also
directly specify the model to {cmd:lroc} and {cmd:lsens} by inputting a vector
of coefficients with the {opt beta()} option and passing the name of the
dependent variable {depvar} to these commands.

{pstd}
The {cmd:estat classification}, {cmd:estat gof},
{cmd:lroc}, and {cmd:lsens}
commands may also be used after {cmd:logit} or {cmd:probit}.


{marker predict}{...}
{title:Syntax for predict}

{p 8 16 2}
{cmd:predict} {dtype} {newvar} {ifin} 
[{cmd:,} {it:statistic} {opt rule:s} {opt asif} {opt nooff:set}]

{synoptset 13 tabbed}{...}
{synopthdr :statistic}
{synoptline}
{syntab :Main}
{synopt :{opt p:r}}probability of a positive outcome (the default){p_end}
{synopt :{cmd:xb}}xb, fitted values{p_end}
{synopt :{cmd:stdp}}standard error of the prediction{p_end}
{p2coldent :* {opt db:eta}}Pregibon Delta-Beta influence
statistic{p_end}
{p2coldent :* {opt de:viance}}deviance residual{p_end}
{p2coldent :* {opt dx:2}}Hosmer and Lemeshow Delta
chi-squared influence statistic{p_end}
{p2coldent :* {opt dd:eviance}}Hosmer and Lemeshow Delta-D
influence statistic{p_end}
{p2coldent :* {opt h:at}}Pregibon leverage{p_end}
{p2coldent :* {opt n:umber}}sequential number of the covariate
pattern{p_end}
{p2coldent :* {opt r:esiduals}}Pearson residuals; adjusted for number
sharing covariate pattern{p_end}
{p2coldent :* {opt rsta:ndard}}standardized Pearson residuals; adjusted
for number sharing covariate pattern{p_end}
{synopt :{opt sc:ore}}first derivative of the log likelihood with respect to
x-Beta{p_end}
{synoptline}
{p2colreset}{...}
INCLUDE help unstarred


{title:Options for predict}

{dlgtab:Main}

{phang}
{opt pr}, the default, calculates the probability of a positive outcome.

{phang}
{opt xb} calculates the linear prediction.

{phang}
{opt stdp} calculates the standard error of the linear prediction.

{phang}
{opt dbeta} calculates the Pregibon Delta-Beta influence statistic, a
standardized measure of the difference in the coefficient vector due to
deletion of the observation along with all others that share the same
covariate pattern.  In Hosmer and Lemeshow jargon, this statistic is
M-asymptotic; that is, it is adjusted for the number of observations that
share the same covariate pattern.

{phang}
{opt deviance} calculates the deviance residual.  

{phang}
{opt dx2} calculates the Hosmer and Lemeshow Delta chi-squared influence
statistic, reflecting the decrease in the Pearson chi-squared due to deletion
of the observation and all others that share the same covariate pattern.

{phang}
{opt ddeviance} calculates the Hosmer and Lemeshow Delta-D influence
statistic, which is the change in the deviance residual due to deletion of the
observation and all others that share the same covariate pattern.

{phang}
{opt hat} calculates the Pregibon leverage or the diagonal elements of the hat
matrix adjusted for the number of observations that share the same covariate
pattern. 

{phang}
{opt number} numbers the covariate patterns{hline 2}observations with the same
covariate pattern have the same number.  Observations not used in estimation
have {opt number} set to missing.  The "first" covariate pattern is numbered
1, the second 2, and so on. 

{phang}
{opt residuals} calculates the Pearson residual as given by Hosmer and
Lemeshow and adjusted for the number of observations that share the same
covariate pattern.

{phang}
{opt rstandard} calculates the standardized Pearson residual as given by
Hosmer and Lemeshow and adjusted for the number of observations that share the
same covariate pattern.

{phang}
{opt score} calculates the first derivative of the log likelihood with respect
to the linear prediction.

{dlgtab:Options}

{phang}
{opt rules} requests that Stata use any "rules" that were used to
identify the model when making the prediction.  By default, Stata calculates
missing for excluded observations.  See {helpb logit} for an example.

{phang}
{opt asif} requests that Stata ignore the rules and the exclusion criteria
and calculate predictions for all observations possible using the estimated
parameter from the model.  See {helpb logit} for an example.

{phang}
{opt nooffset} is relevant only if you specified {opth offset(varname)} for
{opt logistic}.  It modifies the calculations made by {opt predict} so that
they ignore the offset variable; the linear prediction is treated as xb
rather than xb + offset.


{marker estatclas}{...}
{title:Syntax for estat classification}

{p 8 14 2}
{cmd:estat} {opt clas:sification} {ifin} {weight} 
[{cmd:,} {it:class_options}]

{synoptset 13 tabbed}{...}
{synopthdr :class_options}
{synoptline}
{syntab :Main}
{synopt :{opt all}}display summary statistics for all observations in the data{p_end}
{synopt :{opt cut:off(#)}}positive outcome threshold; default is
{cmd:cutoff(0.5)}{p_end}
{synoptline}
{p2colreset}{...}
{p 4 6 2}{opt fweight}s are allowed; see {help weight}.


{title:Options for estat classification}

{dlgtab:Main}

{phang}
{opt all} requests that the statistic be computed for all observations in the
data, ignoring any {opt if} or {opt in} restrictions specified by
{cmd:logistic}.

{phang}
{opt cutoff(#)} specifies the value for determining whether an observation has
a predicted positive outcome.  An observation is classified as positive if its
predicted probability is {ul:>} {it:#}.  The default is 0.5.

⌨️ 快捷键说明

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