Journal of Statistical Software
Not a member yet
1629 research outputs found
Sort by
fairadapt: Causal Reasoning for Fair Data Preprocessing
Machine learning algorithms are useful for various prediction tasks, but they can also learn how to discriminate, based on gender, race or other sensitive attributes. This realization gave rise to the field of fair machine learning, which aims to recognize, quantify and ultimately mitigate such algorithmic bias. This manuscript describes the R package fairadapt, which implements a causal inference preprocessing method. By making use of a causal graphical model alongside the observed data, the method can be used to address hypothetical questions of the form "What would my salary have been, had I been of a different gender/race?". Such individual level counterfactual reasoning can help eliminate discrimination and help justify fair decisions. We also discuss appropriate relaxations which assume that certain causal pathways from the sensitive attribute to the outcome are not discriminatory
The R Package markets: Estimation Methods for Markets in Equilibrium and Disequilibrium
Market models constitute a significant cornerstone of empirical applications in business, industrial organization, and policymaking macroeconomics. The econometric literature proposes various estimation methods for markets in equilibrium, which entail a market-clearing structural condition, and disequilibrium, which are described based on a structural short-side rule. Nonetheless, maximum likelihood estimations of such models are computationally demanding, and software providing simple, out-of-the-box methods for estimating them is scarce. Therefore, applications rely on project-specific implementations for estimating these models, which hinders research reproducibility and result comparability. This article presents the R package markets, which provides a common interface with generic functionality simplifying the estimation of models for markets in equilibrium and disequilibrium. The package specializes in estimating demanded, supplied, and aggregated market quantities and absolute, normalized, and relative market shortages. Its functionality is exemplified via an empirical application using a classic dataset of United States credit for housing starts. Moreover, the article details the scope and design of the implementation and provides statistical measurements of the computational performance of its estimation functionality gathered via large-scale benchmarking simulations. The markets package is free software distributed under the Expat license as part of the R software ecosystem. It comprises a set of estimation and analysis tools that are not directly available from either alternative R packages or other statistical software projects
funGp: An R Package for Gaussian Process Regression with Scalar and Functional Inputs
This article introduces funGp, an R package which handles regression problems involving multiple scalar and/or functional inputs, and a scalar output, through the Gaussian process model. This is particularly of interest for the design and analysis of computer experiments with expensive-to-evaluate numerical codes that take as inputs regularly sampled time series. Rather than imposing any particular parametric input-output relationship in advance (e.g., linear, polynomial), Gaussian process models extract this information directly from the data. The package offers built-in dimension reduction, which helps to simplify the representation of the functional inputs and obtain lighter models. It also implements an ant colony based optimization algorithm which supports the calibration of multiple structural characteristics of the model such as the state of each input (active or inactive) and the type of kernel function, while seeking for greater prediction power. The implemented methods are tested and applied to a real case in the domain of marine flooding
sparsegl: An R Package for Estimating Sparse Group Lasso
The sparse group lasso is a high-dimensional regression technique that is useful for problems whose predictors have a naturally grouped structure and where sparsity is encouraged at both the group and individual predictor level. In this paper we discuss a new R package for computing such regularized models. The intention is to provide highly optimized solution routines enabling analysis of very large datasets, especially in the context of sparse design matrices
pyStoNED: A Python Package for Convex Regression and Frontier Estimation
Shape-constrained nonparametric regression is a growing area in econometrics, statistics, operations research, machine learning, and related fields. In the field of productivity and efficiency analysis, recent developments in multivariate convex regression and related techniques such as convex quantile regression and convex expectile regression have bridged the long-standing gap between the conventional deterministic-nonparametric and stochastic-parametric methods. Unfortunately, the heavy computational burden and the lack of a powerful, reliable, and fully open-access computational package have slowed down the diffusion of these advanced estimation techniques to the empirical practice. The purpose of the Python package pyStoNED is to address this challenge by providing a freely available and user-friendly tool for multivariate convex regression, convex quantile regression, convex expectile regression, isotonic regression, stochastic nonparametric envelopment of data, and related methods. This paper presents a tutorial of the pyStoNED package and illustrates its application, focusing on estimating frontier cost and production functions
fHMM: Hidden Markov Models for Financial Time Series in R
Hidden Markov models constitute a versatile class of statistical models for time series that are driven by hidden states. In financial applications, the hidden states can often be linked to market regimes such as bearish and bullish markets or recessions and periods of economics growth. To give an example, when the market is in a nervous state, corresponding stock returns often follow some distribution with relatively high variance, whereas calm periods are often characterized by a different distribution with relatively smaller variance. Hidden Markov models can be used to explicitly model the distribution of the observations conditional on the hidden states and the transitions between states, and thus help us to draw a comprehensive picture of market behavior. While various implementations of hidden Markov models are available, a comprehensive R package that is tailored to financial applications is still lacking. In this paper, we introduce the R package fHMM, which provides various tools for applying hidden Markov models to financial time series. It contains functions for fitting hidden Markov models to data, conducting simulation experiments, and decoding the hidden state sequence. Furthermore, functions for model checking, model selection, and state prediction are provided. In addition to basic hidden Markov models, hierarchical hidden Markov models are implemented, which can be used to jointly model multiple data streams that were observed at different temporal resolutions. The aim of the fHMM package is to give R users with an interest in financial applications access to hidden Markov models and their extensions
gcimpute: A Package for Missing Data Imputation
This article introduces the Python package gcimpute for missing data imputation. Package gcimpute can impute missing data with many different variable types, including continuous, binary, ordinal, count, and truncated values, by modeling data as samples from a Gaussian copula model. This semiparametric model learns the marginal distribution of each variable to match the empirical distribution, yet describes the interactions between variables with a joint Gaussian that enables fast inference, imputation with confidence intervals, and multiple imputation. The package also provides specialized extensions to handle large datasets (with complexity linear in the number of observations) and streaming datasets (with online imputation). This article describes the underlying methodology and demonstrates how to use the software package
salmon: A Symbolic Linear Regression Package for Python
One of the most attractive features of R is its linear modeling capabilities. We describe a Python package, salmon, that brings the best of R's linear modeling functionality to Python in a Pythonic way - by providing composable objects for specifying and fitting linear models. This object-oriented design also enables other features that enhance easeof-use, such as automatic visualizations and intelligent model building
scikit-fda: A Python Package for Functional Data Analysis
The library scikit-fda is a Python package for functional data analysis (FDA). It provides a comprehensive set of tools for representation, preprocessing, and exploratory analysis of functional data. The library is built upon and integrated in Python's scientific ecosystem. In particular, it conforms to the scikit-learn application programming interface so as to take advantage of the functionality for machine learning provided by this package: Pipelines, model selection, and hyperparameter tuning, among others. The scikit-fda package has been released as free and open-source software under a 3-clause BSD license and is open to contributions from the FDA community. The library's extensive documentation includes step-by-step tutorials and detailed examples of use
Holistic Generalized Linear Models
Holistic linear regression extends the classical best subset selection problem by adding additional constraints designed to improve the model quality. These constraints include sparsity-inducing constraints, sign-coherence constraints and linear constraints. The R package holiglm provides functionality to model and fit holistic generalized linear models. By making use of state-of-the-art mixed-integer conic solvers, the package can reliably solve generalized linear models for Gaussian, binomial and Poisson responses with a multitude of holistic constraints. The high-level interface simplifies the constraint specification and can be used as a drop-in replacement for the stats::glm() function