I am building a generalized linear mixed model in SAS. Unfortunately, this is the first time I’m working with GLMMs and I am not very familiar with SAS. I have been using proc GLIMMIX. I have data from 4 sites, each specified with a 4 letter code in the variable site. Each site was sampled 11 times. A crossover design was used for treatment, so 2 sites were treated for the first 5 weeks of the study, and the other 2 sites were treated for the last 6 weeks of the study. I’ve incorporated this into the model with a variable called order with a value 1 for treatment 1st and 2 for treatment 2nd, and a variable called treatment that reads yes when treatment was present and no when treatment was absent. My response variable should be normally distributed. My current code is:
proc glimmix data=data; class Treatment Site Order; model Response = Treatment Order Site; random Site; random Order; run;
Is this too simplistic? My goal is to figure out what effect treatment, order, and site had on the response variable and to determine which variables are necessary in the model. I know I will have to run the model multiple times with different combinations of variables and compare AIC values to determine which variables are necessary (unless there is a way to do this in SAS?). Do I need to change any of the other default parameters? Do I need to make Site and/or Order a random_residual variable instead? Thank you! Any advice is appreciated.