阅读权限 255 威望 3 级论坛币 12142 个 通用积分 313.4212 学术水平 3212 点 热心指数 3231 点 信用等级 3124 点 经验 8908 点 帖子 1637 精华 0 在线时间 8 小时 注册时间 2006-11-26 最后登录 2018-10-13
藤椅
epoh
发表于 2011-11-11 20:52:08
这是在建构gmm instrument时用到的参数
为保险起见都会取大范围
譬如底下例子:
2:8 与 2:99的结果是相同的
这时的matrix 是 28 x 6
而2:7时,与 2:99的结果就不相同
这时的matrix 是 27 x 6
详见plm.pdf page 31/65
#########
y~lag(y, 1:2)+lag(x1, 0:1)+lag(x2, 0:2) | lag(y, 2:99)
is similar to y~lag(y,1:2)+lag(x1, 0:1)+lag(x2, 0:2) |
lag(y, 2:99) | lag(x1, 0:1)+lag(x2,0:2)
and indicates that all lags from 2 of y is used as gmm instruments.
The first right-hand side part describe the covariates.
The second one, which is mandatory, describes the gmm instruments.
The third one, which is optionnal,describes the ’normal’ instruments.
By default, all the variables of the model which are not used as
GMM instruments are used as normal instruments with the same lag
structure as the one specified in the model.
############
library(plm)
data("EmplUK", package = "plm")
z7 <- pgmm(log(emp) ~ lag(log(emp), 1)+ lag(log(wage), 0:1) +
lag(log(capital), 0:1) | lag(log(emp), 2:7) +
lag(log(wage), 2:7) + lag(log(capital), 2:7),
data = EmplUK, effect = "twoways", model = "onestep",
transformation = "ld")
summary(z7)
Coefficients
Estimate Std. Error z-value Pr(>|z|)
lag(log(emp), 1) 0.936845 0.016543 56.6313 < 2.2e-16 ***
lag(log(wage), 0:1)0 -0.627037 0.069777 -8.9863 < 2.2e-16 ***
lag(log(wage), 0:1)1 0.479968 0.063831 7.5193 5.506e-14 ***
lag(log(capital), 0:1)0 0.478242 0.045499 10.5110 < 2.2e-16 ***
lag(log(capital), 0:1)1 -0.419226 0.047809 -8.7687 < 2.2e-16 ***
###########
z8 <- pgmm(log(emp) ~ lag(log(emp), 1)+ lag(log(wage), 0:1) +
lag(log(capital), 0:1) | lag(log(emp), 2:8) +
lag(log(wage), 2:8) + lag(log(capital), 2:8),
data = EmplUK, effect = "twoways", model = "onestep",
transformation = "ld")
summary(z8)
Coefficients
Estimate Std. Error z-value Pr(>|z|)
lag(log(emp), 1) 0.935605 0.016302 57.3931 < 2.2e-16 ***
lag(log(wage), 0:1)0 -0.630976 0.069328 -9.1013 < 2.2e-16 ***
lag(log(wage), 0:1)1 0.482620 0.063722 7.5739 3.623e-14 ***
lag(log(capital), 0:1)0 0.483930 0.044933 10.7701 < 2.2e-16 ***
lag(log(capital), 0:1)1 -0.424393 0.047422 -8.9492 < 2.2e-16 ***
###########
z99 <- pgmm(log(emp) ~ lag(log(emp), 1)+ lag(log(wage), 0:1) +
lag(log(capital), 0:1) | lag(log(emp), 2:99) +
lag(log(wage), 2:99) + lag(log(capital), 2:99),
data = EmplUK, effect = "twoways", model = "onestep",
transformation = "ld")
summary(z99)
Coefficients
Estimate Std. Error z-value Pr(>|z|)
lag(log(emp), 1) 0.935605 0.016302 57.3931 < 2.2e-16 ***
lag(log(wage), 0:1)0 -0.630976 0.069328 -9.1013 < 2.2e-16 ***
lag(log(wage), 0:1)1 0.482620 0.063722 7.5739 3.623e-14 ***
lag(log(capital), 0:1)0 0.483930 0.044933 10.7701 < 2.2e-16 ***
lag(log(capital), 0:1)1 -0.424393 0.047422 -8.9492 < 2.2e-16 ***
总评分: 论坛币 + 40
学术水平 + 6
热心指数 + 6
信用等级 + 5
查看全部评分