| Title: | Environmental Phillips Curve Analysis with Multiple Instrumental Variables and Networks |
|---|---|
| Description: | Comprehensive toolkit for Environmental Phillips Curve analysis featuring multidimensional instrumental variable creation, transfer entropy causal discovery, network analysis, and state-of-the-art econometric methods. Implements geographic, technological, migration, geopolitical, financial, and natural risk instruments with robust diagnostics and visualization. Provides 24 different instrumental variable approaches with empirical validation. Methods based on Phillips (1958) <doi:10.1111/j.1468-0335.1958.tb00003.x>, transfer entropy by Schreiber (2000) <doi:10.1103/PhysRevLett.85.461>, and weak instrument tests by Stock and Yogo (2005) <doi:10.1017/CBO9780511614491.006>. |
| Authors: | Avishek Bhandari [aut, cre, cph] |
| Maintainer: | Avishek Bhandari <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.1 |
| Built: | 2026-05-20 08:27:02 UTC |
| Source: | https://github.com/avishekb9/manyivsnets |
Calculate Instrument Strength
calculate_instrument_strength(data)calculate_instrument_strength(data)
data |
Enhanced EPC data |
Data frame with instrument strength results
Conduct Transfer Entropy Analysis for Causal Discovery
conduct_transfer_entropy_analysis(data)conduct_transfer_entropy_analysis(data)
data |
Enhanced EPC data with instruments |
List containing transfer entropy matrix, network, and metadata
# Transfer entropy analysis (computationally intensive) data(sample_epc_data) te_results <- conduct_transfer_entropy_analysis(sample_epc_data)# Transfer entropy analysis (computationally intensive) data(sample_epc_data) te_results <- conduct_transfer_entropy_analysis(sample_epc_data)
Create Alternative State-of-the-Art Instruments
create_alternative_sota_instruments(data)create_alternative_sota_instruments(data)
data |
Enhanced EPC data |
Data frame with alternative SOTA instruments
Create Composite Instruments using Factor Analysis
create_composite_instruments(instruments)create_composite_instruments(instruments)
instruments |
Data frame with individual instruments |
Enhanced data frame with composite instruments
Create Comprehensive Network Plots
create_comprehensive_network_plots( te_results, te_iv_results, data, strength_results, output_dir = tempdir() )create_comprehensive_network_plots( te_results, te_iv_results, data, strength_results, output_dir = tempdir() )
te_results |
Transfer entropy results |
te_iv_results |
Transfer entropy IV results |
data |
Enhanced EPC data |
strength_results |
Instrument strength results |
output_dir |
Directory to save plots (optional) |
List of plot objects
Create Comprehensive Results Table
Create Comprehensive Results Table
create_comprehensive_results_table(models, diagnostics) create_comprehensive_results_table(models, diagnostics)create_comprehensive_results_table(models, diagnostics) create_comprehensive_results_table(models, diagnostics)
models |
List of fitted models |
diagnostics |
List of diagnostic results |
Data frame with comprehensive results
Data frame with comprehensive results
Create enhanced test data with all required variables
create_enhanced_test_data()create_enhanced_test_data()
Data frame with enhanced test data
Create Publication Summary
create_publication_summary(results_table, strength_results, te_results)create_publication_summary(results_table, strength_results, te_results)
results_table |
Main results table |
strength_results |
Instrument strength results |
te_results |
Transfer entropy results |
Character vector with summary text
Create Real Multidimensional Instruments from Economic Data
create_real_instruments_from_data(epc_data)create_real_instruments_from_data(epc_data)
epc_data |
Data frame containing EPC data with country and year columns |
Data frame with created instruments
# Create instruments using built-in sample data data(sample_epc_data) instruments <- create_real_instruments_from_data(sample_epc_data) head(instruments)# Create instruments using built-in sample data data(sample_epc_data) instruments <- create_real_instruments_from_data(sample_epc_data) head(instruments)
Create Transfer Entropy-Based Instruments
create_te_based_instruments(data, te_results)create_te_based_instruments(data, te_results)
data |
EPC data |
te_results |
Transfer entropy analysis results |
List with enhanced data and network centralities
Create test EPC data for testing
create_test_epc_data()create_test_epc_data()
Data frame with test EPC data
Create test instruments for testing
create_test_instruments()create_test_instruments()
Data frame with test instruments
Export Comprehensive Results to CSV
export_comprehensive_results( models, diagnostics, strength_results, te_results, instruments, centralities, output_dir = tempdir() )export_comprehensive_results( models, diagnostics, strength_results, te_results, instruments, centralities, output_dir = tempdir() )
models |
List of fitted models |
diagnostics |
List of diagnostic results |
strength_results |
Instrument strength results |
te_results |
Transfer entropy results |
instruments |
Created instruments data |
centralities |
Country network centralities |
output_dir |
Directory to save files |
Load and Clean EPC Data
load_epc_data_corrected(file_path = "epc_data_new_ar5_indicators.csv")load_epc_data_corrected(file_path = "epc_data_new_ar5_indicators.csv")
file_path |
Path to the EPC data CSV file |
Cleaned EPC data frame
# Load sample EPC data from package sample_file <- system.file("extdata", "sample_epc_data.csv", package = "ManyIVsNets") if (file.exists(sample_file)) { epc_data <- load_epc_data_corrected(sample_file) head(epc_data) } # Example with external file (only runs if file exists) if (file.exists("your_epc_data.csv")) { epc_data <- load_epc_data_corrected("your_epc_data.csv") }# Load sample EPC data from package sample_file <- system.file("extdata", "sample_epc_data.csv", package = "ManyIVsNets") if (file.exists(sample_file)) { epc_data <- load_epc_data_corrected(sample_file) head(epc_data) } # Example with external file (only runs if file exists) if (file.exists("your_epc_data.csv")) { epc_data <- load_epc_data_corrected("your_epc_data.csv") }
Merge EPC Data with Created Instruments
merge_epc_with_created_instruments(epc_data, instruments)merge_epc_with_created_instruments(epc_data, instruments)
epc_data |
EPC data frame |
instruments |
Instruments data frame |
Enhanced data frame with merged instruments
Create Country Network Visualization by Income Classification
plot_country_income_network(country_network, output_dir = NULL)plot_country_income_network(country_network, output_dir = NULL)
country_network |
igraph network object |
output_dir |
Directory to save plots (optional) |
ggplot object
Create Cross-Income CO2 Growth Nexus Visualization
plot_cross_income_co2_nexus(data, output_dir = NULL)plot_cross_income_co2_nexus(data, output_dir = NULL)
data |
Enhanced EPC data |
output_dir |
Directory to save plots (optional) |
ggplot object
Create Instrument Causal Pathways Network
plot_instrument_causal_pathways(data, output_dir = NULL)plot_instrument_causal_pathways(data, output_dir = NULL)
data |
Enhanced EPC data |
output_dir |
Directory to save plots (optional) |
ggplot object
Create Instrument Strength Comparison Visualization
plot_instrument_strength_comparison(strength_results, output_dir = NULL)plot_instrument_strength_comparison(strength_results, output_dir = NULL)
strength_results |
Data frame with instrument strength results |
output_dir |
Directory to save plots (optional) |
ggplot object
Create Migration Impact Visualization
plot_migration_impact(data, output_dir = NULL)plot_migration_impact(data, output_dir = NULL)
data |
Enhanced EPC data |
output_dir |
Directory to save plots (optional) |
ggplot object
Create Regional Network Visualization
plot_regional_network(data, output_dir = NULL)plot_regional_network(data, output_dir = NULL)
data |
Enhanced EPC data |
output_dir |
Directory to save plots (optional) |
ggplot object
Create Transfer Entropy Network Visualization
plot_transfer_entropy_network(te_results, output_dir = NULL)plot_transfer_entropy_network(te_results, output_dir = NULL)
te_results |
Transfer entropy analysis results |
output_dir |
Directory to save plots (optional) |
ggplot object
Run Complete EPC Analysis Pipeline
run_complete_epc_analysis(data_file = NULL, output_dir = tempdir())run_complete_epc_analysis(data_file = NULL, output_dir = tempdir())
data_file |
Path to EPC data file (optional) |
output_dir |
Directory for outputs |
List with all analysis results
Run Comprehensive EPC Models
run_comprehensive_epc_models(data)run_comprehensive_epc_models(data)
data |
Enhanced EPC data with all instruments |
List of fitted models
Run Comprehensive IV Diagnostics
Run Comprehensive IV Diagnostics
run_comprehensive_iv_diagnostics(models) run_comprehensive_iv_diagnostics(models)run_comprehensive_iv_diagnostics(models) run_comprehensive_iv_diagnostics(models)
models |
List of fitted models |
List of diagnostic results
List of diagnostic results
A dataset containing Environmental Phillips Curve variables for 5 countries from 1991 to 2021, used for testing and demonstration purposes.
sample_epc_datasample_epc_data
A data frame with 155 rows and 9 variables:
Country name
Year (1991-2021)
CO2 emissions per capita
Total unemployment rate
Female unemployment rate
Male unemployment rate
Per capita GDP
Trade openness
Renewable energy share
Generated for package testing and demonstration