marginalJointMoTBF | R Documentation |
Computes the marginal densities from a "jointmotbf"
object.
marginalJointMoTBF(P, var)
P |
An object of class |
var |
The |
The marginal of a "jointmotbf"
function. The result is an object of class "motbf"
.
jointMoTBF and evalJointFunction
## 1. EXAMPLE
## Dataset with 2 variables
X <- data.frame(rnorm(100), rnorm(100))
## Joint function
dim <- c(4,3)
param <- parametersJointMoTBF(X, dimensions = dim)
P <- jointMoTBF(param)
P
## Marginal
marginalJointMoTBF(P, var = "x")
marginalJointMoTBF(P, var = 2)
##############################################################################
## MORE EXAMPLES #############################################################
##############################################################################
## Generate a dataset with 3 variables
data <- data.frame(rnorm(100), rnorm(100), rnorm(100))
## Joint function
dim <- c(2,1,3)
param <- parametersJointMoTBF(data, dimensions = dim)
P <- jointMoTBF(param)
nVariables(P)
## Marginal
marginalJointMoTBF(P, var="x")
marginalJointMoTBF(P, var="y")
marginalJointMoTBF(P, var="z")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.