0
$\begingroup$

while performing a logistic regression for two variables I also wanted to perform an interaction analysis. Particularly, I was looking to the use of a diagnostic test over time (before and after a certain period, a binary variable) and deepending on age (elderly >75 y.o. ore younger individuals, still a binary variable). However, the p-values given in the interaction analysis for the single components are different than the original given by the single analysis, so I would like to understand what are the actual p-values reported in the interaction analysis.

Here the codes and results:

summary(glm(DB$Test~ DB$Time,family = binomial(link="logit"))

p-Value 1.52e-06

summary(glm(DB$Test~ DB$Age, family = binomial(link="logit"))

p-Value 5.4e-09

summary(glm(DB$Test~ DB$Time* DB$Age,family = binomial(link="logit"))

p-Values:

Time= 7.67e-06

Age= 0.0491

Time:Age= 0.6922

So, where does this 0.049 come from? what is it testing?

Thanks in advance for the answers.

$\endgroup$
2
  • 1
    $\begingroup$ I find it surprising that you seem to believe that including additional terms in a regression model has no impact on the other terms. All the p-values are from a test with the null hypothesis that the parameter is zero. $\endgroup$
    – Roland
    Jul 26 at 6:07
  • 2
    $\begingroup$ The principle is that if you ask a different question, the answer is likely to change. $\endgroup$
    – Nick Cox
    Jul 26 at 8:33

1 Answer 1

2
$\begingroup$

When you modify your model by adding or removing predictors, whether main effects or interactions, the coefficient estimates, standard errors and (therefore) $p$ values of all the terms already in the model will change. (Except for very exceptional circumstances.) What you are seeing is thus not surprising.

The tests you are seeing (probably, since you don't specify what exactly you are asking about) perform two-sided tests against the null hypothesis that the relevant coefficient is zero - in the context of the current model. Thus, between different models that all include a given predictor, the context changes, so the test result also changes, see above.

$\endgroup$
2
  • $\begingroup$ Ummm yes, I understand thath the model is different, but I thought that the output of R was giving the single regression analysis (as done with the "simple" model) and then the interaction analysis, that's what I was questioning: instead they actually are the B parameter of the other model. $\endgroup$ Jul 26 at 12:10
  • 1
    $\begingroup$ R is giving the output of the two analyses. It's just that they are two different analyses, so the p values of predictors that are present in both analyses will differ, because the coefficient estimates are different. $\endgroup$ Jul 26 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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