estimate: MLE for univariate sample

Description Usage Arguments Value Examples

Description

Estimate parameters of various distributions by the method of maximum likelihood. The following families are available: Normal(location=μ,scale=σ^2), Gamma(shape=α,scale=β), Logistic(location=μ,scale=s), Laplace(location=μ,scale=b), Weibull(shape=α,scale=β), and Exponential(scale=θ).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
estimate.uniform(x)

estimate.normal(x)

estimate.gamma(x, use.rate = FALSE)

estimate.logistic(x, eps = 1e-07, verbose = FALSE)

estimate.laplace(x, use.sd = FALSE)

estimate.weibull(x, eps = 1e-07)

estimate.exp(x, use.rate = FALSE)

Arguments

x

A random sample.

use.rate

Logical; if TRUE use the rate instead of the scale.

eps

Stopping criterion, 1e-7 by default.

verbose

Logical; if TRUE, print estimates in each iteration.

use.sd

Logical; if TRUE use the sd instead of the scale for Laplace distribution.

Value

Estimated parameters of the assumed distribution by MLE.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
x0=runif(n=100,min=-1,max=1)
estimate.uniform(x0)

x1=rnorm(n=100,mean=0,sd=1)
estimate.normal(x1)

x2=rgamma(n=100,shape=1,scale=1)
estimate.gamma(x2)

x3=rlogis(n=100,location=0,scale=1)
estimate.logistic(x3)

x4= rmutil::rlaplace(n=100,m=0,s=1)
estimate.laplace(x4)

x5=rweibull(n=100,shape=1,scale=1)
estimate.weibull(x5)

x6=rexp(n=100,rate=1/2)
estimate.exp(x6,use.rate=TRUE)

EDFtest documentation built on Oct. 25, 2021, 9:10 a.m.