Solved – Finding Degree of Freedom from 2 Logit Models

logitself-study

Hi I have a question on finding DF in logit models. Say I have a table (all fictional numbers)

8 cities smoking vs heart disease

and say I am testing goodness of fit (deviance) between the fitted model and saturated model.

1) main effect model : $$Logit[\pi (x,y))] = \alpha + \beta_{x}^{smoking} + \beta_{y}^{city}$$

2) Saturated model: $$ Logit[\pi (x,y))] = \alpha + \beta_{x}^{smoking} + \beta_{y}^{city} + \beta_{xy}^{smoking,city}$$

How do I calculate the DF from these 2 models? (the answer is 7 from stats software, but I don't understand how to get the answer manually). DF=degree of freedom = difference in number of parameters from the 2 models.

thanks

Best Answer

I guess that with DF you mean the number of degrees of freedom of the test comparing either model with a null model containing only the constant.

In the first model you add 7 indicator variables for city (the 8th is the reference category and is thus left out) and 1 for smoking, so in total 8 degrees of freedom

In the second model you have 7 main effects of city and 1 main effect of smoking and 7 interaction effects, so in total 15 degrees of freedom.

Related Question