%global __brp_check_rpaths %{nil} %global packname hdbm %global packver 0.9.0 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 0.9.0 Release: 3%{?dist}%{?buildtag} Summary: High Dimensional Bayesian Mediation Analysis License: GPL-3 URL: https://cran.r-project.org/package=%{packname} Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz BuildRequires: R-devel Requires: R-core BuildRequires: R-CRAN-Rcpp BuildRequires: R-CRAN-RcppArmadillo Requires: R-CRAN-Rcpp %description Perform mediation analysis in the presence of high-dimensional mediators based on the potential outcome framework. High dimensional Bayesian mediation (HDBM), developed by Song et al (2018) , relies on two Bayesian sparse linear mixed models to simultaneously analyze a relatively large number of mediators for a continuous exposure and outcome assuming a small number of mediators are truly active. This sparsity assumption also allows the extension of univariate mediator analysis by casting the identification of active mediators as a variable selection problem and applying Bayesian methods with continuous shrinkage priors on the effects. %prep %setup -q -c -n %{packname} %build %install mkdir -p %{buildroot}%{rlibdir} %{_bindir}/R CMD INSTALL -l %{buildroot}%{rlibdir} %{packname} test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so) rm -f %{buildroot}%{rlibdir}/R.css %files %{rlibdir}/%{packname}