Zero-bounded triangular and zero-censored normal distributions
Posted: 23 Feb 2022, 09:07
Hello Stephane and David,
I have been trying to estimate a model with a (negative) log-normally distributed cost parameter however, I keep having extremely long tails even at a very large number of draws (10.000). Hence, I have been trying to apply other distributions that might produce more behaviorally reasonable results while keeping its domain below zero. I came across the zero-bounded triangular and zero-censored normal distributions and which are mentioned in the mlogit package and I was wondering how to implement it using Apollo. For example, I know that in order to generate a symmetrical triangular distribution I can use the sum of two uniforms (shown below), but how should I transform the original uniform draws in order to get a zero-bounded triangular distribution? Additionally, which transformation should I apply to (standard) normal draws in order to get a zero-censored normal distribution?
Finally, would you recommend using said distributions for cost coefficients?
Thank you a lot for your time!
Álvaro.
I have been trying to estimate a model with a (negative) log-normally distributed cost parameter however, I keep having extremely long tails even at a very large number of draws (10.000). Hence, I have been trying to apply other distributions that might produce more behaviorally reasonable results while keeping its domain below zero. I came across the zero-bounded triangular and zero-censored normal distributions and which are mentioned in the mlogit package and I was wondering how to implement it using Apollo. For example, I know that in order to generate a symmetrical triangular distribution I can use the sum of two uniforms (shown below), but how should I transform the original uniform draws in order to get a zero-bounded triangular distribution? Additionally, which transformation should I apply to (standard) normal draws in order to get a zero-censored normal distribution?
Finally, would you recommend using said distributions for cost coefficients?
Thank you a lot for your time!
Álvaro.
Code: Select all
apollo_draws = list(
interDrawsType = 'sobol',
interNDraws = 1000,
interUnifDraws = c("unif_draws_cost_a","unif_draws_cost_b")
interNormDraws = c("norm_draws_cost"),
)
#create random coefficients
apollo_randCoeff <- function(apollo_beta,apollo_inputs){
randcoeff = list()
# Symmetrical triangular distribution
randcoeff[['cost']] = bound_cost + range_cost * ( unif_draws_cost_a + unif_draws_cost_b ) / 2
return(randcoeff)
}