Learn R Programming

DiscreteWeibull (version 1.1)

lossdw3: Loss function

Description

Loss function for the method of moments (type 3 discrete Weibull)

Usage

lossdw3(par, x, eps = 1e-04)

Arguments

par
vector of parameters $q$ and $\beta$
x
the vector of sample values
eps
error threshold for the numerical computation of the expected value

Value

the value of the quadratic loss function

Details

The loss function is given by $L(x;c,\beta)=[m_1-\mathrm{E}(X;c,\beta)]^2+[m_2-\mathrm{E}(X^2;c,\beta)]^2$, where $\mathrm{E}(\cdot)$ denotes the expected value, $m_1$ and $m_2$ are the first and second order sample moments respectively.

See Also

Edweibull3

Examples

Run this code
n <- 25
c <- 1/3
beta <- 2/3
x <- rdweibull3(n, c, beta)
par <- estdweibull3(x, "M")
par
lossdw3(par, x)

Run the code above in your browser using DataLab