simulation.adlasso: Simulation studies for Lasso and Adpative Lasso

Description Usage Arguments Value Details Author(s) Examples

View source: R/Adlassosimulation.R

Description

This function calls the data generating function simulation.generation.data and can be used to conduct simulation studies for comparison between the Lasso and the Adaptive Lasso.

Usage

1
2
3
simulation.adlasso(n.resample = n.resample, n = n, coeff = coeff,
  matrix.option = 1, collinear = collinear, sig = sig, option = 2,
  parallel = FALSE)

Arguments

n.resample

The number of simulation datasets to generate

n

The number of rows in the each data.frame

coeff

A vector a true coefficients fixed acrossed the simulated datasets

matrix.option

1: Using an Exchangeable correlation matrix to simulate the predictors
2: Using an Autoregressive correlation matrix to simulate the predictors

collinear

The correlation levels within the matrix.option

sig

The model inherent error, the σ^2

option

1: split the dataset according to c(split.prop, 1 - split.prop)
2: Use the whole dataset. Note When option = 2, the split.prop will be ignored
Note: When using simulation.adlasso please make sure "option = 2" under the current package.

parallel

Parallelisation

Value

A list of elements:

final.table

A summary table contains: 1.The averaged number of incorrectly classified coefficients.
2.The proportion of times the each method correctly chooses the true model

lasso

A matrix full with simulation results for the Lasso method. Users can freely use this result matrix to obtain further insight

Adpative Lasso

A matrix full with simualtion results for the Adatpive Lasso method. Users can freely use this result matrix to obtain further insight

Details

The function is one of the core function for the simulation studies. The function supports comparison between the Lasso and the Adaptive Lasso in terms of making inferenes. This function calls the function simulation.generation.data and thus, users can study different datasets of their liking. The function uses the coefficients from the Lasso fit to construct the initial weights. The function investigates and compare between three different γs e.g. c(0.5,1,2). The function provide a summary table for the simulation results. Furthermore, the function also poduces visulisation of bias, variance and mean-squared error for the sampling distributions of the coefficients. Finally, the matrix containing the simulation iterations for each of these methods is also provided. Therefore, users are free to conduct further investigation.

Author(s)

Mokyo Zhou

Examples

1
2
3
4
5
#number of simulated dataset 20, 400 rows, vector of true coefficient is c(0.4,0.4,2.5,2.5,0,0,0,
#0,0,0),using exchangeable correlation matrix, correlation level is 0.2 in the autoregressive
#matrix,model error is 2, using the whole dataset. No parallelisation.
simulation1 <- simulation.adlasso(n.resample = 20, n = 400, coeff = c(0.4,0.4,2.5,2.5,rep(0,6)),
matrix.option = 1, collinear = 0.2, sig = 2, parallel = FALSE,option=2)

MokyoZhou/lassoenet documentation built on May 20, 2019, 11:38 a.m.