| jvn_nowcast | R Documentation |
Estimate the Jacobs and Van Norden (2011) state-space model for real-time data revisions, allowing for news and noise components and optional spillovers.
jvn_nowcast(
df,
e,
ar_order = 1,
h = 0,
include_news = TRUE,
include_noise = TRUE,
include_spillovers = FALSE,
spillover_news = TRUE,
spillover_noise = TRUE,
method = "MLE",
alpha = 0.05,
standardize = FALSE,
solver_options = list()
)
df |
A matrix, data frame, or single-ID vintages object. Wide data
should store one vintage per column. Long-format vintages data are also
accepted and are converted internally. If |
e |
A single integer giving the number of vintages used in estimation.
The function uses the first |
ar_order |
A single integer giving the autoregressive order of the
latent true-value process. Must be greater than |
h |
A single integer giving the forecast horizon. Must be greater than
or equal to |
include_news |
Logical; whether to include a news component. |
include_noise |
Logical; whether to include a noise component. |
include_spillovers |
Logical; whether to include spillover effects. |
spillover_news |
Logical; whether spillovers apply to the news component. |
spillover_noise |
Logical; whether spillovers apply to the noise component. |
method |
Estimation method. Currently only |
alpha |
Significance level used for confidence intervals. Must lie in
|
standardize |
Logical; whether to standardize the vintage matrix before
estimation using |
solver_options |
A named list of solver options. Valid names are
For backward compatibility, the legacy aliases |
An object of class "jvn_model" with components:
A tibble of filtered and smoothed state estimates. If
solver_options$return_states = FALSE, this is NULL.
A list containing the state-space matrices Z,
Tmat, R, H, and Q.
A data frame of parameter estimates and standard errors.
The raw optimizer output returned by the selected numerical optimizer.
The maximized log-likelihood.
Akaike information criterion.
Bayesian information criterion.
Optimizer convergence code.
The input data after preprocessing.
Scaling metadata returned by jvn_standardize() when
standardize = TRUE; otherwise NULL.
The standard-error method used.
Estimated covariance matrix of the parameter estimates, if
available; otherwise NULL.
Logical; whether computing the Kalman filter's
stationary initial-state covariance at the converged estimate required
numerical regularization, which can happen for a fit close to a
non-stationary boundary. NULL when solver_options$return_states = FALSE, since the initial-state covariance is then not computed.
summary() reports this when TRUE.
Jacobs, Jan P. A. M. and Van Norden, Simon (2011). Modeling data revisions: Measurement error and dynamics of "true" values. Journal of Econometrics.
Other revision nowcasting:
coef.revision_model(),
fitted.revision_model(),
kk_nowcast(),
logLik.revision_model(),
nobs.revision_model(),
plot.revision_model(),
predict.revision_model(),
print.revision_model(),
residuals.revision_model(),
revision_model,
states(),
summary.revision_model(),
vcov.revision_model()
gdp_growth <- dplyr::filter(
tsbox::ts_pc(reviser::gdp),
id == "EA",
time >= min(pub_date),
time <= as.Date("2020-01-01")
)
gdp_growth <- tidyr::drop_na(gdp_growth)
df <- get_nth_release(gdp_growth, n = 0:3)
result <- jvn_nowcast(
df = df,
e = 4,
ar_order = 2,
h = 0,
include_news = TRUE,
include_noise = TRUE
)
summary(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.