Learn R Programming

distributions3 (version 0.2.2)

fit_mle: Fit a distribution to data

Description

Generic function for fitting maximum-likelihood estimates (MLEs) of a distribution based on empirical data.

Usage

fit_mle(d, x, ...)

Value

A distribution (the same kind as d) where the parameters are the MLE estimates based on x.

Arguments

d

An object. The package provides methods for distribution objects such as those from Normal() or Binomial() etc.

x

A vector of data to compute the likelihood.

...

Arguments passed to methods. Unevaluated arguments will generate a warning to catch mispellings or other possible errors.

Examples

Run this code
X <- Normal()
fit_mle(X, c(-1, 0, 0, 0, 3))

Run the code above in your browser using DataLab