Skip to contents

Introduction

ReboundTools is an R package that provides functions to analyze energy rebound, the unanticipated reduction of the benefits of energy efficiency due to behavior change and economy-wide effects. Many functions perform analysis calculations to move from known parameters to rebound estimates. Graphing functions (described in the Graphs vignette) create rebound path graphs in energy, expenditure, and consumption spaces. Other graphing functions create sensitivity graphs. The functions in this package were used for the analyses and graphs in the paper **********.

Getting started

The first step in a rebound analysis is specifying parameters for the energy efficiency upgrade (EEU) and rebound analysis, typically in a Excel spreadsheet. The path to an example spreadsheet can be found with the function sample_eeu_data_path(). Data can be loaded into a data frame as follows:

eeu_data <- sample_eeu_data_path() %>% 
  load_eeu_data() # Uses the readxl package internally.
dplyr::glimpse(eeu_data)
#> Rows: 3
#> Columns: 28
#> $ Reference             <chr> "None yet", "None yet", "None yet"
#> $ Case                  <chr> "Car", "Lamp", "Car, r = 0"
#> $ Original              <chr> "Ford Fusion", "Incandescent", "Ford Fusion"
#> $ Upgrade               <chr> "Ford Fusion Hybrid", "LED", "Ford Fusion Hybrid"
#> $ r                     <dbl> 0.03, 0.03, 0.00
#> $ service_unit          <chr> "mile", "lm-hr", "mile"
#> $ energy_engr_unit      <chr> "gal", "W-hr", "gal"
#> $ `MJ/energy_engr_unit` <dbl> 126.6216, 0.0036, 126.6216
#> $ I_E                   <dbl> 3.389339, 3.389339, 3.389339
#> $ k                     <dbl> 1, 1, 1
#> $ p_E_engr_units        <dbl> 2.2100000, 0.0001355, 2.2100000
#> $ e_qs_ps_UC_orig       <dbl> -0.1, -0.4, -0.1
#> $ e_qs_M                <dbl> 1, 1, 1
#> $ e_qo_M                <dbl> 1, 1, 1
#> $ eta_engr_units_orig   <dbl> 25.000000, 8.833333, 25.000000
#> $ eta_engr_units_star   <dbl> 42.0, 81.8, 42.0
#> $ q_dot_s_orig          <dbl> 14425, 580350, 14425
#> $ M_dot_orig            <dbl> 27401.28, 27401.28, 27401.28
#> $ C_cap_orig            <dbl> 28216.10, 1.88, 28216.10
#> $ C_cap_star            <dbl> 27523.40, 1.21, 27523.40
#> $ C_dot_om_orig         <dbl> 2861.134, 0.000, 2861.134
#> $ C_d_orig              <dbl> 100, 0, 100
#> $ C_dot_om_star         <dbl> 2774.668, 0.000, 2774.668
#> $ C_d_star              <dbl> 101, 0, 101
#> $ E_emb_orig            <dbl> 34000.0, 2.2, 34000.0
#> $ t_life_orig           <dbl> 14.0, 1.8, 14.0
#> $ E_emb_star            <dbl> 40000.0, 6.5, 40000.0
#> $ t_life_star           <dbl> 14, 10, 14

Variable names (columns in the EEU spreadsheet) are described by various constants in the package, including eeu_base_params, key_analysis_vars, and rebound_stages. Get help on any of those constants to see descriptions of parameters, variables, and stages.

Rows of the EEU spreadsheet should describe the cases to be analyzed. The example file at sample_eeu_data_path() contains two cases: a car and an electric lamp. Columns of the EEU spreadsheet should contain rebound parameters for each case. Required columns are shown in the example file and in the eeu_data data frame.

colnames(eeu_data)
#>  [1] "Reference"           "Case"                "Original"           
#>  [4] "Upgrade"             "r"                   "service_unit"       
#>  [7] "energy_engr_unit"    "MJ/energy_engr_unit" "I_E"                
#> [10] "k"                   "p_E_engr_units"      "e_qs_ps_UC_orig"    
#> [13] "e_qs_M"              "e_qo_M"              "eta_engr_units_orig"
#> [16] "eta_engr_units_star" "q_dot_s_orig"        "M_dot_orig"         
#> [19] "C_cap_orig"          "C_cap_star"          "C_dot_om_orig"      
#> [22] "C_d_orig"            "C_dot_om_star"       "C_d_star"           
#> [25] "E_emb_orig"          "t_life_orig"         "E_emb_star"         
#> [28] "t_life_star"

