refresh | R Documentation |
Function allowing to create a new specification by updating a specification used for a previous estimation. Some selected parameters will be kept fixed (previous estimation results) while others will be freed for re-estimation in a domain of constraints. See details and examples.
tramo_refresh(
spec,
refspec = NULL,
policy = c("FreeParameters", "Complete", "Outliers_StochasticComponent", "Outliers",
"FixedParameters", "FixedAutoRegressiveParameters", "Fixed", "Current"),
period = 0,
start = NULL,
end = NULL
)
tramoseats_refresh(
spec,
refspec = NULL,
policy = c("FreeParameters", "Complete", "Outliers_StochasticComponent", "Outliers",
"FixedParameters", "FixedAutoRegressiveParameters", "Fixed", "Current"),
period = 0,
start = NULL,
end = NULL
)
spec |
the current specification to be refreshed ( |
refspec |
the reference specification used to define the domain
considered for re-estimation ( |
policy |
the refresh policy to apply (see details). |
period , start , end |
additional parameters used to specify the span on
which additive outliers (AO) are introduced when |
The selection of constraints to be kept fixed or re-estimated is called a revision policy. User-defined parameters are always copied to the new refreshed specifications. This revision applies to the estimation done in Tramo (pre-adjustment phase), Seats will then run a new decomposition which might be in some (rare) cases based on a different model.
Available refresh policies are:
Current: applying the current pre-adjustment reg-arima model and handling the new raw data points, or any sub-span of the series as Additive Outliers (defined as new intervention variables)
Fixed: applying the current pre-adjustment reg-arima model and replacing forecasts by new raw data points.
FixedParameters: pre-adjustment reg-arima model is partially modified: regression coefficients will be re-estimated but regression variables, Arima orders and coefficients are unchanged.
FixedAutoRegressiveParameters: same as FixedParameters but Arima Moving Average coefficients (MA) are also re-estimated, Auto-regressive (AR) coefficients are kept fixed.
FreeParameters: all regression and Arima model coefficients are re-estimated, regression variables and Arima orders are kept fixed.
Outliers: regression variables and Arima orders are kept fixed, but outliers will be re-detected on the defined span, thus all regression and Arima model coefficients are re-estimated
Outliers_StochasticComponent: same as "Outliers" but Arima model orders (p,d,q)(P,D,Q) can also be re-identified.
a new specification, an object of class "JD3_TRAMOSEATS_SPEC"
or
"JD3_TRAMO_SPEC"
.
More information on revision policies in JDemetra+ online documentation: https://jdemetra-new-documentation.netlify.app/t-rev-policies-production
y <- rjd3toolkit::ABS$X0.2.08.10.M
# raw series for first estimation
y_raw <- window(y, end = c(2016, 12))
# raw series for second (refreshed) estimation
y_new <- window(y, end = c(2017, 6))
# specification for first estimation
spec_tramoseats_1 <- tramoseats_spec("rsafull")
# first estimation
sa_tramoseats <- tramoseats(y_raw, spec_tramoseats_1)
# refreshing the specification
current_result_spec <- sa_tramoseats$result_spec
current_domain_spec <- sa_tramoseats$estimation_spec
# policy = "Fixed"
spec_tramoseats_ref <- tramoseats_refresh(current_result_spec, # point spec to be refreshed
current_domain_spec, # domain spec (set of constraints)
policy = "Fixed"
)
# 2nd estimation with refreshed specification
sa_tramoseats_ref <- tramoseats(y_new, spec_tramoseats_ref)
# policy = "Outliers"
spec_tramoseats_ref <- tramoseats_refresh(current_result_spec,
current_domain_spec,
policy = "Outliers",
period = 12,
start = c(2017, 1)
) # outliers will be re-detected from January 2017 included
# 2nd estimation with refreshed specification
sa_tramoseats_ref <- tramoseats(y_new, spec_tramoseats_ref)
# policy = "Current"
spec_tramoseats_ref <- tramoseats_refresh(current_result_spec,
current_domain_spec,
policy = "Current",
period = 12,
start = c(2017, 1),
end = end(y_new)
)
# points from January 2017 (included) until the end of the series will be treated
# as Additive Outliers, the previous reg-Arima model being otherwise kept fixed
# 2nd estimation with refreshed specification
sa_tramoseats_ref <- tramoseats(y_new, spec_tramoseats_ref) #'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.