library(plm)
library(psych)
library(xts)
library(tseries)
library(lmtest)
## import dataset
datas
## adf test
pcgdp
adf.test(pcgdp)
# result: stationary
ltax
adf.test(ltax)
# result: stationary
hp
adf.test(hp)
# result: stationary
lp
adf.test(lp)
# result: stationary
## 协整检验
# Engle-Granger
reg
summary(reg)
error
adf.test(error)
# result: residuals stationary
### 面板数据回归
hpdatas
# Pooled Regression Model
hp_pool
# Fixed Effects Regression Model
hp_fe
# F-test :
pFtest(hp_fe,hp_pool)
# result: significant effects
# Random Effects Regression Model
hp_re
# Hausman test
phtest(hp_fe,hp_re)
# if p<0.05,then use fixed effects
# result: p=0.6785>0.05,use random ffects
# Random Effects Regression Model
hp_re
summary(hp_re)
# 显著水平 a=0.01
# result: fp:房价与 lp:地价正相关,且显著;
# fp:房价与 Ltax: 地税收入正相关,且显著;
# fp:房价与 PCGDP: 人均GDP 正相关,且显著;