Skip to contents

Package

Package overview

bhfvar-package bhfvar
bhfvar: Bayesian Hybrid Framework for Variance Decomposition

Model Compilation

Functions for compiling the Stan model

compile_bhf_model()
Compile the BHF Stan Model
get_stan_file_path()
Get Path to Stan Model File

Data Preparation

Functions for preparing survey data

prepare_bhf_data()
Prepare Data for BHF Model
validate_input_data()
Validate Input Data
validate_stan_data()
Validate Stan Data

Model Fitting

Functions for fitting the Bayesian model

bhf_fit()
Fit the Bayesian Hybrid Framework Model

Result Extraction

Functions for extracting and summarizing results

variance_decomposition()
Extract Variance Decomposition Results
domain_estimates()
Extract Domain-Level Estimates
overall_estimate()
Extract Overall Population Estimate
log_lik()
Extract Log-Likelihood for LOO-CV

Utilities

Helper functions

calc_eff_n()
Calculate Effective Sample Size

Data

Example datasets

bhf_synthetic_data
Synthetic Survey Data for BHF Package Examples