[R] 2SLS with Fixed Effects and Control Variables

2024-01-29 Thread Kelis Wong
Dear John Fox, Christian Kleiber, and Achim Zeileis, I am attempting to run various independent variable parameters to assess their suitability. Unfortunately, I hit a snag and couldn't get the tests to run properly. When I used ivreg, I got an error message saying: "Error in eval(predvars, data,

Re: [R] 2SLS with Fixed Effects and Control Variables

2024-01-28 Thread Achim Zeileis
Kelis, thanks for your interest. It's hard to say what exactly goes wrong based on the information you provide. However, I would recommend that you first process the data: - Store all variables as the appropriate types (numeric, factor, etc.) in the data frame. Then you don't have to put the