Hello!
I try to use MixedModels and GLM for binary data outcome analysis. So I have model:
@formula(resp ~ pred1 + pred2)
where pred1
and pred2
are continuous predictors. I fit model with Bernoulli()
distribution and LogitLink()
link function. After that I have coef
vector with 3 coefficients.
So, I want to get difference: pred1 - pred2
and interpret this like exp(OR*)
. For that I make contrast vector l = [0, 1, -1]
, than get difference diff = l'*coef(glm_model)
and SD: diff_sd = sqrt(dot(l, vcov(glm_model), l))
.
Does that calculations meaningful?
*OR = p1 * (1 - p2)/ p2 / (1 - p2)