0

Suppose there are two groups of (x, y) pairs, and that x and y are linearly correlated but with different slopes and/or intercepts for different groups.

We do not know which data point belongs to which group a priori, but we know that there are two groups.

I am looking for a method to fit simultaneously two linear models, such that the groups are automatically detected and models fitted. For a given x value, there will be two y-values predicted for both groups, I cannot implement with a GLM, as putting side-by-side the two design matrices, I would get collinear columns, which would break the fitting process. Appreciate any hints.

bonobo
  • 438
  • I would look into the flexmix R package for mixture models – Ben May 16 '22 at 14:45
  • Already answered here. https://stats.stackexchange.com/questions/245902/is-there-any-algorithm-combining-classification-and-regression/245910#245910 – bonobo May 20 '22 at 19:00

0 Answers0