Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add permutation_method={"brutal-force", "lookup-table"} in lisa.R #13

Merged
merged 1 commit into from
Feb 13, 2021

Conversation

lixun910
Copy link
Member

e.g.

nat <- st_read("./data/natregimes.shp")
w <- queen_weights(nat)
lm1 <- local_moran(w, nat["HR70"], permutations = 9999, ppermutation_method = "lookup-table")
lm2 <- local_moran(w, nat["HR70"], permutations = 9999)
plot(lm1$p_vals, lm2$p_vals)

system.time(lm2 <- local_moran(w, nat["HR70"], permutations = 9999))
system.time(lm1 <- local_moran(w, nat["HR70"], permutations = 9999, permutation_method = "lookup-table"))

0.076 vs 0.906 seconds

image

e.g. nat <- st_read("./data/natregimes.shp")
w <- queen_weights(nat)
lm1 <- local_moran(w, nat["HR70"], permutations = 9999, ppermutation_method = "lookup-table")
lm2 <- local_moran(w, nat["HR70"], permutations = 9999)
plot(lm1$p_vals, lm2$p_vals)
@lixun910 lixun910 merged commit 4b79d19 into master Feb 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant