2SLS Regression in R with binary endogenous variables

61 Views Asked by At

I am trying to conduct a 2SLS regression in R with two endogenous variables, both of which are binary. In the example below, Y is my outcome variable, X1 and X2 are my binary endogenous variables, and Z1 and Z2 are my instruments.

Regression: Y = B1X1 + B2X2 + B3Z1 + B4Z2

Would it be okay to simply use ivreg?

This is what I have tried so far. I use mtcars as a hypothetical example here:

# Packages
library(tidyverse)
library(ivreg)

# 2SLS Function
data<-mtcars
reg<-ivreg(mpg~vs+am|gear+carb,data=mtcars)

I have read that within economic literature, using a nonlinear model such as probit in the first stage while fitting it to a second stage regression is "forbidden." However, I am not certain of the best methodology to use here. Any help would be greatly appreciated. Thanks!

0

There are 0 best solutions below