Example: bachelor of science

Estimation and postestimation commands

20 Estimation and postestimation Estimation commands work the same prior Estimation Estimation the Estimation the width of confidence the coefficient the variance covariance Obtaining predicted Using Making in-sample Making out-of-sample Obtaining standard errors, tests, and confidence intervals for Accessing estimated Performing hypothesis tests on the Linear Using Likelihood-ratio Nonlinear Wald Obtaining linear combinations of Obtaining nonlinear combinations of Obtaining marginal means, adjusted predictions, and predictive Obtaining estimated marginal Obtaining adjusted Obtaining predictive Obtaining conditional and average marginal Obtaining conditional marginal Obtaining average marginal Obtaining pairwise Obtaining contrasts, tests of interactions, and main Graphing margins, marginal effects, and Dynamic forecasts and Obtaining robust variance Interpreting standard Correlated errors: cluster robust sta

average marginal effects and see[R] margins. 6. You can use the postestimation command pwcompareto obtain pairwise comparisons across levels of factor variables. You can compare estimated cell means, marginal means, intercepts, marginal intercepts, slopes, or marginal slopes—collectively called margins. See [U] 20.17 Obtaining

Tags:

  Effect, Marginal, Marginal effects

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Estimation and postestimation commands

1 20 Estimation and postestimation Estimation commands work the same prior Estimation Estimation the Estimation the width of confidence the coefficient the variance covariance Obtaining predicted Using Making in-sample Making out-of-sample Obtaining standard errors, tests, and confidence intervals for Accessing estimated Performing hypothesis tests on the Linear Using Likelihood-ratio Nonlinear Wald Obtaining linear combinations of Obtaining nonlinear combinations of Obtaining marginal means, adjusted predictions, and predictive Obtaining estimated marginal Obtaining adjusted Obtaining predictive Obtaining conditional and average marginal Obtaining conditional marginal Obtaining average marginal Obtaining pairwise Obtaining contrasts, tests of interactions, and main Graphing margins, marginal effects, and Dynamic forecasts and Obtaining robust variance Interpreting standard Correlated errors.

2 Cluster robust standard Obtaining Weighted Frequency Analytic Sampling Importance A list of postestimation References12 [ U ] 20 Estimation and postestimation All Estimation commands work the same wayAll Stata commands that fit statistical models commands such asregress,logit,sureg, andso on work the same way. Most single-equation Estimation commands have the syntaxcommand varlist[if] [in] [weight] [,options]and most multiple-equation Estimation commands have the syntaxcommand(varlist) (varlist)..(varlist)[if] [in] [weight] [,options]Adopt a loose definition of single and multiple equation in interpreting this. For instance,heckmanis atwo-equation system, mathematically speaking, yet we categorize it, syntactically, with single-equationcommands because most researchers think of it as a linear regression with an adjustment for thecensoring.

3 The important thing is that most Estimation commands have one or the other of these single-equation commands , the first variable in thevarlistis the dependent variable, and theremaining variables are the independent variables, with some exceptions. For instance,mixedallowsspecial variable prefixes to identify random commands may be specified in front of an Estimation command to modify what it syntax the prefix commands arePrefix commandDescriptionManual entrybyrepeat command on subsets of data[D]bystatsbycollect results across subsets of data[D]statsbyrollingtime-series rolling Estimation [TS]rolling*svyestimation for complex survey data[SVY]svy*mi estimatemultiply imputed data and multiple imputation[MI]mi estimate*nestregnested model statistics[R]nestreg*stepwisestepwise Estimation [R]stepwise*xiinteraction expansion[R]xi*fpfractional polynomials[R]fp*mfpmultiple fractional polynomials[R]

4 Mfp*Available for some but not all Estimation commandsTwo other prefix commands bootstrapandjackknife also work with Estimation commands see [R]bootstrapand [R]jackknife but usually it is easier to specify the Estimation -commandoptionvce(bootstrap)or vce(jackknife).Also, all Estimation commands whether single or multiple equation share the following features:1. You can use the standard features of Stata s syntax ifexpandinrange to specify theestimation subsample; you do not have to make a special You can retype the Estimation command without arguments to redisplay the most recent estimationresults. For instance, after fitting a model withregress, you can see the estimates again bytypingregressby itself.

