Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

lambda.pert

Perturbation of Mixing Proportions


Description

Perturbs a set of mixing proportions by first scaling the mixing proportions, then taking the logit of the scaled values, perturbing them, and inverting back to produce a set of new mixing proportions.

Usage

lambda.pert(lambda, pert)

Arguments

lambda

A vector of length k giving the mixing proportions which are to be perturbed.

pert

A vector (possibly of length k-1) for which to perturb lambda. If the length is less than k, then values of the vector are recycled. If length is greater than k, then only the first k values are used.

Details

This function is called by regmixMH.

Value

lambda.pert returns new lambda values perturbed by pert.

See Also

Examples

set.seed(100)
x <- c(0.5, 0.2, 0.3)
lambda.pert(x, rcauchy(3))

mixtools

Tools for Analyzing Finite Mixture Models

v1.2.0
GPL (>= 2)
Authors
Derek Young [aut, cre] (<https://orcid.org/0000-0002-3048-3803>), Tatiana Benaglia [aut], Didier Chauveau [aut], David Hunter [aut], Ryan Elmore [ctb], Thomas Hettmansperger [ctb], Hoben Thomas [ctb], Fengjuan Xuan [ctb]
Initial release
2020-02-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.