wintpl: Do the multivaiate interpolation based on weights and drift...

Description Usage Arguments Details Value Examples

View source: R/shepard.R

Description

The drift is needed for interpolation by angular distance weighting extended by slopes. Interpolation weights include either all observations or are based on the nearest neighbors (4 to 10 neighbors, depending on the distance).

Usage

1
wintpl(data, xinp, weights, drift = 0, p = NULL, vparam = NULL)

Arguments

data

A matrix of the points for which the function is known

xinp

Coordinates, where interpolation has to be computed

weights

Vector of the weights for the interpolation

drift

Matrix of the drift for the interpolation

p

Scalar, parameter for the weights, currently not used

vparam

Scalar, parameter for the slopes, currently not used

Details

The interpoliation works for a multidimensional input space and also for multi-responses.

Value

The interpolated value(s) at xinp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
mydata <- matrix(runif(10*4)*10, ncol=4)
mydata <- cbind(mydata,abs(apply(mydata,1,sum)-3),abs(apply(mydata,1,prod)-4))
inp <- rep(4,4)
#Inverse distance weighting (based on all observations)
wintpl(data=mydata, xinp=inp, weights=di_get(data=mydata, xinp=inp,2))
#Inverse distance weighting (based on nearest neighbors)
wintpl(data=mydata, xinp=inp, weights=si_get(data=mydata, xinp=inp)^2)
#Angular distance weighting
wintpl(data=mydata, xinp=inp, weights=ti_get(data=mydata, xinp=inp))
#Angular distance weighting under consideration of slopes
wintpl(data=mydata, xinp=inp, weights=ti_get(data=mydata, xinp=inp), drift=slopezi_get(mydata,inp))

amaendle/mvInterpolation documentation built on May 16, 2019, 6:56 p.m.