MartinSpindler / hdm

Other
11 stars 8 forks source link

Question concerning hdm II #16

Open MartinSpindler opened 7 months ago

MartinSpindler commented 7 months ago

Thank you for the email. It was great seeing and chatting with you in Ottawa.

I’m attaching RMD and HTML files that illustrate the problem. As I mentioned, rlassoIV() returns an error when there are multiple endogenous regressors and we use select.X=TRUE to select controls. The error message is "Error in X[, index, drop = FALSE] : subscript out of bounds”.

Maybe we are supposed to use rlassoIVmult() when there are multiple endogenous regressors, but rlassoIV() actually does work with multiple endogenous regressors if we don’t select controls and set select.X=FALSE, so this is a bit confusing.

Also, when using summary() on the object generated by rlassoIVmult(), in addition to the estimates of the coefficients on the endogenous variables it returns another estimated coefficient labeled as “NA”. It’s not clear what it is.

Maybe I’m missing something here, but I could not figure it out from the help files, so I thought I would use the opportunity to ask you.