Simulation of Multivariate Linear Model data with response
bisimrel( n = 50, p = 100, q = c(10, 10, 5), rho = c(0.8, 0.4), relpos = list(c(1, 2), c(2, 3)), gamma = 0.5, R2 = c(0.8, 0.8), ntest = NULL, muY = NULL, muX = NULL, sim = NULL )
n | Number of training samples |
---|---|
p | Number of x-variables |
q | Vector of number of relevant predictor variables for first, second and common to both responses |
rho | A 2-element vector, unconditional and conditional correlation between y_1 and y_2 |
relpos | A list of position of relevant component for predictor variables. The list contains vectors of position index, one vector or each response |
gamma | A declining (decaying) factor of eigen value of predictors (X). Higher the value of |
R2 | Vector of coefficient of determination for each response |
ntest | Number of test observation |
muY | Vector of average (mean) for each response variable |
muX | Vector of average (mean) for each predictor variable |
sim | A simrel object for reusing parameters setting |
A simrel object with all the input arguments along with following additional items
Simulated predictors
Simulated responses
True regression coefficients
True regression intercept
Position of relevant predictors
Test Predictors
Test Response
Minimum model error
Rotation matrix of predictor (R)
Type of simrel object, in this case bivariate
Eigenvalues of predictors
Variance-Covariance matrix of response and predictors
Sæbø, S., Almøy, T., & Helland, I. S. (2015). simrel—A versatile tool for linear model data simulation based on the concept of a relevant subspace and relevant predictors. Chemometrics and Intelligent Laboratory Systems, 146, 128-135.
Almøy, T. (1996). A simulation study on comparison of prediction methods when only a few components are relevant. Computational statistics & data analysis, 21(1), 87-107.
sobj <- bisimrel( n = 100, p = 10, q = c(5, 5, 3), rho = c(0.8, 0.4), relpos = list(c(1, 2, 3), c(2, 3, 4)), gamma = 0.7, R2 = c(0.8, 0.8) ) # Regression Coefficients from this simulation sobj$beta#> [,1] [,2] #> [1,] 0.1976147 0.0000000 #> [2,] -1.1352283 -1.2669424 #> [3,] 0.6884604 0.5123310 #> [4,] 0.0000000 0.3985812 #> [5,] 0.0000000 0.0000000 #> [6,] 0.0000000 0.0000000 #> [7,] 0.4467680 0.7546115 #> [8,] 0.0000000 -0.3985812 #> [9,] -0.1976147 0.0000000 #> [10,] 0.0000000 0.0000000