| moments | R Documentation |
Uses numerical integration to compute the theoretical raw or central moments of the specified distribution.
moments(
dist,
distarg,
p0 = 0,
raw = TRUE,
central = TRUE,
coef = TRUE,
distbounds = c(-Inf, Inf),
order = 1:4
)
dist |
character; distribution name (e.g. |
distarg |
list of distribution arguments |
p0 |
numeric; probability zero (default 0) |
raw |
logical; compute raw moments? |
central |
logical; compute central moments? |
coef |
logical; compute standardised coefficients (CV, skewness, kurtosis)? |
distbounds |
numeric vector of length 2; distribution bounds (default
|
order |
integer vector; raw moment orders (default |
a named list with zero or more of:
mraw moments
mucentral moments
coefficientsCV, skewness, kurtosis
sample.moments, populationstat
library(CoSMoS)
## Normal distribution
moments("norm", list(mean = 2, sd = 1))
## Pareto type II
moments(dist = "paretoII",
distarg = list(shape = 0.2, scale = 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.