SimCorrMix (version 0.1.1)

calc_mixmoments: Find Standardized Cumulants of a Continuous Mixture Distribution by Method of Moments

Description

This function uses the method of moments to calculate the expected mean, standard deviation, skewness, standardized kurtosis, and standardized fifth and sixth cumulants for a continuous mixture variable based on the distributions of its components. The result can be used as input to find_constants or for comparison to a simulated mixture variable from contmixvar1, corrvar, or corrvar2. See the Expected Cumulants and Correlations for Continuous Mixture Variables vignette for equations of the cumulants.

Usage

calc_mixmoments(mix_pis = NULL, mix_mus = NULL, mix_sigmas = NULL,
  mix_skews = NULL, mix_skurts = NULL, mix_fifths = NULL,
  mix_sixths = NULL)

Arguments

mix_pis

a vector of mixing probabilities that sum to 1 for the component distributions

mix_mus

a vector of means for the component distributions

mix_sigmas

a vector of standard deviations for the component distributions

mix_skews

a vector of skew values for the component distributions

mix_skurts

a vector of standardized kurtoses for the component distributions

mix_fifths

a vector of standardized fifth cumulants for the component distributions; keep NULL if using method = "Fleishman" to generate continuous variables

mix_sixths

a vector of standardized sixth cumulants for the component distributions; keep NULL if using method = "Fleishman" to generate continuous variables

Value

A vector of the mean, standard deviation, skewness, standardized kurtosis, and standardized fifth and sixth cumulants

References

Please see references for SimCorrMix.

Examples

Run this code
# NOT RUN {
# Mixture of Normal(-2, 1) and Normal(2, 1)
calc_mixmoments(mix_pis = c(0.4, 0.6), mix_mus = c(-2, 2),
  mix_sigmas = c(1, 1), mix_skews = c(0, 0), mix_skurts = c(0, 0),
  mix_fifths = c(0, 0), mix_sixths = c(0, 0))

# }

Run the code above in your browser using DataLab