| eval.motbf | R Documentation |
Evaluates a univariate ("mop", "mte") or joint distribution ("jointmotbf") at a specific point.
eval.motbf(P, values)
P |
An object of class |
values |
A list with the name of the variables equal to the values to be evaluated. |
If all the variables in the equation are evaluated, then a "numeric" value
is returned. Otherwise, an "univmotbf" object or a "jointmotbf" object is returned.
#' ## 1. EXAMPLE
## Dataset with 2 variables
X <- data.frame(rnorm(100), rexp(100))
## Joint function
dim <- c(3,3) # dim <- c(5,4)
P <- jointmotbf.fit(X, dimensions = dim)
## Evaluation
val <- list(x = -1.5, y = 3)
eval.motbf(P, values = val)
val <- list(x = -1.5)
eval.motbf(P, values = val)
val <- list(y = 3)
eval.motbf(P, values = val)
##############################################################################
## MORE EXAMPLES #############################################################
##############################################################################
## Dataset with 3 variables
X <- data.frame(x = rnorm(100), y = rexp(100), z = rnorm(100, 1))
## Joint function
dim <- c(2,1,3)
P <- jointmotbf.fit(X, dimensions = dim)
P
## Evaluation
val <- list(x = 0.8, y = -2.1, z = 1.2)
eval.motbf(P, values = val)
val <- list(x = 0.8, y = 1.2)
eval.motbf(P, values = val)
val <- list(y = -2.1)
eval.motbf(P, values = val)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.