n_eff {geostan} | R Documentation |
Effective sample size
Description
An approximate calculation for the effective sample size for spatially autocorrelated data. Only valid for approximately normally distributed data.
Usage
n_eff(n, rho)
Arguments
n |
Number of observations. |
rho |
Spatial autocorrelation parameter from a simultaneous autoregressive model. |
Details
Implements Equation 3 from Griffith (2005).
Value
Returns effective sample size n*, a numeric value.
Source
Griffith, Daniel A. (2005). Effective geographic sample size in the presence of spatial autocorrelation. Annals of the Association of American Geographers. Vol. 95(4): 740-760.
See Also
Examples
n_eff(100, 0)
n_eff(100, 0.5)
n_eff(100, 0.9)
n_eff(100, 1)
rho <- seq(0, 1, by = 0.01)
plot(rho, n_eff(100, rho),
type = 'l',
ylab = "Effective Sample Size")
[Package geostan version 0.8.1 Index]