BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Education
Obsidian | Level 7

Hi, i am trying to analyze my data using the proc glimmix procedure but it is giving me problems for some of my response variable while some are fine. This makes me worry because i am now suspecting that the ones that worked well might be wrong at some point. In brief, i was running an experiment where i was testing the behaviour of animals, the animals were subjected to three different treatments for 4 months where they were looked after by one person. After a year old the behaviour of the animals was assesed if they approach human or not (1=approach, 0 = did not approach), the tests were done by a familiar person and unfamiliar which is one othe things im looking at. The commands below are the ones i am using to run my data:

 

PROC GLIMMIX DATA= BEHAVIOUR;

CLASS YEAR FAMILIARITY NUMBER GENOTYPE SEX TREATMENT;
MODEL APPROACH(EVENT='1')= YEAR FAMILIARITY SEX GENOTYPE TREATMENT TREATMENT*YEAR TREATMENT*GENOTYPE FAMILIARITY*TREATMENT GENOTYPE*SEX SEX*FAMILIARITY/SOLUTION DDFM=RES DIST=BINOMIAL LINK=LOGIT;
RANDOM NUMBER;
PARMS/NOITER;
RUN; QUIT;

 

however, i am not getting any results but the warning and error:

WARNING: Pseudo-likelihood update fails in outer iteration 14

NOTE: Fixed effects updates stopped at iteration 13.
ERROR: The GLIMMIX procedure failed to obtain post-processing information.

 

Anyone who can help me please i am stuck!

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

I'd say that you are using GLIMMIX rather than LOGISTIC because the model is mixed; LOGISTIC does not do mixed. GENMOD does do mixed, as a GEE using a working correlation matrix. The GENMOD documentation has details.

 

If the data file you  posted is an actual subset of your data, then at a minimum you have serious data problems. Animal_id = 5 and 123 is male in one observation, female in the other. Animal_id = 150 is both genotype 1 and 2. Most of the animals are assigned to more than one treatment group. Variable coding needs to be consistent in capitalization: use "group1" or "Group1" but not both; use "male" or "Male" but not both. If this data set is totally made up, then next time you'll want to make up a data set that is plausible; this one doesn't do us much good.

 

If an animal_id is associated with one level of gender, genotype, treatment and year (as it appears in your data excerpt) and both levels of familiarity, then a first model attempt might look like

proc glimmix data=behav method=laplace;
    class gender genotype treatment year familiarity animal_id;
    model approach = gender genotype treatment year familiarity / dist=binary;
    random intercept / subject=animal_id(gender genotype treatment year);
    lsmeans gender / ilink;
    run;

You could include interactions in the MODEL statement as needed and if you had sufficient observations.

View solution in original post

6 REPLIES 6
lakshmi_74
Quartz | Level 8
First thing,
Why you are using GLMMIX procedure as you have outcome varaible is binary. You can use either PROC LOGISTIC or PROC GENMOD.
Education
Obsidian | Level 7

I am using the Glimmix procedure because i want to report my results in F statistics with both degrees of freedom and its P-value. I am not sure if the GENMOD can do that but the Logistic procedure does not give F values if i recall but the chi square probability of the fixed effects. And since i am using the dist=Binomial and link = logit, i belive it is appropriate to apply the Glimmix procedure isn't it?

 

Thank you Iakshmi_74 for you suggestion.

Education
Obsidian | Level 7

Hi lakshmi_74

 

This is how my data set looks like. however it is not complete. I hope you can be able to help me from what i uploaded. I am using Animal_ID as my random variable and all others as fixed effects.

 

Thank you so much for your assistance.

sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

I'd say that you are using GLIMMIX rather than LOGISTIC because the model is mixed; LOGISTIC does not do mixed. GENMOD does do mixed, as a GEE using a working correlation matrix. The GENMOD documentation has details.

 

If the data file you  posted is an actual subset of your data, then at a minimum you have serious data problems. Animal_id = 5 and 123 is male in one observation, female in the other. Animal_id = 150 is both genotype 1 and 2. Most of the animals are assigned to more than one treatment group. Variable coding needs to be consistent in capitalization: use "group1" or "Group1" but not both; use "male" or "Male" but not both. If this data set is totally made up, then next time you'll want to make up a data set that is plausible; this one doesn't do us much good.

 

If an animal_id is associated with one level of gender, genotype, treatment and year (as it appears in your data excerpt) and both levels of familiarity, then a first model attempt might look like

proc glimmix data=behav method=laplace;
    class gender genotype treatment year familiarity animal_id;
    model approach = gender genotype treatment year familiarity / dist=binary;
    random intercept / subject=animal_id(gender genotype treatment year);
    lsmeans gender / ilink;
    run;

You could include interactions in the MODEL statement as needed and if you had sufficient observations.

Education
Obsidian | Level 7

Thank you so much! I appreaciate it. Its all fine now, i see i was missing the fact that the animal_id is associated to one level of all the fixed effect in the random statement.  Thank you so much. 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 6 replies
  • 3026 views
  • 2 likes
  • 3 in conversation