Solved
Contributor
Posts: 40

# Not a proportion?? PROC GLIMMIX

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;

Accepted Solutions
Solution
‎08-21-2015 01:16 PM
Valued Guide
Posts: 684

## Re: Not a proportion?? PROC GLIMMIX

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.

All Replies
SAS Super FREQ
Posts: 3,839

## Re: Not a proportion?? PROC GLIMMIX

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;

Contributor
Posts: 40

## Re: Not a proportion?? PROC GLIMMIX

Hello Rick, Thanks.

These are the results:

n     nmiss

214   0

knowledge1_23  frequency

1                           72

2                           142

Solution
‎08-21-2015 01:16 PM
Valued Guide
Posts: 684

## Re: Not a proportion?? PROC GLIMMIX

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.

Contributor
Posts: 40

## Re: Not a proportion?? PROC GLIMMIX

Thanks to both of you.

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

SAS Super FREQ
Posts: 3,839

## Re: Not a proportion?? PROC GLIMMIX

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:

Contributor
Posts: 40

SAS Super FREQ
Posts: 3,839

## Re: Not a proportion?? PROC GLIMMIX

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.

🔒 This topic is solved and locked.