Maximum likelihood estimated distributionSource:
Density, distribution function, quantile function and random generation for a univariate distribution estimated by maximum likelihood.
dml(x, obj, log = FALSE) pml(q = q, obj, lower.tail = TRUE, log.p = FALSE) qml(p = p, obj, lower.tail = TRUE, log.p = FALSE) rml(n = n, obj)
- x, q
vector of quantiles.
- log, log.p
TRUE, the probabilities p are gives as
TRUE(default), the probabilities are \(P[X \le x]\) otherwise, \(P[X > x]\)
vector of probabilities.
number of observations. If
length(n) > 1, the length is taken to be the number required.
dml gives the density,
pml gives the distribution
qml gives the quantile function, and
rmlgenerates random deviates.
dml is the density,
pml is the distribution function,
qml is the quantile function, and
rml is the random variable
These functions work like their counterparts in
univariateML object contains both maximum
likelihood estimates and the identity of the model these estimates were
calculated under. These functions are wrappers around underlying density,
distribution, quantile and random generation functions where unknown
parameters are filled with the maximum likelihood estimates.
See the example.
## Simple example obj <- mlnorm(airquality$Wind) dml(0.5, obj) == dnorm(0.5, mean = obj, sd = obj) #>  TRUE obj <- mlbetapr(airquality$Wind) # Plot the logarithm of the beta prime distribution. plot(function(x) dml(x, obj, log = TRUE), from = 0, to = 20, main = "Logarithm of Density", ylab = NA, lwd = 2 )