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
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.