Learn R Programming

stat.extend (version 0.2.1)

MLE.matching: Maximum likelihood estimator (MLE) in the generalised matching distribution

Description

MLE.matching returns the maximum likelihood estimator (MLE) for the data.

Usage

MLE.matching(
  x,
  size,
  CI.method = "asymptotic",
  conf.level = 0.95,
  bootstrap.sims = 10^3
)

Arguments

x

A vector of numeric values to be used as arguments for the mass function

size

The size parameter for the generalised matching distribution (number of objects to match)

CI.method

The method used to compute the confidence interval ('asymptotic' or 'bootstrap')

conf.level

The width of the CI

bootstrap.sims

The number of bootstrap simulations used in the bootstrap confidence interval

Value

If all inputs are correctly specified (i.e., parameters are in allowable range) then the output will be a list of outputs for the MLE

Details

This function computes the maximum likelihood estimator (MLE) from data consisting of IID samples from the generalised matching distribution. Further details on the distribution can be found in the following paper:

References

O'Neill, B. (2021) A generalised matching distribution for the problem of coincidences.

Examples

Run this code
# NOT RUN {
X <- rmatching(20, 5, prob=.1)

# For comparison
# MASS::fitdistr(X, dmatching, start=list(prob=.5), size=5, lower=c(prob=0), upper=c(prob=1))

MLE.matching(X, 5)

# }

Run the code above in your browser using DataLab