Generic method to test spatial heterogeneity
Usage
spatial_hetero_test(x, ...)
# Default S3 method
spatial_hetero_test(x, ...)
# S3 method for class 'matrix'
spatial_hetero_test(x, coords, ...)
# S3 method for class 'numeric'
spatial_hetero_test(x, coords, ...)
# S3 method for class 'vector'
spatial_hetero_test(x, coords, ...)
# S3 method for class 'data.frame'
spatial_hetero_test(x, coords, ...)
# S3 method for class 'sf'
spatial_hetero_test(x, ...)Arguments
- x
The data to be tested.
- ...
Arguments passed on to
spatial_hetero_test_data,spatial_hetero_test_dataresampleThe total times of resampling with replacement. Default to 5000.
polyThe number of polynomial terms used by the polynomial estimator. Default to 2.
bwThe adaptive bandwidth used by the polynomial estimator. Default to 10.
kernelThe kernel function used by the polynomial estimator.
verboseThe verbosity level. Default to 0.
- coords
The coordinates used for testing. Accepts a matrix or vector. For matrix, it needs to have the same number of rows as
x. For vector, it indicates the columns inxand the actual coordinates will be taken fromx.
Methods (by class)
spatial_hetero_test(default): Default behavior.spatial_hetero_test(matrix): For the matrix,coordsis necessary.spatial_hetero_test(numeric): Takesxas values of a series variables stored by column, andcoordsas coordinates for each row inx.spatial_hetero_test(vector): Takesxas values of the variable, andcoordsas coordinates for each element inx.spatial_hetero_test(data.frame): Takesxas variable values (each column is a variable), andcoordsas coordinates for each row inx.spatial_hetero_test(sf): For thesfobject, coordinates of centroids are used. Only the numerical columns are tested.