How to remove an interaction term from a regression?
Show older comments
Hello everyone,
Following my question here, I am looking for a way to drop an interaction term that is the interaction of one category of a categorical variable (say sex_Male) and another category of another categorical variable (say, frame_demand).
Is it possible to remove this specific interaction (sex_Male:frame_demand) and not the whole interaction between two categorical variables (sex:frame) or not the the categories (sex_Male or frame_demand)?
Thanks!
Mostafa
Answers (1)
Mostafa
on 14 Apr 2022
Moved: Walter Roberson
42 minutes ago
1 vote
1 Comment
dpb
about 4 hours ago
Moved: Walter Roberson
1 minute ago
@Mostafa -- good idea to post the solution; I'd just comment it would be of more general help to others if were to include sample code to illustrate besides the verbal explanation. I would then recommend to post that as an Answer rather than a Comment. Just a suggestion... :>)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!