SEESGS46 Project
- Cacular Ye
- 2018年9月19日
- 讀畢需時 2 分鐘
大家好! 叶小二今天和大家分享一个 SEESGS46的一个project.
这个project 是自选题目,但是数据要么是cross-sectional 要么是time series data. 而且重点不是研究的内容, 而是basic econometrics 的应用。
所以为了简化问题,我选取的是研究human capital and GDP per capita的关系,用的数据是China over the period of 1952 – 2014. human capital用的是human capital index,然后GDP per capita 是用GDP/population. 这些数据都是来自Penn World Table 9.0。 这个是个公开数据库,很多国家的宏观数据都可以下载到。这个project的sample数据我分享在了百度网盘,大家可以去下载,试着自己做一下。
链接: https://pan.baidu.com/s/1AbfvY_aPM5s-xEzHDtlFQw 密码: tbsa
📷
上面这个是整个project的大体要求。
我选的data是time series,所以涉及时间序列的分析。用的统计软件是STATA 14.
The research aim is to investigate the relationship between human capital and economic growth.
literature review什么的,小二我就不在这里赘述了,反正也不是重点。大概就是围绕着Solow growth model 和相关的empirical studies。
数据分析的第一步;
1. descriptive statistics
这个作业的要求使用graphic presentations来看这两个变量: HCI (human capital index) and GDPPC (GDP per capita). 首先是original 数据, 然后是log transformed 数据。
📷
📷
从图中可以看来,在这两个变量中trend是很明显的。这个会是很严重的问题,如果要用OLS regression的话。
第二步:correlation analysis
📷
从上面结果可以看出,log transformed variables have the strong correlation. 当correlation coefficient 超过0.7 或者低于-0.7, 这2个variables之间就存在collinearity,这个会影响ols regression的准确性。
第三步: stationarity
对于时间序列,stationarity 是一个非常重要的特点。non-stationary data always leads to spurious regression.
我用了ACF 和PACF来看。
📷
visual check这个 stationarity through ACF, PACF 是有一些guidelines,叶小二总结了以下3点:
1) Nonstationary series have an ACF that remains significant for half a dozen or more lags, rather than quickly declining to zero. You must difference such a series until it is stationary before you can identify the process.
2) Autoregressive processes have an exponentially declining ACF and spikes in the first one or more lags of the PACF. The number of spikes indicates the order of the autoregression.
3) Moving average processes have spikes in the first one or more lags of the ACF and an exponentially declining PACF. The number of spikes indicates the order of the moving average.
从上面图上可以看出, ACF remains significant for more than half of lags. 这说明了,这个variable is nonstationary and needed to take the first difference.
当然除了ACF, PACF, 我们可以用ADF test 比较test statistic 和5% critical。
📷
从结果可以看出,在first difference之后,数据变得stationary。
这些前期准备工作完了之后,涉及到选model:
很多同学,不知道什么情况下,用什么模型,我给大家一个basic guideline:
如果all variables are stationary, 那么作为时间序列,我们可以用ols/VAR Model;
如果all variables are non-stationary,这种情况,我们有两种处理方法: 1)Johansen test: if cointegration was confirmed, we use ECM or Causality test. 2) 用ARDL model, 然后再看cointegration, confirmed的话,选ECM or causality test.
如果一些variables are stationary 另一些non-stationary,直接跳去 ARDL.
📷
这个作业之后的思路就是上面所讲的那样啦。
Comments