Computes density of a prior distribution across a range of values.
# S3 method for prior
density(
  x,
  x_seq = NULL,
  x_range = NULL,
  x_range_quant = NULL,
  n_points = 1000,
  n_samples = 10000,
  force_samples = FALSE,
  individual = FALSE,
  transformation = NULL,
  transformation_arguments = NULL,
  transformation_settings = FALSE,
  truncate_end = TRUE,
  ...
)density.prior returns an object of class 'density'.
a prior
sequence of x coordinates
vector of length two with
lower and upper range for the support
(used if x_seq is unspecified)
quantile used for
automatically obtaining x_range
if both x_range and x_seq
are unspecified. Defaults to 0.005
for all but Cauchy, Student-t, Gamma, and
Inverse-gamme distributions that use
0.010.
number of equally spaced points
in the x_range if x_seq is unspecified
number of samples from the prior
distribution if the density cannot be obtained
analytically (or if samples are forced with
force_samples = TRUE)
should prior be sampled instead of obtaining analytic solution whenever possible
should individual densities be returned (e.g., in case of weightfunction)
transformation to be applied to the prior distribution. Either a character specifying one of the prepared transformations:
linear transformation in form of a + b*x
also known as Fisher's z transformation
exponential transformation
, or a list containing the transformation function fun,
inverse transformation function inv, and the Jacobian of
the transformation jac. See examples for details.
a list with named arguments for
the transformation
boolean indicating whether the
settings the x_seq or x_range was specified on
the transformed support
whether the density should be set to zero in for the endpoints of truncated distributions
additional arguments
prior()