Run_MCMC: Run MCMC Analysis with Specified Option File

View source: R/Run_MCMC.R

Run_MCMCR Documentation

Run MCMC Analysis with Specified Option File

Description

This function runs an MCMC analysis based on the specified option file, sourcing auxiliary scripts, and executing the analysis.

Usage

Run_MCMC(option_file, excel_file = NULL, output_path = NULL)

Arguments

option_file

The name of the option file (e.g., "option1.R") located in the current working directory.

excel_file

The path to the Excel file containing the data.

output_path

Directory where the output will be saved. If 'NULL', uses a temporary directory.

Value

None. The function executes and saves results directly.

Examples

# Get path to the example option file included with package
option_file <- system.file("extdata", "option.R", 
                          package = "BayesianFitForecast")
                          
# Specify the path to the Excel file you want to analyze
excel_file <- system.file("extdata", "SanFrancisco.xlsx", 
                          package = "BayesianFitForecast")  # Modify this path accordingly
                          
# Run the MCMC analysis

Run_MCMC(option_file = option_file, excel_file = excel_file, output_path = NULL)


BayesianFitForecast documentation built on Aug. 21, 2025, 5:54 p.m.