Thursday, November 08, 2018

R Packages: leonRdo & inteRest

I have recently developed two packages that can accompany the modeling simulation platform I described in my book Business Case Analysis with R: Simulation Tutorials to Support Complex Business Decisions (available at Springer-Nature/Apress and Amazon).

These packages are:

  • leonRdo 0.1.4: provides median Latin hypercube sampling
  • inteRest 1.0: provides basic finance functions
Go here to see how you can install these packages and see a few highlights from their contents.

Friday, August 03, 2018

Bayesian Reasoning: Discrete Inference with Sequential Data

Or, One Way I Learned to Quit Believing My Prejudices

In my last article on this topic, I showed that considering background information can play a significant role in helping us make less biased judgments. What I hope to show now is that while we learn by updating the information we have through experience, limited experiences can often lead to prejudices about the way we interpret the world; but even broad and deep experience should rarely lead us to certain conclusions.

To get started, imagine playing a game in which someone asks you to infer the number of sides of a die based on the face numbers that show up in repeated throws of the die. The only information you are given beforehand is that the actual die will be selected from a set of seven die having these number of faces: (4, 6, 8, 10, 12, 15, 18). Assuming you can trust the person who reports the outcome on each throw, after how many rolls of the die will you be willing to specify which die was chosen?

Let's use the R programming language to help us think through the problem. Start by specifying the set of the die possibilities such that each number represents the number of sides of a given die. (You might also want to refer to my previous article on Bayesian analysis to familiarize yourself with some of the terminology that follows.)

To read the entire discussion go here.

Friday, March 09, 2018

Book Release: Business Case Analysis with R

I am happy to announce that "Business Case Analysis with R" has been republished through Springer-Nature/Apress. The title is available at both Springer-Nature/Apress and Amazon.

"This tutorial teaches you how to use the statistical programming language R to develop a business case simulation and analysis. It presents a methodology for conducting business case analysis that minimizes decision delay by focusing stakeholders on what matters most and suggests pathways for minimizing the risk in strategic and capital allocation decisions. Business case analysis, often conducted in spreadsheets, exposes decision makers to additional risks that arise just from the use of the spreadsheet environment."



Contact us if you would like to receive a copy for journalistic or academic review or purchase books in bulk for your organization.

So far, the reviews on Amazon have been great!

★★★★★ This book is a great resource for anyone looking to learn more about running simulations
By Matthew C Marzillo on March 30, 2018
I came across this book while I was looking to find a practical resource for applying simulation methods in business settings. While there are many resources on simulation models for academic and research applications there aren't many that address simulations from a business stand point. This book is a great resource for anyone looking to learn more about running simulations and getting some real world experience by test driving Robert's R code. A technical book that is easy read...for the price, it's really hard to pass up!

★★★★★ This book has made me a better analyst
By Buffalo Gal on March 27, 2018
Last week I bought this because I have a project merging 85 spreadsheets with R. I am still on chapter 2 but I LOVE THIS BOOK. Let me tell you why.
A. Intuitive Organization. The book begins with a discussion of what motivated the author - to facilitate more accurate, clear and practical analysis by using R instead of complex spreadsheet designs. It discusses guidelines like file architecture and R syntax. It lays out a progressive approach to the Business Case analysis, starting with the basics.
B. Incredible Content. The elegant code is written in base R so it avoids the drama that can come from snazzy packages. It does require some confidence with R. At the same time it inspires me to stretch my skills and try more sophisticated techniques like Monte Carlo and stochastic simulations
C. Solid delivery. It is easy-to-read even though it is chock full of technical details. It does not have fancy color pictures but it does have simple graphs and visuals that are helpful and easy to understand.

I can't wait to read the rest of this book. It is filled with treasures that will make me more productive, thorough and effective.


★★★★★ Works for any sector and organization
By Russell J Moore on March 25, 2018
I run a niche consulting business focused on education reform. Public education has a long tradition of poor decision-making driven by powers-that-be protectors of the status quo. I am using R - and specifically the tutorials in this book - to identify existing and new measures to include in goals and strategic plans that will actually “move the needle” in public and private K-12 and higher education. I have also shown my copy to friends who do similar critical decision-making in large, private healthcare organizations and have used R before. Just a short skim through this book got them excited about “going deeper” and rejuvenating their analyses and processes. I predict this useful “how to” will take many industries by storm.

★★★★★ R finally enters in the Strategic Planning field.
By Carlos Ortega Fernandez on March 23, 2018
I knew this book through the same author in LinkedIn and I could not withstand to buy it immediately, it deserved it. The subject is not easy, Strategic Planning combines financial concepts but more and more if you want to explore alternative scenarios is when you will require mathematics and probability. This is what this good book is about.

The novel approach it offers is that is written in a very easy to follow R programming language. Perhaps it is the only book about this subject and entirely written in R.

Hopefully there will be new extensions of the book that take advantage of the extensive R's optimization libraries as well as its graphical capabilities.


