EstimateQuantile: 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]].
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.
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, 10.1109/TGRS.2017.2785240.