diff --git a/.Rbuildignore b/.Rbuildignore index 0dabb98..02fd7f5 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,2 +1,6 @@ ^docs$ ^_pkgdown\.yml$ +^\.github$ +^\.circleci$ +^\.travis\.yml$ +^appveyor\.yml$ diff --git a/DESCRIPTION b/DESCRIPTION index 05b8366..eb8f9e1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Encoding: UTF-8 Type: Package Package: mr.mash.alpha -Version: 0.2-28 +Version: 0.2-29 Date: 2023-08-17 Title: Multiple Regression with Multivariate Adaptive Shrinkage Description: Provides an implementation of methods for multivariate @@ -26,11 +26,14 @@ Imports: parallel Suggests: testthat, - varbvs + varbvs, + knitr, + rmarkdown, LinkingTo: Rcpp, RcppArmadillo (>= 0.10.4.0.0), RcppParallel +VignetteBuilder: knitr Remotes: stephenslab/ebnm, stephenslab/mashr, diff --git a/NAMESPACE b/NAMESPACE index d4ad215..972d8f2 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -33,7 +33,9 @@ importFrom(mvtnorm,rmvnorm) importFrom(parallel,makeCluster) importFrom(parallel,parLapply) importFrom(parallel,stopCluster) +importFrom(stats,coef) importFrom(stats,cov) importFrom(stats,cov2cor) importFrom(stats,lm) +importFrom(stats,predict) useDynLib(mr.mash.alpha) diff --git a/R/compute_covs.R b/R/compute_covs.R index 4906f3e..f8b47ee 100644 --- a/R/compute_covs.R +++ b/R/compute_covs.R @@ -327,6 +327,8 @@ compute_cov_canonical <- function(ntraits, singletons, hetgrid, grid, zeromat=TR return(U) } ###Compute univariate summary statistics +# +#' @importFrom stats coef get_univariate_sumstats <- function(X, Y, standardize=FALSE, standardize.response=FALSE){ r <- ncol(Y) p <- ncol(X) diff --git a/R/mr_mash_predict.R b/R/mr_mash_predict.R index cb694cb..90bd90d 100644 --- a/R/mr_mash_predict.R +++ b/R/mr_mash_predict.R @@ -8,6 +8,9 @@ #' #' @return Matrix of predicted values. #' +#' @importFrom stats predict +#' +#' @method predict mr.mash #' @export #' @export predict.mr.mash #' @@ -27,8 +30,11 @@ predict.mr.mash <- function(object, newx, ...){ #' #' @return (p+1) x r matrix of coefficients. #' -#' @export +#' @importFrom stats coef +#' +#' @method coef mr.mash #' @export coef.mr.mash +#' @export #' coef.mr.mash <- function(object, ...){ coeffs <- rbind(object$intercept, object$mu1) diff --git a/man/mr.mash.Rd b/man/mr.mash.Rd index c993c9c..9f0c75f 100644 --- a/man/mr.mash.Rd +++ b/man/mr.mash.Rd @@ -11,7 +11,7 @@ mr.mash( w0 = rep(1/(length(S0)), length(S0)), V = NULL, mu1_init = matrix(0, nrow = ncol(X), ncol = ncol(Y)), - tol = 1e-04, + tol = 0.0001, convergence_criterion = c("mu1", "ELBO"), max_iter = 5000, update_w0 = TRUE,