moran_plot: Posterior Moran's I Plot

Description Usage Arguments Value

View source: R/stan_mc.R

Description

A scatterplot of y and its mean lagged value along with graphical representation of the posterior distribution of the Global Moran's I test statistic (the median estimate with random draws from the posterior distribution)

Usage

1
2
moran_plot(mc_test, draws = 100, title = NULL, xlab = "y",
  ylab = "Mean Spatial Lag", col = "lightskyblue")

Arguments

mc_test

Output from a call to GeoStan::stan_mc(), an object of class mc_test.

draws

Number of posterior draws of I to plot. This also sets the number of draws taken from the null distribution of Moran's I (under the randomization hypothesis). Default draws = 100.

title

An optional character string with which to replace the default plot title.

xlab

X-axis label

ylab

Y-axis label

col

Line color; default col = "lightskyblue".

Value

A scatterplot of mc_test$Data overlaid by the posterior distribution of the Moran Coefficient.


ConnorDonegan/spstan documentation built on Jan. 28, 2020, 11:48 a.m.