| simrel | R Documentation |
Simulation of Multivariate Linear Model Data
simrel(n, p, q, relpos, gamma, R2, type = "univariate", ...)
n |
Number of observations. |
p |
Number of variables. |
q |
Number of predictors related to each relevant components An integer for univariate, a vector of 3 integers for bivariate and 3 or more for multivariate simulation (for details see Notes). |
relpos |
A list (vector in case of univariate simulation) of position of relevant component for predictor variables corresponding to each response. |
gamma |
A declining (decaying) factor of eigenvalues of predictors (X).
Higher the value of |
R2 |
Vector of coefficient of determination (proportion of variation explained by predictor variable) for each relevant response components. |
type |
Type of simulation - |
... |
Since this is a wrapper function to simulate univariate,
bivariate or multivariate, it calls their respective function.
This parameter should contain all the necessary arguements for respective
simulations. See |
A simrel object with all the input arguments along with
following additional items. For more detail on the return values see the
individual simulation functions unisimrel,
bisimrel and multisimrel.
Common returns from univariate, bivariate and multivariate simulation:
call |
the matched call |
X |
simulated predictors |
Y |
simulated responses |
beta |
true regression coefficients |
beta0 |
true regression intercept |
relpred |
position of relevant predictors |
n |
number of observations |
p |
number of predictors (as supplied in the arguments) |
p |
number of responses (as supplied in the arguments) |
q |
number of relevant predictors (as supplied in the arguments) |
gamma |
declining factor of eigenvalues of predictors (as supplied in the arguments) |
lambda |
eigenvalues corresponding to the predictors |
R2 |
theoretical R-squared value (as supplied in the arguments) |
relpos |
position of relevant components (as supplied in the arguments) |
minerror |
minimum model error |
Sigma |
variance-Covariance matrix of response and predictors |
testX |
simulated test predictor (in univarite simulation |
testY |
simulated test response (in univarite simulation |
Rotation |
Random rotation matrix used to rotate latent components. Is
equivalent to the transpose of eigenvector-matrix. In multivariate
simulation, |
type |
type of simrel object |
Returns from multivariate simulation:
eta |
a declining factor of eigenvalues of response (Y) (as supplied in the arguments) |
ntest |
number of simulated test observations |
W |
simulated response components |
Z |
simulated predictor components |
testW |
test predictor components |
testZ |
test response components |
SigmaWZ |
Variance-Covariance matrix of components of response and predictors |
SigmaWX |
Covariance matrix of response components and predictors |
SigmaYZ |
Covariance matrix of response and predictor components |
RsqW |
Coefficient of determination corresponding to response components |
RsqY |
Coefficient of determination corresponding to response variables |
The parameter q represetns the number of predictor variables
that forms a basis for each of the relevant componetns. For example,
for q = 8 and relevant components 1, 2, and 3 specified by
parameter relpos then the randomly selected 8 predictor variables
forms basis for these three relevant componets and thus in the model
these 8 predictors will be revant for the response (outcome).
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.