BookmarkSubscribeRSS Feed
VioletaB
Calcite | Level 5

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

6 REPLIES 6
PaigeMiller
Diamond | Level 26

Example:

 

proc robustreg data=sashelp.class;
    ods output parameterestimates = paramestimates;
    model weight=height;
run;
--
Paige Miller
SAS_Rob
SAS Employee

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;

 

 
VioletaB
Calcite | Level 5

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?

SAS_Rob
SAS Employee

It would be helpful if you could post your ROBUSTREG code.  

VioletaB
Calcite | Level 5

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.

 

SAS_Rob
SAS Employee

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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

What is ANOVA?

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.

Discussion stats
  • 6 replies
  • 494 views
  • 4 likes
  • 3 in conversation