From 127656cc4a653b476356f5993fb06e70fddc596b Mon Sep 17 00:00:00 2001 From: Marianna Rottoli Date: Thu, 16 Sep 2021 14:16:10 +0200 Subject: [PATCH] Removed deprecated lines. --- R/calculate_logit_inconv_endog.R | 3 --- 1 file changed, 3 deletions(-) diff --git a/R/calculate_logit_inconv_endog.R b/R/calculate_logit_inconv_endog.R index 3aeed56..20a743e 100644 --- a/R/calculate_logit_inconv_endog.R +++ b/R/calculate_logit_inconv_endog.R @@ -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]