Hi all,
I want to use proc robust in my analysis for treatment effect; however, i can not find out how to output standard errors into table. Specially when proc robustreg used during multiple imputation process. Can anyone help?
Thank you
Example:
proc robustreg data=sashelp.class;
ods output parameterestimates = paramestimates;
model weight=height;
run;
The example below shows the syntax necessary to combine results from ROBUSTREG in MIANALYZE.
/*Assume the imputation is already done*/
data a (drop=i);
do _imputation_=1 to 25;
do i=1 to 1000;
do trt=1 to 3;
x1=rannor(1234);
x2=rannor(1234);
e=rannor(1234);
if i > 900 then y=100 + e;
else y=10 + 5*x1 + 3*x2 + .5 * e;
output;
end;
end;
end;
run;
proc robustreg data=a method=m(wf=huber);
by _imputation_;
class trt;
model y = x1 x2 trt;
ods output parameterestimates=parms;
run;
proc mianalyze parms(classvar=level)=parms;
class trt;
modeleffects intercept x1 x2 trt;
run;
Thanks for this. This helps, however, this is first time i use robustreg. The code provide only estimate for one of treatment arm; is were a way to get those for both treatment arms and then a comparison like you would get using proc mixed?
It would be helpful if you could post your ROBUSTREG code.
Pro sort data=imp_24;by _imputation_;run;
proc robustreg data=imp_24 method=m (wf=huber);
by _imputation_;
class trt;
model ratio=base trt;
ods output parameterstimates=parms;
run;
proc mianalyze [arms (classvar=level)=parms;
class trt;
modeleffects intercept base trt;
ods output parameterstomates=mi;
run;
Ratio and base are continuous variables and trt has 2 levels: 1,2.
it provides only information for one treatment arm. Can we get from proc robustreg similar results as we get from proc mixed: LSmeans for each treatment arm and then a comparison.
ROBUSTREG does not supply LSMeans.
Since it is using GLM coding and you only have one CLASS variable and a single covariate, the estimate for the intercept is the adjusted mean value for the second treatment arm.
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.