An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20130812/548aa4c6/attachment.pl>
optimize idw power
6 messages · Thomas Adams, Jon Olav Skoien, Dominik Schneider
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20130812/b8e63706/attachment.pl>
Dominik, The brute force approach shown in the link from Tom has in the mean time been implemented in the intamap package. See the example for the function "estimateParameters". Cheers, Jon
On 13-Aug-13 1:54, Thomas Adams wrote:
Dominik, Look here: http://r-sig-geo.2731867.n2.nabble.com/GSTAT-Optimize-power-value-for-IDW-td2765918.html Tom On Mon, Aug 12, 2013 at 5:17 PM, Dominik Schneider < Dominik.Schneider at colorado.edu> wrote:
Hi, I'd like to optimize the IDW power, similar to what ArcGIS does. I found this old thread http://www.mail-archive.com/r-sig-geo at stat.math.ethz.ch/msg04011.html but was hoping someone could help adapt the solution. I am using idw(residuals(mdl.stepaic[[j]])~1,locations=swe.nozeros[swe.nozeros$mth==mth & swe.nozeros$yr==yr,],newdata=swe.grid) where mdl.stepaic[[j]] is a list of 39 regression equations. swe.nozeros is a spatialpointsdataframe of observations. swe.grid is a grid where I want new values predicted. I currently run this idw command through a loop of j with no problems but I'd like to optimize both within each equation represented by j and for the whole data set (so across the 39 timesteps). Below is what I'm starting with but I don't really understand how to get it working. I appreciate your help. f= function(idp,formula,locations,newdata,...) { sum(idw(formula,locations,newdata),set=list(debug=0,idp=idp),...)$residuals**2 } optimize(f,interval=seq(1.4,1.7,by=0.1),formula=residuals(mdl.stepaic[[j]])~1,locations=swe.nozeros[swe.nozeros$mth==mth & swe.nozeros$yr==yr,],newdata=swe.grid) [[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
[[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Jon Olav Sk?ien Joint Research Centre - European Commission Institute for Environment and Sustainability (IES) Land Resource Management Unit Via Fermi 2749, TP 440, I-21027 Ispra (VA), ITALY jon.skoien at jrc.ec.europa.eu Tel: +39 0332 789206 Disclaimer: Views expressed in this email are those of the individual and do not necessarily represent official views of the European Commission.
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20130813/0906eb0b/attachment.pl>
2 days later
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20130816/2c7dfb5f/attachment.pl>
2 days later
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20130818/5e0b210f/attachment.pl>