Newbie question! Apologies if this question sounds oblivious. I'm hoping to find the best fit lines for two linear portions of a curve. The goal is to find the x-intercept for where these two lines intersect.
So far my method has been:
- Break the dataset up into two pieces and using lm() to find their individual best fit lines.
- Use the best fit lines as geom_abline() to overlay them onto a ggplot of the full dataset.
- Adjust the lines as needed to fit the curve.
- Manually calculate the x-intercept from the two line equations after adjusting them.
I'm looking to simplify/increase robustness of this process.
I have also tried this method using tangent lines, but changing the guess value for x changes the answer considerably. Based on the application, tangent does not seem to be the most accurate way of going about this either.
I'll include a screenshot to describe what I am trying to accomplish.
REF: Rheological Methods in Food Process Engineering by James F. Steffe