Dear Catalin, You can look at ?nls.
Alternatively, you could also consider a linear model as follows, where "d" is your data: # plot your data with(d, plot(cls, proc, las = 1)) # linear model fit <- lm(proc ~ I(1/cls) + I((1/cls)^2), data = d) summary(fit) # plotting with(d, plot(cls, proc, las = 1)) grid <- seq(min(d$cls), max(d$cls), length = 1000) points(grid, predict(fit, data.frame(cls = grid)), type = "l", col = 2) HTH, Jorge.- On Wed, Apr 10, 2013 at 7:01 PM, catalin roibu <catalinro...@gmail.com>wrote: > Hello all! > > I have a problem with a double exponential equation. > this are my data's> > structure(list(proc = c(1870.52067384719, 766.789388745793, > 358.701545859122, > 237.113777545511, 43.2726259059654, 148.985133316262, 92.6242882655781, > 88.4521557193262, 56.6404686159112, 27.0374477259404, 34.3347291080268, > 18.3226992991316, 15.2196612445747, 5.31600719692165, 16.7015717397302, > 16.3923389973684, 24.2702542054496, 21.247247993673, 18.3070717608672, > 2.8811892177331, 3.18018869564679, 8.74204132937479, 7.11596966047229 > ), cls = c(0.25, 0.5, 0.75, 1, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, > 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10)), .Names = c("proc", > "cls"), row.names = c("0.25", "0.5", "0.75", "1", "11", "1.5", > "2", "2.5", "3", "3.5", "4", "4.5", "5", "5.5", "6", "6.5", "7", > "7.5", "8", "8.5", "9", "9.5", "10"), class = "data.frame") > I want to compute a double exponential equation like this: > proc=a*exp(b*class)+c*exp(d*class) > or > proc=a*exp(b*class)+c*class > or a power, logarithmic equation. > Is there a possibility to calculate R squared for each model? > > Thank you! > > -- > --- > Catalin-Constantin ROIBU > Lecturer PhD, Forestry engineer > Forestry Faculty of Suceava > Str. Universitatii no. 13, Suceava, 720229, Romania > office phone +4 0230 52 29 78, ext. 531 > mobile phone +4 0745 53 18 01 > +4 0766 71 76 58 > FAX: +4 0230 52 16 64 > silvic.usv.ro > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. > [[alternative HTML version deleted]] ______________________________________________ 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.