regression with proc surveyreg using clustered standard errors and fixed effects

#1
How can I implement clustered standard errors and fixed effects for proc surveyreg? E.g., I want to have fixed effects for three variables: fe1, fe2, fe3 (note: I don't want to create dummy variables for each observation) and also have standard errors clustered by cse1 and cse2, is the following code correct?

proc surveyreg data=my_data;
class fe1 fe2 fe3;
cluster cse1 cse2;
model dependent_var = independent_var fe1 fe2 fe3 /solution ADJRSQ;
run;

Does the 'class' option provide the fixed effects? And do I need to include the fixed effect variables, fe1, fe2, and fe3, in the model specification? Because when I tested this, leaving the fixed effect variables out of the model specification changes the coefficient estimates.
 

hlsmith

Not a robit
#2
So fe has three levels, so you just turned it into 3 binary variables?


Not familiar with this, but I would imagine that if you have categorical variables, they should go in the class and model statements. Also, these covariates will always probably be fixed unless a random or other type of statement is used.


I have not used the cluster statement before. What is it supposed to do and why do you want clustered standard errors, plus have two cluster terms? Is this 3 level multilevel modeling?