Covariance of a pangmm fit
Usage
# S3 method for class 'pangmm'
vcov(object, type = NULL, ...)See also
Other pangmm methods:
plot.pangmm(),
predict.pangmm(),
summary.pangmm()
Examples
set.seed(3)
N <- 200; TT <- 6
d <- data.frame(id = rep(seq_len(N), each = TT), t = rep(seq_len(TT), N))
mu <- rep(rnorm(N), each = TT)
d$y <- ave(mu + rnorm(N * TT), d$id, FUN = function(e) stats::filter(e, 0.4,
method = "recursive"))
fit <- pangmm(y ~ lag(y, 1) | lag(y, 2:99), data = d, index = c("id", "t"),
model = "twostep")
sqrt(diag(vcov(fit, type = "classical")))
#> lag(y, 1) 3 4 5 6
#> 0.12466147 0.09332815 0.10048407 0.10112917 0.09340707
sqrt(diag(vcov(fit, type = "robust")))
#> lag(y, 1) 3 4 5 6
#> 0.12523344 0.09553760 0.10970517 0.11368133 0.09659418