norm.BData: Computes the Bayes-Space norm of BData objects

normR Documentation

Computes the Bayes-Space norm of BData objects

Description

Computes the Bayes-Space norm of BData objects

Usage

norm(x, ...)

## S3 method for class 'BData'
norm(x, ..., measure = getReferenceMeasure(x))

## S3 method for class 'BDataSplines'
norm(x, ...)

Arguments

x

a BData object

...

further arguments to expectation.

measure

the reference measure to on which to compute the L2 norm of the clr

Value

A numeric vector of the L2 (Bayes-space) norms, one per observation.

Functions

  • norm(): generic functionality computing Euclidean norms of vectors (default method) and redirecting to 'base::norm()' for matrices.

  • norm(BDataSplines): fast exact norm for BDataSplines via the Gram matrix of the basis: the squared norm of each observation is the quadratic form of its coefficient vector with the metric tensor S.

Examples

lbdl = BDataLogDensities(basis=B2N01Basis5, closed=TRUE,
  list(
    \(x)(dnorm(x,2,1,log=TRUE)),
    \(x)(dnorm(x,1,1,log=TRUE)),
    \(x)(dnorm(x,-1,1,log=TRUE)),
    \(x)(dnorm(x,-2,1,log=TRUE))
    ))
norm(lbdl)

DistributionalDDA documentation built on Oct. 20, 2026, 5:06 p.m.