★★★★★ A very accessible introduction to modelling business scenarios.
By Bill Neaves on March 22, 2018 (on the Canadian Amazon site)
A great overview on business analysis and modelling as a discipline. It is a good addition to my my library on using R as an alternative to spreadsheets. Well done.

★★★★★ A great start on modeling complex business systems
By JAD_ClimBiz on March 20, 2018
I had the good fortune to find Business Case Analysis with R, by Robert D. Brown III, when I was looking for examples of business simulation software. It turned out to be just what I need to get started.

The influence diagrams are especially useful in showing how many factors interact to shape the evolution of a complex business system, especially with and without the many possibilities for uncertainty that must be treated probabilistically.

With the guidance provided by the book, I was able to develop a very useful model of climate change impacts on an electric utility, including probabilistic demand and production of hydro and solar power. The numerical estimates were combined with judgments related to subjective criteria including profitability, reliability, and responsibility using the analytical hierarchy process to suggest an optimum generation asset configuration for the 21st century.


★★★★★ Build better models
By Salil A. Athalye on March 17, 2018
I am one of the fortunate people who made a connection with Robert Brown by purchasing his LeanPub publication entitled Business Case Analysis with R – A Simulation Tutorial to Support Complex Business Decisions. The book comes in at under 100 pages, and the price is less than a week’s worth of Espresso shots, but the value is incalculable.

The general received wisdom for most laypeople in this field is: 1) pick a tool 2) develop a spreadsheet 3) pick one or more distributions based on the similarity to the shape of the distribution and your data and then 4) go wild. Robert, on the other hand, takes great pains to present an effective thought process and workflow and gently guides the reader to help them implement a working example model. At the same time he is imparting wisdom from deep expertise in this field and uncovering some of the theoretical underpinnings that informs model builders in the art and practice without drawing out the heavy duty statistics and mathematics. There are some hidden gems in the R code and some more in the margins. There is an underlying sense of humor and passion for sharing this knowledge evident in the writing.

I am familiar with R but still learned many new tips and tricks. The use of functional programming constructs such as sapply took a while to get used to and in many cases I chose to use loops to help myself while I learned the material. Coming from a 2D spreadsheet world you have to be able to think in terms of data structures and data flows and transformations. Kind of like relearning linear algebra. My tip is to use str() with some of his data structures so you can understand how the indices are traversing through the data structures and how the code is transforming the structures. I must say it does make you appreciate what Excel is doing underneath the hood!

Using this book, I was able to design and implement a full business case simulation for our organization that incorporates uncertainty and risk. This helps us move from single point estimates to ranges and embody uncertainty and risk. And in short order I made it my own by incorporating reproducible research elements using knitr and I have plans to implement a front-end using Shiny. You can spend hundreds of dollars buying college textbooks on this subject matter but many of these books don’t help you actually start implementing a system and using it. That’s why this book is a hidden gem.

And so, why do I feel fortunate? Well, in asking Robert a few questions related to the material I received not only the answers, but also encouragement, perspective and expertise. The combination of all this goodwill flowing back feels like mentoring and I’m very grateful for Robert’s time.

So thank you Robert, for sharing your expertise and wisdom in this book. I highly recommend it to anyone who is not a full time Decision Professional and yet needs to understand the underpinnings of the field and who is ready to move away from Excel spreadsheet hell and leverage the power and flexibility of R.

I look forward to buying new publications from Robert Brown and highly encourage you to buy this book.


★★★★★ Concise tutorials on decision analysis using R language
By AndrewG on March 17, 2018
This book is a re-edited collection of four books originally self-published book on leanpub.com. The book contains four main sections, 1) Business Case Analysis with R, using R programming language to simulate four complex business decisions 2) It's Your Move, about tackling valuable strategic decisions 3) Subject Matter Expert Elicitation Guide, to help assess uncertainties when little data is available, and 4) Information Expresso, about using the value of information (VOI) to make clear decisions efficiently. There also five appendicies: A) Deterministic Model, B) Risk Model, C) Simulation and Finance Functions, D) Decision Hierarchy and Strategy Tables, E) VOI Code Samples. These are a collection of R code and Excel templates explained in the body of the text.

In 2017, I had purchased the self-published ebook mainly looking for R code for concrete examples of Decision Analysis in business. I had purchased previous similarly titled books for Excel, but found them lacking in depth. The author takes an imaginary business, describes the inter-related concerns of revenue and costs to calculate a range of net present values. Then the authors adds additional assumptions and code to model risks, showing the effect on the previous model. It is instructive to see the effect of assumptions on changes on a case by case basis. What the mind has a hard time visualizing, the graphic outputs clearly point out. Of course, the R code can be modified to model other businesses.

I anxiously awaited the release of this book and pdf edition, I am quite pleased with the final product. I found the author's examples and explanations appropriate and clear. The R code, available on the books website, ran in RStudio without difficulty, producing outputs and plots exactly as published.

If your looking for a single source book for concepts and R code on applying Decision Analysis on more complicated, interconnected decisions, I highly recommend this book. The content the first section alone, justifies the price of the entire book. The R code is commented well enough that a programmer could easily translate the algorithms to other programming languages.