5 You do not have to do this immediately any number of commandscan occur between the Estimation and the replaying, and, in fact, you can even replay the lastestimates after the data have changed or you have dropped the data altogether. Stata neverforgets (unless you typediscard; see [P]discard).[ U ] 20 Estimation and postestimation commands 33. You can specify thelevel()option at the time of Estimation , or when you redisplay resultsif that makes sense, to specify the width of the confidence intervals for the coefficients. Thedefault islevel(95), meaning 95% confidence intervals. You can reset the default withsetlevel; see [R] You can use the postestimation commandmarginsto display model results in terms of marginaleffects (dy/dxor evendf(y)/dx), which can be displayed as either derivatives or elasticities;see [R] You can use the postestimation commandmarginsto obtain tables of estimated marginalmeans, adjusted predictions, and predictive margins; see[U] Obtaining conditional andaverage marginal effectsand see [R] You can use the postestimation commandpwcompareto obtain pairwise comparisons across levelsof factor variables.

6 You can compare estimated cell means, marginal means, intercepts, marginalintercepts, slopes, or marginal slopes collectively called margins. See[U] Obtainingpairwise comparisons, [R]margins, and [R]margins, You can use the postestimation commandcontrastto obtain contrasts, which is to say,to compare levels of factor variables and their interactions. This command can also produceANOVA-style tests of main effects, interactions effects, simple effects, and nested effects; andit can be used after most Estimation commands . See[U] Obtaining contrasts, tests ofinteractions, and main effects, [R]contrast, and [R]margins, You can use the postestimation commandmarginsplotto graph any of the results producedbymargins, and becausemarginscan replicate any result produced bypwcompareandcontrast, you can graph any result produced by them, too.

7 See [R] You can use the postestimation commandestatto obtain common statistics associated with themodel. Which statistics are available are documented in the postestimation section followingthe documentation of the Estimation command, for instance, in [R]regress postestimationfollowing [R] can always use the postestimation commandestat vceto obtain the variance covariancematrix of the estimators (VCE), presented as either a correlation matrix or a covariance matrix.(You can also obtain the estimated coefficients and covariance matrix as vectors and matricesand manipulate them with Stata s matrix capabilities; see[U] Accessing matrices createdby Stata commands .)10.

8 You can use the postestimation commandpredictto obtain predictions, residuals, influencestatistics, and the like, either for the data on which you just estimated or for some other can use postestimation commandpredictnlto obtain point estimates, standard errors,etc., for customized predictions. See [R]predictand [R] You can use the postestimation commandforecastto perform dynamic and static forecasts,with optional forecast confidence intervals. This includes the ability to produce forecasts frommultiple Estimation commands , even when estimates imply simultaneous systems. An exampleof a simultaneous system is wheny2predictsy1in Estimation 1 andy1predictsy2inestimation many facilities for creating comparative forecast [TS] You can refer to the values of coefficients and standard errors in expressions (such as withgenerate) by using standard notation; see[U] Accessing coefficients and standarderrors.

9 You can refer in expressions to the values of other Estimation -related statistics by usinge(resultname). For instance, all commands definee(N)recording the number of observationsin the Estimation subsample. After Estimation , typeereturn listto see a list of all that is4 [ U ] 20 Estimation and postestimation commandsavailable. See theStored resultssection in the Estimation command s documentation for especially usefule()result ise(sample): it returns 1 if an observation was used in theestimation and 0 otherwise, so you can addif e(sample)to the end of other commandsto restrict them to the Estimation subsample. You could type, for instance,summarize ife(sample).

10 13. You can use the postestimation commandtestto perform tests on the estimated parameters(Wald tests of linear hypotheses),testnlto perform Wald tests of nonlinear hypotheses, andlrtestto perform likelihood-ratio tests. You can use the postestimation commandlincomto obtain point estimates and confidence intervals for linear combinations of the estimatedparameters and the postestimation commandnlcomto obtain nonlinear You can specify thecoeflegendoption at the time of Estimation or when you redisplay resultsto see how to type your coefficients in postestimation commands such astestandlincom(see [R]testand [R]lincom) and in You can use thestatsbyprefix command (see [D]statsby)


Related search queries