Programming the statistical procedures from SAS

Robust Sandwich Estimate from PROC Logistic

Reply
Occasional Contributor
Posts: 6

Robust Sandwich Estimate from PROC Logistic

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;

Respected Advisor
Posts: 2,655

Re: Robust Sandwich Estimate from PROC Logistic

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

Ask a Question
Discussion stats
  • 1 reply
  • 511 views
  • 0 likes
  • 2 in conversation