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

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

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