Description Usage Arguments Details Author(s) See Also Examples
View source: R/plot.sprunstest.R
Plot the empirical distribution of runs
1 2 | ## S3 method for class 'sprunstest'
plot.sprunstest(srq = srq)
|
srq |
A object of class sprunstest. |
... |
further arguments passed to or from other methods. |
Plot the histogram with the empirical distribution of the runs
Fernando López | fernando.lopez@upct.es |
Román Mínguez | roman.minguez@uclm.es |
Antonio Páez | paez@gmail.com |
Manuel Ruiz | manuel.ruiz@upct.es |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # Fastfood example. sf (points)
data("FastFood")
x <- cbind(FastFood.sf$Lon,FastFood.sf$Lat)
listw <- spdep::knearneigh(x, k = 2)
formula <- ~ Type
srq <- sp.runs.test(formula = formula, data = FastFood.sf, listw = listw, nsim = 299)
plot(srq)
# Spain example (poligons with 0 neinghbourhood)
data("Spain")
listw <- spdep::poly2nb(as(spain.sf,"Spatial"), queen = FALSE)
formula <- ~ Older65
srq <- sp.runs.test(formula = formula, data = spain.sf, listw = listw, nsim = 299)
plot(srq)
formula <- ~ MenWoman
srq <- sp.runs.test(formula = formula, data = spain.sf, listw = listw, nsim = 299)
plot(srq)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.