slides - Bayes

advertisement
Bayesian Analysis of Spatio-Temporal Dynamic
Panel Models with Fixed and Random Effects
Mohammadzadeh, M. and Karami, H.
Tarbiat Modares University, Tehran, Iran
Rasouli, H.
Trauma Research Center, Baqiyatallah University of Medical Sciences, Tehran Iran.
Bayes2014
11-13 June 2014 University College London, UK
Outline
1- Problem
2- Panel Regression Model
3- Dynamic Panel Model
4- Spatial Dynamic Panel Model
5- Bayesian Estimation of the Models
6- Application on Real Data
7- Conclusion
Problem
Observations correlated depending on their locations, are called
spatial data.
Spatial data obtained in successive periods is called spatiotemporal data.
If they are independent over time, is called spatial panel data.
Due to the spatial or spatio-temporal correlation of data, it is
necessary to determine their correlation structure and apply it in
data analysis.
Problem
This requires determining the spatial or spatio-temporal
covariance function, which is usually unknown and must be
estimated.
A key issue in panel data modeling is variability among the
experimental units.
Because of the heterogeneity between spatial locations each
location may have different effects on data.
These effects can be either fixed or random.
Problem
In this talk a panel regression model is investigated.
Then it is developed to dynamic and spatial dynamic panel
regression models.
Also, we show how the spatial fixed and random effects can be
considered in these models.
The spatial and temporal correlation of data can be included
simultaneously in spatial dynamic panel models.
Problem
Then the Bayesian estimation of the models parameters are
presented.
Application of the proposed models for analysis of economic
factors affecting on crime data in Tehran city is shown.
Finally, the performances of the models are evaluated.
Background
Baltagi (2001) and Elhorst (2003) specified the spatial panel
models and estimated their parameters.
Elhorst (2003) has provided a review of issues arising in the
estimation of panel models commonly used in applied researches
including spatial error or spatially lagged dependent variables.
Anselin et al. (2008) introduced different types of spatial panel
models.
Debarsy and Ertur (2010) have provided a Bayesian estimation for
dynamic panel models.
Debarsy et al. (2012) interpreted the dynamic space-time panel
data.
Yang and Su (2012) have estimated the parameters of dynamic
panel models with spatial errors.
Panel Regression Model (PRM)
๐‘ฆ๐‘–๐‘ก = ๐’™′๐‘–๐‘ก ๐œท + ๐œ‡๐‘–๐‘ก + ๐œ€๐‘–๐‘ก ,
๐‘– = 1, โ‹ฏ , ๐‘ ๐‘ก = 1, โ‹ฏ , ๐‘‡
๐‘ฆ๐‘–๐‘ก : observation at unit i and time t,
๐’™๐‘–๐‘ก : ๐‘˜ × 1 vector of exploratory variables,
๐œท : ๐‘˜ × 1 vector of regression coefficients,
๐œ‡๐‘–๐‘ก : effect of i th unit at time t,
๐œ€๐‘–๐‘ก โˆถ error term,
๐œ€๐‘–๐‘ก ~๐‘(0, ๐œŽ 2 ).
Panel Regression Model (Matrix Form)
If we set ๐’š๐‘ก = (๐‘ฆ1๐‘ก , … , ๐‘ฆ๐‘๐‘ก )′
,
๐๐‘ก = (๐œ‡1๐‘ก , … , ๐œ‡๐‘๐‘ก )′ ,
′
๐‘ฟ๐‘ก = (๐’™1๐‘ก
, … , ๐’™′๐‘๐‘ก )′ ,
๐œบ๐‘ก = (๐œ€1๐‘ก , … , ๐œ€๐‘๐‘ก )
Then the matrix form of PRM is given by
๐’š๐‘ก = ๐‘ฟ๐‘ก ๐œท + ๐๐‘ก + ๐œบ๐‘ก ,
๐œบ๐‘ก ~๐‘(๐ŸŽ, ๐œŽ 2 ๐‘ฐ),
๐‘ก = 1, โ‹ฏ , ๐‘‡
Dynamic Panel Regression Model (DPRM)
๐’š๐‘ก = ๐œ†๐’š๐‘ก−1 + ๐‘ฟ๐‘ก ๐œท + ๐๐‘ก + ๐œบ๐‘ก
๐œบ๐‘ก ~๐‘ ๐ŸŽ, ๐œŽ 2 ๐‘ฐ ,
๐‘ก = 1, โ‹ฏ , ๐‘‡
where ๐’š๐‘ก−1 is the lagged variable observed at time t-1 and ๐œ† is the
lagged autoregressive coefficient.
Spatial Dynamic Panel Regression Model (SDPRM)
๐’š๐‘ก = ๐œŒ๐‘พ๐’š๐‘ก + ๐œ†๐’š๐‘ก−1 + ๐‘ฟ๐’• ๐œท + ๐๐‘ก + ๐œบ๐‘ก
๐œบ๐‘ก ~๐‘(๐ŸŽ, ๐œŽ 2 ๐‘ฐ)
where ๐œŒ is spatial autoregressive coefficient and W is a spatial
weight matrix:
๐‘ค๐‘–๐‘— = ๐‘‘๐‘–๐‘—
−๐›ผ
,๐›ผ > 0
dij =d(si − sj )=[ xi − xj
p
p 1
+ yi − yj ]p , p ≥1
Bayesian Estimation of DPRM:
Prior distributions:
Conjugate priors:
and
๐œŽ 2 ~๐ผ๐บ ๐‘Ž, ๐‘ ,
๐œท~๐‘ ๐›ฝ0 , ๐›ด0 ,
−1
๐œ†~๐‘ˆ(๐œ†−1
๐‘š๐‘–๐‘› , ๐œ†๐‘š๐‘Ž๐‘ฅ ), where ๐œ†๐‘š๐‘–๐‘› and ๐œ†๐‘š๐‘Ž๐‘ฅ are minimum and
maximum Eigen values of the weight matrix (San et al, 1999).
The posterior distribution is given by
๐‘“ ๐œท, ๐œ†, ๐, ๐œŽ 2 ๐’š ∝ ๐‘“ ๐’š ๐œท, ๐, ๐œŽ 2 ๐‘“ ๐œท ๐‘“(๐œ†)๐‘“ ๐ ๐‘“(๐œŽ 2 )
But this distribution has not close form.
To use Gibbs sampling the full conditionals are needed:
Full conditional of ๐œท โˆถ
๐œท| ๐’š, ๐œ†, ๐, ๐œŽ 2 ~๐‘ต(๐‘ฉ−๐Ÿ ๐‘, ๐‘ฉ−๐Ÿ )
where
๐‘ฉ = (๐œŽ −2
๐‘ = 2[ ๐œŽ −2
๐‘‡
′
๐‘ก=1 ๐‘ฟ๐‘ก ๐‘ฟ๐‘ก
+
๐‘‡
′
๐‘ก=1 ๐‘ฟ๐‘ก (๐’š๐‘ก
−1
0 )
− ๐œ†๐’š๐‘ก−1 − ๐๐‘ก ) +
−1
0 ๐œท0
]
Full conditional of ๐ˆ๐Ÿ โˆถ
๐œŽ 2 | ๐’š, ๐œท, ๐œ†, ๐ ~๐ผ๐บ(๐‘Ž∗ , ๐‘ ∗ ),
where
๐‘Ž∗ = ๐‘Ž +
๐‘∗ =
๐Ÿ
๐Ÿ
๐‘๐‘‡
,
2
๐‘ป
๐’•=๐Ÿ( ๐’š๐‘ก
− ๐œ†๐’š๐‘ก−1 − ๐‘ฟ๐‘ก ๐œท − ๐๐‘ก )′ ๐’š๐’• − ๐œ†๐’š๐‘ก−1 − ๐‘ฟ๐‘ก ๐œท − ๐๐‘ก + ๐‘
Full conditional of ๐€
๐œ†|(๐’š, ๐œท, ๐, ๐œŽ 2 ) ∼ ๐‘(๐œ†๐‘› , ๐›พ)
where
๐œ†๐‘› = (
๐›พ = ๐œŽ 2(
๐‘‡
′
−1
๐‘ก=1 ๐’š๐‘ก−1 ๐’š๐‘ก−1 )
๐‘ป
๐’•=๐Ÿ(๐’š๐‘ก
− ๐‘ฟ๐‘ก ๐œท − ๐๐‘ก )′๐’š๐‘ก−1
๐‘ป
′
−1
๐’•=๐Ÿ ๐’š๐‘ก−1 ๐’š๐‘ก−1 )
Now we consider two cases for fixed and random effects.
a) Fixed Effects:
Suppose effects of all units are fixed at different times and
๐๐‘ก = ๐ = (๐œ‡1 , … , ๐œ‡๐‘ )′ ~๐‘ต(๐๐ŸŽ , ๐œž๐ŸŽ )
Full conditional of ๐ :
๐| ๐’š, ๐œท, ๐œŽ 2 ~๐‘(๐๐’ , ๐œž๐’ )
where
๐๐’ = ๐œž๐’ [๐œŽ −2
๐‘‡
๐‘ก=1( ๐’š๐’•
− ๐œ†๐’š๐‘ก−1 − ๐‘ฟ๐‘ก ๐œท) + ๐œž−1
0 ๐0 ]
−1
๐œž๐’ = (๐‘‡๐œŽ −2 ๐‘ฐ๐‘ต + ๐œž−1
0 )
b) Random Effects
Suppose random effects of all units are fixed at different times
๐๐‘ก = ๐ = ๐œ‡1 , … , ๐œ‡๐‘
′
where ๐œ‡๐‘– ~๐‘(๐œ‡∗ , ๐œŽ๐œ‡2 ), i=1,…,N
Full conditional of ๐ :
๐| ๐’š, ๐œท, ๐ˆ๐Ÿ ~๐‘ต(๐๐’ , ๐œฎ๐๐’ )
where
๐๐’ = ๐œฎ๐๐’ [๐œŽ −2
๐‘‡
๐‘ก=1( ๐’š๐’•
− ๐œ†๐’š๐‘ก−1 − ๐‘ฟ๐‘ก ๐œท) + ๐œŽ๐œ‡−2 ๐∗ ๐‘ฐ๐‘ ]
๐œฎ๐๐’ = (๐‘‡๐œŽ −2 ๐‘ฐ๐‘ต + ๐œŽ๐œ‡−2 ๐‘ฐ๐‘ )−1
Prior distributions for hyper parameters:
Suppose ๐∗ ~๐‘ต ๐∗๐ŸŽ , ๐ˆ๐Ÿ๐๐ŸŽ and ๐ˆ๐Ÿ๐ ~๐‘ฐ๐‘ฎ ๐‘จ, ๐‘ฉ ,
Full conditional of ๐∗ :
๐∗ |(๐, ๐ˆ๐Ÿ๐ )~๐‘ต(๐∗๐’ , ๐ˆ๐Ÿ๐∗๐’ )
where
∗
−๐Ÿ ′
๐∗๐’ = ๐ˆ๐Ÿ๐∗๐’ ๐ˆ−๐Ÿ
๐๐ŸŽ ๐๐ŸŽ + ๐ˆ๐ ๐œพ๐‘ต ๐
−๐Ÿ −๐Ÿ
๐ˆ๐Ÿ๐∗๐’ = (๐ˆ−๐Ÿ
๐๐ŸŽ + ๐‘ต๐ˆ๐ )
Full conditional of ๐ˆ๐Ÿ๐ :
๐ˆ๐Ÿ๐ |(๐, ๐∗๐’ )~๐‘ฐ๐‘ฎ(๐‘จ +
๐‘ต
๐Ÿ
, ๐‘ฉ + (๐ − ๐∗๐’ ๐œพ๐‘ต )′ ๐ − ๐∗๐’ ๐œพ๐‘ต )
๐Ÿ
๐Ÿ
Bayesian Estimation of SDPRM:
๐’š๐‘ก = ๐œŒ๐‘พ๐’š๐‘ก + ๐œ†๐’š๐‘ก−1 + ๐‘ฟ๐’• ๐œท + ๐๐‘ก + ๐œบ๐‘ก
๐œบ๐‘ก ~๐‘(๐ŸŽ, ๐œŽ 2 ๐‘ฐ)
The conditional likelihood function at time t is:
๐’š๐‘ก |(๐’š๐‘ก−๐Ÿ , ๐œท, ๐œŒ, ๐œ†, ๐๐‘ก , ๐œŽ 2 )~๐‘ต(๐’„, ๐œฎ)
where
๐’„ = ๐†๐‘พ๐’š๐‘ก +๐œ†๐’š๐‘ก−1 + ๐‘ฟ๐’• ๐œท + ๐๐‘ก
๐œฎ=๐œŽ 2 (I− ๐†๐‘พ)−1 (I− ๐†๐‘พ′)
−1
Bayesian Estimation of SDPRM:
Prior distributions:
๐œŽ 2 ~๐ผ๐บ ๐‘Ž, ๐‘ ,
๐›ฝ~๐‘ ๐›ฝ0 , ๐›ด0
−1
๐œŒ~๐‘ˆ(๐œ†−1
๐‘š๐‘–๐‘› , ๐œ†๐‘š๐‘Ž๐‘ฅ )
where ๐œ†๐‘š๐‘–๐‘› and ๐œ†๐‘š๐‘Ž๐‘ฅ are minimum and maximum eigen
values of the weight matrix (San et al, 1999).
The posterior distribution is given by
๐’‡ ๐œท, ๐œŒ, ๐œ†, ๐, ๐œŽ 2 ๐’š ∝ ๐’‡ ๐’š ๐œท, ๐œŒ, ๐œ†, ๐, ๐œŽ 2 ๐’‡(๐œŒ)๐’‡ ๐œท ๐’‡ ๐ ๐’‡(๐œŽ 2 )
But this distribution has not close form.
To use Gibbs sampling the full conditionals are needed:
Full conditional of ๐œท โˆถ
๐œท| ๐’š, ๐œŒ, ๐œ†, ๐, ๐œŽ 2 ~๐‘ต(๐‘ฉ−๐Ÿ ๐‘, ๐‘ฉ−๐Ÿ )
where
๐‘ฉ = (๐ˆ−๐Ÿ
๐‘ป
′
๐’•=๐Ÿ ๐‘ฟ๐’• ๐‘ฟ๐’•
๐‘ = 2 ๐ˆ−๐Ÿ
๐‘ป
′
๐’•=๐Ÿ ๐‘ฟ๐’•
+
−๐Ÿ
๐ŸŽ )
๐’š๐’• − ๐œŒ๐‘พ๐’š๐’• − ๐œ†๐’š๐‘ก−1 − ๐๐’• +
−๐Ÿ
๐ŸŽ ๐œท๐ŸŽ
Full conditional of ๐ˆ๐Ÿ โˆถ
๐œŽ 2 | ๐’š, ๐œท, ๐œŒ, ๐œ†, ๐ ~๐ผ๐บ(๐‘Ž∗ , ๐‘ ∗ ),
where
๐‘Ž∗ = ๐‘Ž +
๐‘∗ =
๐Ÿ
๐Ÿ
๐‘๐‘‡
,
2
๐‘ป
๐’•=๐Ÿ( ๐’š๐’•
− ๐œŒ๐‘พ๐’š๐‘ก − ๐‘ฟ๐‘ก ๐œท − ๐๐’• )′ ๐’š๐‘ก − ๐œŒ๐‘พ๐’š๐‘ก − ๐‘ฟ๐‘ก ๐œท − ๐๐‘ก + ๐‘
Full conditional of ๐†
๐’‡ ๐† ๐’š, ๐œท, ๐€, ๐, ๐ˆ๐Ÿ ) ∝ |(๐‘ฐ๐‘ต − ๐†๐‘พ′ )( ๐‘ฐ๐‘ต −
−๐‘ป
๐†๐‘พ)| ๐Ÿ ๐ž๐ฑ๐ฉ(−
๐Ÿ
๐Ÿ๐ˆ๐Ÿ
๐‘ป
๐œบ′๐’• ๐œบ๐’• )
๐’•=๐Ÿ
where
๐œบ๐’• =๐’š๐’• − ๐†๐‘พ๐’š๐’• − ๐œ†๐’š๐‘ก−1 − ๐‘ฟ๐’• ๐œท − ๐๐’•
Full conditional of ๐€
๐€|(๐’š, ๐œท, ๐†, ๐, ๐ˆ๐Ÿ ) ∼ ๐‘ต(๐€๐’ , ๐œธ)
where
๐€๐’ = ๐ˆ๐Ÿ (
๐œธ=๐ˆ๐Ÿ (
๐‘ป
′
−๐Ÿ
๐’š
๐’•=๐Ÿ ๐’•−๐Ÿ ๐’š๐’•−๐Ÿ )
๐‘ป
′
−๐Ÿ
๐’•=๐Ÿ ๐’š๐’•−๐Ÿ ๐’š๐’•−๐Ÿ )
๐‘ป
๐’•=๐Ÿ(๐’š๐’•
− ๐†๐‘พ๐’š๐’• − ๐‘ฟ๐’• ๐œท − ๐๐’• )′๐’š๐’•−๐Ÿ
a) Fixed Effects:
Suppose effects of all units are fixed at different times and
๐๐‘ก = ๐ = (๐œ‡1 , … , ๐œ‡๐‘ )′ ~๐‘ต(๐๐ŸŽ , ๐œž๐ŸŽ )
Full conditional of ๐ :
๐| ๐’š, ๐œท, ๐†, ๐ˆ๐Ÿ ~๐‘ต(๐๐’ , ๐œž๐’ )
where
๐๐’ = ๐œž๐’ [๐ˆ−๐Ÿ
๐‘ป
๐’•=๐Ÿ( ๐’š๐’•
− ๐†๐‘พ๐’š๐’• − ๐œ†๐’š๐‘ก−1 − ๐‘ฟ๐’• ๐œท) + ๐œž−๐Ÿ
๐ŸŽ ๐๐ŸŽ ]
−๐Ÿ
๐œž๐’ = (๐‘ป๐ˆ−๐Ÿ ๐‘ฐ๐‘ต + ๐œž−๐Ÿ
๐ŸŽ )
b) Random Effects
Suppose random effects of all units are fixed at different times
๐๐‘ก = ๐ = ๐œ‡1 , … , ๐œ‡๐‘
′
๐œ‡๐‘– ~๐‘(๐œ‡∗ , ๐œŽ๐œ‡2 ), i=1,…,N
Full conditional of ๐ :
๐| ๐’š, ๐œท, ๐†, ๐ˆ๐Ÿ ~๐‘ต(๐๐’ , ๐œฎ๐๐’ )
where
๐๐’ = ๐œฎ๐๐’ [๐ˆ−๐Ÿ
๐‘ป
๐’•=๐Ÿ( ๐’š๐’•
− ๐†๐‘พ๐’š๐’• − ๐œ†๐’š๐‘ก−1 − ๐‘ฟ๐’• ๐œท) + ๐ˆ๐−๐Ÿ ๐∗ ๐‘ฐ๐‘ต ]
−๐Ÿ
๐œฎ๐๐’ = (๐‘ป๐ˆ−๐Ÿ ๐‘ฐ๐‘ต + ๐ˆ−๐Ÿ
๐ ๐‘ฐ๐‘ต )
Prior distributions for hyper parameters:
If ๐ˆ๐Ÿ๐ ~๐‘ฐ๐‘ฎ ๐‘จ, ๐‘ฉ
๐š๐ง๐ ๐∗ ~๐‘ต(๐∗๐ŸŽ , ๐ˆ๐Ÿ๐๐ŸŽ ) then
Full conditional of ๐∗ :
๐∗ |(๐, ๐ˆ๐Ÿ๐ )~๐‘ต(๐∗๐’ , ๐ˆ๐Ÿ๐∗๐’ )
where
∗
−๐Ÿ ′
๐∗๐’ = ๐ˆ๐Ÿ๐∗๐’ ๐ˆ−๐Ÿ
๐๐ŸŽ ๐๐ŸŽ + ๐ˆ๐ ๐œพ๐‘ต ๐
−๐Ÿ −๐Ÿ
๐ˆ๐Ÿ๐∗๐’ = (๐ˆ−๐Ÿ
๐๐ŸŽ + ๐‘ต๐ˆ๐ )
Full conditional of ๐ˆ๐Ÿ๐ :
๐ˆ๐Ÿ๐ |(๐, ๐∗ )~๐‘ฐ๐‘ฎ(๐‘จ +
๐‘ต
๐Ÿ
, ๐‘ฉ + (๐ − ๐∗๐’ ๐œพ๐‘ต )′ ๐ − ๐∗๐’ ๐œพ๐‘ต ))
๐Ÿ
๐Ÿ
Modeling of Crime Data
Dependent variable is murder rate (per 100,000 people) in 30 cities of Iran in
years 2000 -2010.
Independent variables are indexes of unemployment, industrialization and
income inequality.
Accuracy of the models are compared by BIC criteria.
Prior distributions:
๐›ฝ0 , ๐›ฝ1 , ๐›ฝ2 , ๐›ฝ3 ~๐‘(0, 103 )
1
~๐บ
๐œŽ2
0.01,0.01
๐œ‡๐‘– ~๐‘ ๐œ‡∗ , ๐œŽ๐‘ข2
๐œ‡~๐‘ 0,100๐ผ๐‘
๐œ‡∗ ~๐‘ 0,100
๐œŽ 2 ~๐ผ๐บ(0.01,0.01)
Normality of the data
Histogram
P-P plot
Data transformed by Box-Cox transformation with ๐œ† = −0.29 .
The p_value=0.13 for Shapiro-Wilk test shows normality of transformed
The Estimates of the models parameters and BIC
DPRM
Items
Parameters
SDPRM
Random Effect
Fixed Effect
Random Effect
Fixed Effect
Constant
๐›ฝ0
13.43
-40.65
73.44
294.78
Unemployment
๐›ฝ1
0.60
0.49
0.74
0.58
Industrial
๐›ฝ2
0.009
0.007
0.009
0.007
Deference income
๐›ฝ3
25.82
24.63
32.96
31.89
Time autoregressive
๐œ†
0.21
0.135
-0.002
-0.002
๐œŽ2
538.42
613.57
538.44
608.38
๐œŒ
-
-
-0.138
-0.107
494
522
481
478
Variance
Spatial
autoregressive
BIC
Based on BIC criteria the spatial dynamic fixed effect regression
model is better than the other models
Conclusion
๏ƒ˜ The variability between experimental units can be
considered by dynamic panel regression models.
๏ƒ˜Spatial and spatio-temporal correlation of data can be
considered by using spatial dynamic panel regression models.
๏ƒ˜For analysis of crime data in Tehran city, a spatial dynamic
panel regression model with fixed effect is more accurate than
the other models.
๏ƒ˜By using spatial dynamic panel regression model we are able
to consider the spatio-temporal correlation of data without
providing covariance function.
REFERENCES
Anselin, L., Le Gallo, J. and Jayet, H. (2008), Spatial Panel Econometrics, in The
Econometrics of Panel Data: Fundamentals and Recent Developments in Theory and Practice,
Berlin, Springer. Group New York.
Mohammadzadeh, M. and Rasouli, H. R. (2013), Bayesian Analysis of Spatial Dynamic Panel
Regression Models, GeoMed 2013, Sheffield, UK.
Sun, D., Robert, K., Tsutakawa, L., Paul L. S. (1999), Posterior Distribution of
Hierarchical Models Using Car(1) Distributions, Biometrika, 86, 341-350.
Yang, Z. and Su, L. (2012), QML Estimation of Dynamic Panel Data Models with Spatial Errors,
18th Reserarch International Panel Data Conference.
Baltagi, B. H. (2001), Econometric Analysis of Panel Data, Chichester, Wiley.
Debarsy, N. Ertur, C., Lesage, J., (2012), Interpreting Dynamic Space-Time Panel Data
Models, Journal of Statistical Methodology, 9, 158-171.
Elhorst, J. P. (2003), Specification and Estimation of Spatial Panel Data
Models. International Regional Science Review, 26, 244-268.
Thank you for your attention
Download