Simulation of Multivariate Linear Model Data

simrel(n, p, q, relpos, gamma, R2, type = "univariate", ...)

## Arguments

n |
Number of observations. |

p |
Number of variables. |

q |
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 `gamma` , the decrease of eigenvalues will be steeper. |

R2 |
Vector of coefficient of determination (proportion of variation explained by predictor variable) for each relevant response components. |

type |
Type of simulation - `univariate` , `bivariate` and `multivariate` |

... |
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 `unisimrel` , `bisimrel` and `multisimrel` |

## Value

A simrel object with all the input arguments along with following additional items.

XSimulated predictors

YSimulated responses

WSimulated predictor components

ZSimulated response components

betaTrue regression coefficients

beta0True regression intercept

relpredPosition of relevant predictors

testXTest Predictors

testYTest Response

testWTest predictor components

testZTest response components

minerrorMinimum model error

XrotationRotation matrix of predictor (R)

YrotationRotation matrix of response (Q)

typeType of simrel object *univariate* or *multivariate*

lambdaEigenvalues of predictors

SigmaWZVariance-Covariance matrix of components of response and predictors

SigmaWXCovariance matrix of response components and predictors

SigmaYZCovariance matrix of response and predictor components

SigmaVariance-Covariance matrix of response and predictors

RsqWCoefficient of determination corresponding to response components

RsqYCoefficient of determination corresponding to response variables

## References

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.