%global __brp_check_rpaths %{nil} %global __requires_exclude ^libmpi %global packname FrailtyPackPlus %global packver 0.1.0 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 0.1.0 Release: 1%{?dist}%{?buildtag} Summary: Shared, Correlated, Additive, and Zero-Inflated Frailty Models License: GPL (>= 3) URL: https://cran.r-project.org/package=%{packname} Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz BuildRequires: R-devel >= 4.0.0 Requires: R-core >= 4.0.0 BuildArch: noarch BuildRequires: R-graphics BuildRequires: R-grDevices BuildRequires: R-CRAN-MASS BuildRequires: R-methods BuildRequires: R-CRAN-numDeriv BuildRequires: R-stats BuildRequires: R-CRAN-survival BuildRequires: R-utils Requires: R-graphics Requires: R-grDevices Requires: R-CRAN-MASS Requires: R-methods Requires: R-CRAN-numDeriv Requires: R-stats Requires: R-CRAN-survival Requires: R-utils %description Fits and compares shared, correlated, additive, zero-inflated promotion cure-rate, and k-out-of-M one-shot device frailty survival models under Bayesian Markov chain Monte Carlo (MCMC) and Maximum Likelihood Estimation (MLE) frameworks. Supports ten baseline hazard distributions (Weibull, Exponential, Generalized Exponential, Exponential Power, Linear Failure Rate, Generalized Log-Logistic, Generalized Weibull, Generalized Rayleigh, Weighted Exponential, Extended Weibull) and eight frailty distributions (Gamma, Inverse Gaussian, Positive Stable, Compound Poisson, Compound Negative Binomial, Generalized Lindley, Weighted Lindley, Mixture of Inverse Gaussians). Implements reversed hazard rate (RHR) models for bivariate left-censored survival data, additive shared frailty models under random right censoring, and one-shot device reliability analysis. Provides goodness-of-fit testing, information criteria (AIC, BIC, AICc, HQIC, DIC, EAIC, EBIC, LPML), convergence diagnostics (Geweke, Gelman-Rubin, Heidelberger-Welch), Bayes factors, residual analyses, and diagnostic visualizations. Methodologies are based on Hanagal and Dabade (2013) , Hanagal and Dabade (2013) , Hanagal and Dabade (2015) , Hanagal and Bhambure (2015) , Hanagal and Bhambure (2016) , Hanagal, Pandey, and Ganguly (2017) , Hanagal and Pandey (2018) , Hanagal (2020) , Tyagi et al. (2021) , Pandey, Hanagal, Tyagi, and Gupta (2021) , Tyagi, Pandey, and Chesneau (2022) , Pandey, Hanagal, and Tyagi (2022) , Tyagi, Pandey, and Chesneau (2022) , Tyagi, Pandey, Hanagal, and Chesneau (2024) , Kiprotich et al. (2025) , Assuncao et al. (2026) , Chen et al. (1999) , Dunn and Smyth (1996) , Ling et al. (2021) , Yu, So, and Balakrishnan (2025) , Balakrishnan, Ling, and So (2021, ISBN:978-1-119-77795-3), and McGilchrist and Aisbett (1991) . %prep %setup -q -c -n %{packname} # fix end of executable files find -type f -executable -exec grep -Iq . {} \; -exec sed -i -e '$a\' {} \; # prevent binary stripping [ -d %{packname}/src ] && find %{packname}/src -type f -exec \ sed -i 's@/usr/bin/strip@/usr/bin/true@g' {} \; || true [ -d %{packname}/src ] && find %{packname}/src/Make* -type f -exec \ sed -i 's@-g0@@g' {} \; || true # don't allow local prefix in executable scripts find -type f -executable -exec sed -Ei 's@#!( )*/usr/local/bin@#!/usr/bin@g' {} \; %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 # remove buildroot from installed files find %{buildroot}%{rlibdir} -type f -exec sed -i "s@%{buildroot}@@g" {} \; %files %{rlibdir}/%{packname}