Description Usage Arguments Value
Compute probability of observations given a vector of probability of heads
1 2 3 4 5 6 7 8 | dcoin_from_probability(
pheads,
nheads,
nflips,
log = FALSE,
possibilities = get_possibilities(nheads, nflips),
diff_value = NULL
)
|
pheads |
Vector with the probability of a heads on flip 1, 2, etc. |
nheads |
Number of heads |
nflips |
Total number of flips (heads and tails) |
log |
If TRUE return log transformed probabilities. |
possibilities |
All possible sequences of flips that lead to the observed number of heads |
diff_value |
If not NULL, the final likelihood will be abs(likelihood - diff_value) for minimizing a function |
The likelihood of the data (or log likelihood if log=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.