Description Usage Arguments See Also Examples
All prior distributions described in Prior
can be updated with
binomial observations (x
out of n
responses).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## S4 method for signature 'PointMass'
update(object, x, n)
## S4 method for signature 'Beta'
update(object, x, n)
## S4 method for signature 'BetaMixture'
update(object, x, n)
## S4 method for signature 'GenericDistribution'
update(object, x, n)
## S4 method for signature 'JeffreysPrior'
update(object, x, n)
|
object |
|
x |
number of responses out of |
n |
number of individuals out of which |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run:
# point mass distributions are invariant under updating
update(PointMass(.4), 3, 10)
## End(Not run)
## Not run:
update(Beta(5, 7), 3, 10) # same as Beta(8, 14)
## End(Not run)
## Not run:
update(1/3*Beta(5, 7) + 2/3*Beta(1,1), 3, 10) # update mixtures
## End(Not run)
## Not run:
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
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.