sample_stochastic_vector | R Documentation |
Given a vector of counts in cells, x
and a stochastic matrix prob
, each
row of which describes a probability distribution of how that cell should be
distributed among bins, sample destination bins for each cell count, and return
a vector giving the number of counts in bins. It is conceptually similar to
"stochastically" distributing the vector as x %*% prob
, which gives the
expectation.
sample_stochastic_vector(x, prob)
x |
a vector |
prob |
a matrix, it must have number of rows equal to |
a vector of length equal to the number of columns of prob
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.