powered by
An approximate calculation for the effective sample size for spatially autocorrelated data. Only valid for approximately normally distributed data.
n_eff(n, rho)
Returns effective sample size n*, a numeric value.
Number of observations.
Spatial autocorrelation parameter from a simultaneous autoregressive model.
Implements Equation 3 from Griffith (2005).
sim_sar, aple
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")
Run the code above in your browser using DataLab