Calvagone / campsis

A generic PK/PD simulation platform based on rxode2 and mrgsolve engines.
https://calvagone.github.io/
GNU General Public License v3.0
8 stars 3 forks source link

Function to sample from a Binomial Distribution #124

Closed AndreasCalvagone closed 1 year ago

AndreasCalvagone commented 1 year ago

Could we add a short-cut function to use the rbinom function when sampling a covariate?

And along these lines, how about a generic wrapper function for distributions, that, that takes as input the function name and a list of it arguments?

mattfidler commented 1 year ago

In rxode2 you can use rxbinom or ribinom

mattfidler commented 1 year ago

I think you can use Rcpp for mrgsolve though I am less familiar with that approach

luyckxn commented 1 year ago

Good idea. @AndreasCalvagone: There is already a wrapper that you can use, it is called 'FunctionDistribution' (see here: https://calvagone.github.io/campsis.doc/reference/FunctionDistribution.html)