MWLasso-package: Penalized Moving-Window Lasso Method for Genome-Wide...

Description Usage Arguments Details Value Author(s) References Examples

Description

Find coefficients for a regression model with moving-window Lasso penalty (MWLasso). The model is marginalized so that missing values can be accommendated.

Usage

1
2
MWLasso(X, Y, lambda, eta, d, method='linear', epson = 1e-10, M = 100)
MW_parameters(X, Y, d, number, gamma2, method="linear", epson = 1e-10, M = 100)

Arguments

X

The design matrix which can include missing values.

Y

The response variable.

lambda

The L1 penalty tuning parameter.

eta

The moving-window penalty tuning parameter.

d

The size of the moving-window penalty.

method

The regression method. Method can be linear or logistic.

number

The pre-determined number of non-zero coefficients.

gamma2

The proportion of the tuning parameter for moving-window part and L1 penalty part. gamma2 is the ratio of lambda/(lambda+eta).

epson

Convergence criterion. The iteration will stop if the relative change is smaller than epson.

M

The maximum number of iterations.

Details

The function minimizes 1/(2n)*MLS + lambda*L1 + eta/(2(d-1))*MW. Here MLS is the marginalized least squares, L1 is the L1 penalty in Lasso, and MW is the moving-window penalty.

Value

MWLasso returns:

beta

The coefficients estimates.

MW_parameters returns:

lambda

The tuning parameter for L1 penalty.

eta

The tuning parameter for moving-window penalty.

Thus under such lambda and eta, MWLasso will return beta which satisfies the pre-determined number of non-zero coefficients.

Author(s)

Minli Bao <minli-bao@uiowa.edu>

References

Genome-wide association studies using a penalized moving-window regression. Minli Bao and Kai Wang. Submitted for review.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# In example 1, feature matrix X and response variable Y are randomly generated.
# Example 1:
n = 100
p = 200
X = matrix(rnorm(n*p, mean = 0, sd = 1), nrow = n, ncol = p)
X[2,1] = NA; X[80:90,1]= NA; 
Y =  rnorm(n, mean = 0, sd = 1)

number = 20
gamma2 = 0.1
d = 4
params = MW_parameters(X, Y, d, number, gamma2, method="linear")
lambda = params[1]
eta = params[2]
beta.hat = MWLasso(X, Y, lambda, eta, d, method="linear")

# In example 2, the nki70 dataset is from the "penalized" package
# (https://cran.r-project.org/web/packages/penalized/penalized.pdf).
# The response variable Y is "event", the disease indicator.
# The feature matrix X is "TSPYL5...C20orf46", the gene expression
# measurements of 70 prognostic genes.
# Example 2:
require("penalized")
data(nki70)
data = nki70
Y = data$event
data$time <- NULL
data$event <- NULL
data$Diam <- NULL
data$N <- NULL
data$ER <- NULL
data$Grade <- NULL
data$Age <- NULL
X = data.matrix(data)

number = 20
gamma2 = 0.1
d = 4
params = MW_parameters(X, Y, d, number, gamma2, method="linear")
lambda = params[1]
eta = params[2]
beta.hat = MWLasso(X, Y, lambda, eta, d, method="linear")

Example output

Tuning parameters are: lambda = 0.1752809, eta = 1.577528.Loading required package: penalized
Loading required package: survival
Welcome to penalized. For extended examples, see vignette("penalized").
Tuning parameters are: lambda = 0.08282598, eta = 0.7454338.

MWLasso documentation built on May 2, 2019, 6:12 a.m.