There are two issues that need to be addressed in addition to the ERROR message. Your MODELEFFECTS statement should list the parameters on it and there should not be a STDERR statement when you use the PARMS= data set.
Secondly, you should use a BY statement for the _IMPUTATION_ and only list RaceEthnicity on the DOMAIN statement.
Regarding the ERROR message, because of the way that SURVEYREG codes CLASS variables it is necessary to remove all blanks from the variable Parameter before feeding it into MIANALYZE. You will then need to check the names of the effects in that data set (using a Proc PRINT) by placing them on the MODELEFFECTS statement . You will also need to sort the output data set since you will need to run MIANALYZE by the domain variable.
If your goal is to also combine your ESTIMATE statement, then you will need another call to MIANALYZE (with another Proc SORT).
Below is an example that shows all of the steps for combining both the Parameter Estimates and Estimate statements when you use a DOMAIN statement in SURVEYREG.
/*This assumes that the imputation has already been done*/
data farms;
do _imputation_=1 to 3;
do domainvar=1 to 3;
do state=1 to 2;
do region=1 to 3;
do rep=1 to 5;
farmarea=ceil(ranuni(323)*100);
cornyield=.66+.95*state+.65*farmarea+rannor(3214);
weight=ceil(ranuni(0)*10);
output;
end;
end;
end;
end;
end; run;
proc surveyreg data=Farms;
by _imputation_;
domain domainvar;
class region;
strata State ;
model CornYield = region FarmArea /solution;
weight Weight;
estimate 'Region 1 vs Region 2' region 1 -1;
estimate 'Region 1 vs Region 3' region 1 0 -1;
ods output parameterestimates=parms estimates=estimate_ds;;
run;
/*Because of the way that SURVEYREG codes CLASS variables it is necessary to
remove all blanks from the variable Parameter*/
data parms;
set parms;
parameter=compress(parameter);
run;
/*This shows how the Parameters are now labeled for the MODELEFFECTS statement*/
proc print data=parms(obs=5);
var parameter;
run;
proc sort data=parms;
by domainvar _imputation_;
run;
proc mianalyze parms=parms;
by domainvar;
modeleffects intercept region1 region2 farmarea;
run;
proc sort data=estimate_ds;
by label domain _imputation_;
run;
proc mianalyze data=estimate_ds;
by label domain;
modeleffects estimate;
stderr stderr;
run;
... View more