I have a data set which follows lognormal distribution (parameters $μ$, $σ$ known - estimated by maximum likelihood estimation). I have to generate random numbers within range $[a:b]$ from this known distribution (a and b are predetermined and hence known as well). I am confused how should this be done. I am thinking of proceeding in following way - use runif with min and max ranges and qlnorm from the known lognormal distribution, e.g.
min = plnorm(a, meanlog = μ, sdlog = σ)
max = plnorm(b, meanlog = μ, sdlog = σ)
qlnorm(runif(x, min = min, max = max), meanlog = μ, sdlog = σ)
Will this approach be correct?
Also, just out of curiosity, can I fit a log-normal only to this interval (i.e. in $[a:b]$ ) and generate random numbers using the same approach as above? Is my understanding correct that this will be essentially a truncated distribution? Also, what will be the new values of "a" & "b" used above to generate min and max quantiles using plnorm of this new truncated distribution?