normalize: Normalize distribution

Description Usage Arguments Value Note Examples

View source: R/RcppExports.R

Description

Normalizes the distribution so that the total mass equals 1.

Usage

1
normalize(d, qp)

Arguments

d

A vector with length(qp) elements representing the unscaled density at each quadrature point.

qp

Vector of equally spaced quadrature points.

Value

A vector of length(d) elements with the prior density estimate at each quadature point.

Note

: Internal function

Examples

1
2
3
dscore:::normalize(c(5, 10, 5), qp = c(0, 1, 2))

sum(dscore:::normalize(rnorm(5), qp = 1:5))

dscore documentation built on Nov. 29, 2020, 1:07 a.m.