as.function.jointmotbf | R Documentation |
"jointmotbf"
Object to a FunctionTakes a "jointmotbf"
object and contructs an R function to evaluate it at multidimensional points.
## S3 method for class 'jointmotbf' as.function(x, ...)
x |
An object of class |
... |
Further arguments to be passed to or from the method. Not necessary for this method. |
This is an S3
method for the generic function as.function.
It returns a function to evaluate an object of class "jointmotbf"
.
parametersJointMoTBF and jointMoTBF
## 1.EXAMPLE ## Dataset data <- data.frame(X = rnorm(100), Y = rexp(100)) ## Joint function dim <- c(3,2) param <- parametersJointMoTBF(data, dimensions = dim) P <- jointMoTBF(param) density <- as.function(P)(data[,1], data[,2]) density ## Log-likelihood sum(log(density)) ############################################################################# ## MORE EXAMPLES ############################################################ ############################################################################# ## Dataset data <- data.frame(X = rnorm(100), Y = rexp(100), Z = rnorm(100)) ## Joint function dim <- c(2,3,4) param <- parametersJointMoTBF(data, dimensions = dim) P <- jointMoTBF(param) density <- as.function(P)(data[,1], data[,2], data[,3]) density ## Log-likelihood sum(log(density))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.