An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20091123/f708f94d/attachment-0001.pl>
On Nov 23, 2009, at 2:03 PM, Christian Miner wrote:> I'm working on Loess fit models using R, once I have the fit > accomplished, > I'm looking to back-out the equation of the fitted non-linear curve, > wondering if there is a way to determine this equation in R? I've been > looking but can't find any literature. For me, the graph of the > function is > great, but without the equation of the graph, I'm kinda dead in the > water.So you want a global equation from a procedure that does local fitting for each point? Maybe you should re-think your strategy. The points that form the graph _are_ the function. Maybe you should re-think your strategy. Perhaps you want spline fiting. -- David Winsemius, MD Heritage Laboratories West Hartford, CT
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20091123/390d0efa/attachment-0001.pl>
Check out the loess.demo function in the TeachingDemos package. Using this function with your data will show the scatterplot with the loess curve. Then if you click in the plot it will show the line/curve used to do the prediction for that x-value, click on another x-value and you will see that the line/curve used there is different from before. There is not a single function created by the loess algorithm, rather a different approximation for every possible x-value (theoretically infinite, practically still a big number). You could fit a function to the results of loess (or approximate the points with a function), but the function will probably be complicated enough that it would not tell you much that the points themselves don't. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Christian Miner > Sent: Monday, November 23, 2009 12:04 PM > To: r-help at r-project.org > Subject: [R] Loess Fit > > I'm working on Loess fit models using R, once I have the fit > accomplished, > I'm looking to back-out the equation of the fitted non-linear curve, > wondering if there is a way to determine this equation in R? I've been > looking but can't find any literature. For me, the graph of the > function is > great, but without the equation of the graph, I'm kinda dead in the > water. > > Christian Miner > 503-866-6977 > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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.
Thanks Christian. The client is always right ... Tom On Nov 23, 2009, at 10:32 AM, Christian Miner wrote:> sorry, I don't. I have data that I can estimate, but my client wants > to "What if..." 20 separate scenarios, and that requires a function. > > On Mon, Nov 23, 2009 at 12:22 PM, Thomas S. Dye <tsd@tsdye.com> wrote: > Hi Christian, > > Do you have a reference to a publication where this has been done? > > All the best, > Tom > > On Nov 23, 2009, at 10:15 AM, Christian Miner wrote: > >> it's a tricky maneuver. When I finish the fit, the predict function >> will give me the values, and I can smooth this out so it looks like >> a nice non-linear equation. The last thing I need to do is find the >> equation, knowing I know have the x and y values, as they will >> relate to each other in a non-linear fashion. >> >> Matlab can do this, but I'd rather not go into that realm. >> >> On Mon, Nov 23, 2009 at 12:11 PM, Thomas S. Dye <tsd@tsdye.com> >> wrote: >> Hi Christian, >> >> I haven't seen an equation associated with a loess fit before. Do >> you have a reference to one of these? >> >> All the best, >> Tom >> >> >> On Nov 23, 2009, at 9:03 AM, Christian Miner wrote: >> >> I'm working on Loess fit models using R, once I have the fit >> accomplished, >> I'm looking to back-out the equation of the fitted non-linear curve, >> wondering if there is a way to determine this equation in R? I've >> been >> looking but can't find any literature. For me, the graph of the >> function is >> great, but without the equation of the graph, I'm kinda dead in the >> water. >> >> Christian Miner >> 503-866-6977 >> >> [[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. >> >> >> >> >> -- >> Christian Miner >> 503-866-6977 >> > > > > > -- > Christian Miner > 503-866-6977 >[[alternative HTML version deleted]]