Skip to contents

Fits MCP-penalized regression on the RSS objective, searching over a shrinkage grid s and lambda path. Model selection uses LD-quadratic pseudovalidation by default.

Usage

mcpRssWeights(
  stat,
  LD,
  s = c(0.2, 0.5, 0.9, 1),
  gamma = 3,
  alpha = 1,
  selection = c("ld_quadratic", "min_fbeta"),
  ...
)

Arguments

stat

A list with $b (effect sizes) and $n (per-variant sample sizes).

LD

LD correlation matrix R (single matrix, NOT pre-shrunk).

s

Numeric vector of LD shrinkage parameters. Default: c(0.2, 0.5, 0.9, 1.0).

gamma

MCP concavity parameter. Default 3.

alpha

Elastic-net mixing (1 = pure L1). Default 1.

selection

Selection strategy: "ld_quadratic" (default) or "min_fbeta".

...

Additional arguments passed to penalizedRss().

Value

A numeric vector of SNP coefficient weights.

Examples

data(eqtlRegionExample)
X <- eqtlRegionExample$X[, 1:30]
y <- eqtlRegionExample$yRes
ss <- lapply(
  seq_len(ncol(X)), function(j) coef(summary(lm(y ~ X[, j])))[2, 1:2])
stat <- list(
  b = vapply(ss, `[`, numeric(1), 1L),
  seb = vapply(ss, `[`, numeric(1), 2L),
  n = rep(nrow(X), ncol(X))
)
LD <- cor(X)
mcpRssWeights(stat, LD)
#>  [1] -0.048615991 -0.048626912 -0.023334082  0.006252348  0.006221979
#>  [6] -0.021826559 -0.016513809  0.030985033  0.009649182  0.009695623
#> [11] -0.017820516 -0.037776811 -0.028963067  0.000000000 -0.017889357
#> [16]  0.030971326  0.005756017  0.007749771  0.092699982  0.007639803
#> [21]  0.007651641 -0.021917549  0.007742214 -0.016027817 -0.029041570
#> [26] -0.021844400 -0.111386230 -0.028758808  0.093079147  0.023128685
#> attr(,"penalized_rss_selection")
#>                  mode                 index               penalty 
#>        "ld_quadratic"                   "8"                 "MCP" 
#>                     s                lambda 
#>                 "0.2" "0.00127427498570313"