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

Hello everyone,

I am applying PROC GLIMMIX on a dataset with binary response. I am getting a NOTE in the log file which is:

NOTE: Some observations are not used in the analysis because of: missing subject effects (n=2), not a proportion (n=142).

In the output page I get either "Does not converge" or "Estimated G matrix is not positive definite." I'm thinking that I have these problems since more than half of observations are deleted as the LOG file says (total sample size is 214). I've been digging the whole internet, but no one talked about this NOTE! I was wondering if anyone can help me over here.

my cods are:

proc glimmix data = colaps ;

class id;

model knowledge1_23 = prepost / s dist = binomial link = logit;

random int / subject = id ;

run;

1 ACCEPTED SOLUTION

Accepted Solutions
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

The PROC is expecting 0 and 1 for the response variable (all the 2s are considered missing). In a data step, subtract 1 from all the values to get 0/1 variable. For the missing values, you must have a problem with two observations of ID.

View solution in original post

7 REPLIES 7
Rick_SAS
SAS Super FREQ

What do you see if you run the following procedures?


proc means data=colaps N NMISS;
var id;
run;

proc freq data = colaps;
tables knowledge1_23;
run;

Mehdi_R
Fluorite | Level 6

Hello Rick, Thanks.

These are the results:

n     nmiss

214   0

knowledge1_23  frequency

1                           72

2                           142

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

The PROC is expecting 0 and 1 for the response variable (all the 2s are considered missing). In a data step, subtract 1 from all the values to get 0/1 variable. For the missing values, you must have a problem with two observations of ID.

Mehdi_R
Fluorite | Level 6

Thanks to both of you.

That's correct! I had no idea that response should be 0s and 1s! Thanks.

Rick_SAS
SAS Super FREQ

Be aware that GLIMMIX supports a BINARY (=Bernoulli) distribution and a BINOMIAL distribution (for proportions),

You are using the binomial distribution, which requires 0/1.

If you meant to use a binary distribution, then '1' and '2' are perfectly OK, because any binary variable will work:

Mehdi_R
Fluorite | Level 6

I see! Thanks for your helpful comments.

Rick_SAS
SAS Super FREQ

Apparently one of the subjects (with 2 repeated measurements) has missing values for some variable, but I'm

confused because in my version of SAS the NOTE in the log also says "missing fixed effects (n=2)" for that case. That's why I didn't ask about PREPOST.  But maybe you have an earlier version of SAS in which the NOTE was different.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 7 replies
  • 3612 views
  • 3 likes
  • 3 in conversation