| robust_vcov | R Documentation |
Computes the sandwich (Huber-White) variance-covariance matrix for ML-estimated DSGE model parameters. This provides standard errors that are robust to model misspecification.
robust_vcov(object, ...)
object |
A |
... |
Additional arguments passed to methods (e.g., |
The sandwich estimator is: V_robust = inv(H) B inv(H), where H is the Hessian of the negative log-likelihood and B is the outer product of the per-observation score vectors.
An object of class "dsge_robust_vcov" containing:
Robust variance-covariance matrix.
Robust standard errors.
Conventional (Hessian-based) standard errors for comparison.
Parameter names.
m <- dsge_model(
obs(y ~ z),
state(z ~ rho * z),
start = list(rho = 0.5)
)
set.seed(1)
z <- numeric(100); for (i in 2:100) z[i] <- 0.8 * z[i-1] + rnorm(1)
fit <- estimate(m, data = data.frame(y = z))
rv <- robust_vcov(fit)
print(rv)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.