rmap.mvn: Computes the distribution of 'g(x)' where 'x' is an 'mvn'...

View source: R/mvn.R

rmap.mvnR Documentation

Computes the distribution of g(x) where x is an mvn object.

Description

By the invariance property, if x is an mvn object, then under the right conditions, asymptotically, g(x) is an MVN distributed, g(x) ~ normal(g(mean(x)), sigma) where sigma is the variance-covariance of g(x)

Usage

## S3 method for class 'mvn'
rmap(x, g, n = 10000L, ...)

Arguments

x

The mvn object to apply g to

g

The function to apply to x

n

number of samples to take to estimate distribution of g(x) if method is mc or empirical. Defaults to 10000.

...

additional arguments to pass into the g function.

Value

An mvn distribution fitted to the transformed samples.

Examples


X <- mvn(c(1, 2), diag(2))
set.seed(42)
Y <- rmap(X, function(x) x^2)
mean(Y)


algebraic.dist documentation built on Feb. 27, 2026, 5:06 p.m.