bisimrel | R Documentation |
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
X |
Simulated predictors |
Y |
Simulated responses |
beta |
True regression coefficients |
beta0 |
True regression intercept |
relpred |
Position of relevant predictors |
testX |
Test Predictors |
testY |
Test Response |
minerror |
Minimum model error |
Rotation |
Rotation matrix of predictor (R) |
type |
Type of simrel object, in this case bivariate |
lambda |
Eigenvalues of predictors |
Sigma |
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.