BARS Software

BARS in C, with an S/R wrapper:

  • Normal version
  • Poisson version
  • Detailed description of the BARS code for S/R in Wallstrom, G., Liebner, J., and Kass, R.E. (2008) J. Statist. Software.
    BARS in Matlab:
  • Matlab version created by Ryan Kelly

  • BARS Publications

    Papers applying (or modifying) BARS include:
  • Behseta, S., Wallstrom, G.L., and Kass, R.E. (2005, Biometrika)
  • Behseta, S. and Kass, R.E. (2005, Statistics in Medicine)
  • Kaufman, C.G., Ventura, V., and Kass, R.E. (2005, Statistics in Medicine)
  • Kass, R.E., Ventura, V. and Cai, C. (2003, Network)
  • Wallstrom, G.L, Kass, R.E., Miller, A., Cohn, J.F., and Fox, N.A. (2002, Case Studies in Bayesian Statistics)
  • DiMatteo, I., Genovese, C.R., and Kass, R.E. (2001, Biometrika)
    These may be obtained from my selected publications page.

    About BARS

    BARS (Bayesian Adaptive Regression Splines) solves the generalized nonparametric regression (curve-fitting) problem

Y_i \, & \sim & p(y \vert\theta_i, \zeta) \\
\theta_i & = & f(x_i)

    by assuming the function $f(x)$ may be approximated by a spline. Here, for example, the data $Y_i$ may be binary, or counts, and the explanatory variable $x$ may be time. The special cases in which the data are continuous pose the usual curve-fitting problem, ordinarily solved by some variation on least-squares.

    A substantial literature has demonstrated the power of spline-based generalized curve-fitting. See Hansen and Kooperberg (2002, Statist. Science) for a review. The difficult part of the problem is to allow aspects of the spline to vary (adaptively to the data) across the domain of $x$. DiMatteo, Genovese, and Kass (2001, Biometrika) proposed BARS and contributed an initial implementation and study of the method.


    DiMatteo et al. compared BARS to two recently successful methods of solving the usual curve-fitting problem.

    A typical data set simulated from a true curve, together with fits for each of DMS, SARS, and BARS are shown in the following figure. The fits are all a bit more wiggly than the true curve, but BARS provides a smoother fit while still capturing the sudden jump. Mean-squared errors in several examples were much smaller for BARS than for DMS or SARS.


    The next figure shows a BARS Poisson regression fit (thick curve) to neuronal data, providing the kind of smoothing we believe to be desirable; also shown is a Gaussian kernel density (Gaussian filter) estimate (thin curve). Taken from Kass, Ventura, Cai (2003, NETWORK: Computation in Neural Systems).