datagen.norm.intercept: Data generation normal with intercept
Description
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 and the first column of X consists of 1's such that an intercept is included in the model.
Usage
datagen.norm.intercept(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