Programming the statistical procedures from SAS

Proc Genmod based logistic regression--parameter estimates

Reply
Contributor
Posts: 31

Proc Genmod based logistic regression--parameter estimates

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.

SAS Employee
Posts: 29

Re: Proc Genmod based logistic regression--parameter estimates

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

Valued Guide
Valued Guide
Posts: 673

Re: Proc Genmod based logistic regression--parameter estimates

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.

Ask a Question
Discussion stats
  • 2 replies
  • 357 views
  • 0 likes
  • 3 in conversation