lambda.pert {mixtools} | R Documentation |
Perturbs a set of mixing proportions by first scaling the mixing proporitons, then taking the logit of the scaled values, perturbing them, and inverting back to produce a set of new mixing proportions.
lambda.pert(lambda, pert)
lambda |
A vector of length k giving the mixing proportions which are to be perturbed. |
pert |
A vector (likely of length k-1) for which to perturb lambda .
If the length is less than k-1, then values of the vector are recycled. If length
is greater than k-1, then only the first k-1 values are used. |
This function is called by regmixMH
.
lambda.pert
returns new lambda
values perturbed by pert
.
x<-c(0.5, 0.2, 0.3) lambda.pert(x, rcauchy(2))