Is there a SAS equivalent to Stata's areg command? Specifically, I'm looking for a procedure that will replicate the following Stata command:
areg depvar indvar, absorb(id1) cluster(id2)
In this case id1 is nested within id2.
I am not real sure, but would some sort of hierarchical model, such as GLIMMIX work for what you want?
proc glimmix data=have;
class id1 id2;
model depvar=indvar;
random intercept/subject=id1;
random _residual_/subject=id2(id1) type=vc;
run;
Steve Denham
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.