rdasim1 {rrda} | R Documentation |
Generate simulated data for Ridge Redundancy Analysis (RDA).
Description
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.
Usage
rdasim1(n, p, q, k, s2n = c(5, 5))
Arguments
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). |
Value
A list containing matrices X, Y, H, and theta.y.
Examples
# Example usage of rdasim1
set.seed(10)
sim_data <- rdasim1(n = 10, p = 5, q = 3, k = 2)
str(sim_data)
[Package rrda version 0.1.1 Index]