BookmarkSubscribeRSS Feed
Shad
Obsidian | Level 7

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, 

2 REPLIES 2
sbxkoenk
SAS Super FREQ

Hello,

I have moved your post to the "SAS Forecasting and Econometrics"-board.

 

I have not heard before about a multi-level 2SLS regression (using instrumental variables (IV)).

 

With PROC MODEL (available in SAS/ETS, just like PROC SYSLIN), you can do: 
Heteroscedastic Two-Stage Least Squares Regression.
https://support.sas.com/rnd/app/ets/examples/h2sls/index.htm

https://go.documentation.sas.com/doc/en/pgmsascdc/v_040/etsug/etsug_model_toc.htm

 

Not sure if that will bring you any further.

 

BR, Koen

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Discussion stats
  • 2 replies
  • 1559 views
  • 2 likes
  • 3 in conversation