Calcite | Level 5

## deviance value for Proc Genmod

I am running two different genmod models: One is for a binomial distribution and the other is for a normal distribution. My SAS code is very similiar for the two models. However, the output for the binomial distribution does not give me all of the goodness of fit information that I need. Specifically, the binomial distribution output does not give me the criterian of deviance, scaled deviance, pearson chi-square, and scaled pearson X2. Yet, the output for the normal distribution does give me values for these 4 criteria. ??? I need to find out how to get the criterian listed in the output for the binomial model.

You will see that the SAS code for the two different model runs is very similiar.

Here is my SAS code for the binomial distribution:

proc genmod data=analysis desc;
model success = / dist = bin link = logit type3;
run;

Here is my SAS code for the normal distribution:

proc genmod data=analysis desc;
model cpue = / dist = normal link = identity type3;
run;

Any help on how to get SAS to report the 4 criteria for the binomial distribution would be greatly appreciated.
2 REPLIES 2
Rhodochrosite | Level 12

## Re: deviance value for Proc Genmod

Presumably success in your example is a 0/1 variable (not a count out of n). The binomial is really the Bernoulli in this case. As can be shown (see book by Collett on binary data), the deviance (and many related statistics) "can tell us nothing about the agreement between the observations and their corresponding fitted probabilities" for binary data (page 65 in Modelling Binary Data by Collett, 1st edition [1991]). This is because the deviance in this special case depends only on the fitted values and not the observations. Presumably, this is why GENMOD does not display the deviance and related statistics.

Now, if your binomial data was number of successes (s) out of n individuals per sampling unit (n), you could use:
model s/n = / dist=bin link=logit type3;
and you would get the deviance (etc.).
SAS Super FREQ

## deviance value for Proc Genmod

In cases where you have predictors in the model, specify the AGGREGATE= option to obtain these statistics.  See this usage note:

Discussion stats
• 2 replies
• 3856 views
• 0 likes
• 3 in conversation