| random_composition_with_fixed_pb | R Documentation |
Simulates a random composition whose coordinate system is constructed from
a sequential binary partition induced by a given first balance. The supplied
balance is completed to a full orthonormal basis using
sbp_basis with fill = TRUE.
random_composition_with_fixed_pb(principal_balance, n = 100, sd1 = 5)
principal_balance |
An integer or numeric vector in
|
n |
Integer. Number of observations to generate. |
sd1 |
Numeric value used to scale the first latent coordinate before rotating the simulated coordinates. |
Standard normal latent coordinates are first generated in dimension
D - 1, where D is the number of parts. Their sample covariance
matrix is then diagonalized, and the associated eigenvectors are used to
rotate the latent coordinates before mapping them back to the simplex using
the basis induced by principal_balance.
This function is mainly intended for examples, simulation studies, and experiments where a specific first balance structure is desired.
A composition matrix with n rows and
length(principal_balance) columns.
sbp_basis,
composition
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.