Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Commit

Permalink
Removed deprecated lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marianna Rottoli committed Sep 16, 2021
1 parent 7289494 commit 127656c
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions R/calculate_logit_inconv_endog.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,10 @@ calculate_logit_inconv_endog = function(prices,
## joins the df containing the prices with the df containing the logit exponents
df <- merge(prices, logit_exponent,
by=intersect(names(prices), names(logit_exponent)), all.x = TRUE)

## joins the previous df with gathe df containing the inconvenience costs
df <- merge(df, final_pref, by=intersect( names(df),names(final_pref)), all.y=TRUE)
## delete entries have tot_price NA (e.g. 1900 BEV)
df <- df[ !(is.na(tot_price))]
## entries that are not present in the mix have non_fuel_price == 0, but also Walk and Cycle: delete all the not-present in the mix options
df <- df[(non_fuel_price>0)|(non_fuel_price==0 & subsector_L1 %in% c("Walk", "Cycle"))]
## needs random lambdas for the sectors that are not explicitly calculated
df <- df[ is.na(logit.exponent), logit.exponent := -10]

Expand Down

0 comments on commit 127656c

Please sign in to comment.