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 |
|
err |
a positive tolerance value, as small as possible, used in the definition of lower and upper bounds of the parameters |
parml |
starting values for |
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
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)