RIDW: Regression IDW Optimizing inverse distance weighting power

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/RIDW.R

Description

This function use gstat packages for interpolate spatial point data (SpatialPoints) and RasterLayer data (see raster).

Usage

1
RIDW(gauge, cov, formula, idpR = seq(0.8, 3.5, 0.1), ...)

Arguments

gauge

Is an object of SpatialPointsDataFrame class.

cov

Is An object of RasterLayer.

formula

that defines the dependent variable as a linear model of independent variables; suppose the dependent variable has name 'z', for Regression Inverse Distance Weigthing (RIDW) use the formula 'z~x+y+....', you do not need define.

idpR

Is vector numeric of the power coeficient to evaluate.

...

parameters that are passed on to variogram variogram when calculating the sample variogram

Details

R_IDW use crossvalidation Leave-p-out cross-validation (LpO CV) and force brute (optimize MSE) for estimate the best idp power coeficient.

Value

a List that contains: Interpol is the RIDW result in Raster, params being bestp is the best distance weighting power, MSE is the Residual Mean squared error of the residuals and finally linear_Model is the adjusted linear Model.

Author(s)

Cesar Aybar <aybar1994@gmail.com>

See Also

idw

Examples

1
2
3
4
5
6
library(raster)
library(Dorado)
data("Dorado")
gauge <- mean_doble_Station(gauge = Dorado$gauge,cov = Dorado$TRMM)
sat <- Dorado$TRMM
x <- RIDW(gauge = gauge,cov = sat,formula = PP_anual~Precipitacion_Anual)

AybarCL/Dorado documentation built on Jan. 13, 2020, 1:13 p.m.