Learn R Programming

MoTBFs (version 1.4.2)

coef.mte: Extracting the coefficients of an MTE

Description

It extracts the parameters of the learned mixtures of truncated exponential models.

Usage

coeffMTE(fx)

coeffExp(fx)

Value

An array with the parameters of the function.

Arguments

fx

An "motbf" function of subclass 'mte'.

Details

coeffMOP() return the coefficients of the terms in the function.

coeffPol() returns the coefficients of the potential of the exponential basis in the function.

See Also

coef.motbf and univMoTBF

Examples

Run this code

## 1. EXAMPLE
data <- rnorm(1000, mean=5)
fx1 <- univMoTBF(data, POTENTIAL_TYPE = "MTE")
hist(data, prob=TRUE, main="")
plot(fx1, xlim=range(data), col="red", add=TRUE)
coeffMTE(fx1) ## coef(fx1)
coeffExp(fx1)

## 2. EXAMPLE
data <- rexp(1000, rate=1/2)
fx2 <- univMoTBF(data, POTENTIAL_TYPE = "MTE")
hist(data, prob=TRUE, main="")
plot(fx2, xlim=range(data), col="red", add=TRUE)
coeffMTE(fx2) ## coef(fx2)
coeffExp(fx2)
 

Run the code above in your browser using DataLab