📅  最后修改于: 2023-12-03 14:41:01.543000             🧑  作者: Mango
Stata is a powerful statistical software program frequently used in economic research. One of its most useful features is the ability to produce high-quality tables and regression output. Two popular commands used to accomplish this are 'est' and 'esttab'.
The 'est' command is used to estimate models in Stata. It can be used to fit a range of different models, including linear regression, logistic regression, and time series models. To use 'est', simply type the command followed by the model you wish to estimate.
For example, to estimate a linear regression model with two independent variables (x1 and x2) and a dependent variable (y), the command would look like this:
est clear
eststo: reg y x1 x2
The 'est clear' command clears any previously stored estimates, while 'eststo' stores the results of the regression in memory so that they can be easily accessed later.
Once you have estimated one or more models using 'est', you can use the 'esttab' command to create a table summarizing the results. This table can be exported to a variety of formats, including LaTeX, HTML, and Excel.
To use 'esttab', first make sure that the models you wish to include in the table have been estimated and stored using 'eststo'. Then, simply type 'esttab' followed by the names of the stored models.
For example, to create an HTML table summarizing the results of the linear regression model estimated above, the command would look like this:
esttab using mytable.html, html
This would create an HTML table saved in the file 'mytable.html'.
In summary, 'est' and 'esttab' are powerful tools for estimating models and creating high-quality output in Stata. By mastering these commands, users can produce professional-level regression tables and other output with ease.