All prior distributions described in Prior can be updated with
binomial observations (x out of n responses).
# S4 method for PointMass update(object, x, n) # S4 method for Beta update(object, x, n) # S4 method for BetaMixture update(object, x, n) # S4 method for GenericDistribution update(object, x, n) # S4 method for JeffreysPrior update(object, x, n)
| object |
|
|---|---|
| x | number of responses out of |
| n | number of individuals out of which |
if (FALSE) { # point mass distributions are invariant under updating update(PointMass(.4), 3, 10) } if (FALSE) { update(Beta(5, 7), 3, 10) # same as Beta(8, 14) } if (FALSE) { update(1/3*Beta(5, 7) + 2/3*Beta(1,1), 3, 10) # update mixtures } if (FALSE) { design <- Design(c(0, 30, 25, 0), c(Inf, 10, 7, -Inf)) prior <- JeffreysPrior(design) posterior <- update(prior, 3, 10) # results in a GenericDistribution object (no analytical update) update(posterior, 2, 5) # the generic posterior of a Jeffreys prior can also be updated again }