Help using Base SAS procedures

Random Statement in Proc Glimmix

Contributor bts
Posts: 23

Random Statement in Proc Glimmix


I'm looking at injury outcomes in a group of employees, with particular interest in the role of gender. I have employees (n=20,000) in jobs (n=50) in locations(n=20) and am confused about the syntax (and related implications) of modeling this in Glimmix.

Here's what I have:

proc glimmix data=poisson noclprint method=laplace;

nloptions maxiter=500 technique=dbldog;

class id sex ethnicity tenure year job location;

model sum_all_inj=sex ethnicity tenure age job year/ link=log offset=log_persontime dist=poisson

ddfm=bw solution;

random intercept/ subject=id(job);


This code runs fine and there doesn't appear to be an issue with overdispersion.

However, I'm also interested in how individual jobs impact injury risk for men vs women. Would I add:

random intercept/subject=job as well as an interaction in the model statement for sex*job?  Adding this additional random statement crashes my computer, and honestly I'm not sure of how that differs from merely adding the interaction.

So to sum it up, I'm worried about clustering in jobs and locations and not sure how to tease out the effect of job on injury risk between sexes.

Thank you!

Ask a Question
Discussion stats
  • 0 replies
  • 1 in conversation