Hello,
If you only want robust standard errors, you can indeed specify the cluster variable to be the identifier variable.
Like here:
proc surveyreg data=yourdata;
cluster id;
model y = x1 x2 x3 / covb;
run; QUIT;
And, of course, you can specify a WEIGHT statement (if the weights are sampling weights).
If you do not specify a WEIGHT statement or a REPWEIGHTS statement, PROC SURVEYREG assigns all observations a weight of one.
But are you sure you want PROC SURVEYREG??
Keep in mind that your outcome variable is binary (0,1).
PROC SURVEYLOGISTIC seems more appropriate then anyway.
Koen
Hello,
If you only want robust standard errors, you can indeed specify the cluster variable to be the identifier variable.
Like here:
proc surveyreg data=yourdata;
cluster id;
model y = x1 x2 x3 / covb;
run; QUIT;
And, of course, you can specify a WEIGHT statement (if the weights are sampling weights).
If you do not specify a WEIGHT statement or a REPWEIGHTS statement, PROC SURVEYREG assigns all observations a weight of one.
But are you sure you want PROC SURVEYREG??
Keep in mind that your outcome variable is binary (0,1).
PROC SURVEYLOGISTIC seems more appropriate then anyway.
Koen
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.