Rows can be used for sensitivity analysis, varying one or many parameters in each row of the spreadsheet.

Performing the analysis

After data are loaded, rebound analyses can be performed. A rebound analysis consists of calculating all rebound terms and intermediate results, once for each row of the EEU data frame. A convenient function to perform the rebound analysis is named, aptly, rebound_analysis(). Columns for intermediate and final results are added to the right of the data frame.

rebound_data <- rebound_analysis(eeu_data)
dplyr::glimpse(rebound_data)
#> Rows: 3
#> Columns: 256
#> $ Reference                     <chr> "None yet", "None yet", "None yet"
#> $ Case                          <chr> "Car", "Lamp", "Car, r = 0"
#> $ Original                      <chr> "Ford Fusion", "Incandescent", "Ford Fus…
#> $ Upgrade                       <chr> "Ford Fusion Hybrid", "LED", "Ford Fusio…
#> $ r                             <dbl> 0.03, 0.03, 0.00
#> $ service_unit                  <chr> "mile", "lm-hr", "mile"
#> $ energy_engr_unit              <chr> "gal", "W-hr", "gal"
#> $ `MJ/energy_engr_unit`         <dbl> 126.6216, 0.0036, 126.6216
#> $ I_E                           <dbl> 3.389339, 3.389339, 3.389339
#> $ k                             <dbl> 1, 1, 1
#> $ p_E_engr_units                <dbl> 2.2100000, 0.0001355, 2.2100000
#> $ e_qs_ps_UC_orig               <dbl> -0.1, -0.4, -0.1
#> $ e_qs_M                        <dbl> 1, 1, 1
#> $ e_qo_M                        <dbl> 1, 1, 1
#> $ eta_engr_units_orig           <dbl> 25.000000, 8.833333, 25.000000
#> $ eta_engr_units_star           <dbl> 42.0, 81.8, 42.0
#> $ q_dot_s_orig                  <dbl> 14425, 580350, 14425
#> $ M_dot_orig                    <dbl> 27401.28, 27401.28, 27401.28
#> $ C_cap_orig                    <dbl> 28216.10, 1.88, 28216.10
#> $ C_cap_star                    <dbl> 27523.40, 1.21, 27523.40
#> $ C_dot_om_orig                 <dbl> 2861.134, 0.000, 2861.134
#> $ C_d_orig                      <dbl> 100, 0, 100
#> $ C_dot_om_star                 <dbl> 2774.668, 0.000, 2774.668
#> $ C_d_star                      <dbl> 101, 0, 101
#> $ E_emb_orig                    <dbl> 34000.0, 2.2, 34000.0
#> $ t_life_orig                   <dbl> 14.0, 1.8, 14.0
#> $ E_emb_star                    <dbl> 40000.0, 6.5, 40000.0
#> $ t_life_star                   <dbl> 14, 10, 14
#> $ R_alpha_orig                  <dbl> 1.203271, 1.011811, 1.000000
#> $ R_omega_orig                  <dbl> 0.7955036, 0.9593840, 1.0000000
#> $ p_E                           <dbl> 0.01745357, 0.03763889, 0.01745357
#> $ p_E_orig                      <dbl> 0.01745357, 0.03763889, 0.01745357
#> $ eta_orig                      <dbl> 0.1974386, 2453.7036944, 0.1974386
#> $ E_dot_s_orig                  <dbl> 73060.68, 236.52, 73060.68
#> $ C_dot_cap_orig                <dbl> 2015.435714, 1.044444, 2015.435714
#> $ R_alpha_C_dot_cap_orig        <dbl> 2425.114596, 1.056781, 2015.435714
#> $ p_s_orig                      <dbl> 8.840000e-02, 1.533962e-05, 8.840000e-02
#> $ C_dot_s_orig                  <dbl> 1275.17000, 8.90235, 1275.17000
#> $ C_dot_d_orig                  <dbl> 7.142857, 0.000000, 7.142857
#> $ R_omega_C_dot_d_orig          <dbl> 5.682169, 0.000000, 7.142857
#> $ C_dot_omd_orig                <dbl> 2866.816, 0.000, 2868.277
#> $ C_dot_o_orig                  <dbl> 20834.18, 27391.32, 21242.39
#> $ f_Cs_orig                     <dbl> 0.0576756075, 0.0003249007, 0.0566300134
#> $ e_qo_ps_UC_orig               <dbl> -0.0550851141, -0.0001950038, -0.0540265…
#> $ e_qs_ps_C_orig                <dbl> -0.04232439, -0.39967510, -0.04336999
#> $ e_qo_ps_C_orig                <dbl> 0.0025904933, 0.0001298969, 0.0026034779
#> $ sigma                         <dbl> 0.04491489, 0.39980500, 0.04597346
#> $ rho                           <dbl> -21.264334, -1.501219, -20.751678
#> $ E_dot_emb_orig                <dbl> 2428.571429, 1.222222, 2428.571429
#> $ N_dot_orig                    <dbl> 0, 0, 0
#> $ R_alpha_star                  <dbl> 1.203271, 1.138160, 1.000000
#> $ R_omega_star                  <dbl> 0.7955036, 0.8468981, 1.0000000
#> $ eta_star                      <dbl> 3.316969e-01, 2.272222e+04, 3.316969e-01
#> $ eta_ratio                     <dbl> 1.680000, 9.260377, 1.680000
#> $ S_dot_dev                     <dbl> 29572.1802, 210.9789, 29572.1802
#> $ G_dot                         <dbl> 516.140238, 7.941012, 516.140238
#> $ p_E_star                      <dbl> 0.01745357, 0.03763889, 0.01745357
#> $ p_s_star                      <dbl> 5.261905e-02, 1.656479e-06, 5.261905e-02
#> $ q_dot_s_star                  <dbl> 14425, 580350, 14425
#> $ C_dot_cap_star                <dbl> 1965.957, 0.121, 1965.957
#> $ R_alpha_C_dot_cap_star        <dbl> 2365.5784841, 0.1377174, 1965.9571429
#> $ E_dot_emb_star                <dbl> 2857.143, 0.650, 2857.143
#> $ C_dot_s_star                  <dbl> 759.0297619, 0.9613377, 759.0297619
#> $ C_dot_d_star                  <dbl> 7.214286, 0.000000, 7.214286
#> $ R_omega_C_dot_d_star          <dbl> 5.738991, 0.000000, 7.214286
#> $ C_dot_omd_star                <dbl> 2780.407, 0.000, 2781.882
#> $ M_dot_star                    <dbl> 27401.28, 27401.28, 27401.28
#> $ N_dot_star                    <dbl> 662.085664, 8.860075, 652.013517
#> $ C_dot_o_star                  <dbl> 20834.18, 27391.32, 21242.39
#> $ E_dot_s_star                  <dbl> 43488.50030, 25.54108, 43488.50030
#> $ f_Cs_star                     <dbl> 3.515132e-02, 3.509521e-05, 3.449912e-02
#> $ e_qs_ps_UC_star               <dbl> -0.1, -0.4, -0.1
#> $ e_qo_ps_UC_star               <dbl> -0.0550851141, -0.0001950038, -0.0540265…
#> $ e_qs_ps_C_star                <dbl> -0.04232439, -0.39967510, -0.04336999
#> $ e_qo_ps_C_star                <dbl> 0.0025904933, 0.0001298969, 0.0026034779
#> $ t_life_hat                    <dbl> 14, 10, 14
#> $ R_alpha_hat                   <dbl> 1.203271, 1.138160, 1.000000
#> $ R_omega_hat                   <dbl> 0.7955036, 0.8468981, 1.0000000
#> $ eta_engr_units_hat            <dbl> 42.0, 81.8, 42.0
#> $ eta_hat                       <dbl> 3.316969e-01, 2.272222e+04, 3.316969e-01
#> $ p_E_hat                       <dbl> 0.01745357, 0.03763889, 0.01745357
#> $ p_s_hat                       <dbl> 5.261905e-02, 1.656479e-06, 5.261905e-02
#> $ C_dot_cap_hat                 <dbl> 1965.957, 0.121, 1965.957
#> $ R_alpha_C_dot_cap_hat         <dbl> 2365.5784841, 0.1377174, 1965.9571429
#> $ E_dot_emb_hat                 <dbl> 2857.143, 0.650, 2857.143
#> $ M_dot_hat                     <dbl> 27401.28, 27401.28, 27401.28
#> $ q_dot_s_hat                   <dbl> 14749.25, 1412809.74, 14757.28
#> $ E_dot_s_hat                   <dbl> 44466.06000, 62.17745, 44490.24608
#> $ C_dot_s_hat                   <dbl> 776.09167, 2.34029, 776.51381
#> $ C_d_hat                       <dbl> 101, 0, 101
#> $ C_dot_d_hat                   <dbl> 7.214286, 0.000000, 7.214286
#> $ R_omega_C_dot_d_hat           <dbl> 5.738991, 0.000000, 7.214286
#> $ C_dot_om_hat                  <dbl> 2774.668, 0.000, 2774.668
#> $ C_dot_omd_hat                 <dbl> 2780.407, 0.000, 2781.882
#> $ C_dot_o_hat                   <dbl> 20811.86, 27386.95, 21219.52
#> $ f_Cs_hat                      <dbl> 3.595023e-02, 8.544544e-05, 3.530244e-02
#> $ e_qs_ps_C_hat                 <dbl> -0.04330019, -0.39977083, -0.04435049
#> $ e_qo_ps_C_hat                 <dbl> 1.614700e-03, 3.416152e-05, 1.622976e-03
#> $ e_qs_ps_UC_hat                <dbl> -0.07925041, -0.39985628, -0.07965293
#> $ e_qo_ps_UC_hat                <dbl> -3.433553e-02, -5.128393e-05, -3.367947e…
#> $ N_dot_hat                     <dbl> 667.34404, 11.85078, 657.40189
#> $ M_dot_hat_prime               <dbl> 21587.95, 27389.29, 21996.04
#> $ t_life_bar                    <dbl> 14, 10, 14
#> $ R_alpha_bar                   <dbl> 1.203271, 1.138160, 1.000000
#> $ R_omega_bar                   <dbl> 0.7955036, 0.8468981, 1.0000000
#> $ eta_engr_units_bar            <dbl> 42.0, 81.8, 42.0
#> $ eta_bar                       <dbl> 3.316969e-01, 2.272222e+04, 3.316969e-01
#> $ p_E_bar                       <dbl> 0.01745357, 0.03763889, 0.01745357
#> $ p_s_bar                       <dbl> 5.261905e-02, 1.656479e-06, 5.261905e-02
#> $ C_dot_cap_bar                 <dbl> 1965.957, 0.121, 1965.957
#> $ R_alpha_C_dot_cap_bar         <dbl> 2365.5784841, 0.1377174, 1965.9571429
#> $ E_dot_emb_bar                 <dbl> 2857.143, 0.650, 2857.143
#> $ M_dot_bar                     <dbl> 27401.28, 27401.28, 27401.28
#> $ q_dot_s_bar                   <dbl> 15205.19, 1413421.03, 15198.33
#> $ E_dot_s_bar                   <dbl> 45840.63067, 62.20435, 45819.93891
#> $ C_dot_s_bar                   <dbl> 800.082844, 2.341303, 799.721698
#> $ C_d_bar                       <dbl> 101, 0, 101
#> $ C_dot_d_bar                   <dbl> 7.214286, 0.000000, 7.214286
#> $ R_omega_C_dot_d_bar           <dbl> 5.738991, 0.000000, 7.214286
#> $ C_dot_om_bar                  <dbl> 2774.668, 0.000, 2774.668
#> $ C_dot_omd_bar                 <dbl> 2780.407, 0.000, 2781.882
#> $ C_dot_o_bar                   <dbl> 21455.21, 27398.80, 21853.72
#> $ f_Cs_bar                      <dbl> 3.595023e-02, 8.544544e-05, 3.530244e-02
#> $ e_qs_ps_UC_bar                <dbl> -0.07925041, -0.39985628, -0.07965293
#> $ e_qo_ps_UC_bar                <dbl> -3.433553e-02, -5.128393e-05, -3.367947e…
#> $ e_qs_ps_C_bar                 <dbl> -0.04330019, -0.39977083, -0.04435049
#> $ e_qo_ps_C_bar                 <dbl> 1.614700e-03, 3.416152e-05, 1.622976e-03
#> $ N_dot_bar                     <dbl> 0, 0, 0
#> $ t_life_tilde                  <dbl> 14, 10, 14
#> $ R_alpha_tilde                 <dbl> 1.203271, 1.138160, 1.000000
#> $ R_omega_tilde                 <dbl> 0.7955036, 0.8468981, 1.0000000
#> $ eta_engr_units_tilde          <dbl> 42.0, 81.8, 42.0
#> $ eta_tilde                     <dbl> 3.316969e-01, 2.272222e+04, 3.316969e-01
#> $ p_E_tilde                     <dbl> 0.01745357, 0.03763889, 0.01745357
#> $ p_s_tilde                     <dbl> 5.261905e-02, 1.656479e-06, 5.261905e-02
#> $ C_dot_cap_tilde               <dbl> 1965.957, 0.121, 1965.957
#> $ R_alpha_C_dot_cap_tilde       <dbl> 2365.5784841, 0.1377174, 1965.9571429
#> $ E_dot_emb_tilde               <dbl> 2857.143, 0.650, 2857.143
#> $ M_dot_tilde                   <dbl> 27401.28, 27401.28, 27401.28
#> $ q_dot_s_tilde                 <dbl> 15205.19, 1413421.03, 15198.33
#> $ E_dot_s_tilde                 <dbl> 45840.63067, 62.20435, 45819.93891
#> $ C_dot_s_tilde                 <dbl> 800.082844, 2.341303, 799.721698
#> $ C_dot_om_tilde                <dbl> 2774.668, 0.000, 2774.668
#> $ C_d_tilde                     <dbl> 101, 0, 101
#> $ C_dot_d_tilde                 <dbl> 7.214286, 0.000000, 7.214286
#> $ R_omega_C_dot_d_tilde         <dbl> 5.738991, 0.000000, 7.214286
#> $ C_dot_omd_tilde               <dbl> 2780.407, 0.000, 2781.882
#> $ C_dot_o_tilde                 <dbl> 21455.21, 27398.80, 21853.72
#> $ f_Cs_tilde                    <dbl> 3.595023e-02, 8.544544e-05, 3.530244e-02
#> $ e_qs_ps_UC_tilde              <dbl> -0.07925041, -0.39985628, -0.07965293
#> $ e_qo_ps_UC_tilde              <dbl> -3.433553e-02, -5.128393e-05, -3.367947e…
#> $ e_qs_ps_C_tilde               <dbl> -0.04330019, -0.39977083, -0.04435049
#> $ e_qo_ps_C_tilde               <dbl> 1.614700e-03, 3.416152e-05, 1.622976e-03
#> $ N_dot_tilde                   <dbl> 0, 0, 0
#> $ Delta_t_life_star             <dbl> 0.0, 8.2, 0.0
#> $ Delta_R_alpha_star            <dbl> 0.0000000, 0.1263491, 0.0000000
#> $ Delta_R_omega_star            <dbl> 0.0000000, -0.1124859, 0.0000000
#> $ Delta_eta_engr_units_star     <dbl> 17.00000, 72.96667, 17.00000
#> $ Delta_eta_star                <dbl> 1.342583e-01, 2.026852e+04, 1.342583e-01
#> $ Delta_p_s_star                <dbl> -3.578095e-02, -1.368314e-05, -3.578095e…
#> $ Delta_q_dot_s_star            <dbl> 0, 0, 0
#> $ Delta_p_E_star                <dbl> 0, 0, 0
#> $ Delta_E_dot_s_star            <dbl> -29572.1802, -210.9789, -29572.1802
#> $ Delta_E_dot_emb_star          <dbl> 428.5714286, -0.5722222, 428.5714286
#> $ Delta_C_dot_s_star            <dbl> -516.140238, -7.941012, -516.140238
#> $ Delta_C_dot_cap_star          <dbl> -49.4785714, -0.9234444, -49.4785714
#> $ Delta_R_alpha_C_dot_cap_star  <dbl> -59.5361117, -0.9190632, -49.4785714
#> $ Delta_C_dot_om_star           <dbl> -86.46614, 0.00000, -86.46614
#> $ Delta_C_d_star                <dbl> 1, 0, 1
#> $ Delta_C_dot_d_star            <dbl> 0.07142857, 0.00000000, 0.07142857
#> $ Delta_R_omega_C_dot_d_star    <dbl> 0.05682169, 0.00000000, 0.07142857
#> $ Delta_C_dot_omd_star          <dbl> -86.40931, 0.00000, -86.39471
#> $ Delta_C_dot_o_star            <dbl> 0, 0, 0
#> $ Delta_N_dot_star              <dbl> 662.085664, 8.860075, 652.013517
#> $ Delta_M_dot_star              <dbl> 0, 0, 0
#> $ Delta_t_life_hat              <dbl> 0, 0, 0
#> $ Delta_R_alpha_hat             <dbl> 0, 0, 0
#> $ Delta_R_omega_hat             <dbl> 0, 0, 0
#> $ Delta_eta_engr_units_hat      <dbl> 0, 0, 0
#> $ Delta_eta_hat                 <dbl> 0, 0, 0
#> $ Delta_p_s_hat                 <dbl> 0, 0, 0
#> $ Delta_q_dot_s_hat             <dbl> 324.2535, 832459.7380, 332.2760
#> $ Delta_p_E_hat                 <dbl> 0, 0, 0
#> $ Delta_E_dot_s_hat             <dbl> 977.55969, 36.63637, 1001.74577
#> $ Delta_E_dot_emb_hat           <dbl> 0, 0, 0
#> $ Delta_C_dot_s_hat             <dbl> 17.061911, 1.378952, 17.484044
#> $ Delta_C_dot_cap_hat           <dbl> 0, 0, 0
#> $ Delta_R_alpha_C_dot_cap_hat   <dbl> 0, 0, 0
#> $ Delta_C_dot_om_hat            <dbl> 0, 0, 0
#> $ Delta_C_d_hat                 <dbl> 0, 0, 0
#> $ Delta_C_dot_d_hat             <dbl> 0, 0, 0
#> $ Delta_R_omega_C_dot_d_hat     <dbl> 0, 0, 0
#> $ Delta_C_dot_omd_hat           <dbl> 0, 0, 0
#> $ Delta_C_dot_o_hat             <dbl> -22.320290, -4.369659, -22.872418
#> $ Delta_N_dot_hat               <dbl> 5.258380, 2.990707, 5.388374
#> $ Delta_M_dot_hat               <dbl> 0, 0, 0
#> $ Delta_t_life_bar              <dbl> 0, 0, 0
#> $ Delta_R_alpha_bar             <dbl> 0, 0, 0
#> $ Delta_R_omega_bar             <dbl> 0, 0, 0
#> $ Delta_eta_engr_units_bar      <dbl> 0, 0, 0
#> $ Delta_eta_bar                 <dbl> 0, 0, 0
#> $ Delta_p_s_bar                 <dbl> 0, 0, 0
#> $ Delta_q_dot_s_bar             <dbl> 455.9408, 611.2937, 441.0550
#> $ Delta_p_E_bar                 <dbl> 0, 0, 0
#> $ Delta_E_dot_s_bar             <dbl> 1374.5706729, 0.0269029, 1329.6928386
#> $ Delta_E_dot_emb_bar           <dbl> 0, 0, 0
#> $ Delta_C_dot_s_bar             <dbl> 23.991171074, 0.001012595, 23.207892469
#> $ Delta_C_dot_cap_bar           <dbl> 0, 0, 0
#> $ Delta_R_alpha_C_dot_cap_bar   <dbl> 0, 0, 0
#> $ Delta_C_dot_om_bar            <dbl> 0, 0, 0
#> $ Delta_C_d_bar                 <dbl> 0, 0, 0
#> $ Delta_C_dot_d_bar             <dbl> 0, 0, 0
#> $ Delta_R_omega_C_dot_d_bar     <dbl> 0, 0, 0
#> $ Delta_C_dot_omd_bar           <dbl> 0, 0, 0
#> $ Delta_C_dot_o_bar             <dbl> 643.35287, 11.84977, 634.19400
#> $ Delta_N_dot_bar               <dbl> -667.34404, -11.85078, -657.40189
#> $ Delta_M_dot_bar               <dbl> 0, 0, 0
#> $ Delta_t_life_tilde            <dbl> 0, 0, 0
#> $ Delta_R_alpha_tilde           <dbl> 0, 0, 0
#> $ Delta_R_omega_tilde           <dbl> 0, 0, 0
#> $ Delta_eta_engr_units_tilde    <dbl> 0, 0, 0
#> $ Delta_eta_tilde               <dbl> 0, 0, 0
#> $ Delta_p_s_tilde               <dbl> 0, 0, 0
#> $ Delta_q_dot_s_tilde           <dbl> 0, 0, 0
#> $ Delta_p_E_tilde               <dbl> 0, 0, 0
#> $ Delta_E_dot_s_tilde           <dbl> 0, 0, 0
#> $ Delta_E_dot_emb_tilde         <dbl> 0, 0, 0
#> $ Delta_C_dot_s_tilde           <dbl> 0, 0, 0
#> $ Delta_C_dot_cap_tilde         <dbl> 0, 0, 0
#> $ Delta_R_alpha_C_dot_cap_tilde <dbl> 0, 0, 0
#> $ Delta_C_dot_om_tilde          <dbl> 0, 0, 0
#> $ Delta_C_d_tilde               <dbl> 0, 0, 0
#> $ Delta_C_dot_d_tilde           <dbl> 0, 0, 0
#> $ Delta_R_omega_C_dot_d_tilde   <dbl> 0, 0, 0
#> $ Delta_C_dot_omd_tilde         <dbl> 0, 0, 0
#> $ Delta_C_dot_o_tilde           <dbl> 0, 0, 0
#> $ Delta_N_dot_tilde             <dbl> 0, 0, 0
#> $ Delta_M_dot_tilde             <dbl> 0, 0, 0
#> $ Re_dempl                      <dbl> 0, 0, 0
#> $ Re_emb                        <dbl> 0.014492385, -0.002712225, 0.014492385
#> $ Re_cap                        <dbl> -0.095530088, -0.008434532, -0.079392022
#> $ Re_om                         <dbl> -0.009910093, 0.000000000, -0.009910093
#> $ Re_d                          <dbl> 6.512471e-06, 0.000000e+00, 8.186601e-06
#> $ Re_omd                        <dbl> -0.009903580, 0.000000000, -0.009901906
#> $ Re_empl                       <dbl> 0.004588805, -0.002712225, 0.004590479
#> $ Re_isub                       <dbl> -0.002558182, -0.070197801, -0.002621463
#> $ Re_dsub                       <dbl> 0.03305673, 0.17364943, 0.03387460
#> $ Re_sub                        <dbl> 0.03049855, 0.10345163, 0.03125314
#> $ Re_dinc                       <dbl> 0.0464818848, 0.0001275146, 0.0449643154
#> $ Re_iinc                       <dbl> 0.07373623, 0.19036445, 0.07268651
#> $ Re_inc                        <dbl> 0.1202181, 0.1904920, 0.1176508
#> $ Re_micro                      <dbl> 0.1553055, 0.2912314, 0.1534944
#> $ Re_macro                      <dbl> 0.07588324, 0.14233554, 0.07472885
#> $ Re_dir                        <dbl> 0.07953862, 0.17377694, 0.07883892
#> $ Re_indir                      <dbl> 0.1516501, 0.2597900, 0.1493844
#> $ Re_tot                        <dbl> 0.2311887, 0.4335669, 0.2282233

