-3

I am by no means a math person, but I am really trying to figure out how create a graphable function from some data plots I measure from a chemical titration. I have been trying to learn R and I would like to know if anyone can explain to me or point me to a guide to create a mathmatic function of the titration graph below. Thanks in advance. mL Base V Acid Solution

farmerm3
  • 341
  • 1
  • 4
  • 13
  • 1
    Chemistry isn't my area, but it looks like a logistic curve. Google search turns up a lot of hits on "chemical titration" and "logistic", so I think that this is a reasonable guess (though doubtless an oversimplification). You could search for how to do logistic regression in R. – John Coleman Nov 09 '16 at 01:29
  • 1
    You want to fit a model. This can be a logistic curve (parametric) or fit something more flexible, a non parametric curve, like a spline as mentioned by @user1774806. – Roman Luštrik Nov 09 '16 at 08:37
  • 1
    Downvote for failing to search: https://cran.r-project.org/web/packages/titrationCurves/vignettes/titrationCurves.pdf – IRTFM Nov 09 '16 at 17:51
  • I looked at the documentation and installed the package for titrationCurves, it only builds models it doesn't create functions from data – farmerm3 Nov 09 '16 at 18:38

1 Answers1

4

What you are looking for is a Interpolation. I'm not a R programmer, but I'll try to answer anyway.

Some of the more common ways to achieve this function you want is by Polynomial Interpolation which usually gives back a Nth degree polynomial function, where N is the number of data points minus one (1 point gives a constant, 2 points make a line, 3 makes a*x^2 + b*x + c and so on).

Other common alternatives I've learn are used in Computer Graphics are Splines, B-spline, Bézier curve and Hermite interpolation. Those make the curve smoother and good looking (I've told they originated in the car industry so they are less true to the data points).

TL;DR: I've found evidence that there is a implementation of spline in R from the question Interpolation in R which may lead you to your solution.

Hope you get to know better your tool and do a great work.


When doing this kind of work in Computer Science we call it Numerical Methods (at least here in my university), I've done some class and homework in this area while attending to the Numerical Methods Course (it can be found at github) but it's nothing worth noting.

I would add a lot of links to Wikipedia but StackOverflow didn't allow it.

Community
  • 1
  • 1
LuisPuhl
  • 57
  • 3
  • This is a) too vague for SO. (no code), and b) not suggesting the known form of titration curves. – IRTFM Nov 09 '16 at 17:08
  • You should have voted to close and cited a relevant reference, such as https://cran.r-project.org/web/packages/titrationCurves/vignettes/titrationCurves.pdf – IRTFM Nov 09 '16 at 17:51