Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/recipe/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ requirements:
- r-mr.mashr
- r-mvsusier
- r-ncvreg
- r-nnls
- r-pgenlibr
- r-purrr
- r-qgg
- r-quadprog
- r-rcppdpr
- r-readr
- r-rfast
Expand Down Expand Up @@ -98,6 +100,7 @@ requirements:
- r-mr.mashr
- r-mvsusier
- r-ncvreg
- r-nnls
- r-pgenlibr
- r-purrr
- r-qgg
Expand Down
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ Suggests:
mr.mashr,
mvsusieR,
ncvreg,
nnls,
pgenlibr,
quadprog,
qgg,
qvalue,
rmarkdown,
Expand Down
6 changes: 6 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ export(compute_qtl_enrichment)
export(ctwas_bimfile_loader)
export(dentist)
export(dentist_single_window)
export(dpr_adaptive_gibbs_weights)
export(dpr_gibbs_weights)
export(dpr_vb_weights)
export(dpr_weights)
export(enet_weights)
export(enforce_design_full_rank)
export(ensemble_weights)
export(extract_cs_info)
export(extract_flatten_sumstats_from_nested)
export(extract_top_pip_info)
Expand Down Expand Up @@ -185,10 +189,12 @@ importFrom(readr,read_lines)
importFrom(rlang,"!!!")
importFrom(stats,as.dist)
importFrom(stats,coef)
importFrom(stats,complete.cases)
importFrom(stats,cor)
importFrom(stats,cutree)
importFrom(stats,hclust)
importFrom(stats,lm.fit)
importFrom(stats,optim)
importFrom(stats,pchisq)
importFrom(stats,pnorm)
importFrom(stats,predict)
Expand Down
12 changes: 12 additions & 0 deletions R/regularized_regression.R
Original file line number Diff line number Diff line change
Expand Up @@ -1208,3 +1208,15 @@ dpr_weights <- function(X, y, fitting_method = "VB", ...) {
eff.wgt[keep] <- as.numeric(fit$beta + fit$alpha)
return(eff.wgt)
}

#' @rdname dpr_weights
#' @export
dpr_vb_weights <- function(X, y, ...) dpr_weights(X, y, fitting_method = "VB", ...)

#' @rdname dpr_weights
#' @export
dpr_gibbs_weights <- function(X, y, ...) dpr_weights(X, y, fitting_method = "Gibbs", ...)

#' @rdname dpr_weights
#' @export
dpr_adaptive_gibbs_weights <- function(X, y, ...) dpr_weights(X, y, fitting_method = "Adaptive_Gibbs", ...)
Loading