This package contains functions to compute p-values for the one-sample and two-sample Kolmogorov-Smirnov (KS) tests and the two-sample Kuiper test for any fixed critical level and arbitrary (possibly very large) sample sizes. For the one-sample KS test, this package implements a novel, accurate and efficient method named Exact-KS-FFT, which allows the pre-specified cumulative distribution function under the null hypothesis to be continuous, purely discrete or mixed. In the two-sample case, it is assumed that both samples come from an unspecified (unknown) continuous, purely discrete or mixed distribution, i.e. ties (repeated observations) are allowed, and exact p-values of the KS and the Kuiper tests are computed. Note, the two-sample Kuiper test is often used when data samples are on the line or on the circle (circular data). To cite this package in publication: (for the use of the one-sample KS test) Dimitrina S. Dimitrova, Vladimir K. Kaishev, and Senren Tan. Computing the Kolmogorov-Smirnov Distribution When the Underlying CDF is Purely Discrete, Mixed, or Continuous. Journal of Statistical Software. 2020; 95(10): 1--42. <doi:10.18637/jss.v095.i10>. (for the use of the two-sample KS and Kuiper tests) Dimitrina S. Dimitrova, Yun Jia and Vladimir K. Kaishev (2024). The R functions KS2sample and Kuiper2sample: Efficient Exact Calculation of P-values of the Two-sample Kolmogorov-Smirnov and Kuiper Tests. submitted.
This package provides functions for Gaussian and Non Gaussian (bivariate) spatial and spatio-temporal data analysis are provided for a) (fast) simulation of random fields, b) inference for random fields using standard likelihood and a likelihood approximation method called weighted composite likelihood based on pairs and b) prediction using (local) best linear unbiased prediction. Weighted composite likelihood can be very efficient for estimating massive datasets. Both regression and spatial (temporal) dependence analysis can be jointly performed. Flexible covariance models for spatial and spatial-temporal data on Euclidean domains and spheres are provided. There are also many useful functions for plotting and performing diagnostic analysis. Different non Gaussian random fields can be considered in the analysis. Among them, random fields with marginal distributions such as Skew-Gaussian, Student-t, Tukey-h, Sin-Arcsin, Two-piece, Weibull, Gamma, Log-Gaussian, Binomial, Negative Binomial and Poisson. See the URL for the papers associated with this package, as for instance, Bevilacqua and Gaetan (2015) <doi:10.1007/s11222-014-9460-6>, Bevilacqua et al. (2016) <doi:10.1007/s13253-016-0256-3>, Vallejos et al. (2020) <doi:10.1007/978-3-030-56681-4>, Bevilacqua et. al (2020) <doi:10.1002/env.2632>, Bevilacqua et. al (2021) <doi:10.1111/sjos.12447>, Bevilacqua et al. (2022) <doi:10.1016/j.jmva.2022.104949>, Morales-Navarrete et al. (2023) <doi:10.1080/01621459.2022.2140053>, and a large class of examples and tutorials.
This package provides a tuneable and interpretable method for relaxing the instrumental variables (IV) assumptions to infer treatment effects in the presence of unobserved confounding. For a treatment-associated covariate to be a valid IV, it must be (a) unconfounded with the outcome and (b) have a causal effect on the outcome that is exclusively mediated by the exposure. There is no general test of the validity of these IV assumptions for any particular pre-treatment covariate. However, if different pre-treatment covariates give differing causal effect estimates when treated as IVs, then we know at least some of the covariates violate these assumptions. budgetIVr exploits this fact by taking as input a minimum budget of pre-treatment covariates assumed to be valid IVs and idenfiying the set of causal effects that are consistent with the user's data and budget assumption. The following generalizations of this principle can be used in this package: (1) a vector of multiple budgets can be assigned alongside corresponding thresholds that model degrees of IV invalidity; (2) budgets and thresholds can be chosen using specialist knowledge or varied in a principled sensitivity analysis; (3) treatment effects can be nonlinear and/or depend on multiple exposures (at a computational cost). The methods in this package require only summary statistics. Confidence sets are constructed under the "no measurement error" (NOME) assumption from the Mendelian randomization literature. For further methodological details, please refer to Penn et al. (2024) <doi:10.48550/arXiv.2411.06913>.
Assess the agreement in method comparison studies by tolerance intervals and errors-in-variables (EIV) regressions. The Ordinary Least Square regressions (OLSv and OLSh), the Deming Regression (DR), and the (Correlated)-Bivariate Least Square regressions (BLS and CBLS) can be used with unreplicated or replicated data. The BLS() and CBLS() are the two main functions to estimate a regression line, while XY.plot() and MD.plot() are the two main graphical functions to display, respectively an (X,Y) plot or (M,D) plot with the BLS or CBLS results. Four hyperbolic statistical intervals are provided: the Confidence Interval (CI), the Confidence Bands (CB), the Prediction Interval and the Generalized prediction Interval. Assuming no proportional bias, the (M,D) plot (Band-Altman plot) may be simplified by calculating univariate tolerance intervals (beta-expectation (type I) or beta-gamma content (type II)). Major updates from last version 1.0.0 are: title shortened, include the new functions BLS.fit() and CBLS.fit() as shortcut of the, respectively, functions BLS() and CBLS(). References: B.G. Francq, B. Govaerts (2016) <doi:10.1002/sim.6872>, B.G. Francq, B. Govaerts (2014) <doi:10.1016/j.chemolab.2014.03.006>, B.G. Francq, B. Govaerts (2014) <http://publications-sfds.fr/index.php/J-SFdS/article/view/262>, B.G. Francq (2013), PhD Thesis, UCLouvain, Errors-in-variables regressions to assess equivalence in method comparison studies, <https://dial.uclouvain.be/pr/boreal/object/boreal%3A135862/datastream/PDF_01/view>.
Generates reproducible random samples from any user-specified univariate distribution under a comprehensive suite of censoring and truncation schemes. Users supply the probability density function (PDF), cumulative distribution function (CDF), survival function, support bounds, and parameters; the same seed and inputs yield identical samples across sessions. Supported schemes include right and left truncation, random, right, left, interval, and middle censoring, block random censoring, balanced joint progressive Type-II (BJPT-II), progressive first failure, joint Type-I, Type-I, Type-II, progressive Type-II, Type-II progressively hybrid, joint Type-II, hybrid, hybrid Type-I, doubly Type-II, Type-I hybrid, and hybrid Type-II censoring. Diagnostic histogram, dot plot, and autocorrelation plots are provided for each scheme to verify distributional behaviour. Methods are described in Nagar, Kumar, and Krishna (2026) <doi:10.59467/IJASS.2026.22.1>, Goel, Kumar, and Krishna (2026, "Estimation in power Lindley distributions using balanced joint progressively Type-II censored data"), Wu and Kus (2009) <doi:10.1016/j.csda.2009.03.010>, Goel and Krishna (2026) <doi:10.1007/s13198-026-03208-w>, Balakrishnan and Aggarwala (2000, ISBN:978-1-4612-1334-5), Mondal and Kundu (2020) <doi:10.1080/03610926.2018.1554128>, Ding and Gui (2023) <doi:10.3390/math11092003>, Prajapati, Mitra, and Kundu (2019) <doi:10.1007/s13571-018-0167-0>, Yadav, Jaiswal, and Yadav (2026) <doi:10.1007/s11135-026-02647-8>, Iyer, Jammalamadaka, and Kundu (2008) <doi:10.1016/j.jspi.2007.03.062>, Banerjee and Kundu (2008) <doi:10.1109/TR.2008.916890>, and Kundu and Joarder (2006) <doi:10.1016/j.csda.2005.05.002>.
Quantifies the provenance of sediments by applying a mixing model algorithm to end sediment mixtures based on a comprehensive characterization of the sediment sources. The fingerPro model builds upon the foundational concept of using mass balance linear equations for sediment source quantification by incorporating several distinct technical advancements. It employs an optimization approach to normalize discrepancies in tracer ranges and minimize the objective function. Latin hypercube sampling is used to explore all possible combinations of source contributions (0-100%), mitigating the risk of local minima. Uncertainty in source estimates is quantified through a Monte Carlo routine, and the model includes additional metrics, such as the normalized error of the virtual mixture, to detect mathematical inconsistencies, non-physical solutions, and biases. A new linear variability propagation (LVP) method is also included to address and quantify potential bias in model outcomes, particularly when dealing with dominant or non-contributing sources and high source variability, offering a significant advancement for field studies where direct comparison with theoretical apportionments is not feasible. In addition to the unmixing model, a complete framework for tracer selection is included. Several methods are implemented to evaluate tracer behaviour by considering both source and mixture information. These include the Consistent Tracer Selection (CTS) method to explore all tracer combinations and select the optimal ones improving the robustness and interpretability of the model results. A Conservative Balance (CB) method is also incorporated to enable the use of isotopic tracers. The package also provides several graphical tools to support data exploration and interpretation, including box plots, correlation plots, Linear Discriminant Analysis (LDA) and Principal Component Analysis (PCA).
This package provides a modification of the preventive vaccine efficacy trial design of Gilbert, Grove et al. (2011, Statistical Communications in Infectious Diseases) is implemented, with application generally to individual-randomized clinical trials with multiple active treatment groups and a shared control group, and a study endpoint that is a time-to-event endpoint subject to right-censoring. The design accounts for the issues that the efficacy of the treatment/vaccine groups may take time to accrue while the multiple treatment administrations/vaccinations are given; there is interest in assessing the durability of treatment efficacy over time; and group sequential monitoring of each treatment group for potential harm, non-efficacy/efficacy futility, and high efficacy is warranted. The design divides the trial into two stages of time periods, where each treatment is first evaluated for efficacy in the first stage of follow-up, and, if and only if it shows significant treatment efficacy in stage one, it is evaluated for longer-term durability of efficacy in stage two. The package produces plots and tables describing operating characteristics of a specified design including an unconditional power for intention-to-treat and per-protocol/as-treated analyses; trial duration; probabilities of the different possible trial monitoring outcomes (e.g., stopping early for non-efficacy); unconditional power for comparing treatment efficacies; and distributions of numbers of endpoint events occurring after the treatments/vaccinations are given, useful as input parameters for the design of studies of the association of biomarkers with a clinical outcome (surrogate endpoint problem). The code can be used for a single active treatment versus control design and for a single-stage design.
EQ-5D is a standard instrument (<https://euroqol.org/eq-5d-instruments/>) that measures the quality of life often used in clinical and economic evaluations of health care technologies. Both adult versions of EQ-5D (EQ-5D-3L and EQ-5D-5L) contain a descriptive system and visual analog scale. The descriptive system measures the patient's health in 5 dimensions: the 5L versions has 5 levels and 3L version has 3 levels. The descriptive system scores are usually converted to index values using country specific values sets (that incorporates the country preferences). This package allows the calculation of both descriptive system scores to the index value scores. The value sets for EQ-5D-3L are from the references mentioned in the website <https://euroqol.org/eq-5d-instruments/eq-5d-3l-about/valuation/> The value sets for EQ-5D-3L for a total of 31 countries are used for the valuation (see the user guide for a complete list of references). The value sets for EQ-5D-5L are obtained from references mentioned in the <https://euroqol.org/eq-5d-instruments/eq-5d-5l-about/valuation-standard-value-sets/> and other sources. The value sets for EQ-5D-5L for a total of 17 countries are used for the valuation (see the user guide for a complete list of references). The package can also be used to map 5L scores to 3L index values for 10 countries: Denmark, France, Germany, Japan, Netherlands, Spain, Thailand, UK, USA, and Zimbabwe. The value set and method for mapping are obtained from Van Hout et al (2012) <doi: 10.1016/j.jval.2012.02.008>.
This package provides a spatial analytical framework for preliminary species extinction-risk screening following the IUCN Red List Criterion B guidelines. From occurrence points it computes the Extent of Occurrence (EOO) and Area of Occupancy (AOO) on a data-centred equal-area projection, assigns provisional Criterion B categories, and integrates MapBiomas land-use/land-cover data to quantify the proportion of anthropogenic conversion versus remaining natural habitat within each range metric, with per-class breakdowns and land-cover time series. Several MapBiomas initiatives are supported through one standardised legend - MapBiomas Brazil, the Pan-Amazon / Amazonia collection (RAISG), Colombia, Argentina, Bolivia, Chile, Ecuador, Peru, Venezuela, Paraguay and Uruguay - so a species anywhere these products cover can be screened as readily as a Brazilian one. For ranges outside MapBiomas coverage it can fall back to the global Esri / Impact Observatory 10 m annual land cover derived from Sentinel-2 (the product behind the ArcGIS Living Atlas Land Cover Explorer), so a species anywhere on Earth can be screened. It also integrates MapBiomas Fire to compute burned-area metrics and fire time series, and quantifies the overlap of the range with protected areas from the global World Database on Protected Areas (WDPA). MapBiomas data are read either locally over the network via GDAL /vsicurl/ (no Google Earth Engine account required) or server-side through Google Earth Engine (GEE) for large-scale assessments. Outputs include interactive and publication ready maps and charts, spatial (shapefile/'GeoPackage') and raster exports, and a written assessment report (HTML, text or Word). An interactive shiny application ties the whole workflow together for reproducible conservation planning.
Runs several heterogeneity-robust difference-in-differences (DID) event-study estimators for non-absorbing (i.e., treatment can switch on and off over time, allowing treatment reversal) binary treatments through their respective packages, harmonizes their output onto a common time axis and tidy data structure, and overlays them in a single ggplot2 panel for visual comparison. Supported estimators include those provided by DIDmultiplegtDYN', PanelMatch', and fect', with an optional naive two-way fixed-effects reference series via fixest'. The underlying methods are respectively described in Clement de Chaisemartin and Xavier D'Haultfoeuille. "Difference-in-Differences Estimators of Intertemporal Treatment Effects." The Review of Economics and Statistics (2026) <doi:10.1162/rest_a_01414>, Kosuke Imai, In Song Kim, and Erik H. Wang. "Matching methods for causal inference with timeâ series crossâ sectional data." American Journal of Political Science 67.3 (2023) <doi:10.1111/ajps.12685>, Licheng Liu, Ye Wang, and Yiqing Xu. "A practical guide to counterfactual estimators for causal inference with timeâ series crossâ sectional data." American Journal of Political Science 68.1 (2024) <doi:10.1111/ajps.12723>, and Laurent R. Bergé, Kyle Butts, and Grant McDermott. "Fast and user-friendly econometrics estimations: The R package fixest'." arXiv preprint (2026) <doi:10.48550/arXiv.2601.21749>. A single nabs_event_study() wrapper runs any supported estimator with a common interface; nabs_event_study_simple() provides a one-line front door for quick exploratory runs; the S3 generic as_nabs_event_study() coerces estimator output into a tidy stable schema; and nabs_event_plot() overlays multiple methods on a single ggplot2 panel, with optional naive two-way fixed effects drawn in a neutral color as a reference.
The microplot function writes a set of R graphics files to be used as microplots (sparklines) in tables in either LaTeX', HTML', Word', or Excel files. For LaTeX', we provide methods for the Hmisc::latex() generic function to construct latex tabular environments which include the graphs. These can be used directly with the operating system pdflatex or latex command, or by using one of Sweave', knitr', rmarkdown', or Emacs org-mode as an intermediary. For MS Word', the msWord() function uses the flextable package to construct Word tables which include the graphs. There are several distinct approaches for constructing HTML files. The simplest is to use the msWord() function with argument filetype="html". Alternatively, use either Emacs org-mode or the htmlTable::htmlTable() function to construct an HTML file containing tables which include the graphs. See the documentation for our as.htmlimg() function. For Excel use on Windows', the file examples/irisExcel.xls includes VBA code which brings the individual panels into individual cells in the spreadsheet. Examples in the examples and demo subdirectories are shown with lattice graphics, ggplot2 graphics, and base graphics. Examples for LaTeX include Sweave (both LaTeX'-style and Noweb'-style), knitr', emacs org-mode', and rmarkdown input files and their pdf output files. Examples for HTML include org-mode and Rmd input files and their webarchive HTML output files. In addition, the as.orgtable() function can display a data.frame in an org-mode document. The examples for MS Word (with either filetype="docx" or filetype="html") work with all operating systems. The package does not require the installation of LaTeX or MS Word to be able to write .tex or .docx files.
The receiver operating characteristic (ROC) curve is one of the most widely used tools for evaluating diagnostic and prognostic biomarkers across diverse scientific fields, particularly in medicine. Despite its ubiquity, ROC estimation and testing methods differ substantially in their assumptions and resulting curve properties. This package provides a unified framework for constructing, visualizing, and comparing parametric, nonparametric, semiparametric, and Bayesian ROC curves. ROCModels helps researchers identify and implement ROC inference methods most suitable for their data. See the accompanying vignette ROCModels_Package_Doc for a detailed introduction. Alonzo, T. A., and Pepe, M. S. (2002) <doi: 10.1093/biostatistics/3.3.421>, Andrews, D. F., and Herzberg, A. M. (1985) <doi: 10.1007/978-1-4612-5098-2>, Bamber, D. (1975) <doi: 10.1016/0022-2496(75)90001-2>, Cox, D. R. (1972) <doi:10.1111/j.2517-6161.1972.tb00899.x>, Cox, D. R. (1975) <doi: 10.1093/biomet/62.2.269>, DeLong, E. R., DeLong, D. M., and Clarke-Pearson, D. L. (1988) <doi: 10.2307/2531595>, Dorfman, D. D., and Alf, E. (1969) <doi: 10.1016/0022-2496(69)90019-4>, Dorfman, D. D., Berbaum, K. S., and Metz, C. E. (1997) <doi: 10.1016/s1076-6332(97)80013-x>, Erkanli, A., Sung, L., and Stamey, J. D. (2006) <doi: 10.1002/sim.2496>, Faraggi, D., and Reiser, B. (2002) <doi: 10.1002/sim.1228>, Ghebremichael, M., and Habtemicael, S. (2018) <doi: 10.1080/02664763.2017.1420758>, Ghebremichael, M., and Michael, H. (2024) <doi: 10.1080/03610918.2022.2032159>, Ghebremichael, M., Michael, H., Tubbs, J., and Paintsil, E. (2019) <doi: 10.3844/jmssp.2019.55.64>, Gönen, M., and Heller, G. (2010) <doi: 10.1177/0272989X09360067>, Gopalakrishnan, V., Bose, E., Nair, U., Cheng, Y., and Ghebremichael, M. (2020) <doi: 10.1186/s12879-020-05458-w>, Green, D. M., and Swets, J. A. (1966, ISBN:0471324205), Gu, J., and Ghosal, S. (2009) <doi: 10.1016/j.jspi.2008.09.014>, Gu, Y., Ghosal, S., and Roy, A. (2008) <doi: 10.1002/sim.3366>, Guidoum, A. C. (2020) <doi: 10.32614/CRAN.package.kedd>, <doi: 10.48550/arXiv.2012.06102>, Guo, B. (2015) <https://d-scholarship.pitt.edu/23590/1/Guo_Ben_thesis_12-2014.pdf>, Hanley, J. A., and McNeil, B. J. (1982) <doi: 10.1148/radiology.143.1.7063747>, Hsieh, F., and Turnbull, B. W. (1996) <doi: 10.1214/aos/1033066197>, Hussain, E. (2012) <doi: 10.6000/1927-5129.2012.08.02.09>, Ishwaran, H., and James, L. F. (2002) <doi: 10.1198/106186002411>, Jokiel-Rokita, A., and Topolnicki, R. (2020) <doi: 10.1016/j.csda.2019.106820>, Krzanowski, W. J., and Hand, D. J. (2009) <doi: 10.1201/9781439800225>, Kundu, D., and Gupta, R. D. (2006) <doi: 10.1109/TR.2006.874918>, Lloyd, C. J. (1998) <doi: 10.1080/01621459.1998.10473797>, Lehmann, E. L. (1953) <doi: 10.1214/aoms/1177729080>, Metz, C. E., Herman, B. A., and Shen, J. H. (1998) <doi:10.1002/(SICI)1097-0258(19980515)17:9%3C1033::AID-SIM784%3E3.0.CO;2-Z>, Pepe, M. S. (2003) <doi: 10.1093/oso/9780198509844.001.0001>, Pundir, S., and Amala, R. (2014) <doi: 10.22237/jmasm/1398917940>, Silverman, B. W. (2018) <doi: 10.1201/9781315140919>, Yeo, I. K., and Johnson, R. A. (2000) <doi: 10.1093/biomet/87.4.954>, Zhou, X. H., McClish, D. K., and Obuchowski, N. A. (2009) <doi: 10.1002/9780470906514>, Zou, K. H., Hall, W. J., and Shapiro, D. E. (1997) <doi: 10.1002/(SICI)1097-0258(19971015)16:19%3C2143::AID-SIM655%3E3.0.CO;2-3>.
Mobile-monitoring or "sensors on a mobile platform", is an increasingly popular approach to measure high-resolution pollution data at the street level. Coupled with location data, spatial visualisation of air-quality parameters helps detect localized areas of high air-pollution, also called hotspots. In this approach, portable sensors are mounted on a vehicle and driven on predetermined routes to collect high frequency data (1 Hz). mmaqshiny is for analysing, visualising and spatial mapping of high-resolution air-quality data collected by specific devices installed on a moving platform. 1 Hz data of PM2.5 (mass concentrations of particulate matter with size less than 2.5 microns), Black carbon mass concentrations (BC), ultra-fine particle number concentrations, carbon dioxide along with GPS coordinates and relative humidity (RH) data collected by popular portable instruments (TSI DustTrak-8530, Aethlabs microAeth-AE51, TSI CPC3007, LICOR Li-830, Garmin GPSMAP 64s, Omega USB RH probe respectively). It incorporates device specific cleaning and correction algorithms. RH correction is applied to DustTrak PM2.5 following the Chakrabarti et al., (2004) <doi:10.1016/j.atmosenv.2004.03.007>. Provision is given to add linear regression coefficients for correcting the PM2.5 data (if required). BC data will be cleaned for the vibration generated noise, by adopting the statistical procedure as explained in Apte et al., (2011) <doi:10.1016/j.atmosenv.2011.05.028>, followed by a loading correction as suggested by Ban-Weiss et al., (2009) <doi:10.1021/es8021039>. For the number concentration data, provision is given for dilution correction factor (if a diluter is used with CPC3007; default value is 1). The package joins the raw, cleaned and corrected data from the above said instruments and outputs as a downloadable csv file.
Clean, prepare, and aggregate surveillance data for public health analysis. Provides structural data cleaning and standardisation (clean_the_nest()), age categorisation against ~50 published schemes with publication-ready labelling (preening()), time-unit aggregation with zero-filling and seasonal awareness (roost()), joint aggregation of several linked event dates (e.g. onset, admission, ICU, complication, fatality) into one table of comparable rate columns (flyway()), under-ascertainment correction via a stratified, time-varying multiplier factor supplied directly, derived by the ratio (multiplier) method, or derived by inverting an externally sourced severity rate (e.g. an infection-fatality-rate anchor) against an observed severity ratio (corncrake()), comorbidity detection from ICD-10-AM clinical coding (plumage()), vaccine coverage data construction (brood()), hash-based de-identification (molting()), and relinking of previously de-identified data (homing()). brood() produces a brood_df object supporting two population models: pre-aggregated denominators (population_model = "pre_aggregated") and record-level cohort designs (population_model = "cohort"). The cohort model handles single time-point coverage snapshots, interrupted time series analysis via a built-in sweep returning monthly coverage rates (time_series = TRUE), and birth cohort designs with person-time computation. This cohort/time-series coverage model was applied in Roughan et al. (2026) <doi:10.33321/cdi.2026.50.031> to estimate infant immunisation coverage against respiratory syncytial virus over an 18-month period. Both wide format (one row per person with dose columns, from starling'::murmuration()) and long format (one row per dose) are accepted. corncrake() returns both a point-corrected count and uncertainty bounds wherever they can be derived, including the inverse relationship between a severity-anchored factor and the bounds of its own reference rate. Built for Australian public health surveillance practice but not specific to it -- see individual function documentation for notes on non-Australian use (e.g. Northern Hemisphere season boundaries).
This package performs and benchmarks various Multi-Criteria Decision Analysis (MCDA) methods. MCDA is a decision-making framework used to evaluate and rank alternatives based on multiple conflicting criteria using normalization, weighting, and aggregation techniques. The package implements a wide range of MCDA methods including ARAS (Additive Ratio Assessment), AROMAN (Alternative Ranking Order Method Accounting for two-step Normalization), COCOSO (Combined Compromise Solution), CODAS (Combinative Distance-based Assessment), COPRAS (Complex Proportional Assessment), EDAS (Evaluation based on Distance from Average Solution), ELECTRE (Elimination and Choice Expressing Reality) family (I-IV), FUCA (Faire Un Choix Adequat), GRA (Grey Relational Analysis), MABAC (Multi-Attributive Border Approximation Area Comparison), MAIRCA (Multi-Attributive Ideal-Real Comparative Analysis), MARCOS (Measurement of Alternatives and Ranking according to Compromise Solution), MAUT (Multi-Attribute Utility Theory), MAVT (Multi-Attribute Value Theory), MEGAN (Multi-criteria Evaluation with Gradual-weighting and Aggregation of Normalized distance matrices), MOORA (Multi-Objective Optimization on the basis of Ratio Analysis), OCRA (Operational Competitiveness Rating Analysis), ORESTE (Organisation, Rangement Et Synthese De Donnees Relationnelles), PROMETHEE (Preference Ranking Organization Method for Enrichment Evaluations I-VI), RAM (Root Assessment Method), ROV (Range of Value), SMART (Simple Multi-Attribute Rating Technique), TOPSIS (Technique for Order Preference by Similarity to Ideal Solution), VIKOR (VlseKriterijumska Optimizacija I Kompromisno Resenje), WASPAS (Weighted Aggregated Sum Product Assessment), WPM (Weighted Product Model), and WSM (Weighted Sum Model). The package computes comparative evaluation measures including Spearman rank correlation (Spearman, 1904) <doi:10.2307/1412107>, Salabun-Urbaniak's weight similarity index (Salabun and Urbaniak, 2020)<doi:10.1007/978-3-030-50417-5_47>, Wilcoxon signed-rank test (Wilcoxon, 1945)<doi:10.2307/3001968>, and permutation- and bootstrap- based entropy difference tests for pairwise method comparisons using Jensen-Shannon divergence (Lin, 1991)<doi:10.1109/18.61115>. It also provides sensitivity and stability analysis of MCDA results. Weight sensitivity analysis is implemented through deterministic and stochastic perturbation of criterion weights, and is also integrated as a built-in step within the MEGAN method framework (Cebeci, 2026)<doi:10.7717/peerj-cs.3819>.
This package provides a collection of user-friendly functions for assessing fragility of clinical results with binary and survival outcomes. For binary outcomes, the package assesses and visualizes fragility of individual studies (Walsh et al., 2014 <doi:10.1016/j.jclinepi.2013.10.019>; Lin, 2021 <doi:10.1111/jep.13428>), conventional pairwise meta-analyses (Atal et al., 2019 <doi:10.1016/j.jclinepi.2019.03.012>), and network meta-analyses of multiple treatments with binary outcomes (Xing et al., 2020 <doi:10.1016/j.jclinepi.2020.07.003>). The functions for binary outcomes are designed to: 1) calculate the fragility index (i.e., the minimal event status modifications that can alter the significance or non-significance of the original result) and fragility quotient (i.e., fragility index divided by sample size) at a specific significance level; 2) give the cases of event status modifications for altering the result's significance or non-significance and visualize these cases; 3) visualize the trend of statistical significance as event status is modified; 4) efficiently derive fragility indexes and fragility quotients at multiple significance levels, and visualize the relationship between these fragility measures against the significance levels; and 5) calculate fragility indexes and fragility quotients of multiple datasets (e.g., a collection of clinical trials or meta-analyses) and produce plots of their overall distributions. For survival outcomes, the package implements the event status modification method based on the log-rank test described by Xing et al. (2026 <doi:10.1093/aje/kwaf229>). It calculates the fragility index and fragility quotient for two-group studies with right-censored data, modifying event status in one or both groups while preserving follow-up times and group assignments. Results include the sequence of modifications, corresponding p-values, and an S3 print method. The outputs from these functions may inform the robustness of clinical results in terms of statistical significance and aid the interpretation of fragility measures. The usage of this package is illustrated in Lin et al. (2023 <doi:10.1016/j.ajog.2022.08.053>) and detailed in Lin and Chu (2022 <doi:10.1371/journal.pone.0268754>).
Calculate different glucose variability measures, including average measures of glycemia, measures of glycemic variability and measures of glycemic risk, from continuous glucose monitoring data. Boris P. Kovatchev, Erik Otto, Daniel Cox, Linda Gonder-Frederick, and William Clarke (2006) <doi:10.2337/dc06-1085>. Jean-Pierre Le Floch, Philippe Escuyer, Eric Baudin, Dominique Baudon, and Leon Perlemuter (1990) <doi:10.2337/diacare.13.2.172>. C.M. McDonnell, S.M. Donath, S.I. Vidmar, G.A. Werther, and F.J. Cameron (2005) <doi:10.1089/dia.2005.7.253>. Everitt, Brian (1998) <doi:10.1111/j.1751-5823.2011.00149_2.x>. Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) <doi:10.2307/2234167>. Dougherty, R. L., Edelman, A. and Hyman, J. M. (1989) <doi:10.1090/S0025-5718-1989-0962209-1>. Tukey, J. W. (1977) <doi:10.1016/0377-2217(86)90209-2>. F. John Service (2013) <doi:10.2337/db12-1396>. Edmond A. Ryan, Tami Shandro, Kristy Green, Breay W. Paty, Peter A. Senior, David Bigam, A.M. James Shapiro, and Marie-Christine Vantyghem (2004) <doi:10.2337/diabetes.53.4.955>. F. John Service, George D. Molnar, John W. Rosevear, Eugene Ackerman, Leal C. Gatewood, William F. Taylor (1970) <doi:10.2337/diab.19.9.644>. Sarah E. Siegelaar, Frits Holleman, Joost B. L. Hoekstra, and J. Hans DeVries (2010) <doi:10.1210/er.2009-0021>. Gabor Marics, Zsofia Lendvai, Csaba Lodi, Levente Koncz, David Zakarias, Gyorgy Schuster, Borbala Mikos, Csaba Hermann, Attila J. Szabo, and Peter Toth-Heyn (2015) <doi:10.1186/s12938-015-0035-3>. Thomas Danne, Revital Nimri, Tadej Battelino, Richard M. Bergenstal, Kelly L. Close, J. Hans DeVries, SatishGarg, Lutz Heinemann, Irl Hirsch, Stephanie A. Amiel, Roy Beck, Emanuele Bosi, Bruce Buckingham, ClaudioCobelli, Eyal Dassau, Francis J. Doyle, Simon Heller, Roman Hovorka, Weiping Jia, Tim Jones, Olga Kordonouri,Boris Kovatchev, Aaron Kowalski, Lori Laffel, David Maahs, Helen R. Murphy, Kirsten Nørgaard, Christopher G.Parkin, Eric Renard, Banshi Saboo, Mauro Scharf, William V. Tamborlane, Stuart A. Weinzimer, and Moshe Phillip.International consensus on use of continuous glucose monitoring.Diabetes Care, 2017 <doi:10.2337/dc17-1600>.
Create what we call Elemental Graphics for display of anova results. The term elemental derives from the fact that each function is aimed at construction of graphical displays that afford direct visualizations of data with respect to the fundamental questions that drive the particular anova methods. This package represents a modification of the original granova package; the key change is to use ggplot2', Hadley Wickham's package based on Grammar of Graphics concepts (due to Wilkinson). The main function is granovagg.1w() (a graphic for one way ANOVA); two other functions (granovagg.ds() and granovagg.contr()) are to construct graphics for dependent sample analyses and contrast-based analyses respectively. (The function granova.2w(), which entails dynamic displays of data, is not currently part of granovaGG'.) The granovaGG functions are to display data for any number of groups, regardless of their sizes (however, very large data sets or numbers of groups can be problematic). For granovagg.1w() a specialized approach is used to construct data-based contrast vectors for which anova data are displayed. The result is that the graphics use a straight line to facilitate clear interpretations while being faithful to the standard effect test in anova. The graphic results are complementary to standard summary tables; indeed, numerical summary statistics are provided as side effects of the graphic constructions. granovagg.ds() and granovagg.contr() provide graphic displays and numerical outputs for a dependent sample and contrast-based analyses. The graphics based on these functions can be especially helpful for learning how the respective methods work to answer the basic question(s) that drive the analyses. This means they can be particularly helpful for students and non-statistician analysts. But these methods can be of assistance for work-a-day applications of many kinds, as they can help to identify outliers, clusters or patterns, as well as highlight the role of non-linear transformations of data. In the case of granovagg.1w() and granovagg.ds() several arguments are provided to facilitate flexibility in the construction of graphics that accommodate diverse features of data, according to their corresponding display requirements. See the help files for individual functions.
The method of anticlustering partitions a pool of elements into groups (i.e., anticlusters) with the goal of maximizing between-group similarity or within-group heterogeneity. The anticlustering approach thereby reverses the logic of cluster analysis that strives for high within-group homogeneity and clear separation between groups. Computationally, anticlustering is accomplished by maximizing instead of minimizing a clustering objective function, such as the intra-cluster variance (used in k-means clustering) or the sum of pairwise distances within clusters. The main function anticlustering() gives access to optimal and heuristic anticlustering methods described in Papenberg and Klau (2021; <doi:10.1037/met0000301>), Brusco et al. (2020; <doi:10.1111/bmsp.12186>), Papenberg (2024; <doi:10.1111/bmsp.12315>), Papenberg, Wang, et al. (2025; <doi:10.1016/j.crmeth.2025.101137>), Papenberg, Breuer, et al. (2025; <doi:10.1017/psy.2025.10052>), Yang et al. (2022; <doi:10.1016/j.ejor.2022.02.003>), and Wu et al. (2025; <doi:10.1016/j.cor.2025.107030>). The optimal algorithms require that an integer linear programming solver is installed. This package will install lpSolve (<https://cran.r-project.org/package=lpSolve>) as a default solver, but it is also possible to use the package Rglpk (<https://cran.r-project.org/package=Rglpk>), which requires the GNU linear programming kit (<https://www.gnu.org/software/glpk/glpk.html>), the package Rsymphony (<https://cran.r-project.org/package=Rsymphony>), which requires the SYMPHONY ILP solver (<https://github.com/coin-or/SYMPHONY>), or the commercial solver Gurobi, which provides its own R package that is not available via CRAN (<https://www.gurobi.com/downloads/>). Rglpk', Rsymphony', gurobi and their system dependencies have to be manually installed by the user because they are only suggested dependencies. Full access to the bicriterion anticlustering method proposed by Brusco et al. (2020) is given via the function bicriterion_anticlustering(), while kplus_anticlustering() implements the full functionality of the k-plus anticlustering approach proposed by Papenberg (2024). Some other functions are available to solve classical clustering problems. The function balanced_clustering() applies a cluster analysis under size constraints, i.e., creates equal-sized clusters. The function matching() can be used for (unrestricted, bipartite, or K-partite) matching. The function wce() can be used optimally solve the (weighted) cluster editing problem, also known as correlation clustering, clique partitioning problem or transitivity clustering.
This package provides generalized functions to compute Maximum Likelihood Estimation (MLE) for any univariate distribution under various censoring and truncation schemes. Users supply the probability density function (PDF), cumulative distribution function (CDF), survival function, support bounds, and initial parameter values; the package constructs and maximizes the appropriate log-likelihood automatically. Supported schemes include right and left truncation, random, right, left, interval, and middle censoring, block random censoring, balanced joint progressive Type-II (BJPT-II), progressive first failure, joint Type-I, Type-I, Type-II, progressive Type-II, Type-II progressively hybrid, joint Type-II, hybrid, hybrid Type-I, doubly Type-II, Type-I hybrid, and hybrid Type-II censoring. Optimization methods include Newton-Raphson (NR), Broyden-Fletcher-Goldfarb-Shanno (BFGS), the BFGS algorithm implemented in R (BFGSR), Berndt-Hall-Hall-Hausman (BHHH), Simulated Annealing (SANN), Conjugate Gradients (CG), and Nelder-Mead (NM). Inference summaries provide the Akaike Information Criterion (AIC), estimated coefficients, log-likelihood, iteration count, standard errors, z-values, p-values, and the variance-covariance matrix. Methods are described in Nagar, Kumar, and Krishna (2026) <doi:10.59467/IJASS.2026.22.1>, Goel, Kumar, and Krishna (2026, "Estimation in power Lindley distributions using balanced joint progressively Type-II censored data"), Wu and Kus (2009) <doi:10.1016/j.csda.2009.03.010>, Goel and Krishna (2026) <doi:10.1007/s13198-026-03208-w>, Balakrishnan and Aggarwala (2000, ISBN:978-1-4612-1334-5), Mondal and Kundu (2020) <doi:10.1080/03610926.2018.1554128>, Ding and Gui (2023) <doi:10.3390/math11092003>, Prajapati, Mitra, and Kundu (2019) <doi:10.1007/s13571-018-0167-0>, Yadav, Jaiswal, and Yadav (2026) <doi:10.1007/s11135-026-02647-8>, Iyer, Jammalamadaka, and Kundu (2008) <doi:10.1016/j.jspi.2007.03.062>, Banerjee and Kundu (2008) <doi:10.1109/TR.2008.916890>, Kundu and Joarder (2006) <doi:10.1016/j.csda.2005.05.002>, Berndt, Hall, Hall, and Hausman (1974) "Estimation and Inference in Nonlinear Structural Models" <doi:10.3386/t0003>, Fletcher (1987, "Practical Methods of Optimization", ISBN:978-0-471-91547-8), Nelder and Mead (1965) <doi:10.1093/comjnl/7.4.308>, McKinnon (1999) "Convergence of the Nelder-Mead simplex method to a non-stationary point" <doi:10.1137/S1052623496303482>, Kirkpatrick, Gelatt, and Vecchi (1983) <doi:10.1126/science.220.4598.671>, Fletcher and Reeves (1964) <doi:10.1093/comjnl/7.2.149>, and Nocedal and Wright (2006, "Numerical Optimization", ISBN:978-0-387-30303-1).
Mobile Motor Activity Research Consortium for Health (mMARCH) is a collaborative network of studies of clinical and community samples that employ common clinical, biological, and digital mobile measures across involved studies. One of the main scientific goals of mMARCH sites is developing a better understanding of the inter-relationships between accelerometry-measured physical activity (PA), sleep (SL), and circadian rhythmicity (CR) and mental and physical health in children, adolescents, and adults. Currently, there is no consensus on a standard procedure for a data processing pipeline of raw accelerometry data, and few open-source tools to facilitate their development. The R package GGIR is the most prominent open-source software package that offers great functionality and tremendous user flexibility to process raw accelerometry data. However, even with GGIR', processing done in a harmonized and reproducible fashion requires a non-trivial amount of expertise combined with a careful implementation. In addition, novel accelerometry-derived features of PA/SL/CR capturing multiscale, time-series, functional, distributional and other complimentary aspects of accelerometry data being constantly proposed and become available via non-GGIR R implementations. To address these issues, mMARCH developed a streamlined harmonized and reproducible pipeline for loading and cleaning raw accelerometry data, extracting features available through GGIR as well as through non-GGIR R packages, implementing several data and feature quality checks, merging all features of PA/SL/CR together, and performing multiple analyses including Joint Individual Variation Explained (JIVE), an unsupervised machine learning dimension reduction technique that identifies latent factors capturing joint across and individual to each of three domains of PA/SL/CR. In detail, the pipeline generates all necessary R/Rmd/shell files for data processing after running GGIR for accelerometer data. In module 1, all csv files in the GGIR output directory were read, transformed and then merged. In module 2, the GGIR output files were checked and summarized in one excel sheet. In module 3, the merged data was cleaned according to the number of valid hours on each night and the number of valid days for each subject. In module 4, the cleaned activity data was imputed by the average Euclidean norm minus one (ENMO) over all the valid days for each subject. Finally, a comprehensive report of data processing was created using Rmarkdown, and the report includes few exploratory plots and multiple commonly used features extracted from minute level actigraphy data. Reference: Guo W, Leroux A, Shou S, Cui L, Kang S, Strippoli MP, Preisig M, Zipunnikov V, Merikangas K (2022) Processing of accelerometry data with GGIR in Motor Activity Research Consortium for Health (mMARCH) Journal for the Measurement of Physical Behaviour, 6(1): 37-44.
The geohabnet package is designed to perform a geographically or spatially explicit risk analysis of habitat connectivity. Xing et al (2021) <doi:10.1093/biosci/biaa067> proposed the concept of cropland connectivity as a risk factor for plant pathogen or pest invasions. As the functions in geohabnet were initially developed thinking on cropland connectivity, users are recommended to first be familiar with the concept by looking at the Xing et al paper. In a nutshell, a habitat connectivity analysis combines information from maps of host density, estimates the relative likelihood of pathogen movement between habitat locations in the area of interest, and applies network analysis to calculate the connectivity of habitat locations. The functions of geohabnet are built to conduct a habitat connectivity analysis relying on geographic parameters (spatial resolution and spatial extent), dispersal parameters (in two commonly used dispersal kernels: inverse power law and negative exponential models), and network parameters (link weight thresholds and network metrics). The functionality and main extensions provided by the functions in geohabnet to habitat connectivity analysis are a) Capability to easily calculate the connectivity of locations in a landscape using a single function, such as sensitivity_analysis() or msean(). b) As backbone datasets, the geohabnet package supports the use of two publicly available global datasets to calculate cropland density. The backbone datasets in the geohabnet package include crop distribution maps from Monfreda, C., N. Ramankutty, and J. A. Foley (2008) <doi:10.1029/2007gb002947> "Farming the planet: 2. Geographic distribution of crop areas, yields, physiological types, and net primary production in the year 2000, Global Biogeochem. Cycles, 22, GB1022" and International Food Policy Research Institute (2019) <doi:10.7910/DVN/PRFF8V> "Global Spatially-Disaggregated Crop Production Statistics Data for 2010 Version 2.0, Harvard Dataverse, V4". Users can also provide any other geographic dataset that represents host density. c) Because the geohabnet package allows R users to provide maps of host density (as originally in Xing et al (2021)), host landscape density (representing the geographic distribution of either crops or wild species), or habitat distribution (such as host landscape density adjusted by climate suitability) as inputs, we propose the term habitat connectivity. d) The geohabnet package allows R users to customize parameter values in the habitat connectivity analysis, facilitating context-specific (pathogen- or pest-specific) analyses. e) The geohabnet package allows users to automatically visualize maps of the habitat connectivity of locations resulting from a sensitivity analysis across all customized parameter combinations. The primary functions are msean() and sensitivity analysis(). Most functions in geohabnet provide three main outcomes: i) A map of mean habitat connectivity across parameters selected by the user, ii) a map of variance of habitat connectivity across the selected parameters, and iii) a map of the difference between the ranks of habitat connectivity and habitat density. Each function can be used to generate these maps as final outcomes. Each function can also provide intermediate outcomes, such as the adjacency matrices built to perform the analysis, which can be used in other network analysis. Refer to article at <https://garrettlab.github.io/HabitatConnectivity/articles/analysis.html> to see examples of each function and how to access each of these outcome types. To change parameter values, the file called parameters.yaml stores the parameters and their values, can be accessed using get_parameters() and set new parameter values with set_parameters()'. Users can modify up to ten parameters.
This package implements numerous methods for testing for, modelling, and correcting for heteroskedasticity in the classical linear regression model. The most novel contribution of the package is found in the functions that implement the as-yet-unpublished auxiliary linear variance models and auxiliary nonlinear variance models that are designed to estimate error variances in a heteroskedastic linear regression model. These models follow principles of statistical learning described in Hastie (2009) <doi:10.1007/978-0-387-21606-5>. The nonlinear version of the model is estimated using quasi-likelihood methods as described in Seber and Wild (2003, ISBN: 0-471-47135-6). Bootstrap methods for approximate confidence intervals for error variances are implemented as described in Efron and Tibshirani (1993, ISBN: 978-1-4899-4541-9), including also the expansion technique described in Hesterberg (2014) <doi:10.1080/00031305.2015.1089789>. The wild bootstrap employed here follows the description in Davidson and Flachaire (2008) <doi:10.1016/j.jeconom.2008.08.003>. Tuning of hyper-parameters makes use of a golden section search function that is modelled after the MATLAB function of Zarnowiec (2022) <https://www.mathworks.com/matlabcentral/fileexchange/25919-golden-section-method-algorithm>. A methodological description of the algorithm can be found in Fox (2021, ISBN: 978-1-003-00957-3). There are 25 different functions that implement hypothesis tests for heteroskedasticity. These include a test based on Anscombe (1961) <https://projecteuclid.org/euclid.bsmsp/1200512155>, Ramsey's (1969) BAMSET Test <doi:10.1111/j.2517-6161.1969.tb00796.x>, the tests of Bickel (1978) <doi:10.1214/aos/1176344124>, Breusch and Pagan (1979) <doi:10.2307/1911963> with and without the modification proposed by Koenker (1981) <doi:10.1016/0304-4076(81)90062-2>, Carapeto and Holt (2003) <doi:10.1080/0266476022000018475>, Cook and Weisberg (1983) <doi:10.1093/biomet/70.1.1> (including their graphical methods), Diblasi and Bowman (1997) <doi:10.1016/S0167-7152(96)00115-0>, Dufour, Khalaf, Bernard, and Genest (2004) <doi:10.1016/j.jeconom.2003.10.024>, Evans and King (1985) <doi:10.1016/0304-4076(85)90085-5> and Evans and King (1988) <doi:10.1016/0304-4076(88)90006-1>, Glejser (1969) <doi:10.1080/01621459.1969.10500976> as formulated by Mittelhammer, Judge and Miller (2000, ISBN: 0-521-62394-4), Godfrey and Orme (1999) <doi:10.1080/07474939908800438>, Goldfeld and Quandt (1965) <doi:10.1080/01621459.1965.10480811>, Harrison and McCabe (1979) <doi:10.1080/01621459.1979.10482544>, Harvey (1976) <doi:10.2307/1913974>, Honda (1989) <doi:10.1111/j.2517-6161.1989.tb01749.x>, Horn (1981) <doi:10.1080/03610928108828074>, Li and Yao (2019) <doi:10.1016/j.ecosta.2018.01.001> with and without the modification of Bai, Pan, and Yin (2016) <doi:10.1007/s11749-017-0575-x>, Rackauskas and Zuokas (2007) <doi:10.1007/s10986-007-0018-6>, Simonoff and Tsai (1994) <doi:10.2307/2986026> with and without the modification of Ferrari, Cysneiros, and Cribari-Neto (2004) <doi:10.1016/S0378-3758(03)00210-6>, Szroeter (1978) <doi:10.2307/1913831>, Verbyla (1993) <doi:10.1111/j.2517-6161.1993.tb01918.x>, White (1980) <doi:10.2307/1912934>, Wilcox and Keselman (2006) <doi:10.1080/10629360500107923>, Yuce (2008) <https://dergipark.org.tr/en/pub/iuekois/issue/8989/112070>, and Zhou, Song, and Thompson (2015) <doi:10.1002/cjs.11252>. Besides these heteroskedasticity tests, there are supporting functions that compute the BLUS residuals of Theil (1965) <doi:10.1080/01621459.1965.10480851>, the conditional two-sided p-values of Kulinskaya (2008) <doi:10.48550/arXiv.0810.2124>, and probabilities for the nonparametric trend statistic of Lehmann (1975, ISBN: 0-816-24996-1). For handling heteroskedasticity, in addition to the new auxiliary variance model methods, there is a function to implement various existing Heteroskedasticity-Consistent Covariance Matrix Estimators from the literature, such as those of White (1980) <doi:10.2307/1912934>, MacKinnon and White (1985) <doi:10.1016/0304-4076(85)90158-7>, Cribari-Neto (2004) <doi:10.1016/S0167-9473(02)00366-3>, Cribari-Neto et al. (2007) <doi:10.1080/03610920601126589>, Cribari-Neto and da Silva (2011) <doi:10.1007/s10182-010-0141-2>, Aftab and Chang (2016) <doi:10.18187/pjsor.v12i2.983>, and Li et al. (2017) <doi:10.1080/00949655.2016.1198906>.
Suite of tools for functional analysis.