In STATA one can estimate a linear regression using the command ` regress`

. In this post I will present how to use the STATA function `regress`

to run OLS on the following model

In this example, our dependent variable will be my weekly average weight, the explanatory variable represents the sum of calories that I burned during the previous week. For a more detailed description of the data see here.

*start with empty workspace
clear all
*import sample data
import excel using "https://economictheoryblog.files.wordpress.com/2016/08/data.xlsx",first
*estimate linear regression model
regress weight lag_calories

The function `regress`

returns point estimates for and . Moreover, the function returns standard error for the point estimates, along with its t-statistic, the p-value and 95% confidence intervals. The function also allows to conduct multiple regressions. That is, the function allows additional explanatory variables that can simply be added to the function as additional arguments.

### Like this:

Like Loading...