pysal.explore.giddy.rank.
Theta
(y, regime, permutations=999)[source]¶Regime mobility measure. [Rey04]
For sequence of time periods Theta measures the extent to which rank changes for a variable measured over n locations are in the same direction within mutually exclusive and exhaustive partitions (regimes) of the n locations.
Theta is defined as the sum of the absolute sum of rank changes within the regimes over the sum of all absolute rank changes.
Parameters: 


Examples
>>> import pysal.lib as ps
>>> from pysal.explore.giddy.rank import Theta
>>> import numpy as np
>>> f=ps.io.open(ps.examples.get_path("mexico.csv"))
>>> vnames=["pcgdp%d"%dec for dec in range(1940,2010,10)]
>>> y=np.transpose(np.array([f.by_col[v] for v in vnames]))
>>> regime=np.array(f.by_col['esquivel99'])
>>> np.random.seed(10)
>>> t=Theta(y,regime,999)
>>> t.theta
array([[0.41538462, 0.28070175, 0.61363636, 0.62222222, 0.33333333,
0.47222222]])
>>> t.pvalue_left
array([0.307, 0.077, 0.823, 0.552, 0.045, 0.735])
>>> t.total
array([130., 114., 88., 90., 90., 72.])
>>> t.max_total
512
Attributes: 


__init__
(y, regime, permutations=999)[source]¶Initialize self. See help(type(self)) for accurate signature.
Methods
__init__ (y, regime[, permutations]) 
Initialize self. 