Learn R Programming

betafunctions (version 1.8.1)

binomialmoments: Compute Moments of Binomial Probability Mass Functions.

Description

Computes Raw, Central, or Standardized moment properties of defined Binomial probability mass functions.

Usage

binomialmoments(n, p, types = c("raw", "central", "standardized"), orders = 4)

Value

A list of moment types, each a list of moment orders.

Arguments

n

Number of Binomial trials

p

Probability of success per trial.

types

A character vector determining which moment-types are to be calculated. Permissible values are "raw", "central", and "standardized".

orders

The number of moment-orders to be calculated for each of the moment-types.

References

Hanson, B. A (1991). Method of Moments Estimates for the Four-Parameter Beta Compound Binomial Model and the Calculation of Classification Consistency Indexes. American College Testing Research Report Series.

Examples

Run this code
# Assume some variable follows a four-parameter Beta distribution with
# location parameters l = 0.25 and u = .75, and shape parameters a = 5
# and b = 3. To compute the first four raw, central, and standardized
# moments of this distrubution using betamoments():
betamoments(a = 5, b = 3, l = .25, u = .75,
types = c("raw", "central", "standardized"), orders = 4)

Run the code above in your browser using DataLab