Note that rebound_analysis() is a convenience function that calls several helper functions in turn. Each helper function calculates rebound parameters after one of the rebound effects.

simple <- rebound_analysis(eeu_data)
complicated <- eeu_data %>% 
  calc_orig() %>%    # Calculate all parameters before the emplacement effect
  calc_star() %>%    # Calculate all parameters after the emplacement effect
  calc_hat() %>%     # Calculate all parameters after the substitution effect
  calc_bar() %>%     # Calculate all parameters after the income effect
  calc_tilde() %>%   # Calculate all parameters after the macro effect
  calc_Deltas() %>%  # Calculate all differences between stages
  calc_rebound()     # Calculate all rebound terms
all(simple == complicated)
#> [1] TRUE

Rebound tables

ReboundTools contains two functions to create tables: stages_table() and rebound_results_table().

Stages table

After a rebound analysis has been performed, the results can be displayed in a stages table, which has rebound parameters in rows and rebound stages in columns.

digs <- matrix(c(rep(1, 7),  # t_life
                 rep(1, 7),  # R_alpha
                 rep(1, 7),  # R_omega
                 rep(1, 7),  # eta_engr_units
                 rep(3, 7),  # eta
                 rep(3, 7),  # p_s
                 rep(0, 7),  # q_dot_s
                 rep(4, 7),  # p_E
                 rep(0, 7),  # E_dot_s
                 rep(0, 7),  # E_dot_emb
                 rep(0, 7),  # C_dot_s
                 rep(0, 7),  # C_dot_cap
                 rep(0, 7),  # R_alpha_C_dot_cap
                 rep(0, 7),  # C_dot_om
                 rep(1, 7),  # C_d
                 rep(2, 7),  # C_dot_d
                 rep(2, 7),  # R_omega_D_dot_d
                 rep(0, 7),  # C_dot_omd
                 rep(0, 7),  # C_dot_o
                 rep(0, 7),  # N_dot
                 rep(0, 7)), # M_dot
               nrow = 21, ncol = 7, byrow = TRUE)
