Differences between revisions 3 and 4
Revision 3 as of 2023-06-07 21:02:39
Size: 1369
Comment:
Revision 4 as of 2023-06-07 21:02:46
Size: 1369
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
the '''`regress`''' command runs a regression model. The '''`regress`''' command runs a regression model.

Stata Regress

The regress command runs a regression model.


Usage

regress dependent independent

Factor Variables

To regress on the levels of a variable rather than its numeric value, prefix the variable name with i..

To regress on an interaction of variables, delimit the two variable names with #. Or use ## to indicate a full factorial (both variables and the interactions).

To create an interaction with a continuous variable, prefix them with c..


Estimates

To store the estimation results, try:

estimates store example

To display the estimation results, try:

estimates table example
estimates table example, b(%10.3f) star

The star option shows significance.

While coefficients are always displayed by estimates table, they can optionally be formatted with the b(%format) option (as above). There are several optional statistics available as well:

  • se or se(%format) for standard errors

  • t or t(%format) for t- or z-statistics

  • p or p(%format) for p-values

See also

Stata manual for logistic post-estimation


CategoryRicottone

Stata/Regress (last edited 2025-04-04 01:00:05 by DominicRicottone)