I'm trying to fit a curve to my data (shown below), but I'm not sure of the best way to do it. I tried an exponential function following this tutorial, but it didn't fit the data at all (just a vertical line), and now a square root function ( y~x+sqrt(x) ), which seems to fit the data well but curves upwards near the y axis, which is unrealistic. It is an understatement to say mathematics is not a strong point for me, and I'm struggling to find the right option. How can I make a line that only curves upwards, but does so gradually?
$\begingroup$ This looks very exponential. I wonder if you made a mistake in your code/fit process. $\endgroup$– kleinerdeApr 2, 2022 at 12:17
$\begingroup$ Please, joint to your question the numerical data (instead of graphical). One cannot reproduce what you did without data. $\endgroup$– JJacquelinApr 13, 2022 at 8:55
Have you already tried y = a + bx + cx^2? You will need to use regression software to find the values of a, b, and c (which your software will probably call betas 0, 1, and 2)
$\begingroup$ Thanks, that's done it. I had used a squared term before and the curve went the other direction (correctly) - I had thought that to get the opposite direction I needed to use the opposite function... Now I realise it's just to do with the positive/negative coefficients facepalm $\endgroup$– PicapicaApr 2, 2022 at 16:04