• About
  • Documentation

  • More Universes
  • Recent Updates
  • Leader board

  • All repositories
  • All packages
  • All articles
  • All datasets
  • All system Libraries
asmahani
  • Builds
  • Packages
  • Articles
  • Datasets
  • Contribution
  • Badges
  • API
  • Feed

Links toasmahani

sns - Stochastic Newton Sampler (SNS)

Stochastic Newton Sampler (SNS) is a Metropolis-Hastings-based, Markov Chain Monte Carlo sampler for twice differentiable, log-concave probability density functions (PDFs) where the proposal density function is a multivariate Gaussian resulting from a second-order Taylor-series expansion of log-density around the current point. The mean of the Gaussian proposal is the full Newton-Raphson step from the current point. A Boolean flag allows for switching from SNS to Newton-Raphson optimization (by choosing the mean of proposal function as next point). This can be used during burn-in to get close to the mode of the PDF (which is unique due to concavity). For high-dimensional densities, mixing can be improved via 'state space partitioning' strategy, in which SNS is applied to disjoint subsets of state space, wrapped in a Gibbs cycle. Numerical differentiation is available when analytical expressions for gradient and Hessian are not available. Facilities for validation and numerical differentiation of log-density are provided. Note: Formerly available versions of the MfUSampler can be obtained from the archive <https://cran.r-project.org/src/contrib/Archive/MfUSampler/>.

Last updated

3.28 score 1 dependents 32 scripts 209 downloads

MfUSampler - Multivariate-from-Univariate (MfU) MCMC Sampler

Convenience functions for multivariate MCMC using univariate samplers including: slice sampler with stepout and shrinkage (Neal (2003) <DOI:10.1214/aos/1056562461>), adaptive rejection sampler (Gilks and Wild (1992) <DOI:10.2307/2347565>), adaptive rejection Metropolis (Gilks et al (1995) <DOI:10.2307/2986138>), and univariate Metropolis with Gaussian proposal.

Last updated

3.08 score 2 dependents 20 scripts 260 downloads

RegressionFactory - Expander Functions for Generating Full Gradient and Hessian from Single-Slot and Multi-Slot Base Distributions

The expander functions rely on the mathematics developed for the Hessian-definiteness invariance theorem for linear projection transformations of variables, described in authors' paper, to generate the full, high-dimensional gradient and Hessian from the lower-dimensional derivative objects. This greatly relieves the computational burden of generating the regression-function derivatives, which in turn can be fed into any optimization routine that utilizes such derivatives. The theorem guarantees that Hessian definiteness is preserved, meaning that reasoning about this property can be performed in the low-dimensional space of the base distribution. This is often a much easier task than its equivalent in the full, high-dimensional space. Definiteness of Hessian can be useful in selecting optimization/sampling algorithms such as Newton-Raphson optimization or its sampling equivalent, the Stochastic Newton Sampler. Finally, in addition to being a computational tool, the regression expansion framework is of conceptual value by offering new opportunities to generate novel regression problems.

Last updated

2.30 score 20 scripts 270 downloads

CFC - Cause-Specific Framework for Competing-Risk Analysis

Numerical integration of cause-specific survival curves to arrive at cause-specific cumulative incidence functions, with three usage modes: 1) Convenient API for parametric survival regression followed by competing-risk analysis, 2) API for CFC, accepting user-specified survival functions in R, and 3) Same as 2, but accepting survival functions in C++. For mathematical details and software tutorial, see Mahani and Sharabiani (2019) <DOI:10.18637/jss.v089.i09>.

Last updated

cppopenmp

2.11 score 13 scripts 336 downloads

DBR - Discrete Beta Regression

Bayesian Beta Regression, adapted for bounded discrete responses, commonly seen in survey responses. Estimation is done via Markov Chain Monte Carlo sampling, using a Gibbs wrapper around univariate slice sampler (Neal (2003) <DOI:10.1214/aos/1056562461>), as implemented in the R package MfUSampler (Mahani and Sharabiani (2017) <DOI: 10.18637/jss.v078.c01>).

Last updated

2.11 score 13 scripts 238 downloads

MatchLinReg - Combining Matching and Linear Regression for Causal Inference

Core functions as well as diagnostic and calibration tools for combining matching and linear regression for causal inference in observational studies.

Last updated

2.00 score 6 scripts 165 downloads

BayesMixSurv - Bayesian Mixture Survival Models using Additive Mixture-of-Weibull Hazards, with Lasso Shrinkage and Stratification

Bayesian Mixture Survival Models using Additive Mixture-of-Weibull Hazards, with Lasso Shrinkage and Stratification. As a Bayesian dynamic survival model, it relaxes the proportional-hazard assumption. Lasso shrinkage controls overfitting, given the increase in the number of free parameters in the model due to presence of two Weibull components in the hazard function.

Last updated

1.00 score 5 scripts 240 downloads

BSGW - Bayesian Survival Model with Lasso Shrinkage Using Generalized Weibull Regression

Bayesian survival model using Weibull regression on both scale and shape parameters. Dependence of shape parameter on covariates permits deviation from proportional-hazard assumption, leading to dynamic - i.e. non-constant with time - hazard ratios between subjects. Bayesian Lasso shrinkage in the form of two Laplace priors - one for scale and one for shape coefficients - allows for many covariates to be included. Cross-validation helper functions can be used to tune the shrinkage parameters. Monte Carlo Markov Chain (MCMC) sampling using a Gibbs wrapper around Radford Neal's univariate slice sampler (R package MfUSampler) is used for coefficient estimation.

Last updated

1.00 score 1 stars 9 scripts 211 downloads

SAMUR - Stochastic Augmentation of Matched Data Using Restriction Methods

Augmenting a matched data set by generating multiple stochastic, matched samples from the data using a multi-dimensional histogram constructed from dropping the input matched data into a multi-dimensional grid built on the full data set. The resulting stochastic, matched sets will likely provide a collectively higher coverage of the full data set compared to the single matched set. Each stochastic match is without duplication, thus allowing downstream validation techniques such as cross-validation to be applied to each set without concern for overfitting.

Last updated

1.00 score 3 scripts 196 downloads