estdlaplace2 {DiscreteLaplace}R Documentation

Sample estimation for the ADSL

Description

The function provides the point estimates for the parameters of the ASDL, resorting to four possible methods: method of moments, maximum likelihood method, method of proportion, modified method of moments. For details, please take a look at the references.

Usage

estdlaplace2(x, method = "M", err = 0.001, parml = c(exp(-1), exp(-1)))

Arguments

x

a vector of observations from the ADSL

method

M for the method of moments, ML for the maximum likelihood methods, P for the method of proportion, MM for the modified method of moments

err

a positive tolerance value, as small as possible, used in the definition of lower and upper bounds of the parameters pp and qq in the minimization algorithm utilized by the method of moments

parml

starting values for pp and qq in the optimization process for the maximum likelihood method

Value

a vector with the parameter estimates of pp and qq.

Author(s)

Alessandro Barbiero, Riccardo Inchingolo

References

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

See Also

dlaplacelike2

Examples

p <- 0.4
q <- 0.6
x <- rdlaplace2(n=100, p, q)
est <- matrix(0, 5, 2)
est[1,] <- c(p,q)
est[2,] <- estdlaplace2(x, method="M")
est[3,] <- estdlaplace2(x, method="ML")
est[4,] <- estdlaplace2(x, method="P")
est[5,] <- estdlaplace2(x, method="MM")
dimnames(est)[[1]]<-c("true","M","ML","P","MM")
dimnames(est)[[2]]<-c("p","q")
xlim <- c(min(est[,1])*.98,max(est[,1])*1.02)
ylim <- c(min(est[,2])*.98,max(est[,2])*1.02)
plot(est, pch=19, col=1:5, xlim=xlim, ylim=ylim)
text(est, dimnames(est)[[1]], pos=3, col=1:5, cex= .75)

[Package DiscreteLaplace version 1.1.1 Index]