q_boots: A funcion to calculate Q boots

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/q_boots.R

Description

This function calculates Q0, a measure of spatial association based on symbolic entropy.

Usage

1
q_boots(Y, x, m, nsim=999)

Arguments

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

Details

Aquí Antonio escribe una linda historia

Value

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

Author(s)

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

See Also

dgp_spq, m_surr_no,q_symb

Examples

 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)

rominsal/spqdata documentation built on Jan. 24, 2021, 11:11 a.m.