Description Usage Arguments Details Value Author(s) See Also Examples
This function calculates Q0, a measure of spatial association based on symbolic entropy.
1 | q_boots(Y, x, m, nsim=999)
|
x |
coordenadas asociadas a la observación de Y |
m |
amplitud de las m-historias |
nsim |
number of permutations |
Y |
a factor of the same length as the coordinates x |
s |
grado de solapamiento |
Aquí Antonio escribe una linda historia
decir que cosas son las que devuelve
Q0s_p | value of the statistic of the observed distribution. Symbols p |
p.value.p | the pseudo p-value of the Q0s_p test |
efp_symb | frecuencia empírica de los simbolos "p" de cada permutación |
Q0s_c | value of the statistic of the observed distribution. Symbols c |
p.value.c | the pseudo p-value of the Q0s_c test |
efc_symb | frecuencia empírica de los simbolos "c" de cada permutación |
nsim | nsim simulated values of statistic |
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 |
@references
Ruiz, M., López, F., and Páez, A. (2010). Testing for spatial association of qualitative data using symbolic dynamics. Journal of Geographical Systems, 12(3), 281-309.
López, F., and Páez, A. (2012). Distribution-free inference for Q(m) based on permutational bootstrapping: an application to the spatial co-location pattern of firms in Madrid. Estadística Española, 177, 135-156.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Example 1
N <- 1000
cx <- runif(N)
cy <- runif(N)
x <- cbind(cx,cy)
listw <- spdep::nb2listw(spdep::knn2nb(spdep::knearneigh(cbind(cx,cy), k=4)))
p <- c(1/6,3/6,2/6)
rho = 0.5
fx <- dgp_spq(x = x, p = p, listw = listw, rho = rho)
Q0s <- q_boots(fx=fx,x=x,m=3,nsim=199)
# Example 2
# Load dataset
data("FastFood")
# Define coordinates
x <- cbind(FastFood.sf$Lon,FastFood.sf$Lat)
m <- 3
Q0s <- q_boots(fx=FastFood.sf$Type,x=x,m=3,nsim=199)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.