# Model some logarithmic looking data in R

I have the following data in R

x <- c(0.1,0.2,0.3,0.6,0.8,0.9,1)
y <- c(90,96,97.7,99.3,99.65,99.95,100)


I'm trying to find a logarithmic equation that best fits these points. I'm not sure what the equation would look like, but probably something like one of these

• a*log(x)+b
• (a*log(x)+b)/(log(x)+c)
• a*log(b*x)+c
• etc

What kind of curve do you think best fits this data. And how can I find out?

-
The question still doesn't belong here. i vote to close. – Michael Chernick Aug 31 '12 at 17:15
I agree the question is somewhat vague. Maybe the poster could elaborate it ? – Stéphane Laurent Aug 31 '12 at 17:18
Okay if the data is being fit to a statistical model then it is okay for here. – Michael Chernick Aug 31 '12 at 17:20
All of the models you've listed have the same general form: $$y = \frac{\beta_1 \log\left(\beta_2 x\right)+\beta_3}{\beta_4 \log\left(\beta_5 x\right)+\beta_6}+\epsilon$$ Might it be possible to fit the full model, then remove coefficients based on estimates and standard errors? Though that is a seven-parameter model and you have seven data points... – Max Aug 31 '12 at 17:36
I agree with @Max 's last point. Your models are getting too complex for your data. – Peter Flom Aug 31 '12 at 19:19
f <- function(x) a*log(x)+b

Then examine the fitted model for every candidate function f.