For the model I am working on in NetLogo, I would like to distribute a certain variable X as a composite lognormal-pareto, which takes a lognormal density up to an unknown threshold value θ and a two-parameter Pareto density with scaling parameter α thereafter.
The pdf is the following:
f1(x) = (αθ^α / (1+Φ(k))x^(α+1))exp{(-α^2/2k^2)ln^2(x/θ)} , 0 < x ≤ θ
f2(x) = αθ^α / (1+Φ(k))x^(α+1). , θ < x < ∞
where Φ(·) is the cumulative distribution function of the standard normal distribution and k is a constant.
How can I write this in NetLogo?