Blockmodels: A R-package for estimating in Latent Block Model and Stochastic Block Model, with various probability functions, with or without covariates
Analysis of the topology of a graph, regular or bipartite one, can be done by clustering for regular ones or co-clustering for bipartite ones. The Stochastic Block Model and the Latent Block Model are two models, which are very similar for respectively regular and bipartite graphs, based on probabilistic models. Initially developed for binary graphs, these models have been extended to valued networks with optional covariates on the edges. This paper present a implementation of a Variational EM algorithm for Stochastic Block Model and Latent Block Model for some common probability functions, Bernoulli, Gaussian and Poisson, without or with covariates, with some standard flavors, like multivariate extensions. This implementation allow automatic group number exploration and selection via the ICL criterion, and allow analyze networks with thousands of nodes in a reasonable amount of time.
Biomarker data is often subject to limits of quantification and/or limits of detection. Statistically, this corresponds to left- or interval-censoring. To be able to associate a censored time-to-event endpoint to a biomarker covariate, the R package SurvRegCensCov provides software for Weibull regression for a right-censored endpoint, one interval-censored, and an arbitrary number of non-censored covariates. Furthermore, the package provides functions to estimate canonical parameters from censored samples based on several distributional assumptions, and a function to switch between different p…
We consider a stochastic blockmodel equipped with node covariate information, that is helpful in analyzing social network data. The key objective is to obtain maximum likelihood estimates of the model parameters. For this task, we devise a fast, scalable Monte Carlo EM type algorithm based on case-control approximation of the log-likelihood coupled with a subsampling approach. A key feature of the proposed algorithm is its parallelizability, by processing portions of the data on several cores, while leveraging communication of key statistics across the cores during each iteration of the algori…
The receiver operating characteristic (ROC) curve is the most popular tool used to evaluate the discriminatory capability of diagnostic tests/biomarkers measured on a continuous scale when distinguishing between two alternative disease states (e.g, diseased and nondiseased). In some circumstances, the test's performance and its discriminatory ability may vary according to subject-specific characteristics or different test settings. In such cases, information-specific accuracy measures, such as the covariate-specific and the covariate-adjusted ROC curve are needed, as ignoring covariate informa…
In this paper we address the problem of modeling relational data, which appear in many applications such as social network analysis, recommender systems and bioinformatics. Previous studies either consider latent feature based models but disregarding local structure in the network, or focus exclusively on capturing local structure of objects based on latent blockmodels without coupling with latent characteristics of objects. To combine the benefits of the previous work, we propose a novel model that can simultaneously incorporate the effect of latent features and covariates if any, as well as …
The Counterfactual package implements the estimation and inference methods of Chernozhukov, Fernández-Val and Melly (2013) for counterfactual analysis. The counterfactual distributions considered are the result of changing either the marginal distribution of covariates related to the outcome variable of interest, or the conditional distribution of the outcome given the covariates. They can be applied to estimate quantile treatment effects and wage decompositions. This paper serves as an introduction to the package and displays basic functionality of the commands contained within.
In many applications of network analysis, it is important to distinguish between observed and unobserved factors affecting network structure. To this end, we develop spectral estimators for both unobserved blocks and the effect of covariates in stochastic blockmodels. On the theoretical side, we establish asymptotic normality of our estimators for the subsequent purpose of performing inference. On the applied side, we show that computing our estimator is much faster than standard variational expectation--maximization algorithms and scales well for large networks. Monte Carlo experiments sugges…
In multivariate nonparametric analysis, sparseness of the covariates also called curse of dimensionality, forces one to use large smoothing parameters. This leads to a biased smoother. Instead of focusing on optimally selecting the smoothing parameter, we fix it to some reasonably large value to ensure an over-smoothing of the data. The resulting base smoother has a small variance but a substantial bias. In this paper, we propose an R package named ibr to iteratively correct the initial bias of the (base) estimator by an estimate of the bias obtained by smoothing the residuals. After a brief d…
This is an overview of the R package iprior, which implements a unified methodology for fitting parametric and nonparametric regression models, including additive models, multilevel models, and models with one or more functional covariates. Based on the principle of maximum entropy, an I-prior is an objective Gaussian process prior for the regression function with covariance kernel equal to its Fisher information. The regression function is estimated by its posterior mean under the I-prior, and hyperparameters are estimated via maximum marginal likelihood. Estimation of I-prior models is simpl…
Johns Hopkins University(约翰斯·霍普金斯大学);University of Pittsburgh(匹兹堡大学)
In network inference applications, it is often desirable to detect community structure, namely to cluster vertices into groups, or blocks, according to some measure of similarity. Beyond mere adjacency matrices, many real networks also involve vertex covariates that carry key information about underlying block structure in graphs. To assess the effects of such covariates on block recovery, we present a comparative analysis of two model-based spectral algorithms for clustering vertices in stochastic blockmodel graphs with vertex covariates. The first algorithm uses only the adjacency matrix, an…
Latent Markov (LM) models represent an important class of models for the analysis of longitudinal data (Bartolucci et. al., 2013), especially when response variables are categorical. These models have a great potential of application for the analysis of social, medical, and behavioral data as well as in other disciplines. We propose the R package LMest, which is tailored to deal with these types of model. In particular, we consider a general framework for extended LM models by including individual covariates and by formulating a mixed approach to take into account additional dependence structu…
Social network analysis is the study of how links between a set of actors are formed. Typically, it is believed that links are formed in a structured manner, which may be due to, for example, political or material incentives, and which often may not be directly observable. The stochastic blockmodel represents this structure using latent groups which exhibit different connective properties, so that conditional on the group membership of two actors, the probability of a link being formed between them is represented by a connectivity matrix. The mixed membership stochastic blockmodel (MMSBM) exte…
Researchers are often interested in using longitudinal data to estimate the causal effects of hypothetical time-varying treatment interventions on the mean or risk of a future outcome. Standard regression/conditioning methods for confounding control generally fail to recover causal effects when time-varying confounders are themselves affected by past treatment. In such settings, estimators derived from Robins's g-formula may recover time-varying treatment effects provided sufficient covariates are measured to control confounding by unmeasured risk factors. The package gfoRmula implements in R …
The Stochastic Block Model (SBM) is a popular probabilistic model for random graphs. It is commonly used for clustering network data by aggregating nodes that share similar connectivity patterns into blocks. When fitting an SBM to a network which is partially observed, it is important to take into account the underlying process that generates the missing values, otherwise the inference may be biased. This paper introduces missSBM, an R-package fitting the SBM when the network is partially observed, i.e., the adjacency matrix contains not only 1's or 0's encoding presence or absence of edges bu…
Simon Fraser University(西蒙菲莎大学);Columbia University(哥伦比亚大学)
Neural networks have excelled at regression and classification problems when the input space consists of scalar variables. As a result of this proficiency, several popular packages have been developed that allow users to easily fit these kinds of models. However, the methodology has excluded the use of functional covariates and to date, there exists no software that allows users to build deep learning models with this generalized input space. To the best of our knowledge, the functional neural network (FuncNN) library is the first such package in any programming language; the library has been …
This paper presents the R package PlackettLuce, which implements a generalization of the Plackett-Luce model for rankings data. The generalization accommodates both ties (of arbitrary order) and partial rankings (complete rankings of subsets of items). By default, the implementation adds a set of pseudo-comparisons with a hypothetical item, ensuring that the underlying network of wins and losses between items is always strongly connected. In this way, the worth of each item always has a finite maximum likelihood estimate, with finite standard error. The use of pseudo-comparisons also has a reg…
Disaggregation modelling, or downscaling, has become an important discipline in epidemiology. Surveillance data, aggregated over large regions, is becoming more common, leading to an increasing demand for modelling frameworks that can deal with this data to understand spatial patterns. Disaggregation regression models use response data aggregated over large heterogenous regions to make predictions at fine-scale over the region by using fine-scale covariates to inform the heterogeneity. This paper presents the R package disaggregation, which provides functionality to streamline the process of r…
Random forests are a sensible non-parametric model to predict competing risk data according to some covariates. However, there are currently no packages that can adequately handle large datasets ($n > 100,000$). We introduce a new R package, largeRCRF, using the random competing risks forest theory developed by Ishwaran et al. (2014). We verify our package's validity and accuracy through simulation studies and show that its results are similar enough to randomForestSRC while taking less time to run. We also demonstrate the package on a large dataset that was previously inaccessible, using hard…
Measurement error in a covariate or the outcome of regression models is common, but is often ignored, even though measurement error can lead to substantial bias in the estimated covariate-outcome association. While several texts on measurement error correction methods are available, these methods remain seldomly applied. To improve the use of measurement error correction methodology, we developed mecor, an R package that implements measurement error correction methods for regression models with continuous outcomes. Measurement error correction requires information about the measurement error m…
FastRerandomize: Fast Rerandomization Using Accelerated Computing
Robert F. Wagner School of Public Service, New York University(纽约大学罗伯特·F·瓦格纳公共服务学院);Department of Government, University of Texas at Austin(德克萨斯大学奥斯汀分校政府系);Department of Statistics, UC Berkeley(加州大学伯克利分校统计系);Departments of Statistics and Computer Science, Harvard University(哈佛大学统计与计算机科学系)
Although models for count data with over-dispersion have been widely considered in the literature, models for under-dispersion -- the opposite phenomenon -- have received less attention as it is only relatively common in particular research fields such as biodosimetry and ecology. The Good distribution is a flexible alternative for modelling count data showing either over-dispersion or under-dispersion, although no R packages are still available to the best of our knowledge. We aim to present in the following the R package good that computes the standard probabilistic functions (i.e., probabil…
Extending the saemix package for R to fit non Gaussian outcomes
Université Paris Cité(巴黎西岱大学);Université Sorbonne Paris Nord(北索邦大学);Inserm, IAME(法国国家健康与医学研究院,IAME实验室);Université Paris-Saclay(巴黎萨克雷大学);INRAE, MaIAGE(法国国家农业、食品与环境研究所,MaIAGE实验室);Ecole Polytechnique(巴黎综合理工学院)
We propose new tests for assessing whether covariates in a treatment group and matched control group are balanced in observational studies. The tests exhibit high power under a wide range of multivariate alternatives, some of which existing tests have little power for. The asymptotic permutation null distributions of the proposed tests are studied and the p-values calculated through the asymptotic results work well in finite samples, facilitating the application of the test to large data sets. The tests are illustrated in a study of the effect of smoking on blood lead levels. The proposed test…
The software package $\texttt{mstate}$, in articulation with the package $\texttt{survival}$, provides not only a well-established multi-state survival analysis framework in R, but also one of the most complete, as it includes point and interval estimation of relative transition hazards, cumulative transition hazards and state occupation probabilities, both under clock-forward and clock-reset models; personalised estimates, i.e. estimates for an individual with specific covariate measurements, can also be obtained with $\texttt{mstate}$ by fitting a Cox regression model. The new R package $\te…
Discrete-time hidden Markov models (HMMs) have become an immensely popular tool for inferring latent animal behaviors from telemetry data. Here we introduce an open-source R package, momentuHMM, that addresses many of the deficiencies in existing HMM software. Features include: 1) data pre-processing and visualization; 2) user-specified probability distributions for an unlimited number of data streams and latent behavior states; 3) biased and correlated random walk movement models, including "activity centers" associated with attractive or repulsive forces; 4) user-specified design matrices an…
The ergm package supports the statistical analysis and simulation of network data. It anchors the statnet suite of packages for network analysis in R introduced in a special issue in Journal of Statistical Software in 2008. This article provides an overview of the new functionality in the 2021 release of ergm version 4. These include more flexible handling of nodal covariates, term operators that extend and simplify model specification, new models for networks with valued edges, improved handling of constraints on the sample space of networks, and estimation with missing edge data. We also ide…
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…
Meta-analysis methods are used to combine evidence from multiple studies. Meta-regression as well as model-based meta-analysis are extensions of standard pairwise meta-analysis in which information about study-level covariates and (arm-level) dosing amount or exposure may be taken into account. A Bayesian approach to inference is very attractive in this context, especially when a meta-analysis is based on few studies only or rare events. In this article, we present the R package MetaStan which implements a wide range of pairwise and model-based meta-analysis models. A generalised linear mixed …
Decision trees are flexible prediction models which are constructed to quantify outcome-covariate relationships and characterize relevant population subgroups. However, the standard graphical representation of fitted decision trees highlights individual split points, and hence is suboptimal for visualizing defined subgroups. In this paper, we present a novel visual representation of decision trees which shifts the primary focus to characterizing subgroups, both in terms of their defining covariates and their outcome distribution. We implement our method in the \texttt{visTree} package, which b…
PReMiuM is a recently developed R package for Bayesian clustering using a Dirichlet process mixture model. This model is an alternative to regression models, non-parametrically linking a response vector to covariate data through cluster membership. The package allows Bernoulli, Binomial, Poisson, Normal and categorical response, as well as Normal and discrete covariates. Additionally, predictions may be made for the response, and missing values for the covariates are handled. Several samplers and label switching moves are implemented along with diagnostic tools to assess convergence. A number …
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…
We propose the use of non-parametric, graph-based tests to assess the distributional balance of covariates in observational studies with multi-valued treatments. Our tests utilize graph structures ranging from Hamiltonian paths that connect all of the data to nearest neighbor graphs that maximally separates data into pairs. We consider algorithms that form minimal distance graphs, such as optimal Hamiltonian paths or non-bipartite matching, or approximate alternatives, such as greedy Hamiltonian paths or greedy nearest neighbor graphs. Extensive simulation studies demonstrate that the proposed…
In this manuscript we demonstrate the analysis of right-censored survival outcomes using the MRH package in R. The MRH package implements the multi-resolution hazard (MRH) model, which is a Polya-tree based, Bayesian semi-parametric method for flexible estimation of the hazard rate and covariate effects. The package allows for covariates to be included under the proportional and non-proportional hazards assumption, and for robust estimation of the hazard rate in periods of sparsely observed failures via a "pruning" tool.
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…
The Neyman-Scott point process is a widely used point process model which is easily interpretable and easily extendable to include various types of inhomogeneity. The inference for such complex models is then complicated and fast methods, such as minimum contrast method or composite likelihood approach do not provide accurate estimates or fail completely. Therefore, we introduce Bayesian MCMC approach for the inference of Neymann-Scott point process models with inhomogeneity in any or all of the following model components: process of cluster centers, mean number of points in a cluster, spread …
The cgam package contains routines to fit the generalized additive model where the components may be modeled with shape and smoothness assumptions. The main routine is cgam and nineteen symbolic routines are provided to indicate the relationship between the response and each predictor, which satisfies constraints such as monotonicity, convexity, their combinations, tree, and umbrella orderings. The user may specify constrained splines to fit the components for continuous predictors, and various types of orderings for the ordinal predictors. In addition, the user may specify parametrically mode…
This paper introduces the R package drpop to flexibly estimate total population size from incomplete lists. Total population estimation, also called capture-recapture, is an important problem in many biological and social sciences. A typical dataset consists of incomplete lists of individuals from the population of interest along with some covariate information. The goal is to estimate the number of unobserved individuals and equivalently, the total population size. drpop flexibly models heterogeneity using the covariate information, under the assumption that two lists are conditionally indepe…
We give an overview of eight different software packages and functions available in R for semi- or non-parametric estimation of the hazard rate for right-censored survival data. Of particular interest is the accuracy of the estimation of the hazard rate in the presence of covariates, as well as the user-friendliness of the packages. In addition, we investigate the ability to incorporate covariates under both the proportional and the non-proportional hazards assumptions. We contrast the robustness, variability and precision of the functions through simulations, and then further compare differen…