load_eeu_data() %>% 
  dplyr::filter(.data[[ReboundTools::eeu_base_params$case]] == "Car") %>% 
  dplyr::mutate(
    Case = NULL
  ) %>% 
  rebound_analysis() %>% 
  stages_table(digits = digs, 
               align = "lrrrrrr") %>% 
  print(type = "html",
        include.rownames = FALSE, 
        booktabs = TRUE,
        caption.placement = "top",
        sanitize.text.function = function(x) {x},
        format.args = list(big.mark = ","))
Original (\(\circ\)) After empl (\(*\)) After sub (\(\wedge\)) After inc (\(-\)) After macro (\(\sim\))
\(t_{li\!f\!e}\) [yr] 14.0 14.0 14.0 14.0 14.0
\(R_\alpha\) [–] 1.2 1.2 1.2 1.2 1.2
\(R_\omega\) [–] 0.8 0.8 0.8 0.8 0.8
\(\eta\) [mile/gal] 25.0 42.0 42.0 42.0 42.0
\(\eta\) [mile/MJ] 0.197 0.332 0.332 0.332 0.332
\(p_s\) [$/mile] 0.088 0.053 0.053 0.053 0.053
\(\dot{q}_s\) [mile/yr] 14,425 14,425 14,749 15,205 15,205
\(p_E\) [$/MJ] 0.0175 0.0175 0.0175 0.0175 0.0175
\(\dot{E}_s\) [MJ/yr] 73,061 43,489 44,466 45,841 45,841
\(\dot{E}_{emb}\) [MJ/yr] 2,429 2,857 2,857 2,857 2,857
\(\dot{C}_s\) [$/yr] 1,275 759 776 800 800
\(\dot{C}_{cap}\) [$/yr] 2,015 1,966 1,966 1,966 1,966
\(R_{\alpha}\dot{C}_{cap}\) [$/yr] 2,425 2,366 2,366 2,366 2,366
\(\dot{C}_{O\!M}\) [$/yr] 2,861 2,775 2,775 2,775 2,775
\(C_d\) [$] 100.0 101.0 101.0 101.0 101.0
\(\dot{C}_d\) [$/yr] 7.14 7.21 7.21 7.21 7.21
\(R_{\omega}\dot{C}_d\) [$/yr] 5.68 5.74 5.74 5.74 5.74
\(\dot{C}_{O\!M\!d}\) [$/yr] 2,867 2,780 2,780 2,780 2,780
\(\dot{C}_o\) [$/yr] 20,834 20,834 20,812 21,455 21,455
\(\dot{N}\) [$/yr] 0 662 667 0 0
\(\dot{M}\) [$/yr] 27,401 27,401 27,401 27,401 27,401

