New regression functionality: Instrument variables

It will now be possible to use instrument variables in connection with regression analyzes. For such purposes, the new command ivregress is used.

The syntax and input follow the same logic as for the regular regression command: The dependent variable is used as the first input, followed by the independent ones. But unlike regress, it is possible to construct instrument variables using parentheses. If there is a suspicion of correlation between independent variables, one can set up an expression that specifies which variables this applies to.

Example where wealth is suspected to be correlated with age and place of residence (= Oslo):

ivregress salary man (wealth = age oslo)

The result of the execution is a standard regression output where the instrument variabel and instruments are listed under the table. In practice, all independent variables are treated as instruments, except for the variable which is defined as an instrument variable.

We also plan to implement various diagnostics related to instrument variable modeling in the future. This includes standard test estimators for endogeneity, correlation and overidentification. Until then, it is possible to test the modeling in the following ways:

  • Run regression with and without instrumentation, and compare the results: regress vs. ivregress
  • Use the command correlate to check for correlation between selected variables
  • Study residuals etc. using the new command ivregress-predict (click here)

For more details, we recommend using the help command: help ivregress

Click here for examples of using instrument variables in analyzes

We work continuously to improve microdata.no so that most analysis needs can be met. Thus, more and more analysis options will be introduced. We are based on input from researchers, and have compiled a list of new tools that we work through. Do you have specific suggestions for new functionality? Feel free to contact us by email: support@microdata.no