genDataFromExamples {gfboost}R Documentation

Data generation

Description

Auxiliary function for generating simple artificial data sets with normally distributed coefficients and regressors. Note that we only report this function for reproducibility of the simulations from the PhD thesis of the author.

Usage

genDataFromExamples(
  p,
  n,
  s = 1,
  xmean = 0,
  betamean = 0,
  betasd = 1,
  snr = 2,
  rho = 0
)

Arguments

p

Number of variables (columns).

n

Number of observations (rows).

s

Sparsity. Real number between 0 and 1. s=1 (default) leads to a coefficient vector without zero entries.

xmean

Mean of each of the normally distributed columns. Default is 0.

betamean

Mean of each of the normally distributed coefficients. Default is 0.

betasd

Standard deviation of the normally distributed coefficients. Default is 1.

snr

Signal to noise ratio. Real number greater than zero. Default is 2.

rho

Parameter for a Toeplitz covariance structure of the regressors. Real number between -1 and 1. Default is 0 which corresponds to uncorrelated columns.

Value

D

Data matrix (X,Y).

vars

A list of the relevant variables.

Examples

genDataFromExamples(10,25,0.3)

[Package gfboost version 0.1.1 Index]