0
$\begingroup$

I want to know the meaning of differences of effect sizes in the glm and interaction in R. For example, when I did as below,

glm(formula = affected ~ snpA, family = binomial)

For this, the beta of snpA is 0.37 and the p-value of 1.12e-15. Then, I did as below.

glm(formula = affected ~ snpB, family = binomial)

For this, the beta of snpB is 0.44 and the p-value of 0.0042. Then, I did as below.

glm(formula = affected ~ snpA*snpB, family = binomial)

For this, the results in R showed as below. The beta of snpA is -8.36 and the p-value of 0.83. The beta of snpB is 0.43 and the p-value of 0.0074. The beta of snpA:snpB is 8.73 and the p-value of 0.83.

I wonder why are the beta and p-values different between ⓵ and ⓷ for snpA and between ⓶ and ⓷ for snpB?

I would greatly appreciate your help.

Thanks!

$\endgroup$
2
  • 1
    $\begingroup$ What was your expected outcome when you performed the three model calls? $\endgroup$ Jan 5, 2022 at 0:11
  • $\begingroup$ I expected that the beta and p-values of snpA and snpB in ③ are the same as the ones in ① and ②, respectively. I have difficulty interpreting the differences. $\endgroup$ Jan 5, 2022 at 0:17

1 Answer 1

2
$\begingroup$

It would deserve more than a simple answer... but if you think about it, it actually makes sense! Intuitively, in your first model you try to explain your outcome variable with only one independent variable, while in your third model you want to explain it with 3 variables. It cannot be the same, right?

The selection of your model (and inclusion of the relevant independent variable) must be supported by your knowledge of the subject area you are investigating. This is one of the main challenges.

Some relevant CV resources:

$\endgroup$

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.