| estimate | R Documentation |
Estimates the parameters of a linear DSGE model by maximizing the log-likelihood computed via the Kalman filter.
estimate(
model,
data,
start = NULL,
fixed = NULL,
method = "BFGS",
control = list(),
shock_start = NULL,
demean = TRUE,
hessian = TRUE,
presample = 0L
)
model |
A |
data |
A data frame, matrix, or |
start |
Named list of starting values for free parameters. Overrides any starting values specified in the model. |
fixed |
Named list of fixed parameter values. Overrides any fixed values specified in the model. |
method |
Optimization method passed to |
control |
Control list passed to |
shock_start |
Named numeric vector of starting values for shock
standard deviations. If |
demean |
Logical. If |
hessian |
Logical. If |
presample |
Integer. Number of initial observations used only to
initialise the Kalman filter and excluded from the likelihood (as
Dynare's |
The estimator optimizes over the structural parameters and the log standard deviations of the shocks. Shock standard deviations are parameterized in log-space to ensure positivity.
If the optimizer encounters parameter values for which the model is
not saddle-path stable, the log-likelihood is set to -Inf.
An object of class "dsge_fit".
# Define a simple AR(1) model
m <- dsge_model(
obs(y ~ z),
state(z ~ rho * z),
start = list(rho = 0.5)
)
# Simulate some data
set.seed(42)
e <- rnorm(200)
z <- numeric(200)
for (i in 2:200) z[i] <- 0.8 * z[i-1] + e[i]
dat <- data.frame(y = z)
fit <- estimate(m, data = dat)
summary(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.