% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/moments.R
\name{moments}
\alias{moments}
\title{Numerical estimation of moments}
\usage{
moments(
  dist,
  distarg,
  p0 = 0,
  raw = TRUE,
  central = TRUE,
  coef = TRUE,
  distbounds = c(-Inf, Inf),
  order = 1:4
)
}
\arguments{
\item{dist}{character; distribution name (e.g. \code{"norm"},
\code{"paretoII"})}

\item{distarg}{list of distribution arguments}

\item{p0}{numeric; probability zero (default 0)}

\item{raw}{logical; compute raw moments?}

\item{central}{logical; compute central moments?}

\item{coef}{logical; compute standardised coefficients (CV, skewness,
kurtosis)?}

\item{distbounds}{numeric vector of length 2; distribution bounds (default
\code{c(-Inf, Inf)})}

\item{order}{integer vector; raw moment orders (default \code{1:4})}
}
\value{
a named list with zero or more of:
\describe{
\item{\code{m}}{raw moments}
\item{\code{mu}}{central moments}
\item{\code{coefficients}}{CV, skewness, kurtosis}
}
}
\description{
Uses numerical integration to compute the theoretical raw or central moments
of the specified distribution.
}
\examples{

library(CoSMoS)

## Normal distribution
moments("norm", list(mean = 2, sd = 1))

## Pareto type II
moments(dist    = "paretoII",
        distarg = list(shape = 0.2, scale = 1))

}
\seealso{
\code{\link{sample.moments}}, \code{\link{populationstat}}
}
\keyword{moments}
