@@ -66,9 +66,11 @@ class ML_Lag_Regimes(BaseML_Lag, REGI.Regimes_Frame):
66
66
the spatial parameter is fixed accross regimes.
67
67
spat_diag : boolean
68
68
If True, then compute Common Factor Hypothesis test when applicable
69
- spat_impacts : boolean
70
- If True, include average direct impact (ADI), average indirect impact (AII),
71
- and average total impact (ATI) in summary results
69
+ spat_impacts : string
70
+ Include average direct impact (ADI), average indirect impact (AII),
71
+ and average total impact (ATI) in summary results.
72
+ Options are 'simple', 'full', 'power', or None.
73
+ See sputils.spmultiplier for more information.
72
74
cores : boolean
73
75
Specifies if multiprocessing is to be used
74
76
Default: no multiprocessing, cores = False
@@ -318,7 +320,7 @@ def __init__(
318
320
regime_lag_sep = False ,
319
321
cores = False ,
320
322
spat_diag = True ,
321
- spat_impacts = True ,
323
+ spat_impacts = "simple" ,
322
324
vm = False ,
323
325
name_y = None ,
324
326
name_x = None ,
@@ -448,8 +450,9 @@ def __init__(
448
450
diag_out = _spat_diag_out (self , w , 'yend' , ml = True )
449
451
else :
450
452
self .title = ("MAXIMUM LIKELIHOOD SPATIAL LAG - REGIMES" + " (METHOD = " + method + ")" )
453
+
451
454
if spat_impacts and slx_lags == 0 :
452
- impacts = _summary_impacts (self , _spmultiplier (w , self .rho ) )
455
+ impacts = _summary_impacts (self , _spmultiplier (w , self .rho , method = spat_impacts ), spat_impacts , regimes = True )
453
456
try :
454
457
diag_out += impacts
455
458
except TypeError :
@@ -605,7 +608,7 @@ def ML_Lag_Regimes_Multi(
605
608
if spat_diag and slx_lags == 1 :
606
609
results [r ].other_mid += _spat_diag_out (results [r ], None , 'yend' , ml = True )
607
610
if spat_impacts and slx_lags == 0 :
608
- results [r ].other_mid += _summary_impacts (results [r ], _spmultiplier (results [r ].w , results [r ].rho ) )
611
+ results [r ].other_mid += _summary_impacts (results [r ], _spmultiplier (results [r ].w , results [r ].rho , method = spat_impacts ), spat_impacts )
609
612
counter += 1
610
613
self .multi = results
611
614
self .chow = REGI .Chow (self )
@@ -644,7 +647,7 @@ def _work(
644
647
model .schwarz = DIAG .schwarz (reg = model )
645
648
model .slx_lags = slx_lags
646
649
model .w = w_r
647
- model .rho = model .betas [- 1 ]
650
+ model .rho = model .betas [- 1 ]
648
651
return model
649
652
650
653
0 commit comments