Function to simulate data
simulData(p = 100, n = 100, beta = NULL, C = NULL, r = 0.95,
rSN = 10)
A list with components :
vector n
:
matrix n x p
: values of the covariates. See
details.
matrix p x p
. See details
scalar. See details.
vector with p
components. See details.
integer : number of variates. Should be >15 if beta=NULL
integer : number of observations
vector with p
components. See details.
matrix p x p
. Covariance matrix of X. See details.
scalar for calculating the covariance of X when C=NULL
.
scalar : ratio signal/noise
Yannick Baraud, Christophe Giraud, Sylvie Huet
When beta
is NULL
, then p
should be
greater than 15 and
beta=c(rep(2.5,5),rep(1.5,5),rep(0.5,5),rep(0,p-15))
When C
is NULL
, then C
is block
diagonal with
C[a,b] = r**abs(a-b)
for
C[a,b] = r**abs(a-b)
for
The lines of X
are n
i.i.d. gaussian variables with
mean 0 and covariance matrix C
.
The variance sigma**2
equals the squared euclidean
norm of rSN*n
.