Learn R Programming

valueprhr (version 0.1.0)

run_full_analysis: Run Complete Analysis Pipeline

Description

Convenience function to run the full analysis pipeline.

Usage

run_full_analysis(
  direct_prices,
  production_prices,
  run_bayesian = FALSE,
  run_cv = TRUE,
  run_breaks = TRUE,
  verbose = TRUE
)

Value

A list with all analysis results.

Arguments

direct_prices

Data frame with direct prices.

production_prices

Data frame with production prices.

run_bayesian

Logical. Run Bayesian models. Default FALSE.

run_cv

Logical. Run cross-validation. Default TRUE.

run_breaks

Logical. Run structural break tests. Default TRUE.

verbose

Logical. Print progress. Default TRUE.

Examples

Run this code
# \donttest{
set.seed(123)
years <- 2000:2019
sectors <- LETTERS[1:5]

direct <- data.frame(Year = years)
production <- data.frame(Year = years)
for (s in sectors) {
  direct[[s]] <- 100 + cumsum(rnorm(20, 2, 1))
  production[[s]] <- 102 + cumsum(rnorm(20, 2, 1))
}

if (requireNamespace("plm", quietly = TRUE)) {
  results <- run_full_analysis(
    direct, production,
    run_bayesian = FALSE,
    run_cv = FALSE
  )
  print(results$comparison)
}
# }

Run the code above in your browser using DataLab