BookmarkSubscribeRSS Feed
jdserbon
Calcite | Level 5

I have the following pseduo-code in which I need to calculate robust sandwich standard error estimates.  I do not believe you can perform this using PROC LOGISTIC, correct?  If not, which PROC would you recommend?  Which options to specify to substitute for the strata statement?  Thanks!

proc logistic data = data;

  class x5 /param = ref ref = first;

  model y (event = '1')=  x1 x2 x3 x4 x5 x6;

  strata x7;

  where (x9 = 1 or x10 = 1) & x5 ne '' & x7 ne '' & y_denom = 1 &

  x8 in ('name1','name2','name3','name4','name5');

  by x8;

run;

1 REPLY 1
SteveDenham
Jade | Level 19

Try this:

proc glimmix data=data empirical=classical; /* For a classical sandwich estimation */

class x5(param=ref ref=first) x7;

model y(event='1')=x1 x2 x3 x4 x5 x6/dist=binomial solution;

random intercept/subject=x7; /* To mimic the strata */

where (x9 = 1 or x10 = 1) & x5 ne '' & x7 ne '' & y_denom = 1 & 

  x8 in ('name1','name2','name3','name4','name5');

  by x8;

run;

The code is untested, so there will probably be some bugs along the way, but GLIMMIX is the only way I can think of to get sandwich estimators for generalized linear models.

Steve Denham

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 1 reply
  • 2939 views
  • 0 likes
  • 2 in conversation