# Finding local maxima on a loess surface

6 messages
Open this post in threaded view
|
Report Content as Inappropriate

## Finding local maxima on a loess surface

 If a run a LOESS model and then produce a smoothed surface: Is there any way to determine the coordinates of the local maxima on the surface?         [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Finding local maxima on a loess surface

 On May 3, 2012, at 6:09 PM, Diego Rojas wrote: > If a run a LOESS model and then produce a smoothed surface: Is there   > any > way to determine the coordinates of the local maxima on the surface? ?predict    # it has a loess method. > > [[alternative HTML version deleted]] -- David Winsemius, MD Heritage Laboratories West Hartford, CT ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Finding local maxima on a loess surface

 Thanks, I know about it but i wat to find several local maxima, so in other words I need a way to identify the places in the surface where both slopes are equal to 0 and the second derivative is negative. On Fri, May 4, 2012 at 9:28 AM, David Winsemius <[hidden email]>wrote: > > On May 3, 2012, at 6:09 PM, Diego Rojas wrote: > >  If a run a LOESS model and then produce a smoothed surface: Is there any >> way to determine the coordinates of the local maxima on the surface? >> > > ?predict    # it has a loess method. > >> >>        [[alternative HTML version deleted]] >> > > -- > > David Winsemius, MD > Heritage Laboratories > West Hartford, CT > >         [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Finding local maxima on a loess surface

 On May 4, 2012, at 3:00 PM, Diego Rojas wrote: > Thanks, I know about it but i wat to find several local maxima, so   > in other words I need a way to identify the places in the surface   > where both slopes are equal to 0 and the second derivative is   > negative. There is no way that I know that will produce a mathematical function   that would support symbolic manipulations of that sort for the results   obtainable from a loess-object. I was expecting that you would be   approaching this numerically and doing evaluations on a grid. Testing   for equality to 0 is not a good practice if following that route. Sign   reversal would be a more sensible criterion. ( And you _would_ be   using predict.loess(). ) Still no data example or code offered, so not pursuing further efforts   at illustration. > > On Fri, May 4, 2012 at 9:28 AM, David Winsemius <[hidden email] > > wrote: > > On May 3, 2012, at 6:09 PM, Diego Rojas wrote: > > If a run a LOESS model and then produce a smoothed surface: Is there   > any > way to determine the coordinates of the local maxima on the surface? > > ?predict    # it has a loess method. > >        [[alternative HTML version deleted]] > David Winsemius, MD West Hartford, CT ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|
Report Content as Inappropriate

## Fwd: Finding local maxima on a loess surface

 ---------- Forwarded message ---------- From: Diego Rojas <[hidden email]> Date: Wed, May 9, 2012 at 3:05 PM Subject: Re: [R] Finding local maxima on a loess surface To: David Winsemius <[hidden email]> Thanks again, would you please try to ilustrate further your point with this example code. How would you find the coordinates for the maxima on the surface. Consider that in the surface I'm dealing with there are at least 35 maxima. require(MASS) topo.lo <- loess(z ~ x * y, topo, degree = 1, span = 0.25,                  normalize = FALSE) topo.mar <- list(x = seq(0, 6.5, 0.1), y = seq(0, 6.5, 0.1)) new.dat <- expand.grid(topo.mar) topo.pred <- predict(topo.lo, new.dat) ## draw the contour map based on loess predictions library(rgl) persp3d(topo.mar\$x, topo.mar\$y, topo.pred, shade=0.5, col="blue") Thanks fot your help On Sat, May 5, 2012 at 9:34 AM, David Winsemius <[hidden email]>wrote: > > On May 4, 2012, at 3:00 PM, Diego Rojas wrote: > > Thanks, I know about it but i wat to find several local maxima, so in >> other words I need a way to identify the places in the surface where both >> slopes are equal to 0 and the second derivative is negative. >> > > There is no way that I know that will produce a mathematical function that > would support symbolic manipulations of that sort for the results > obtainable from a loess-object. I was expecting that you would be > approaching this numerically and doing evaluations on a grid. Testing for > equality to 0 is not a good practice if following that route. Sign reversal > would be a more sensible criterion. ( And you _would_ be using > predict.loess(). ) > > Still no data example or code offered, so not pursuing further efforts at > illustration. > > > >> On Fri, May 4, 2012 at 9:28 AM, David Winsemius <[hidden email]> >> wrote: >> >> On May 3, 2012, at 6:09 PM, Diego Rojas wrote: >> >> If a run a LOESS model and then produce a smoothed surface: Is there any >> way to determine the coordinates of the local maxima on the surface? >> >> ?predict    # it has a loess method. >> >>       [[alternative HTML version deleted]] >> >> > David Winsemius, MD > West Hartford, CT > >         [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.