moranI¶
- moranI(u, K_lim, T_lim, alpha)¶
moranI computes the Moran’s I statistic. The statistic is modified from its full form by allowing a restriction of the two-dimensional extent over which the statistic is evaluated.
See https://en.wikipedia.org/wiki/Moran%27s_I
- INPUTS:
u – matrix (K x T) of residuals. Required. K_lim – integer number limiting the number of spatial bins
across which the correlations are evaluated. Default is K-1.
- T_lim – integer number limiting the number of time lags
over which the correlations are evaluated. Default is T-1.
alpha – significance level. Default is 0.05.
- OUTPUTS:
I – I statistic value E_I – expected value under the null hypothesis var_I – variance under the null hypothesis pVal – z p-value cVal – z critical value Itest – z-test result
Created: Patrick Stokes