I am trying to run a Partially Linear Instrumental Variable model with the ddml package, and I have a question regarding using the ivreg command. The code I am running looks like this:
set seed 66666
ddml init iv, kfolds(5)
ddml E[Y|X]: pystacked $Y $Xbase, method(gradboost)
ddml E[D|X]: pystacked $D1 $Xbase, method(gradboost)
ddml E[Z|X]: pystacked $Z1 $Xbase, method(gradboost)
ddml E[Z|X]: pystacked $Z2 $Xbase, methods(gradboost)
ddml crossfit
ddml estimate, robust
estimate store u1
ivreg Y1_pystacked_1 $market_controls2_within dt2 dt3 (D1_pystacked_1 = Z1_pystacked_1 Z2_pystacked_1), robust
estimate store n1
As you can see, for the ivreg command, I inputed the exogenous control variables $market_controls2_within, dt2 and dt3 into the ivreg command. However, I am unsure whether this is the correct thing to do in the context of ddml. This is because, after I executed the command, only the coefficient of the focal variable D1_pystacked_1 is displayed in the output. There are no coefficients presented for the exogenous control variables. I am wondering how to get the coefficients of the exogenous control variables. Is it even correct to input the exogenous variables into the ivreg command in the context of ddml?
set seed 66666
ddml init iv, kfolds(5)
ddml E[Y|X]: pystacked $Y $Xbase, method(gradboost)
ddml E[D|X]: pystacked $D1 $Xbase, method(gradboost)
ddml E[Z|X]: pystacked $Z1 $Xbase, method(gradboost)
ddml E[Z|X]: pystacked $Z2 $Xbase, methods(gradboost)
ddml crossfit
ddml estimate, robust
estimate store u1
ivreg Y1_pystacked_1 $market_controls2_within dt2 dt3 (D1_pystacked_1 = Z1_pystacked_1 Z2_pystacked_1), robust
estimate store n1
As you can see, for the ivreg command, I inputed the exogenous control variables $market_controls2_within, dt2 and dt3 into the ivreg command. However, I am unsure whether this is the correct thing to do in the context of ddml. This is because, after I executed the command, only the coefficient of the focal variable D1_pystacked_1 is displayed in the output. There are no coefficients presented for the exogenous control variables. I am wondering how to get the coefficients of the exogenous control variables. Is it even correct to input the exogenous variables into the ivreg command in the context of ddml?