knitr::opts_chunk$set(fig.height = 2.5,out.width = "100%")
knitr::opts_knit$set(global.par = TRUE)
hfserie <- disaggR:::neither_outlier_nor_constant.twoStepsBenchmark(params$new_bn)

# the parameters not affected by preset models are kept (i.e. time series, outliers and time boundaries)

list_args <- c(list(hfserie= hfserie,
                    outliers = outliers(params$new_bn)),  
               model.list(params$new_bn)[c("lfserie",
                                           "start.coeff.calc","end.coeff.calc",
                                           "start.benchmark","end.benchmark",
                                           "start.domain","end.domain")]
)

presets_list <- do.call(disaggR:::presets_list_fun, list_args)

Presets

:::: {.columns}

::: {.column width="50%"}

Model 1 (differences --- with constant)

plot(in_sample(presets_list[[1]]))

Model 3 (levels --- with constant)

plot(in_sample(presets_list[[3]]))

Model 5 (levels --- without constant)

plot(in_sample(presets_list[[5]]))

:::

::: {.column width="50%"}

Model 2 (differences --- without constant)

plot(in_sample(presets_list[[2]]))

Model 4 (autocorrelated levels --- with constant)

plot(in_sample(presets_list[[4]]))

Model 6 (autocorrelated levels --- without constant)

plot(in_sample(presets_list[[6]]))

:::

::::

htmltools::HTML(
  as.character(
    disaggR:::summary_table_html(presets_list,
                                 params$old_bn,
                                 2L)
    ))

Scatter plot

:::: {.columns}

::: {.column width="100%"}

plot(in_scatter(params$new_bn))

:::

::::

Benchmark

:::: {.columns}

::: {.column width="100%"}

cat(disaggR:::get_benchmark_call(params$new_bn,params$hfserie_name,params$lfserie_name))
plot(params$new_bn)

:::

::::

In-sample predictions

:::: {.columns}

::: {.column width="100%"}

plot(in_sample(params$new_bn,type="levels"),
     ylab = "Levels")
plot(in_sample(params$new_bn,type="changes"),
     ylab = "Changes")

:::

::::

Benchmark summary

:::: {.columns}

::: {.column width="100%"}

print(summary(params$new_bn),call=FALSE)

:::

::::

Comparison benchmark/input

:::: {.columns}

::: {.column width="100%"}

plot(in_disaggr(params$new_bn,type="levels-rebased"),
     ylab = "Rebased levels")
plot(in_disaggr(params$new_bn,type="changes"),
     ylab = "Changes")
plot(in_disaggr(params$new_bn,type="contributions"),
     ylab = "Contributions")

:::

::::



InseeFr/disaggR documentation built on June 29, 2024, 7:10 p.m.