| spatgeom | R Documentation |
Function to estimate the geometric correlation between variables.
spatgeom(x, y, scale = FALSE, nalphas = 100, envelope = FALSE, mc_cores = 1)
x |
numeric matrix or data.frame of covariables. |
y |
numeric vector of responses in a model. |
scale |
boolean to make the estimations with scaled variables. Default
|
nalphas |
a single number for the number of alphas generated between the minimum and maximum edge distance on the Delanauy triangulation. |
envelope |
boolean to determine if the Monte-Carlo is estimated. Default
|
mc_cores |
an integer to determine how many parallel process should be
run. Default |
A list of class spatgeom with the following elements:
The function call.
x input.
y output.
A list of size ncol(x) corresponding to each
column of x. Each element of the list has:
a data frame of class sfc (see
sf::st_sf())with columns geometry, segments,
max_length and alpha. The data.frame contains the whole
Delanauy triangulation for the corresponding column of x and y.
The segments column are the segments of each individual triangle and
max_length is the maximum length of them.
a data frame with columns alpha
and geom_corr. The alpha column is a numeric vector of size
nalphas from the minimum to the maximum distance between points
estimated in the data. The geom_corr column is the value 1 -
(alpha shape Area)/(containing box Area).
the intensity estimated for the corresponding
column of x and y.
the mean number of points in the point process.
a data frame in tidy format with 40 runs of a
CSR process, if envelope=TRUE, The CSR is created by generating
n uniform points in the plane, where n is drawn from Poisson
distribution with parameter mean_n.
Hernández, A.J., SolÃs, M. Geometric goodness of fit measure to detect patterns in data point clouds. Comput Stat (2022). https://doi.org/10.1007/s00180-022-01244-1
xy <- donut_data(n = 30, a = -1, b = 1, theta = 2 * pi) estimation <- spatgeom(y = xy[, 1], x = xy[, -1]) # If you want to estimate the envelope, you can use the envelope argument to # TRUE. This will take a while to run. ## Not run: estimation_with_envelope <- spatgeom( y = xy[, 1], x = xy[, -1], envelope = TRUE ) ## End(Not run)