I would like to plot a smooth titration curve with empirical values in R. Unfortunately, I was not able to calculate the point of inflection of the curve where the equivalence point is located.
Do you have any ideas on how I can do this?
par(mfrow=c(1, 1))
vtit <- c(7.05, 9.00, 11.10, 13.00, 15.00, 17.00, 18.05, 18.95, 20.00, 21.00,
21.95, 23.05, 24.00, 25.05, 26.00, 28.10, 30.00, 33.05, 36.10, 39.05,
41.10, 42.10, 42.55, 43.15, 44.99)
vtit. <- vtit - 7.05
pH <- c(2.99, 3.48, 3.82, 4.02, 4.18, 4.30, 4.37, 4.42, 4.45, 4.51, 4.57, 4.64,
4.67, 4.74, 4.79, 4.86, 4.99, 5.18, 5.42, 5.77, 6.33, 9.01, 10.62,
11.06, 11.39)
plot(vtit., pH, type="o", lwd=2, main="Titration of acetic acid with 0.86M NaOH",
cex.main=0.8, xlab=expression(italic(V[NaOH])), ylab=expression(pH))
model <- lm(pH ~ poly(vtit.,17))
pHcurve <- predict(model)
lines(vtit., pHcurve, col='green', lwd=2)
abline(v=34.9, lty=2)