Have you tried Eureqa?
http://ccsl.mae.cornell.edu/eureqa
It tries to discover the model from your data.
Try it, it is impressive (at least on my data).
Ciao!
                mario

On 14-May-10 15:07, Thomas Levine wrote:
Actually, ignore my comment about that link. I don't think that link
is what you want to look at either.

y~x^2 fits quite well, but you could also write a loop to run lm() on
a bunch of different transformations.

foo=list(log,sqrt)
for (bar in foo) {
        plot(bar(x),y)
}

There may be a function that does this already, but I couldn't find it either.

Sorry for sending so many emails

2010/5/14 Thomas Levine<thomas.lev...@gmail.com>:
I spoke too soon; that is not linear.

I've never used the model-fitting functions, but you may check them out.
http://developer.r-project.org/model-fitting-functions.txt

Tom

2010/5/14 Thomas Levine<thomas.lev...@gmail.com>:
x<-c(0.5,4,6,8,12)
y<-c(0.021,0.021,0.020,0.018,0.012)
lm(y~x)

2010/5/14 Dani Valverde<daniel.valve...@uab.cat>:
Hello,
It is a very naive question, but here it is. I have this values:

x: 0.5 4 6 8 12

y: 0.021 0.021 0.020 0.018 0.012

I need to fit a function to them. How can I do it with R?
Thank you so much!

Dani

--
Daniel Valverde Saubí

Grup de Biologia Molecular de Llevats
Facultat de Veterinària de la Universitat Autònoma de Barcelona
Edifici V, Campus UAB
08193 Cerdanyola del Vallès- SPAIN

Tlf. +34 93 581 1910
Fax: +34 93 581 1573

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.




______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

--
Ing. Mario Valle
Data Analysis and Visualization Group | http://www.cscs.ch/~mvalle
Swiss National Supercomputing Centre (CSCS)      | Tel:  +41 (91) 610.82.60
v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax:  +41 (91) 610.82.82

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to