Dec22 SAS ODA Update - Impact on SASPy Users

During December 2022, SAS ODA received substantial updates - see the upgrade page for details. It’s really nice to see that ODA is now using SAS 9.4M7. If you are a SASPy user, you may now bump into an error while logging in with your existing configuration. The specific error I encountered was “An exception was thrown during the encryption key exchange.” Nothing is wrong with your password, however. Due to changes with the AES encryption, SASPy will now need access to 3 encrpytion JARs in its classpath. See this note in the official SASPy docs. Download the required JAR files here (requires login) and add them to your SASPy package’s path here: ...

Jan 9, 2023 · 1 min · 130 words · D. Michael Senter

Setting up a Virtual Lab Computer

Dealing with computer resources in a modern lab can be tricky. Even if all participating researchers have laptops, a central location for storage or to host licensed software is desirable. While a physical computer can be setup for such a use, that is not always the most desirable solution. We want multiple people to have concurrent access to our resources while providing safe, sandboxed environments. Sometimes lab members want/need root access to learn certain tasks, but we don’t want them to accidentally take down our carefully configured systems. This leads us to the idea of containerization which can provide various failsafes. In this post, we will be setting up the LXD (ArchWiki) environment as a virtual lab computer. This solution gives an entire working system, including systemd, similar to but more lightweight than VirtualBox. ...

Jan 6, 2023 · 10 min · 1946 words · D. Michael Senter

Missing Data Mechanisms

Understanding whether a variable’s missingness from a dataset is related to the underlying value of the data is a key concept in the field of missing data analysis. We distinguish three broad categories: missing completely at random (MCAR), missing at random (MAR), and missing not at random (MNAR). In his book Statistical Rethinking, McElreath1 gives an amusing example to illustrate this concept: he considers variants of a dog eating homework and how the dog chooses - if at all - to eat the homework. The examples he give show substantial shifts in observed values, which make for a good illustration of the types of problems you might encounter. A lecture corresponding to the example from the book can be found on YouTube. In this post, I will first briefly review the different missing data mechanisms before implementing McElreath’s examples in SAS. ...

Jan 3, 2023 · 7 min · 1386 words · D. Michael Senter

Some CLI Tools

A few convenience CLI tools I find myself installing on new systems regularly.

Dec 7, 2022 · 4 min · 735 words · D. Michael Senter

CSV2DS

CSV2DS is a new program I wrote in Go to help me create minimum working examples for SAS that can be shared as a single SAS script.

Nov 23, 2022 · 3 min · 577 words · D. Michael Senter

Setup an Arbitrary WSL2 Distro

Windows Subsystem for Linux (WSL) is an important part of my daily work flow. Unfortunately, the main distro supplied by Windows is Ubuntu, which - for a variety of reasons - is not exactly my favorite distro. Luckily, WSL2 allows you to import an arbitrary Linux distro to use instead. I got the idea from an article (Dev.to) by Jonathan Bowman explaining how to get Fedora up and running in WSL2. This article summarizes the key points of Bowman’s post and includes information for my long time daily driver, Arch Linux. ...

Nov 14, 2022 · 4 min · 679 words · D. Michael Senter

SAS Markdown for Reproducibility

One of the coolest packages for R is knitr. Essentially, it allows you to combine explanatory writing, such as a paper or blog post, directly with your analysis code in a Markdown document. When the target document is compiled (‘knitted’), the R code in the document is run and the results inserted into the final document. The target document could be an HTML or a PDF file, for example. This is great for many reasons. You have a regular report you want to run, but the data updates? Just re-knit and your entire report is updated. No more separate running of the code followed by copying the results into whatever software you use to build the report itself. This makes it not just less cumbersome, but less error prone. It also improves reproducibility. Somebody wants to see your work, perhaps because they are unsure of your results or they want to extend your work? You can share the markdown file and the other party can see exactly what code was used to generate what part of your report or paper. ...

Nov 11, 2022 · 5 min · 964 words · D. Michael Senter

Does it ever make sense to play the Lottery?

In a first semester probability course, students encounter combinatorics and point estimates such as the mean and median of a data set. A common example is the low odds of winning the lottery. When discussing the topic of point estimates, students are exposed to the idea of a “fair bet” or “fair game” - one in which the expected value of the random variable associated with the game is equal to the cost of participation or zero, depending on if a fixed cost is included in the game or tracked separately. This year, the Mega Millions had a jackpot in excess of one billion dollars. This had me thinking - mathematically, this is likely a fair game. But I still would expect to loose out playing it. In this article, I want to explore this idea further using the Mega Millions lottery as a particular example. ...

Sep 30, 2022 · 7 min · 1412 words · D. Michael Senter

Life Expectancy Data

A look at the distribution of age at death based on social security mortality tables to see how long we can expect to be in retirement for.

Sep 2, 2022 · 4 min · 800 words · D. Michael Senter

Is it better to buy or rent housing?

This post is a follow-up to my post on how to load data from Zillow. Housing prices have soared through the COVID-19 pandemic, leading to a lot of discussion about housing affordability. The quickly growing home values coupled with the subsequent raising of interest rates on mortgages are seeing more and more people priced out of the ability to purchase a home. While rent prices have increased as well, they haven’t increased as sharply as home prices. ...

Aug 20, 2022 · 14 min · 2905 words · D. Michael Senter