05-01-2018 08:03 PM
I was trying on GLIMMIX SAS procedure. I have five independent variables in my data,i.e source, cpg, ICC, BMI and IDD.
Among those variable source and cpq are repeated measured variables in which variable source have two categories(source1 and
source2). Each level of source contains three categories of cpq(cpq1,cpq2 and cpq3). This means cpq variable is nested into source and source nested to each individuals. My response variable is binary(Resp). How can i account correlation for the two variable source and cpq. Here note that: these two repeated variables are also my interest that i need to see their effect on the response variable.
I tried the sas code below. Could you comment by correcting it so that the model can account the correlation and correctly
estimate effects of variable on the response.
proc glimmix data=Thesis.data;
class source cpg IDD ;
model Resp= source cpg ICC BMI IDD / dist=bin solution;
random intercept /subject=source type=cs;
random intercept /subject=cpg type=cs;
05-02-2018 09:56 PM
When you are working with mixed models, it is important to clearly distinguish between experimental treatments (fixed effects factors) and experimental units (random effects factors).
In GLIMMIX, factors in the MODEL statement are fixed effects factors: they determine the mean of the response. Subjects in the RANDOM statements identify random effects factors that determine the variance of the response; we may use fixed effects factor names to identify levels of a random effects, which will be confusing until you fully understand how the GLIMMIX syntax works.
In your code, you are using SOURCE and CPG as both fixed and random effects factors, which is incorrect and suggests that your understanding of how to implement a mixed model is GLIMMIX is not yet sufficient. You'll find these references useful to study:
Generalized Linear Mixed Models: Modern Concepts, Methods and Applications (especially Ch 2, 7, and 8)
05-03-2018 05:30 PM
05-03-2018 05:43 PM
I am not yet able to provide any advice about your model specification because your description does not clearly identify your experimental design. The resources that I suggested in my previous message will help you determine (1) your fixed effects factors, (2) your random effects factors, and (3) how levels of your fixed effects factors are (ideally) randomly assigned to levels of the appropriate random effects factors. Once these design elements are clear, we may be able to suggest appropriate model specifications.
05-03-2018 06:12 PM
05-03-2018 06:49 PM
Given that your dataset name is "Thesis.data", you will have written, or soon will be writing, a Methods section that describes your experiment. If you are willing to share, that would be useful and would contain the information we need.
This is what I am guessing about your experimental design:
Apparently you have subjects. Subjects is a random effects factor. Each subject has a single value of ICC, BMI, and IDD, which are fixed effects factors.
Each subject is "subdivided" into two sub-units; sub-units are nested within subject. Sub-units is a random effects factor. One sub-unit is assigned to one level of SOURCE. SOURCE is a fixed effects factor.
Each sub-unit is "subdivided" into three sub-sub-units; sub-sub-units are nested with sub-unit. Sub-sub-units is a random effects factor. One sub-sub-unit is assigned to one level of CPG. CPG is a fixed effects factor.
CPG is nested within SOURCE only if the three levels of CPG for SOURCE=1 are different than the three levels of CPG for SOURCE=2. If you have only 3 levels of CPG and these 3 levels are used with both SOURCE =1 and =2, then CPG is crossed with SOURCE. If these concepts of "nested" and "crossed" are unfamiliar to you, then you need to study the resources I suggested. Another good resource is Analysis of Messy Data Volume 1: Designed Experiments, Second Edition. Once you've done that, feel free to post code if you would still like feedback.