0

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?

  • @JenB A composite lognormal-Pareto distribution takes a lognormal density up to an unknown threshold value θ, and a two-parameter Pareto density with scaling parameter α thereafter. The idea of such a composite model comes from Cooray and Ananda (2005). – Silvia Leoni Aug 10 '18 at 11:02
  • I have edited my question. I hope it provides enough information now – Silvia Leoni Aug 10 '18 at 22:34
  • I am not sure, if I get your problem. But do you have to do the calculation in NetLogo? Or could you just do your calculation in another software and have as an output value a value that shows the amount of X per patch in a way that your expectations are matched? That might help to split your question into two parts which could be answered by different persons and it simplifies your problem. – Hannah H. Aug 11 '18 at 20:16
  • Is this what you are trying to do (R solution)? https://stackoverflow.com/questions/23223548/how-can-i-generate-a-sample-from-a-log-normal-distribution-with-pareto-tail-in-r – JenB Aug 14 '18 at 10:04
  • Yes, the only difference is that I would need to build a report function that returns a lognormal-pareto distributed number – Silvia Leoni Aug 14 '18 at 15:54
  • @SilviaLeoni NetLogo doesn't have an integrate function (though I guess you could write one) so it might be easiest to use the R function in that answer and use the R extension in NetLogo to access it. – JenB Aug 15 '18 at 09:05

0 Answers0