Generic method to test spatial heterogeneity
spatial_hetero_test(x, ...)# S3 method for default
spatial_hetero_test(x, ...)
# S3 method for matrix
spatial_hetero_test(x, coords, ...)
# S3 method for numeric
spatial_hetero_test(x, coords, ...)
# S3 method for vector
spatial_hetero_test(x, coords, ...)
# S3 method for data.frame
spatial_hetero_test(x, coords, ...)
# S3 method for sf
spatial_hetero_test(x, ...)
The data to be tested.
Arguments passed on to spatial_hetero_test_data, spatial_hetero_test_data
resampleThe 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.
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 in x
and the actual coordinates will be taken from x.
spatial_hetero_test(default): Default behavior.
spatial_hetero_test(matrix): For the matrix, coords is necessary.
spatial_hetero_test(numeric): Takes x as values of a series variables stored by column,
and coords as coordinates for each row in x.
spatial_hetero_test(vector): Takes x as values of the variable,
and coords as coordinates for each element in x.
spatial_hetero_test(data.frame): Takes x as variable values (each column is a variable),
and coords as coordinates for each row in x.
spatial_hetero_test(sf): For the sf object, coordinates of centroids are used.
Only the numerical columns are tested.