Search code examples
randomnetlogo

How can I generate observations of a lognormal distribution in NetLogo?


I have the values of parameters of the lognormal distribution (mu=1.23 and sigma=0.32) that characterize the income of a population. In Netlogo, how can I generate observations of the income and then assign them to an attribute of a turtle?

Thank you so much!


Solution

    1. Somebody has written a library of common statistical distributions that includes the lognormal.
    2. The language provides random-normal and exp functions, and Wikipedia provides instructions for how to generate lognormals.