Hello,
I'm interested in performing a two-stage least-squares regression using an instrumental variable to compute estimated values of the predictor (in the first stage), and then uses those computed values to estimate a linear regression model of the dependent variable (the second stage). From what I've gathered this can be achieved using PROC SYSLIN. However, I'm working with multilevel data and would like to cluster patients within hospitals, I have not seen any documentation regarding clustering/multilevel/hierarchical data in proc syslin, perhaps I've missed it or is there another procedure that better supports the type of analysis?
/* 2SLS estimation */
proc syslin data = analytic_iv 2sls;
endogenous continuous_opioid_sum;
instruments move_avg_1year;
model log_Infla_Est_Cost = continuous_opioid_sum;
run;
Best regards,