integralJointMoTBF: Integration with MoTBFs

View source: R/joint.R

integralJointMoTBFR Documentation

Integration with MoTBFs

Description

Integrate a "jointmotbf" object over an non defined domain. It is able to get the integral of a joint function over a set of variables or over all the variables in the function.

Usage

integralJointMoTBF(P, var = NULL)

Arguments

P

A "jointmotbf" object.

var

A "character" vector containing the name of the variables that will be integrated out. Instead of the names, the position of the variables can be given. By default it's NULL then all the variables are integrated out.

Value

A multiintegral of a joint function of class "jointmotbf".

Examples

## 1. EXAMPLE
## Dataset with 2 variables
X <- data.frame(rnorm(100), rnorm(100))

## Joint function
dim <- c(2,3)
param <- parametersJointMoTBF(X, dimensions = dim)
P <- jointMoTBF(param)

## Integral
integralJointMoTBF(P)
integralJointMoTBF(P, var="x")
integralJointMoTBF(P, var="y")

##############################################################################
## MORE EXAMPLES #############################################################
##############################################################################

## Dataset with 3 variables
X <- data.frame(rnorm(50), rnorm(50), rnorm(50))

## Joint function
dim <- c(2,1,3)
param <- parametersJointMoTBF(X, dimensions = dim)
P <- jointMoTBF(param)
 
## Integral
integralJointMoTBF(P)
integralJointMoTBF(P, var="x")
integralJointMoTBF(P, var="y")
integralJointMoTBF(P, var="z")
integralJointMoTBF(P, var=c("x","z"))


MoTBFs documentation built on April 18, 2022, 5:06 p.m.