integralMoTBF {MoTBFs} | R Documentation |
Gets the integral of a one dimensional mixture of truncated basis function over a bounded or unbounded interval.
integralMoTBF(fx, min = NULL, max = NULL)
fx |
An |
min |
The lower limit of integration. By default it is NULL. |
max |
The higther limit of the interval. By default it is NULL. |
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.
The non-defined integral of the MoTBF function that is also an "motbf"
function or the defined integral that is a "numeric"
value.
univMoTBF, integralMOP and integralMTE
## 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."
## End(Not run)