Learn R Programming

MoTBFs (version 1.4.2)

derivMOP: Derivative of a MOP

Description

Compute the derivative of an "motbf" object with 'mop' subclass.

Usage

derivMOP(fx)

Value

The derivative which is also an "motbf" function.

Arguments

fx

An "motbf" object of the 'mop' subclass.

See Also

univMoTBF for learning and derivMoTBF for general "motbf" models.

Examples

Run this code

## 1. EXAMPLE
X <- rexp(1000)
Px <- univMoTBF(X, POTENTIAL_TYPE="MOP")
derivMOP(Px)

## 2. EXAMPLE
X <- rnorm(1000)
Px <- univMoTBF(X, POTENTIAL_TYPE="MOP")
derivMOP(Px)

if (FALSE) {
## 3. EXAMPLE
X <- rnorm(1000)
Px <- univMoTBF(X, POTENTIAL_TYPE="MTE")
derivMOP(Px)
## Error in derivMOP(Px): fx is an 'motbf' function but not 'mop' subclass.
class(Px)
subclass(Px)
}

Run the code above in your browser using DataLab