View source: R/integrateDens.R
| integrateDens | R Documentation |
Given a density function specified by the root of the density function name, returns the integral over a specified range, usually the whole real line. Used for checking that the integral over the whole real line is 1.
integrateDens(densFn = "norm", lower = -Inf, upper = Inf,
subdivisions = 100, ...)
densFn |
Character. The name of the density function to be integrated. |
lower |
Numeric. The lower limit of the integration.
Defaulty is |
upper |
Numeric. The upper limit of the integration.
Defaulty is |
subdivisions |
Numeric. The number of subdivisions to be passed
to |
... |
Additional arguments to be passed to |
The name of the density function to be integrated must be supplied as
the characters of the root for that density (e.g. norm,
gamma). The density function specified is integrated
numerically over the range specified via a call to
integrate. The parameters of the distribution can be
specified, otherwise the default parameters will be used.
A list of class integrate with components:
value |
The final estimate of the integral. |
abs.error |
Estimate of the modulus of the absolute error. |
subdivisions |
The number of subintervals produced in the subdivision process. |
message |
|
call |
The matched call to the |
David Scott d.scott@auckland.ac.nz
momIntegrated
integrateDens("norm", mean = 1, sd = 1)
integrateDens("t", df = 4)
integrateDens("exp", rate = 2)
integrateDens("weibull", shape = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.