Rebound results table

Rebound analysis results can also be displayed in a rebound results table. A rebound results table shows rebound terms and values.

load_eeu_data() %>% 
  dplyr::filter(Case == "Car") %>% 
  rebound_analysis() %>% 
  dplyr::mutate(
    Case = NULL
  ) %>%
  ReboundTools::rebound_results_table(include_subtotals = FALSE, 
                                      label = "tab:car_results", 
                                      digits = 1, 
                                      align = "rrr") %>% 
  print(type = "html",
        include.rownames = FALSE, 
        booktabs = TRUE,
        caption.placement = "top",
        hline.after = c(-1, 0, nrow(.)-1, nrow(.)),
        sanitize.text.function = function(x) {x},
        format.args = list(big.mark = ","))
Rebound term Value [%]
\(Re_{dempl}\) 0.0
\(Re_{emb}\) 1.4
\(Re_{cap}\) -9.6
\(Re_{O\!M\!d}\) -1.0
\(Re_{dsub}\) 3.3
\(Re_{isub}\) -0.3
\(Re_{dinc}\) 4.6
\(Re_{iinc}\) 7.4
\(Re_{macro}\) 7.6
\(Re_{tot}\) 23.1

Conclusion

The ReboundTools package assists with analyzing rebound effects and displaying the results. In particular,

  • the rebound_analysis() function performs rebound analysis on energy efficiency upgrades and
  • the stages_table() function returns an xtable object suitable for inclusion in papers and reports,

Taken together, these functions provide important capabilities to analyze rebound effects for energy efficiency upgrades.