Function to generate data according to the linear model of the form Y = X*beta + epsilon where the noise epsilon follows a standard normal distribution.
Usage
datagen.norm(seed, n, p, rho, beta_vec)
Value
X
Design matrix of type "matrix" and dimension nxp
y
Response vector of type "matrix" and dimension nx1
true_y
True response vector, i.e. without the noise, of type "matrix" and dimension nx1
Arguments
seed
Integer for seed
n
Integer for sample size
p
Integer for number of variables in the design matrix
rho
Integer for correlation between variables in the design matrix