LNRE_posterior {zipfR} | R Documentation |
Posterior Distribution of LNRE Model (zipfR)
Description
Posterior distribution over the type probability space of a LNRE
model, given the observed frequency m
in a sample. Posterior
density (postdlnre
) and log-transformed density
(postldlnre
) can be computed for all LNRE models. The
distribution function (postplnre
) and quantiles
(postqlnre
) are only available for selected types of models.
Usage
postdlnre(model, x, m, N, ...)
postldlnre(model, x, m, N, base=10, log.x=FALSE, ...)
postplnre(model, q, m, N, lower.tail=FALSE, ...)
postqlnre(model, p, m, N, lower.tail=FALSE, ...)
Arguments
model |
an object belonging to a subclass of |
m |
frequency |
N |
sample size |
x |
vector of type probabilities |
q |
vector of type probability quantiles, i.e. threshold values
|
p |
vector of tail probabilities |
base |
positive number, the base |
log.x |
if |
lower.tail |
if |
... |
further arguments are passed through to the method implementations (currently unused) |
Value
A vector of non-negative numbers of the same length as the second
argument (x
, p
or q
).
postdlnre
returns the posterior type density P(\pi | f = m)
for the values of \pi
specified in the vector x
.
postplnre
computes the posterior type distribution function
P(\pi \geq \rho | f = m)
(default) or its complement
P(\pi \leq \rho | f = m)
(if lower.tail=TRUE
).
These correspond to E[V_{m, >\rho}]
and E[V_{m, \rho}]
, respectively (Evert 2004, p. 123).
postqlnre
returns quantiles, i.e. the inverse of the posterior
type distribution function.
postldlnre
computes a logarithmically transformed version of
the posterior type density, taking logarithms with respect to the
base a
specified in the base
argument (default: a=10
).
Such log-transformed densities are useful for visualizing distributions,
see ldlnre
for more information.
See Also
lnre
for more information about LNRE models and how to
initialize them, LNRE
for type density and distribution
functions (which represent the prior distribution).
Examples
## TODO