https://github.com/cran/bayestestR
Revision aee422d7cd4098dad89e31ecc6dfd9e539d2bda4 authored by Dominique Makowski on 06 August 2019, 10:20:02 UTC, committed by cran-robot on 06 August 2019, 10:20:02 UTC
1 parent 23ea322
Raw File
Tip revision: aee422d7cd4098dad89e31ecc6dfd9e539d2bda4 authored by Dominique Makowski on 06 August 2019, 10:20:02 UTC
version 0.2.5
Tip revision: aee422d
density_at.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/estimate_density.R
\name{density_at}
\alias{density_at}
\title{Density Probability at a Given Value}
\usage{
density_at(posterior, x, precision = 2^10, method = "kernel", ...)
}
\arguments{
\item{posterior}{Vector representing a posterior distribution.}

\item{x}{The value of which to get the approximate probability.}

\item{precision}{Number of points of density data. See the \code{n} parameter in \link[=density]{density}.}

\item{method}{Density estimation method. Can be \code{"kernel"} (default), \code{"logspline"} or \code{"KernSmooth"}.}

\item{...}{Currently not used.}
}
\description{
Compute the density value at a given point of a distribution (i.e., the value of the \code{y} axis of a value \code{x} of a distribution).
}
\examples{
library(bayestestR)
posterior <- distribution_normal(n = 10)
density_at(posterior, 0)
density_at(posterior, c(0, 1))
}
back to top