I was setting up the following exemplarely mixture of regression model using the flexmix package in R: model = flexmix(y~ x1 + x2 +x3, data = Data, k=2, control = list(verb = 5, iter = 1000))
How can I decide to drop one variable in one of the components, so that I mix y~x1+x3
in component 1 with y~x2+x3
in component 2?
Asked
Active
Viewed 108 times
2
-
Do you mean dimensionality reduction such as PCA ? – RobJan Sep 08 '18 at 19:40
-
There are many ways to iteratively switch out independent variables -- perhaps check out the `leaps` package? – Evan Friedland Sep 08 '18 at 20:00