neighborhood_HT | R Documentation |
Identifies homogeneous neighbors around a given grid point using a combination of the Hosking-Wallis (1993) and Anderson-Darling (1987) tests for marginal homogeneity.
neighborhood_HT(
data,
coord,
s0,
miles = FALSE,
min.neigh = 5,
max.neigh = 20,
pr = 0.9,
alpha = 0.05,
dmax = 150,
which.test = c(1, 2)
)
data |
A matrix or data.frame. Each column corresponds to a station, with rows containing observations (on the original scale). |
coord |
A two-column matrix or data frame of station coordinates (longitude and latitude), one row per station. |
s0 |
Numeric vector of length 2: the longitude and latitude of the target grid point. |
miles |
Logical; whether to compute distance in miles (default: FALSE). |
min.neigh |
Minimum number of neighbors to accept (default: 5). |
max.neigh |
Maximum number of neighbors to test (default: 20). |
pr |
Probability threshold for quantile filtering (e.g. 0.9). |
alpha |
Significance level for homogeneity tests. |
dmax |
Maximum distance (in km) to consider. |
which.test |
Integer vector specifying which test(s) to run:
|
A vector of station indices considered homogeneous with the grid point.
Castro-Camilo, D. and Huser, R. (2020). JASA 115, 1037–1054. Hosking, J. and Wallis, J. (1993). Water Resour. Res. 29, 271–281. Scholz, F.W. and Stephens, M.A. (1987). JASA 82, 918–924.
fdata()
neighborhood_HT(counterfactual, coord = LonLat, s0 = c(30, 39), which.test = c(1, 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.