*! version 1.0 29 Apr 2021
help xtmoran

Title

xtmoran -- Calculating the Moran's I and Moran's Ii for panel data and displaying a Moran scatterplot

Syntax

xtmoran varname ,
wname(matrix)
[ morani(numlist) graph
symbol(varname) ]

wname(string) spatial weight matrix in dta format.

morani(numlist) year of calculation of the Moran's Ii.

graph display a Moran scatterplot.

symbol(varname) identification of locations in the Moran scatter plot.

1. A panel variable and a time variable must be specified; use xtset (xtmoran requires balanced panel data !!!)

2. Only one variable can be calculated for the Moran's I and Moran's Ii !

3. wname(name) : The spatial weight matrix can only be used in dta format
and by default this matrix will be normalised.

Description

xtmoran computes the global spatial autocorrelation statistic: Moran's I and local spatial autocorrelation statistics: Moran's Ii.
xtmoran computes anddisplays in tabular form the statistic itself, the expected value of the statistic under the null hypothesis of global spatial independence, the standard deviation of the statistic, the z-value, and the corresponding 2-tail p-value.
xtmoran also displays a Moran scatterplot.

Stored results

xtmoran stores the following in r():

Scalars

r(N) Number of cross-sections.

r(T) Number of time periods.

Matrices

r(moran) A (T x 5) matrix containing the results of Moran's I.

r(moranitime) A (N x 6) matrix containing the results of Moran's Ii.

Examples

. use panel.dta

. xtset id year

. xtmoran y, wname(w.dta)

. xtmoran y, wname(w.dta) morani(2012 2013 2014 2015)

. xtmoran y, wname(w.dta) morani(2012 2013 2014 2015) graph

. xtmoran y, wname(w.dta) morani(2012 2013 2014 2015) graph symbol(name)

Authors

Zihou,Chen

Party School of the Guangdong Provincial Committee of CPC,China

Email: econometricalc@outlook.com

Xiangge,Liu

Party School of the Guangdong Provincial Committee of CPC,China

Email: 1920888280@qq.com

Jiahui,Xu

Party School of the Guangdong Provincial Committee of CPC,China

Email: xujiahui0106@163.com

Also see

On-line: help for splagvar, spatgsa ,spatlsa if installed