mosmafs (version 0.1.2)

create.linear.data: Create Linear Model Data

Description

Create linear model data Y = X * beta + epsilon with X as a n * p matrix of multivariate normal distributed rows with covariance matrix

1     rho rho^2 rho^3 ... rho^p
rho     1 rho   rho^2 ... rho^(p-1)
rho^2 rho   1   rho ...   rho^(p-2)
...
rho^p ...

epsilon is standard normally distributed and beta[i] = beta0 * q ^ (i - 1) for i = 1,..., p.

If permute == TRUE, columns of X as well as beta are permuted before the linear model equation is evaluated to generate Y. These permuted values are also the ones returned in the result.

$orig.features are the features with beta > 1 / sqrt(n).

Usage

create.linear.data(n, p, q = exp(-1), beta0 = 1, rho = 0, permute = TRUE)

Value

list(X=[Matrix], Y=[vector], beta = [vector], orig.features = logical)

Arguments

n

[integer(1)] number of rows to generate.

p

[integer(1)] number of columns to generate.

q

[numeric(1)] attenuation factor for beta coefficients.

beta0

[numeric(1)] size of first coefficient.

rho

[numeric(1)] parameter for correlation matrix.

permute

[logical(1)] whether to permute columns of X and coefficient vector (beta).

See Also

Other Artificial Datasets: clonetask(), create.hypersphere.data(), create.linear.toy.data(), create.regr.task(), task.add.permuted.cols(), task.add.random.cols()