I am supposed to fit a logistic regression model and the find the log- linear model which correspond to it, fit that model and show the correspondence between parameters. But it is not working, I am not getting things right:

I have a 2x2x2x2 contingency table. I should handle the data as if it was a product of 8 binomial distributed RVs:

enter image description here

let X = 0 if (<30), X = 1 if (+30). Y = 0 if (<5) , Y = 1 if (+5) , Z = 0 if (<260),Z=0 if (+260). V= 0 (alive) , V=1 (dead).

The logistic regression model is(model the probability of V=0, with three explanatory variables):

$log\dfrac{P(V=0\mid X=x,Y=y, Z=z)}{P(V=1\mid X=x,Y=y, Z=z)} = \alpha + \beta^X x + \beta^Y y + \beta^Z z $

The ML estimates (by SAS-software) are;

$ \hat{\alpha} = 1.8139 , \hat{\beta}^X = -0.4675, \hat{\beta}^Y = -0.4228, \hat{\beta}^Z = 3.3094$.

Okey, the corresponding log linear model is $(VX, VY, VZ)$:

$log\dfrac{P(V=0\mid X=x,Y=y, Z=z)}{P(V=1\mid X=x,Y=y, Z=z)} = log [\dfrac{\mu_{x,y,z,0}}{\mu_{x,y,z,1}}] = log(\mu_{x,y,z,0}) - log(\mu_{x,y,z,1})= (\lambda + \lambda^X_x + \lambda^Y_y + \lambda^Z_z +\lambda^V_0 + \lambda^{XV}_{x0} +\lambda^{YV}_{y0} +\lambda^{ZV}_{z0} ) - (\lambda + \lambda^X_x + \lambda^Y_y + \lambda^Z_z +\lambda^V_1 + \lambda^{XV}_{x1} +\lambda^{YV}_{y1} +\lambda^{ZV}_{z1} ) = (\lambda^V_0 -\lambda^V_1) + (\lambda^{XV}_{x0} - \lambda^{XV}_{x1})+ (\lambda^{YV}_{y0} - \lambda^{YV}_{y1}) + (\lambda^{ZV}_{z0} - \lambda^{ZV}_{z1})$

In the last equality we first have the constant term ($\lambda^V_0 -\lambda^V_1$) that should correspond to $\alpha$ in the logistic model , and then we have the term that depends on only on $X$ and so on. Now after fitting this model and then comparing parameters with the logistic regression model nothing seems right.

So my question is: am I doing all things right here (as above) ? I just want to confirm with you so that i know I am doing something wrong with the "fitting process" instead of doing something wrong in the theoretical part.


1 Answer 1


You need to fix the marginal totals corresponding to the rows in your table so you also need a term XYZ in you model.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.