cen: Centers the representation

View source: R/helpers.R

cenR Documentation

Centers the representation

Description

This centers an representation in a way that a direct converstion to a log Density has integral 0.

Usage

cen(X, ..., center = TRUE)

## S3 method for class ''function''
cen(X, measure = getReferenceMeasure(X), ..., center)

## S3 method for class 'BDataDensities'
cen(X, ..., center)

## S3 method for class 'BDataPDFs'
cen(X, ..., center)

## S3 method for class 'BDataLogDensities'
cen(X, ..., center)

## S3 method for class 'BDataLogPDFs'
cen(X, ..., center)

## S3 method for class 'BayesSpaceBasis'
cen(X, ..., center)

Arguments

X

the object to be centered

...

further arguments for generic use

center

a boolean, if FALSE the object is returned directly, if true uncentered objects will be centered.

measure

the reference measure for which the closing constant shall be computed. This is especially required for functions

Details

Centring subtracts the integral mean (with respect to the reference measure) so that the result integrates to zero; equivalently it makes the clr representative of the distribution centred.

Value

and object of the same type as the incoming, but closed.

Methods (by class)

  • cen(`function`): method for functions

  • cen(BDataDensities): method for BDataDensities

  • cen(BDataPDFs): method for BDataPDFs

  • cen(BDataLogDensities): method for BDataLogDensities

  • cen(BDataLogPDFs): method for BDataLogPDFs

  • cen(BayesSpaceBasis): method for BayesSpaceBasis returns the centered logDensities

See Also

[clo]

Examples

cen(function(x) x^2,measure=ReferenceMeasureUniform(0,1))


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