| norm | R Documentation |
Computes the Bayes-Space norm of BData objects
norm(x, ...)
## S3 method for class 'BData'
norm(x, ..., measure = getReferenceMeasure(x))
## S3 method for class 'BDataSplines'
norm(x, ...)
x |
a BData object |
... |
further arguments to expectation. |
measure |
the reference measure to on which to compute the L2 norm of the clr |
A numeric vector of the L2 (Bayes-space) norms, one per observation.
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.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.