Rather than doing all the renaming and using the COMPRESS function, it will be easier to get them to match if you use the TRANWRD function instead. The reason why this is necessary is because SURVEYREG names the columns in the COVB matrix using _ where the spaces are in the Parameter.
Below is an example showing what I mean.
/*This assumes that the imputation has already been done*/ data farms; do _imputation_=1 to 2; 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; proc surveyreg data=Farms; by _imputation_; class region; strata State ; model CornYield = region FarmArea /solution covb; weight Weight; ods output parameterestimates=parms covb=covb; 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=tranwrd(strip(parameter),' ','_'); run;
data covb; set covb; parameter=tranwrd(strip(parameter),' ','_'); run;
proc mianalyze parms=parms covb=covb mult; modeleffects intercept region_1 region_2 farmarea; test region_1=region_2; run;
... View more