I am trying to get an optimal cut-off value dividing group with minimum sums of squares of residuals (=observed y - estimated y) the model is like below.
In group 1 : model y= a1x + b1z + C1v ...
In group 2 : model y= a2x + b1z + C1v ...
I have the data of y, x, z, v... The problem is the group 1 and 2 are not divided yet and the purpose of the analysis is finding optimal cut-off point of x using regression models.
I searched again and again, but couldn't find the way to make models varying 'a' and share b1 and c1... and fitting it to data.
I asked similar quesion in stackexchange, and somebody advised me the problems of this kind of approach, however, I need this approach, because it's some clinical research want to 'find' optimal (not perfect) cut-off point of x.
The article I read described below The authors of the article mentioned that they used R, but I cannot find any reference or examples about this kind of analysis.
To determine the relationship between serum 25(OH)D and iPTH concen- trations while adjusting for confounders that could affect serum 25(OH)D concentrations (i.e., age, gender, body weight, calcium intake, physical activity, and season of year), we considered two linear regression models, one for subjects below a certain concentration of serum 25(OH)D and the other for subjects above that concentration. To determine the specific cutoffs, we fitted the two linear regression models described above and calculated the sums of squares of residuals (=observed PTH - estimated PTH) from the two models for each concentration of serum 25(OH)D. The models with the lowest residual sums of squares were our best models, and the corresponding concentrations of serum 25(OH)D were defined as the optimal cutoff values.
Somebody said that this question is already answered in "regression model fitting for define cut-off" but, I don't think so... It's not regression discontinued design, because there is no a-priori cut-off. Finding cutoff is the purpose of analysis. Thanks.