EstimateQuantile {gapfill} | R Documentation |
Estimate the Quantile of a Missing Value
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
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 |
predictionInterval |
Logical vector of length 1.
If |
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
Examples
a <- Subset(data = ndvi, mp = c(1, 3, 1, 2), i = 0)
EstimateQuantile(a = a, mp = attr(a, "mp"), nQuant = 2)