8
$\begingroup$

I was reading the helpfile for the dropterm function in the R MASS package, which is one of the main building blocks of the stepAIC function (at least for backwards stepwise regression.) The aim of this function is to identify a variable to remove from a model by sequentially considering models that drop one variable.

In the helpfile, it states:

Try fitting all models that differ from the current model by dropping a single term, maintaining marginality.

What does maintaining marginality mean in this context? Is it a special treatment of interactions specified in the model formula, e.g. by dropping interactions first before dropping the interacting variables?

Related:

How does step function selects best linear Models which includes polynomial effects and interaction effects in R?

$\endgroup$
1

1 Answer 1

9
$\begingroup$

It means that, if you have an interaction, all the lower terms in that interaction are also included in the model. If your model includes "foo:bar", then your model will also include "foo" and "bar" as independent effects.

As mentioned below in comments, this means that any interaction would be dropped before any of its components is dropped.

$\endgroup$
3
  • $\begingroup$ Does this mean foo:bar is dropped first before considering foo and bar to be dropped? $\endgroup$
    – Alex
    Commented Apr 26, 2023 at 20:37
  • $\begingroup$ Yes. Yes. Yes. Y $\endgroup$
    – Bryan
    Commented Apr 27, 2023 at 16:22
  • $\begingroup$ I will accept your answer if a combination of my comment and your comment is incorporated into it. $\endgroup$
    – Alex
    Commented May 1, 2023 at 3:46

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.