Functional programming in R: Part 2
In Part 1 of this series, I showed how Functional-style code allows you to separate the what and the how of your code, and how doing so opened up new ways of solving programming problems. Part 1 covered the reduce / accumulate family of higher-order functions, and in the current post I cover the apply / map family of higher-order functions. Finally, I show how changing from loops to the apply / map family of higher-order functions parallel programming becomes a trivial matter of slightly modifying a function name.
Understanding p values through simulation
The properties of p values can be difficult to understand. Therefore, one way to develop a good conceptual understanding of p values is through simulation. The document below allows you to simulate experiments and to examine how the distribution of data and p-values change.
Functional programming in R: Part 1
There’s recently been a bit of talk on twitter about the relative benefits of loops versus more functional-style code. Most of these discussions have centred around the relative performance benefits. However, I think this slightly misses the point. Functional-style code allows you to separate the what and the how of your code in a way that opens up new ways of thinking about problems. The end result is often faster code, but this benefit comes from writing cleaner code the encourages clearer thinking. In this post, I show how to speed up some of the simulation code in the {BFDA}
R package using functional design patterns. Specifically, reductions and accumulations (aka scans).
Robustness analysis for informed Bayesian t-tests
Currently, robustness analysis for informed Bayesian t-tests is not implemented in JASP. So I thought I’d just build it! This is also a great excuse to play around with Rust WASM and Observable blocks in Quarto.