determine optimal spatial data discretization for individual variables
Source:R/loess.R
loess_optnum.Rd
Function for determining optimal spatial data discretization for individual variables based on locally estimated scatterplot smoothing (LOESS) model.
Value
A two element numeric vector.
discnum
optimal number of spatial data discretization
increase_rate
the critical increase rate of the number of discretization
Note
When increase_rate
is not satisfied by the calculation, the discrete number corresponding
to the highest q statistic
is selected as a return.
Note that sdsfun
sorts discnumvec
from smallest to largest and keeps qvec
in
one-to-one correspondence with discnumvec
.
Examples
qv = c(0.26045642,0.64120405,0.43938704,0.95165535,0.46347836,
0.25385338,0.78778726,0.95938330,0.83247885,0.09285196)
loess_optnum(qv,3:12)
#> discnum increase_rate
#> 6.00 0.05