Articles by R-bloggers | A Random Walk

Efficient list recursion in R with {rrapply}

July 25, 2022 | R-bloggers | A Random Walk

Introduction The nested list below shows a small extract from the Mathematics Genealogy Project highlighting the advisor/student genealogy of several famous mathematicians. The mathematician’s given names are present in the "given" attribute of each list element. The numeric values at the leaf elements are the total number of ...
[Read more...]

Efficient list recursion in R with {rrapply}

July 25, 2022 | R-bloggers | A Random Walk

Introduction The nested list below shows a small extract from the Mathematics Genealogy Project highlighting the advisor/student genealogy of several famous mathematicians. The mathematician’s given names are present in the "given" attribute of each list element. The numeric values at the leaf elements are the total number of ...
[Read more...]

Automatic differentiation in R with Stan Math

January 23, 2022 | R-bloggers | A Random Walk

Introduction Automatic differentiation Automatic differentiation (AD) refers to the automatic/algorithmic calculation of derivatives of a function defined as a computer program by repeated application of the chain rule. Automatic differentiation plays an important role in many statistical computing problems, such as gradient-based optimization of large-scale models, where gradient calculation ...
[Read more...]

GSL nonlinear least squares fitting in R

October 12, 2021 | R-bloggers | A Random Walk

Introduction The new gslnls-package provides R bindings to nonlinear least-squares optimization with the GNU Scientific Library (GSL) using the trust region methods implemented by the gsl_multifit_nlinear module. The gsl_multifit_nlinear module was added in GSL version 2.2 (released in August 2016) and the available nonlinear-least squares routines have been ...
[Read more...]

Step function regression in Stan

June 16, 2021 | R-bloggers | A Random Walk

Introduction Tha aim of this post is to provide a working approach to perform piecewise constant or step function regression in Stan. To set up the regression problem, consider noisy observations \(y_1, \ldots, y_n \in \mathbb{R}\) sampled from a standard signal plus i.i.d. Gaussian noise model ...
[Read more...]

Tracking Stan sampling progress in Shiny

February 1, 2021 | R-bloggers | A Random Walk

Introduction The previous post demonstrates the use of pre-compiled Stan models in interactive R Shiny applications to avoid unnecessary Stan model (re-)compilation on application start-up. In this short follow-up post we go a step further and tackle the issue of tracking the Stan model sampling progress itself in a ... [Read more...]

Running compiled Stan models in Shiny

January 31, 2021 | R-bloggers | A Random Walk

Introduction The aim of this post is to provide a short step-by-step guide on writing interactive R Shiny-applications that include models written in Stan using rstan and rstantools. The remainder of this post assumes a small amount of working knowledge on writing models in Stan and usage of the package ... [Read more...]

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)