View source: R/simul_data_complete.R
simul_data_complete | R Documentation |
This function generates a single multivariate response value
\boldsymbol{Y}
and a vector of explinatory variables
(X_1,\ldots,X_{totdim})
drawn from a model with a given number of
latent components.
simul_data_complete(totdim, ncomp)
totdim |
Number of columns of the X vector (from |
ncomp |
Number of latent components in the model (from 2 to 6) |
This function should be combined with the replicate function to give rise to a larger dataset. The algorithm used is a port of the one described in the article of Li which is a multivariate generalization of the algorithm of Naes and Martens.
simX |
Vector of explanatory variables |
HH |
Dimension of
the response |
eta |
See Li et al. |
r |
See Li et al. |
epsilon |
See Li et al. |
ksi |
See Li et al. |
f |
See Li et al. |
z |
See Li et al. |
Y |
See Li et al. |
The value of r
depends on the value of ncomp
:
ncomp | r |
2 | 3 |
3 | 3 |
4 | 4 |
Frédéric Bertrand
frederic.bertrand@utt.fr
https://fbertran.github.io/homepage/
T. Naes, H. Martens, Comparison of prediction methods for
multicollinear data, Commun. Stat., Simul. 14 (1985) 545-576.
Morris, Elaine B. Martin, Model selection for partial least squares
regression, Chemometrics and Intelligent Laboratory
Systems 64 (2002) 79-89, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/S0169-7439(02)00051-5")}.
simul_data_YX
for data simulation purpose
simul_data_complete(20,6)
dimX <- 6
Astar <- 2
simul_data_complete(dimX,Astar)
dimX <- 6
Astar <- 3
simul_data_complete(dimX,Astar)
dimX <- 6
Astar <- 4
simul_data_complete(dimX,Astar)
rm(list=c("dimX","Astar"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.