lossdw {DiscreteWeibull} | R Documentation |
Loss function
Description
Loss function for the method of moments (type 1 discrete Weibull)
Usage
lossdw(par, x, zero = FALSE, eps = 1e-04, nmax=1000)
Arguments
par |
vector of parameters |
x |
the vector of sample values |
zero |
|
eps |
error threshold for the numerical computation of the expected value |
nmax |
maximum value considered for the numerical computation of the expected value |
Details
The loss function is given by L(x;q,\beta)=[m_1-\mathrm{E}(X;q,\beta)]^2+[m_2-\mathrm{E}(X^2;q,\beta)]^2
, where \mathrm{E}(\cdot)
denotes the expected value, m_1
and m_2
are the first and second order sample moments respectively.
Value
the value of the quadratic loss function
Author(s)
Alessandro Barbiero
See Also
Examples
x <- c(1,1,1,1,1,2,2,2,3,4)
lossdw(c(0.5, 1), x)
par <- estdweibull(x, "M") # parameter estimates derived by the method of moments
par
lossdw(par, x) # the loss is zero using these estimates
[Package DiscreteWeibull version 1.1 Index]