methods_localsrq | R Documentation |
The plot()
function allows the user to plot significant observations.
The print()
function is used to print the number of runs in each localization. Additional information of
expected values and standard deviation, z-value ans p-value is prited for each observation.
## S3 method for class 'localsrq' print(x, ...) ## S3 method for class 'localsrq' plot(x, ..., sf = NULL, coor = NULL, sig = 0.05)
x |
a |
... |
further arguments passed to or from other methods. |
sf |
optional argument for |
coor |
optional argument for |
sig |
significant level for each observation in |
No return value, called for side effects
Fernando López | fernando.lopez@upct.es |
Román Mínguez | roman.minguez@uclm.es |
Antonio Páez | paezha@gmail.com |
Manuel Ruiz | manuel.ruiz@upct.es |
Ruiz, M., López, F., and Páez, A. (2021). A test for global and local homogeneity of categorical data based on spatial runs. working paper.
# Example 1: Local spatial runs test based on knn library(lwgeom) N <- 100 cx <- runif(N) cy <- runif(N) x <- cbind(cx,cy) listw <- spdep::knearneigh(cbind(cx,cy), k = 10) p <- c(1/6,3/6,2/6) rho <- 0.5 fx <- dgp.spq(p = p, listw = listw, rho = rho) # Asymtotic version lsrq <- local.sp.runs.test(fx = fx, listw = listw, alternative = "less") print(lsrq) plot(lsrq, sig = 0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.