Should I repost the question with reply-all? On Tue, Dec 19, 2017 at 6:13 PM, Jeff Newmiller <jdnew...@dcn.davis.ca.us> wrote:
> You also need to reply-all so the mailing list stays in the loop. > -- > Sent from my phone. Please excuse my brevity. > > On December 19, 2017 4:00:29 PM PST, Timothy Axberg < > axbergtimo...@gmail.com> wrote: > >Sorry about that. Here is the code typed directly on the email. > > > >qe = (Qmax * Kl * ce) / (1 + Kl * ce) > > > >##The data > >ce <- c(15.17, 42.15, 69.12, 237.7, 419.77) > >qe <- c(17.65, 30.07, 65.36, 81.7, 90.2) > > > >##The linearized data > >celin <- 1/ce > >qelin <- 1/qe > > > >plot(ce, qe, xlim = xlim, ylim = ylim) > > > >##The linear model > >fit1 <- lm(qelin ~ celin) > >intercept1 <- fit1$coefficients[1] > >slope1 <- fit1$coeffecients[2] > >summary(fit1) > > > >Qmax <- 1/intercept1 > >Kl <- .735011*Qmax > > > >xlim <- range(ce, celin) > >ylim <- range(qe, qelin) > > > >abline(lm(qelin ~ celin)) > > > >c <- seq(min(ce), max(ce)) > >q <- (Qmax*Kl*c)/(1+(Kl*c)) > > > >lines(c, q) > > > > > >##My attempt at the nonlinear regression > >fit2 <- nls(qe ~ ((Qmax*Kl*ce)/(1+(Kl*ce))), start = list(Qmax = Qmax, > >Kl = > >Kl)) > >results <- fit2$m$getpars() > >Qmax2 <- fit2$m$getpars()[1] > >Kl2 <- fit2$m$getpars()[2] > >summary(fit2) > > > >-Timothy > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.