@@ -104,20 +104,15 @@ generics::forecast
104104# '
105105# ' @examples
106106# ' # specify the model
107- # ' specification = specify_bvarPANEL$new(ilo_dynamic_panel, exogenous = ilo_exogenous_variables)
107+ # ' specification = specify_bvarPANEL$new(
108+ # ' ilo_dynamic_panel[1:5],
109+ # ' exogenous = ilo_exogenous_variables[1:5]
110+ # ' )
108111# ' burn_in = estimate(specification, 5) # run the burn-in; use say S = 10000
109112# ' posterior = estimate(burn_in, 5) # estimate the model; use say S = 10000
110113# '
111114# ' # forecast 5 years ahead
112- # ' predictive = forecast(posterior, 5, exogenous_forecast = ilo_exogenous_forecasts)
113- # '
114- # ' # workflow with the pipe |>
115- # ' ############################################################
116- # ' ilo_dynamic_panel |>
117- # ' specify_bvarPANEL$new() |>
118- # ' estimate(S = 5) |>
119- # ' estimate(S = 5) |>
120- # ' forecast(horizon = 2) -> predictive
115+ # ' predictive = forecast(posterior, 5, exogenous_forecast = ilo_exogenous_forecasts[1:5])
121116# '
122117# ' @export
123118forecast.PosteriorBVARPANEL = function (
@@ -251,9 +246,9 @@ forecast.PosteriorBVARPANEL = function(
251246# ' @examples
252247# ' # specify the model
253248# ' specification = specify_bvarGroupPANEL$new(
254- # ' ilo_dynamic_panel,
255- # ' exogenous = ilo_exogenous_variables,
256- # ' group_allocation = country_grouping_incomegroup
249+ # ' ilo_dynamic_panel[1:5] ,
250+ # ' exogenous = ilo_exogenous_variables[1:5] ,
251+ # ' group_allocation = country_grouping_incomegroup[1:5]
257252# ' )
258253# ' burn_in = estimate(specification, 5) # run the burn-in; use say S = 10000
259254# ' posterior = estimate(burn_in, 5) # estimate the model; use say S = 10000
@@ -262,17 +257,9 @@ forecast.PosteriorBVARPANEL = function(
262257# ' predictive = forecast(
263258# ' posterior,
264259# ' horizon = 5,
265- # ' exogenous_forecast = ilo_exogenous_forecasts
260+ # ' exogenous_forecast = ilo_exogenous_forecasts[1:5]
266261# ' )
267262# '
268- # ' # workflow with the pipe |>
269- # ' ############################################################
270- # ' ilo_dynamic_panel |>
271- # ' specify_bvarGroupPANEL$new(group_allocation = country_grouping_incomegroup) |>
272- # ' estimate(S = 5) |>
273- # ' estimate(S = 5) |>
274- # ' forecast(horizon = 2) -> predictive
275- # '
276263# ' @export
277264forecast.PosteriorBVARGROUPPANEL = function (
278265 object ,
@@ -497,20 +484,15 @@ forecast.PosteriorBVARGROUPPANEL = function(
497484# '
498485# ' @examples
499486# ' # specify the model
500- # ' specification = specify_bvars$new(ilo_dynamic_panel, exogenous = ilo_exogenous_variables)
487+ # ' specification = specify_bvars$new(
488+ # ' ilo_dynamic_panel[1:5],
489+ # ' exogenous = ilo_exogenous_variables[1:5]
490+ # ' )
501491# ' burn_in = estimate(specification, 5) # run the burn-in; use say S = 10000
502492# ' posterior = estimate(burn_in, 5) # estimate the model; use say S = 10000
503493# '
504494# ' # forecast 5 years ahead
505- # ' predictive = forecast(posterior, 5, exogenous_forecast = ilo_exogenous_forecasts)
506- # '
507- # ' # workflow with the pipe |>
508- # ' ############################################################
509- # ' ilo_dynamic_panel |>
510- # ' specify_bvars$new() |>
511- # ' estimate(S = 5) |>
512- # ' estimate(S = 5) |>
513- # ' forecast(horizon = 2) -> predictive
495+ # ' predictive = forecast(posterior, 5, exogenous_forecast = ilo_exogenous_forecasts[1:5])
514496# '
515497# ' @export
516498forecast.PosteriorBVARs = function (
@@ -645,23 +627,15 @@ forecast.PosteriorBVARs = function(
645627# ' @examples
646628# ' # specify the model
647629# ' specification = specify_bvarGroupPriorPANEL$new(
648- # ' ilo_dynamic_panel,
649- # ' group_allocation = country_grouping_incomegroup
630+ # ' ilo_dynamic_panel[1:5] ,
631+ # ' group_allocation = country_grouping_incomegroup[1:5]
650632# ' )
651633# ' burn_in = estimate(specification, 5) # run the burn-in; use say S = 10000
652634# ' posterior = estimate(burn_in, 5) # estimate the model; use say S = 10000
653635# '
654636# ' # forecast 5 years ahead
655637# ' predictive = forecast(posterior, horizon = 5)
656638# '
657- # ' # workflow with the pipe |>
658- # ' ############################################################
659- # ' ilo_dynamic_panel |>
660- # ' specify_bvarGroupPriorPANEL$new(group_allocation = country_grouping_incomegroup) |>
661- # ' estimate(S = 5) |>
662- # ' estimate(S = 5) |>
663- # ' forecast(horizon = 2) -> predictive
664- # '
665639# ' @export
666640forecast.PosteriorBVARGROUPPRIORPANEL = function (
667641 object ,
0 commit comments