EstimateQuantile: Estimate the Quantile of a Missing Value

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

Description

Helper function for Predict. The function estimates the quantile of the missing value at position mp from the data a relative to its image a[,,mp[3],mp[4]].

Usage

1
EstimateQuantile(a, mp, nQuant, predictionInterval = FALSE)

Arguments

a

Numeric array with 4 dimensions.

mp

Integer vector of length 4 indexing the position of the missing value to predict.

nQuant

Integer vector of length 1. Minimum number of non-missing values in a[mp[1], mp[2],,] required to estimate the quantile. If a[mp[1], mp[2],,] contains less non-missing values, the neighboring values of a[mp[1], mp[2],,] are also taken into account.

predictionInterval

Logical vector of length 1. If TRUE, the estimated quantile together with lower and upper bounds of an approximate 90% uncertainty interval is returned.

Value

If predictionInterval is FALSE, a numeric vector of length 1 being the estimated quantile of the missing value a[mp[1], mp[2], mp[3], mp[4]] is returned. Otherwise, a numeric vector of length 3 containing the estimated quantile and the lower and upper bounds of an approximate 90% uncertainty interval is returned.

Author(s)

Florian Gerber, flora.fauna.gerber@gmail.com.

References

F. Gerber, R. de Jong, M. E. Schaepman, G. Schaepman-Strub, and R. Furrer (2018) in IEEE Transactions on Geoscience and Remote Sensing, pp. 1-13, doi: 10.1109/TGRS.2017.2785240.

See Also

Predict.

Examples

1
2
a <- Subset(data = ndvi, mp = c(1, 3, 1, 2), i = 0)
EstimateQuantile(a = a, mp = attr(a, "mp"), nQuant = 2)

gapfill documentation built on Feb. 12, 2021, 5:06 p.m.