veg / hyphy

HyPhy: Hypothesis testing using Phylogenies
http://www.hyphy.org
Other
209 stars 69 forks source link

Sampling a value from a Poisson distribution in HBL #564

Closed halabikeren closed 7 years ago

halabikeren commented 7 years ago

Hi,

Is there are a way to sample a value from a Poisson distribution with some parameter gamma in HBL?

Thanks! Keren

stevenweaver commented 7 years ago

Dear Keren,

Yes, you can draw from a Poisson distribution in HyPhy.

LoadFunctionLibrary("Utility/ProbabilityDistributions.bf");
fprintf(stdout, sampleFromPoisson(4));

Best, Steven

halabikeren commented 7 years ago

Perfect! Thank you:)