MoTBFs (version 1.2)

integralMoTBF: Integral MoTBF

Description

Gets the integral of a one dimensional mixture of truncated basis function over a bounded or unbounded interval.

Usage

integralMoTBF(fx, min = NULL, max = NULL)

Arguments

fx

An "motbf" function.

min

The lower limit of integration. By default it is NULL.

max

The higther limit of the interval. By default it is NULL.

Value

The non-defined integral of the MoTBF function that is also an "motbf" function or the defined integral that is a "numeric" value.

Details

If the limits of the interval, min and max are NULL, then the output is the expression of the non-defined integral. If only min contains a numeric value, then the expression of the integral is evaluated in this point.

See Also

univMoTBF, integralMOP and integralMTE

Examples

Run this code
# NOT RUN {
## 1. EXAMPLE
X <- rexp(1000)
Px <- univMoTBF(X, POTENTIAL_TYPE="MOP")
integralMoTBF(Px)
integralMoTBF(Px, 1.2)
integralMoTBF(Px, min(X), max(X))

## 2. EXAMPLE
X <- rnorm(1000)
Px <- univMoTBF(X, POTENTIAL_TYPE="MOP")
iP <- integralMoTBF(Px); iP
plot(iP, xlim=range(X))
integralMoTBF(Px, 0.2)
integralMoTBF(Px, min(X), max(X))

## 3. EXAMPLE
X <- rchisq(1000, df = 3)
Px <- univMoTBF(X, POTENTIAL_TYPE="MTE")
integralMoTBF(Px)
integralMoTBF(Px, 1)
integralMoTBF(Px, min(X), max(X))

# }
# NOT RUN {
## 4. EXAMPLE
Px <- "1+x+5"
class(Px)
integralMoTBF(Px)
## Error in integralMoTBF(Px): "fx is not an 'motbf' function."
# }

Run the code above in your browser using DataLab