Blog
3 Examples of Target Trial Emulation I tried to outline the target trial emulation process in previous posts. This process has been designed to guide you towards asking well-defined causal questions and estimating answers to those questions in a way that can prevent common biases. In this post I want to go through some published applications of this process to understand it better.
Single-World Intervention Graphs in 10 Examples SWIGs are a great first mathematically rigorous language for all aspiring sciences. Counterfactual thinking makes it clear that causality is about hypotheticals, like the expected outcome if some variables were set to some values for everyone. A causal diagram makes it clear which variables are assumed to be conditionally independent in the hypothetical world. Other assumptions can then be used to bridge the rest of the gap between counterfactual and observed measures, if logically possible.
Target Trial Emulation in Practice Target trial emulation is a unified process for estimating well-defined causal effects using both randomized and nonrandomized data. Coupled with simulation to approximate the g-formula, it forms a satisfyingly general yet relatively simple process that can be trusted to lead to the best estimate the data can provide.
Matrices To The Rescue Working with datasets involves a lot of numbers in lists and tables and adding and multiplying such things together. It can be easy to forget that math has a great abstraction for these kind of operations. With matrix operations, you don't need to think about loops and one-by-one operations as much.
Statistical Notation in English in 23 Examples Understanding statistics papers undoubtably requires years of mathematical training. I have effectively zero but I'd still want to be able to read some of the mathematical language used to describe statistical (probabilistic) methods for data analysis. So here's a list of examples that can teach you the basics.
Research Software Engineering: 3 Things Any Researcher Should Know As the years go by, it's clearer and clearer that software engineering needs to be an integral part of science. Openness alone demands it. Fortunately, software engineering for science is way simpler than developing complicated apps for millions of users. A few simple principles should be enough.
Interpreting Models Has Never Been Easier Interpreting raw model coefficients can be difficult and confusing. It's much better to interrogate the model and get direct answers to the questions you actually care about.
Learning Probabilistic Programming in Stan From 10 Examples Stan is a very mature probabilistic programming language. Learning a new language (especially domain-specific) can be difficult, time-consuming, and hence off-putting, but in the case of Stan, the curve is not too steep.
Vaikutusta, harhaa vai sattumaa? 5 väylää luotettavampaan syypäätelmään 5 harhaa jotka vääristävät terveystietoa 4 tärkeintä opetusta terveyden hoidon läntisestä historiasta Mitä evoluutio oikeasti sanoo terveyden hoidosta? Hyötyä vai huuhaata? Vain reilu vertailu vahvistaa (8 kriteeriä) 9 huonoa ja tavallista syytä uskoa terveysväitteisiin 10 periaatetta jotka tekevät terveystiedosta luotettavaa (tai roskaa) 5 syytä miksi myös terveysihmeet ovat usein sattumaa Difference Between Good And Bad Writing – And How to Improve You can write pretty well by finishing texts persistently, understanding the readers, being densely informative, touching emotions, and keeping your language as simple as possible.
Understanding Svelte/SvelteKit By Reading The Source Of This Website Svelte is a component hiearchy and JavaScript-CSS-HTML-based language for writing web applications. SvelteKit is a framework for developing Svelte apps.
Understanding AlphaZero by Reading Source Code in Julia AlphaZero showed that combining deep neural networks, tree search, and high-performance computing can give you a very intelligent problem-solving method. Best of all, it's relatively simple to see for yourself in Julia.
How Probabilistic Programming Allows Automatic Causal Inference Generative models can be written with causal assumptions included. Comparing predictions from such a model gives valid estimates of causal effects, similar to more complicated estimators derived from theories of causal inference, but with more accurate accounting of uncertainty.
Understanding the Parametric G-Formula Through Source Code Analysis If you are better at reading code than math, you can learn mathematical methods better by reading their implementations. Let's try this with the parametric g-formula.
Why Causal Mediation Is More Important Than I Previously Thought Total effects can be very misleading if you don't know well how they are mediated.
Target Trial Emulation Summarized A framework for better science from both experimental and observational data.
Causal Inference With Time Varying Variables The Basic Idea of Causal Inference in Julia GLM Causal inference should be done in a mathematically rigourous way. A valid inference requires a long list of assumptions – like consistency, positivity, and exchangeability within levels of confounders – and procedures like standardization, inverse-probability, and g-estimation.
The Basic Idea of Probabilistic Programming in Julia Turing Uncertainty can be fully expressed in a mathematically rigorous way using probability distributions and the Bayes rule. Combining this with general-purpose programming, one can freely describe almost any kind of model with uncertainty that can be updated using observations.
The Basic Idea of Deep Learning in Julia Flux Deep learning methods seem to be able to fit almost any function when given enough data, parameters, and optimization cycles. And the first step is just to start nesting linear models and following the gradients of loss functions.
Automatic Subgrouped Summaries (Table 1) in R Benjamini-Hochberg Adjusted Mann Whitney U Tests in R Extract The First Number in A String/Character in R Extract Percentages in Characters/Strings in R Import Tidy KEGG Annotations in R Use KEGGREST to get pieces and tidyverse to wrangle them into a single tidy annotation dataframe.
Mutating Dataframe Variables Using A One-to-One Table in R Nesting Dataframes with Different Sets of Values in R Pearson Correlations Between Two Tidy Dataframes in R Pretty Numbers in R When Simple Rounding Is Not Enough Print Names Of Objects in the Global Environment in R Recoding Dataframe Variables Using A Metadata File in R Recoding IDs Using A Metadata File in R Renaming Dataframe Variables Using A Metadata File in R Round Numbers To Nth Non-Zero Decimal In R Select A Column That Maximizes A Function in R Summarize All Variables Automatically in R Taking Random Subsets of Dataframes in R From Tidy Data To A Named List in R Tidy Topological Overlap Matrix (TOM) Networks in R Tidy Uniform Manifold Approximation And Projection in R Venn Diagrams for Tidy Data in R A Simple Way to Visualize Missing Values in R Just arrange rows differently and look at missing cells in a table.
How To Organize Messy Personal Archives in Messy Terminal Bash This script is neither smart, fast, or safe so be sure to always have backup copies and understand every line before running. Mostly you might end up learning something about bash.