estdlaplace2: Sample estimation for the ADSL

Description Usage Arguments Value Author(s) References See Also Examples

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

1
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 p and q in the minimization algorithm utilized by the method of moments

parml

starting values for p and q in the optimization process for the maximum likelihood method

Value

a vector with the parameter estimates of p and q.

Author(s)

Alessandro Barbiero, Riccardo Inchingolo

References

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

See Also

dlaplacelike2

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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)

DiscreteLaplace documentation built on May 2, 2019, 5:52 a.m.