BookmarkSubscribeRSS Feed
nstdt
Quartz | Level 8

I am fitting a logistic regession with one predictor variable X and one outcome Y. Both X and Y are binary variables with values 0 and 1.

I used the logit link function. here is the code:


proc genmod data=new;

class x(ref=first);

model y = x/link =logit;

run;

The model output under "Parameter Information" says there are three parameters being estimated: Intercet, x (level 1), and x (level 0).

However, I find that the zero level of x has no Pr>Chisq pvalue or Wald Chi square associated with it in the Analysis of Max Likelihood parameter estimates table --- these are denoted missing (.). Further, all the other values in table-such as DF, Estimate,Standard Error are all 0.0000.

I don't know how to interpret these results.

Is this just because the value of x=0 and therefore this level is being ignored? The output says the algorithm converged and a scale parameter was estimated by maximum likelihood.The log does give a warning that "a link function appropriate for binomial data was selected but the binomila distribution was not used".

I would appreciate any help understanding these results.

Thanks very much.

2 REPLIES 2
Funda_SAS
SAS Employee

It is because PROC GENMOD uses the EFFECT coding with the reference cell as you specified the first level of variable x, which is your  level 0. So, it is expected to get zero estimates for the level 0. The estimate you get for level 1 is the difference in the effect of level 1 and level 0 (level1 -level0).

Here is a link that describes different codings for the classification variables: SAS/STAT(R) 9.2 User's Guide, Second Edition

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

This may another way of saying the same thing. I presume X is coded with 0 and 1. If so, you could take out the CLASS statement (no longer needed), and you will get two parameters, intercept and the slope for x. The CLASS statement works for any number of levels, and they don't need to be 0, 1, etc. With the effect default parameterization, there is a parameter for every level of the class factor. But this is overparameterized, so in the optimization, GENMOD forces one of the parameters of the x factor to be 0. The statistics are all fine. Note: if you did not use the ref=first option, the level with the 0 parameter would be reversed.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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