Estimation of parameters

Description

Estimation of the parameters of the type 3 discrete Weibull distribution

Usage

1
estdweibull3(x, method = "P", eps = 1e-04)

Arguments

x

the vector of sample values

method

"ML" for the maximum likelihood method; "M" for the method of moments; "P" for the method of proportions

eps

error threshold for the computation of the moments of the distribution

Value

the vector of the estimates of c and β

Author(s)

Alessandro Barbiero

See Also

ddweibull3

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Ex1
x <- c(0,0,0,0,0,1,1,1,1,1,1,1,2,2,2,2,3,3,4,6)
estdweibull3(x, "P")
estdweibull3(x, "ML")
estdweibull3(x, "M")
# Ex 2
n <- 20
c <- 1/3
beta <- 2/3
x <- rdweibull3(n, c, beta)
estdweibull3(x, "P")
par <- estdweibull3(x, "ML")
par
-loglikedw3(par, x)
par <- estdweibull3(x, "M")
par
lossdw3(par, x)
n <- 50
x <- rdweibull3(n, c, beta)
estdweibull3(x, "P")
estdweibull3(x, "ML")
estdweibull3(x, "M")
n <- 100
x <- rdweibull3(n, c, beta)
estdweibull3(x, "P")
estdweibull3(x, "ML")
estdweibull3(x, "M")
# Ex 3: a piece of simulation study
nSim <- 50
n <- 50
c <- 0.2
beta <- 0.7
par <- matrix(0, nSim, 2)
for(i in 1:nSim)
{
x <- rdweibull3(n, c, beta)
par[i,] <- estdweibull3(x, "ML")
}
op <- par(mfrow = c(1,2))
boxplot(par[,1], xlab=expression(hat(c)[ML]))
abline(h = c)
boxplot(par[,2], xlab=expression(hat(beta)[ML]))
abline(h = beta)
op <- par()