loss {DiscreteLaplace}R Documentation

Loss function for the method of moments

Description

A loss function used for the implementation of the method of moments (for the ADSL).

Usage

loss(par, x)

Arguments

par

the vector of parameters, p and q, of the ADSL

x

a vector of sample values from the ADSL

Value

The value L=[E(X)-m_1(x)]^2+[E(X^2)-m_2(x)]^2, where m_1 and m_2 are the first- and second-order sample moments.

Author(s)

Alessandro Barbiero, Riccardo Inchingolo

References

A. Barbiero, An alternative discrete Laplace distribution, Statistical Methodology, 16: 47-67

See Also

estdlaplace2, Edlaplace2

Examples

p <- 0.3
q <- 0.7
x <- rdlaplace2(n=100, p, q)
par <- estdlaplace2(x, "M")
loss(par, x) # should be near zero
loss(c(p,q), x) # may be far greater than zero

[Package DiscreteLaplace version 1.1.1 Index]