Skip to contents

Maximum likelihood estimate of the triangle distribution parameters

Usage

triangle_mle(x, debug = FALSE, maxiter = 100)

Arguments

x

sample from a triangle distribution

debug

if TRUE then the function will check the input parameters and print calculation information

maxiter

the maximum number of cycles of optimization between maximizing a and b given c and maximizing c given a and b

Value

an object of S3 class triangle_mle containing a list with the call, coefficients, variance co-variance matrix, minimum negative log likelihood, details of the optimization number of observations, and the sample

References

Samuel Kotz and Johan Rene van Dorp. Beyond Beta doi:10.1142/5720

Examples

xtest <- c(0.1, 0.25, 0.3, 0.4, 0.45, 0.6, 0.75, 0.8)
triangle_mle(xtest)
#> Triangle Maximum Likelihood Estimates
#> 
#> Call:  triangle_mle(x = xtest) 
#> 
#> Estimates:
#>    Estimate Std.Err
#> a 0.0076277  0.0996
#> b 0.9939370  0.1649
#> c 0.3000000  0.0861
#> 
#> Convergence Code:  0
#> 	 CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH

xtest <- rtriangle(20, 1, 5, 3.5)
triangle_mle(xtest)
#> Triangle Maximum Likelihood Estimates
#> 
#> Call:  triangle_mle(x = xtest) 
#> 
#> Estimates:
#>   Estimate Std.Err
#> a   1.5521  0.2339
#> b   4.4910  0.1430
#> c   3.8333  0.1430
#> 
#> Convergence Code:  0
#> 	 CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH