I am trying to replicate one part of the simulating programming results in a working paper, which says the authors 'generate random values from the "inverse log-normal" distribution with an expected median value of w_median = 0.85, with an additional condition, 0 <= w <= 1,' which obviously means random values are within 0 and 1. I am using R, and there are functions for generating "log-normal" distributions like dlnorm, plnorm, qlnorm, rlnorm, and it's quite obvious to generate random values from log-normal distributions with those functions like:
rand_val <- rlnorm(1000, meanlog=log(0.85))
hist(rand_val, breaks=100)
median(rand_val) # 0.8856299
min(rand_val) # 0.04660691
max(rand_val) # 23.33998
But I have no idea about how to generate the random values from "inverse log-normal" distribution. There was essentially the same question raised before (Inverse of the lognormal distribution), and they suggested using qlnorm function, but I am not sure how that function works for generating random values from inverse log-normal distribution, especially with additional conditions of mine as mentioned: 1) expected median value = 0.85; 2) random values are within 0 to 1. Thanks in advance!
Aucun commentaire:
Enregistrer un commentaire