Description Usage Arguments Details Value Examples
Density, distribution function, quantile function and random generation for a univariate distribution estimated by maximum likelihood.
1 2 3 4 5 6 7 |
x, q |
vector of quantiles. |
obj |
an |
log, log.p |
logical; if |
lower.tail |
logical; if |
p |
vector of probabilities. |
n |
number of observations. If |
dml
is the density, pml
is the distribution function,
qml
is the quantile function, and rml
is the random variable
generator.
These functions work like their counterparts in stats
, e.g.
Normal. The 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.
dml
gives the density, pml
gives the distribution
function, qml
gives the quantile function, and rml
generates random deviates.
1 2 3 4 5 6 7 8 9 10 11 | ## Simple example
obj <- mlnorm(airquality$Wind)
dml(0.5, obj) == dnorm(0.5, mean = obj[1], sd = obj[2])
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
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.