psmd_pseudop {gdverse}R Documentation

power of spatial and multilevel discretization determinant(PSMD) and the corresponding pseudo-p value

Description

Function for calculate power of spatial and multilevel discretization determinant and the corresponding pseudo-p value.

Usage

psmd_pseudop(
  formula,
  data,
  wt = NULL,
  locations = NULL,
  discnum = NULL,
  discmethod = NULL,
  cores = 1,
  seed = 123456789,
  permutations = 0,
  ...
)

Arguments

formula

A formula of calculate power of spatial and multilevel discretization determinant PSMDQ_s.

data

A data.frame or tibble of observation data.

wt

(optional) The spatial weight matrix.When wt is not provided, must provide locations. And gdverse will use locations columns to construct spatial weight use inverse_distance_weight().

locations

(optional) The geospatial locations coordinate columns name which in data. Useful and must provided when wt is not provided.

discnum

(optional) Number of multilevel discretization.Default will use 3:22.

discmethod

(optional) The discretization methods. Default will use quantile. Noted that robust will use robust_disc(); rpart will use rpart_disc(); Others use st_unidisc().

cores

(optional) A positive integer(default is 1). If cores > 1, use parallel computation.

seed

(optional) Random seed number, default is 123456789.

permutations

(optional) The number of permutations for the PSD computation. Default is 0, which means no pseudo-p values are calculated.

...

(optional) Other arguments passed to st_unidisc(),robust_disc() or rpart_disc().

Details

The power of spatial and multilevel discretization determinant formula is PSMDQ_s = MEAN(Q_s)

Value

A tibble of power of spatial and multilevel discretization determinant and the corresponding pseudo-p value.

Author(s)

Wenbo Lv lyu.geosocial@gmail.com

References

Xuezhi Cang & Wei Luo (2018) Spatial association detector (SPADE),International Journal of Geographical Information Science, 32:10, 2055-2075, DOI: 10.1080/13658816.2018.1476693

Examples

data('sim')
psmd_pseudop(y ~ .,
             data = dplyr::select(sim,1:4),
             locations = c('lo','la'))


[Package gdverse version 1.0.0 Index]