lassosum2
snp_lassosum2(
corr,
df_beta,
delta = c(0.001, 0.01, 0.1, 1),
nlambda = 30,
lambda.min.ratio = 0.01,
dfmax = 2e+05,
maxiter = 1000,
tol = 1e-05,
ind.corr = cols_along(corr),
ncores = 1
)A matrix of effect sizes, one vector (column) for each row in
attr(<res>, "grid_param"). Missing values are returned when strong
divergence is detected.
Sparse correlation matrix as an SFBM.
If corr is a dsCMatrix or a dgCMatrix, you can use as_SFBM(corr).
A data frame with 3 columns:
$beta: effect size estimates
$beta_se: standard errors of effect size estimates
$n_eff: either GWAS sample size(s) when estimating beta for a
continuous trait, or in the case of a binary trait, this is
4 / (1 / n_control + 1 / n_case); in the case of a meta-analysis, you
should sum the effective sample sizes of each study instead of using the
total numbers of cases and controls, see tools:::Rd_expr_doi("10.1016/j.biopsych.2022.05.029");
when using a mixed model, the effective sample size needs to be adjusted
as well, see tools:::Rd_expr_doi("10.1016/j.xhgg.2022.100136").
Vector of shrinkage parameters to try (L2-regularization).
Default is c(0.001, 0.01, 0.1, 1).
Number of different lambdas to try (L1-regularization).
Default is 30.
Ratio between last and first lambdas to try.
Default is 0.01.
Maximum number of non-zero effects in the model.
Default is 200e3.
Maximum number of iterations before convergence.
Default is 1000.
Tolerance parameter for assessing convergence.
Default is 1e-5.
Indices to "subset" corr, as if this was run with
corr[ind.corr, ind.corr] instead. No subsetting by default.
Number of cores used. Default doesn't use parallelism.
You may use bigstatsr::nb_cores().