Learn Data & AI Skills | 50% off
Get 50% off unlimited learning

acid (version 1.1)

weighted.moments: Moments of a Random Variable

Description

This functions calculates the first three moments as well as mean, standard deviation and skewness for a vector of observations with corresponding weights.

Usage

weighted.moments(x, w8 = NULL)

Arguments

x
a vector of observations.
w8
a vector of weights.

Value

  • fmreturns the first moment.
  • weighted.meanreturns the mean.
  • smreturns the second moment.
  • weighted.sdreturns the uncorrected (population) standard deviation.
  • wtd.sdreturns the sample-size corrected standard deviation estimate.
  • tmreturns the third moment.
  • w.skew.SASreturns the skewness estimate as implemented in SAS.
  • w.skew.Statareturns the skewness estimate as implemented in Stata.

See Also

wtd.var