The R package SamplingStrata was developed in 2011 as an instrument to optimize the design of stratified samples. The optimization is performed by considering the stratification variables available in the sampling frame, and the precision constraints on target estimates of the survey (Ballin & Barcaroli, 2014). The genetic algorithm at the basis of the optimization step explores the universe of the possible alternative stratifications determining for each of them the best allocation, that is the one of minumum total size that allows to satisfy the precision constraints: the final optimal solution is the one that ensures the global minimum sample size. One fundamental requirement to make this approach feasible is the possibility to estimate the variability of target variables in generated strata; in general, as target variable values are not available in the frame, but only proxy ones, anticipated variance is calculated by modelling the relations between target and proxy variables. In case of spatial sampling, it is important to consider not only the total model variance, but also the co-variance derived by the spatial auto-correlation. The last release of SamplingStrata enables to consider both components of variance, thus allowing to harness spatial auto-correlation in order to obtain more efficient samples.
The R package optimall offers a collection of functions that efficiently streamline the design process of sampling in surveys ranging from simple to complex. The package's main functions allow users to interactively define and adjust strata cut points based on values or quantiles of auxiliary covariates, adaptively calculate the optimum number of samples to allocate to each stratum using Neyman or Wright allocation, and select specific IDs to sample based on a stratified sampling design. Using real-life epidemiological study examples, we demonstrate how optimall facilitates an efficient workfl…
R2BEAT (R "to" Bethel Extended Allocation for Two-stage sampling) is an R package for the allocation of a sample. Besides other software and packages dealing with the allocation problems, its peculiarity lies in facing properly allocation problems for complex sampling designs with multi-domain and multi-purpose aims. This is common in many official and non-official statistical surveys, therefore R2BEAT could become an essential tool for planning a sample survey. The package implements the Tschprow (1923) - Neyman (1934) method for the optimal allocation of units in stratified sampling, extendi…
Streams and rivers are biodiverse and provide valuable ecosystem services. Maintaining these ecosystems is an important task, so organisations often monitor the status and trends in stream condition and biodiversity using field sampling and, more recently, autonomous in-situ sensors. However, data collection is often costly and so effective and efficient survey designs are crucial to maximise information while minimising costs. Geostatistics and optimal and adaptive design theory can be used to optimise the placement of sampling sites in freshwater studies and aquatic monitoring programs. Geos…
We introduce phylodyn, an R package for phylodynamic analysis based on gene genealogies. The package main functionality is Bayesian nonparametric estimation of effective population size fluctuations over time. Our implementation includes several Markov chain Monte Carlo-based methods and an integrated nested Laplace approximation-based approach for phylodynamic inference that have been developed in recent years. Genealogical data describe the timed ancestral relationships of individuals sampled from a population of interest. Here, individuals are assumed to be sampled at the same point in time…
Rgbp is an R package that provides estimates and verifiable confidence intervals for random effects in two-level conjugate hierarchical models for overdispersed Gaussian, Poisson, and Binomial data. Rgbp models aggregate data from k independent groups summarized by observed sufficient statistics for each random effect, such as sample means, possibly with covariates. Rgbp uses approximate Bayesian machinery with unique improper priors for the hyper-parameters, which leads to good repeated sampling coverage properties for random effects. A special feature of Rgbp is an option that generates synt…
Markov random fields on two-dimensional lattices are behind many image analysis methodologies. mrf2d provides tools for statistical inference on a class of discrete stationary Markov random field models with pairwise interaction, which includes many of the popular models such as the Potts model and texture image models. The package introduces representations of dependence structures and parameters, visualization functions and efficient (C++ based) implementations of sampling algorithms, common estimation methods and other key features of the model, providing a useful framework to implement alg…
Pooled testing (also known as group testing), where diagnostic tests are performed on pooled samples, has broad applications in the surveillance of diseases in animals and humans. An increasingly common use case is molecular xenomonitoring (MX), where surveillance of vector-borne diseases is conducted by capturing and testing large numbers of vectors (e.g. mosquitoes). The R package PoolTestR was developed to meet the needs of increasingly large and complex molecular xenomonitoring surveys but can be applied to analyse any data involving pooled testing. PoolTestR includes simple and flexible t…
Evolution & Ecology Research Centre, UNSW(新南威尔士大学进化与生态研究中心);School of Mathematics and Statistics, UNSW(新南威尔士大学数学与统计学院);Stats Central, Mark Wainwright Analytical Centre, UNSW(新南威尔士大学Mark Wainwright分析中心统计中心);National Institute of Aquatic Resources, Danish Technical University(丹麦技术大学国家水产研究所);Department of Mathematics & Statistics, McMaster University(麦克马斯特大学数学与统计系);Department of Biology, McMaster University(麦克马斯特大学生物学系);Department of Biological Sciences, Faculty of Science, The University of Alberta(阿尔伯塔大学理学院生物科学系);Department of Biosystems Engineering, Zhejiang University(浙江大学农业生物系统工程系);Department of Psychiatry and Neuropsychology, Maastricht University(马斯特里赫特大学精神病学与神经心理学系)
Background. The bootComb R package allows researchers to derive confidence intervals with correct target coverage for arbitrary combinations of arbitrary numbers of independently estimated parameters. Previous versions (< 1.1.0) of bootComb used independent bootstrap sampling and required that the parameters themselves are independent - an unrealistic assumption in some real-world applications. Findings. Using Gaussian copulas to define the dependence between parameters, the bootComb package has been extended to allow for dependent parameters. Implications. The updated bootComb package can now…
Recently non-reversible samplers based on simulating piecewise deterministic Markov processes (PDMPs) have shown potential for efficient sampling in Bayesian inference problems. However, there remains a lack of guidance on how to best implement these algorithms. If implemented poorly, the computational costs of simulating event times can out-weigh the statistical efficiency of the non-reversible dynamics. Drawing on the adaptive rejection literature, we propose the concave-convex adaptive thinning approach for simulating a piecewise deterministic Markov process (CC-PDMP). This approach provide…
The R package BayesPPD (Bayesian Power Prior Design) supports Bayesian power and type I error calculation and model fitting after incorporating historical data with the power prior and the normalized power prior for generalized linear models (GLM). The package accommodates summary level data or subject level data with covariate information. It supports use of multiple historical datasets as well as design without historical data. Supported distributions for responses include normal, binary (Bernoulli/binomial), Poisson and exponential. The power parameter $a_0$ can be fixed or modeled as rando…
Statistical procedures such as Bayes factor model selection and Bayesian model averaging require the computation of normalizing constants (e.g., marginal likelihoods). These normalizing constants are notoriously difficult to obtain, as they usually involve high-dimensional integrals that cannot be solved analytically. Here we introduce an R package that uses bridge sampling (Meng & Wong, 1996; Meng & Schilling, 2002) to estimate normalizing constants in a generic and easy-to-use fashion. For models implemented in Stan, the estimation procedure is automatic. We illustrate the functionality of t…
Microbiome data analyses require statistical tools that can simultaneously decode microbes' reactions to the environment and interactions among microbes. We introduce CARlasso, the first user-friendly open-source and publicly available R package to fit a chain graph model for the inference of sparse microbial networks that represent both interactions among nodes and effects of a set of predictors. Unlike in standard regression approaches, the edges represent the correct conditional structure among responses and predictors that allows the incorporation of prior knowledge from controlled experim…
The BayesBinMix package offers a Bayesian framework for clustering binary data with or without missing values by fitting mixtures of multivariate Bernoulli distributions with an unknown number of components. It allows the joint estimation of the number of clusters and model parameters using Markov chain Monte Carlo sampling. Heated chains are run in parallel and accelerate the convergence to the target posterior distribution. Identifiability issues are addressed by implementing label switching algorithms. The package is demonstrated and benchmarked against the Expectation-Maximization algorith…
Sampling from high dimensional distributions and volume approximation of convex bodies are fundamental operations that appear in optimization, finance, engineering, artificial intelligence and machine learning. In this paper we present volesti, an R package that provides efficient, scalable algorithms for volume estimation, uniform and Gaussian sampling from convex polytopes. volesti scales to hundreds of dimensions, handles efficiently three different types of polyhedra and provides non existing sampling routines to R. We demonstrate the power of volesti by solving several challenging problem…
In this paper, we introduce an R software package for simulating plays and drives using play-by-play data from the National Football League. The simulations are generated by sampling play-by-play data from previous football seasons.The sampling procedure adds statistical rigor to any decisions or inferences arising from examining the simulations. We highlight that the package is particularly useful as a data-driven tool for evaluating potential in-game strategies or rule changes within the league. We demonstrate its utility by evaluating the oft-debated strategy of $\textit{going for it}$ on f…
Forest Inventory and Analysis (FIA) is a US Department of Agriculture Forest Service program that aims to monitor changes in forests across the US. FIA hosts one of the largest ecological datasets in the world, though its complexity limits access for many potential users. rFIA is an R package designed to simplify the estimation of forest attributes using data collected by the FIA Program. Specifically, rFIA improves access to the spatio-temporal estimation capacity of the FIA Database via space-time indexed summaries of forest variables within user-defined population boundaries (e.g., geograph…
Ranking data represent a peculiar form of multivariate ordinal data taking values in the set of permutations. Despite the numerous methodological contributions to increase the flexibility of ranked data modeling, the application of more sophisticated models is limited by the related computational issues. The PLMIX package offers a comprehensive framework aimed at endowing the R statistical environment with some recent methodological advances in modeling and clustering partially ranked data. The usefulness of the novel PLMIX package can be motivated from several perspectives: (i) it contributes…
In many fields of science, high-dimensional integration is required. Numerical methods have been developed to evaluate these complex integrals. We introduce the code i-flow, a python package that performs high-dimensional numerical integration utilizing normalizing flows. Normalizing flows are machine-learned, bijective mappings between two distributions. i-flow can also be used to sample random points according to complicated distributions in high dimensions. We compare i-flow to other algorithms for high-dimensional numerical integration and show that i-flow outperforms them for high dimensi…
An important step of modeling spatially-referenced data is appropriately specifying the second order properties of the random field. A scientist developing a model for spatial data has a number of options regarding the nature of the dependence between observations. One of these options is deciding whether or not the dependence between observations depends on direction, or, in other words, whether or not the spatial covariance function is isotropic. Isotropy implies that spatial dependence is a function of only the distance and not the direction of the spatial separation between sampling locati…
The present work addresses the question how sampling algorithms for commonly applied copula models can be adapted to account for quasi-random numbers. Besides sampling methods such as the conditional distribution method (based on a one-to-one transformation), it is also shown that typically faster sampling methods (based on stochastic representations) can be used to improve upon classical Monte Carlo methods when pseudo-random number generators are replaced by quasi-random number generators. This opens the door to quasi-random numbers for models well beyond independent margins or the multivari…
The R package RegressionFactory provides expander functions for constructing the high-dimensional gradient vector and Hessian matrix of the log-likelihood function for generalized linear models (GLMs), from the lower-dimensional base-distribution derivatives. The software follows a modular implementation using the chain rule of derivatives. Such modularity offers a clear separation of case-specific components (base distribution functional form and link functions) from common steps (e.g., matrix algebra operations needed for expansion) in calculating log-likelihood derivatives. In doing so, Reg…
Protecting medical privacy can create obstacles in the analysis and distribution of healthcare graphs and statistical inferences accompanying them. We pose a graph simulation model which generates networks using degree and property augmentation (GRANDPA) and provide a flexible R package that allows users to create graphs that preserve vertex attribute relationships and approximating retaining topological properties observed in the original graph (e.g., community structure). We support our proposed algorithm using a case study based on Zachary's karate network and a patient-sharing graph genera…
University College London(伦敦大学学院);King’s College London(伦敦国王学院)
Processing of medical images such as MRI or CT presents unique challenges compared to RGB images typically used in computer vision. These include a lack of labels for large datasets, high computational costs, and metadata to describe the physical properties of voxels. Data augmentation is used to artificially increase the size of the training datasets. Training with image patches decreases the need for computational power. Spatial metadata needs to be carefully taken into account in order to ensure a correct alignment of volumes. We present TorchIO, an open-source Python library to enable effi…
Approximate Shapley value estimation using sampling without replacement and variance estimation via the new Symmetric bootstrap and the Doubled half bootstrap
We introduce dynamic nested sampling: a generalisation of the nested sampling algorithm in which the number of "live points" varies to allocate samples more efficiently. In empirical tests the new method significantly improves calculation accuracy compared to standard nested sampling with the same number of samples; this increase in accuracy is equivalent to speeding up the computation by factors of up to ~72 for parameter estimation and ~7 for evidence calculations. We also show that the accuracy of both parameter estimation and evidence calculations can be improved simultaneously. In additio…
Friedrich Schiller University Jena(耶拿弗里德里希·席勒大学);Ludwig-Maximilians-Universität München(慕尼黑路德维希-马克西米利安大学);TU Dortmund University(多特蒙德工业大学)
Spatial and spatiotemporal machine-learning models require a suitable framework for their model assessment, model selection, and hyperparameter tuning, in order to avoid error estimation bias and over-fitting. This contribution reviews the state-of-the-art in spatial and spatiotemporal cross-validation, and introduces the {R} package {mlr3spatiotempcv} as an extension package of the machine-learning framework {mlr3}. Currently various {R} packages implementing different spatiotemporal partitioning strategies exist: {blockCV}, {CAST}, {skmeans} and {sperrorest}. The goal of {mlr3spatiotempcv} i…