Reputation: 21
I have a probit model that will calculate the z-score which I need to convert it to the probability so my code can use that probability to allow the agents to change from one state to another.
However, I do not know if there is a way to convert the z-score into probability in Netlogo or if I have to upload the z table; and if so how.
Upvotes: 1
Views: 218
Reputation: 4168
The stats
extension has a reporter that returns the area to the left of a value in the normal distribution with given mean and standard deviation. In this case, the area below z would be stats:normal-left z 0 1
, which would give the area to the left of z for a normal distribution with mean 0 and standard deviation 1. (There is also a stats:normal-inverse
that, given an area reports the value at the upper end of that area. E.g., show stats:normal-inverse 0.5 0 1
will give 0.0 as the area to the left of 0.0 is 0.5.) You can find the stats extension in the extension section of the NetLogo Home Page, under Community Extensions. Or, if you are using NetLogo 6.1, simply putting extensions [ stats ]
at the beginning of your code will prompt NetLogo to download it.
Hope this helps, Charles
Upvotes: 1