Basic command and output

  • Regression analyses is one of the most important functionalities of Stata
  • Type help estimation commands for an overview of the large variety of available estimation commands. In addition, there are a large number of open source user written commands you can download
  • Here, we will focus on ordinary least squares regressions with the regress command
  • Refer to the graphs & tables chapter for how to save and export regression results.
  • Regression intuition

    * Simple regression
    webuse nhanes2, clear
    
    // model: bmi_i = b_0 + b_1 * age_i + eps_i
    regress bmi age
    
    // abbreviated command
    reg bmi age
    
    // visualisation (could also be dropped if graphs come afterwards)
    graph twoway (scatter bmi age) (lfit bmi age)
    
    // without constant
    reg bmi age, noconstant
    
    // set alpha level to 10% (default is 5%) --> changes which CIs are displayed
    reg bmi age, level(90)						
    			

    regress