5.5 IV-regression - linear regression analysis with instrument variables
If you suspect dependence between independent variables in a linear regression model, the ivregress
command can be used to set up an expression that defines which variables this applies to.
Syntax:
ivregress <variable> <variable list> (<variable list> = <variable list>) [if <condition>] [, <options>]
The dependent variable must be entered first, followed by the explanatory variables and the instrument expression which is indicated in parentheses. Options can be used for various purposes, such as robust or cluster estimation, cf. the sections below. Like other statistical commands, regression commands can be combined with an if condition to run regressions on selected groups. For a full list of possibilities, use the help ivregress
command.
Example where one suspects that wealth is related to age and place of residence (= Oslo):
ivregress wage man (highwealth = age oslo)
The result of the run is a standard regression result where the instrument variable and instruments are listed below the table. In practice, all independent variables are treated as instruments, except for the variable which is defined as an instrument variable.
Example where highwealth (formuehøy) is instrument variable and age (alder) is instrument (man is also included as an instrument even if the variable is not specified in the parentheses expression):
Factor variables, and cluster and robust estimation can also be used. The procedure is the same as for ordinary linear regression. See respectively chapter 5.4.1 and 5.4.3 for more information on this.
Practical example of linear regression analysis with instrument variables