rdasim1 | R Documentation |
The function generates simulated data for Ridge Redundancy Analysis (RDA). It creates two data matrices, X and Y, based on a set of shared latent variables H. The function adds noise to the data and returns a list containing the matrices X, Y, the latent variables H, and the regression coefficients theta.y used for generating Y.
rdasim1(n, p, q, k, s2n = c(5, 5))
n |
The number of samples. |
p |
The number of variables of X. |
q |
The number of variables of Y. |
k |
The number of latent variables. |
s2n |
The numeric parameters of signal to noise ratio for X and Y, default value is c(1,1). |
A list containing matrices X, Y, H, and theta.y.
# Example usage of rdasim1
set.seed(10)
sim_data <- rdasim1(n = 10, p = 5, q = 3, k = 2)
str(sim_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.