Shuhan (Alice) Ai
Home
Publications
Presentation
Blog Posts
Teaching
CV
Blog Post
Categories
All
(40)
Bayesian
(6)
C++
(2)
Causal Inference
(10)
Critical Quant
(1)
Kernel Density
(3)
ML
(6)
Multilevel Models
(1)
Python
(3)
R
(29)
SNA
(11)
Survival Analysis
(2)
Bayesian Methods Research Project: Can Community Service Foster Social Agency Among STEM Students?
Bayesian
R
This post shares my STATS C216 final project, where I used Bayesian regression models to examine whether community service participation during college is associated with…
Jun 27, 2026
Shuhan (Alice) Ai
Bayesian Methods Part 5: Multilevel Models and Partial Pooling
Bayesian
R
Multilevel Models
Part 4 led us into Bayesian regression with MCMC. We used
rstanarm
to fit logistic, probit, and ordered models, and the main lesson was computational: once the posterior is…
Jun 10, 2026
Shuhan (Alice) Ai
Bayesian Methods Part 4: Regression with rstanarm — From Logistic to Ordered Models
Bayesian
R
Part 1 through Part 3 we worked with one simple model the whole way: the Beta-Binomial. It was a friendly place to start because everything had a clean formula. The…
May 23, 2026
Shuhan (Alice) Ai
Bayesian Methods Part 3: From Prior to Posterior — Conjugacy, Prediction, and Credible Intervals
Bayesian
R
Part 1 of this series argued that Frequentist error rates can be misleading once the data are in hand. Part 2 dealt with where priors come from — both subjective histogram…
May 10, 2026
Shuhan (Alice) Ai
Bayesian Methods Part 2: Specifying Prior Distributions and the Road to Posterior Inference
Bayesian
R
In Part 1, we saw that Frequentist error rates can be misleading once data are observed, and that the likelihood function lets data speak directly about which parameter…
Apr 27, 2026
Shuhan (Alice) Ai
Bayesian Methods Part 1: An Introduction to Bayesian and Likelihood Thinking
Bayesian
R
Have you ever made a decision and thought, “there’s a 5% chance I’m wrong”? In Frequentist statistics, that 5% error rate is calculated
before
we see the data. But once…
Apr 7, 2026
Shuhan (Alice) Ai
SCM Part 4: Variation Analysis and Causal Fairness Analysis
Causal Inference
How do we know whether a disparity between two groups is caused by direct discrimination, indirect systemic factors, or simply reflects demographic differences? Traditional…
Mar 23, 2026
Shuhan (Alice) Ai
Machine Learning Methods: Diffusion Models in ML and Generative Processes Through Iterative Denoising
Python
ML
In our previous tutorial, we explored Transformers and how machines learn to understand language. Now we’re stepping into one of the most fascinating areas of modern AI…
Feb 27, 2026
Shuhan (Alice) Ai
SCM Part 3: Counterfactuals, the Art of Asking ‘What If?’
Causal Inference
In the previous post, we explored the identification problem — learning how to compute
\(P(y \mid do(x))\)
from observational data using the back-door criterion, front-door…
Feb 18, 2026
Shuhan (Alice) Ai
Machine Learning Methods: From RNNs to Transformers, How Machines Learn to Read
Python
ML
In our previous tutorial, we explored gradient descent and regularization. Now we’re going to introduce one of the most exciting frontiers: teaching machines to understand…
Feb 15, 2026
Shuhan (Alice) Ai
SCM Part 2: From Back-door to Do-Calculus
Causal Inference
In the previous post, we explored the foundations of Structural Causal Models (SCMs) and how they allow us to formalize causal relationships. We learned that SCMs provide…
Feb 7, 2026
Shuhan (Alice) Ai
Structural Causal Models (SCM) Part 1: Pearl’s Causal Hierarchy and Causality Identification
Causal Inference
In the previous post, we’ve learnt the foundations of Directed Acyclic Graphs (DAGs) and Structural Causal Models (SCMs). This tutorial builds on those foundations with a…
Jan 25, 2026
Shuhan (Alice) Ai
Machine Learning Methods: Gradient Descent & Regularization
Python
ML
In our previous tutorial, we explored the fundamentals of linear and logistic regression. Now we’ll dive deeper into the math that powers modern machine learning: gradient…
Jan 19, 2026
Shuhan (Alice) Ai
Machine Learning Methods: Regression & Prediction
R
ML
Machine learning begins with a simple yet profound idea: predicting one thing from another. This chapter explores how we can build increasingly sophisticated models…
Jan 10, 2026
Shuhan (Alice) Ai
Social Network Analysis R Tutorial Part 10: Longitudinal Network Analysis
R
SNA
So far in this tutorial series, we’ve explored various aspects of social network analysis using cross-sectional data—networks captured at a single point in time. However…
Dec 15, 2025
Shuhan (Alice) Ai
Predicting STEM Undergraduates’ Intentions to Pursue Scientific Research Careers
Kernel Density
C++
R
ML
This document presents the results and R analyses for the STATS 202A final project
Dec 3, 2025
Shuhan (Alice) Ai
Social Network Analysis R Tutorial Part 9: ERGM for Valued Networks
R
SNA
Welcome to Part 9 of the Social Network Analysis R Tutorial series. In our previous tutorials, we’ve been working exclusively with binary networks, where edges either exist…
Nov 29, 2025
Shuhan (Alice) Ai
Social Network Analysis R Tutorial Part 8: Triad Census Models
R
SNA
In this tutorial, we’ll explore triadic structures in social network and their role in understanding social relationships. We’ll learn how to use triad census models within…
Nov 28, 2025
Shuhan (Alice) Ai
Web Scraping in R: An Introduction Tutorial
R
Web scraping is the process of automatically extracting data from websites. In data analysis and research, we often need to collect data from online sources that don’t…
Nov 19, 2025
Shuhan (Alice) Ai
Social Network Analysis R Tutorial Part 7: Tapered ERGM Modeling, Social Balance and Transitivity, and MCMC Diagnostics
R
SNA
Welcome to Part 7 of our Social Network Analysis R Tutorial series! In our previous tutorial (Part 6), we explored the theoretical foundations of ERGMs, understanding the…
Nov 17, 2025
Shuhan (Alice) Ai
A Practical Machine Learning Guide in R
R
ML
Machine learning (ML) has become an increasingly valuable tool in educational research, offering powerful methods to predict student outcomes and identify key factors…
Nov 16, 2025
Shuhan (Alice) Ai
Social Network Analysis R Tutorial Part 6: ERGM Inference, Simulation, and Diagnostics
SNA
In this post, we’ll continue to explore the theoretical foundations of ERGM estimation, the computational methods used to fit these models, and the diagnostic tools for…
Nov 11, 2025
Shuhan (Alice) Ai
Calling C from R: A Performance Tutorial
R
C++
In data analysis and statistical computing, R is an excellent language for its expressiveness and extensive statistical libraries. However, R can be slow for certain…
Nov 3, 2025
Shuhan (Alice) Ai
Social Network Analysis R Tutorial Part 5: Hands-On ERGM Analysis
R
SNA
Welcome to Part 5 of our Social Network Analysis tutorial! In this hands-on session, we’ll work through three real-world examples of network modeling using ERGM.
Oct 31, 2025
Shuhan (Alice) Ai
Social Network Analysis R Tutorial Part 4: Introduction to Network Models and ERGM
R
SNA
Welcome to Part 4 of our Social Network Analysis tutorial series! In this post, we’ll dive into the theoretical foundations of statistical network models and introduce the…
Oct 29, 2025
Shuhan (Alice) Ai
Social Network Analysis R Tutorial Part 3: Computing Social Network Statistics (Descriptive Analysis & Degree Distribution Modeling)
R
SNA
In the previous tutorial, we explored the mathematical foundations of network statistics, learning about degree, centrality, diameter, and more. Now it’s time to get our…
Oct 23, 2025
Shuhan (Alice) Ai
Social Network Analysis R Tutorial Part 2: Mathematical and Statistical Foundations
SNA
Have you ever wondered how to quantify the “importance” of a person in a social network (like the following graph, which family is the most powerful one among Renaissance…
Oct 22, 2025
Shuhan (Alice) Ai
Real-World Practice with Kernel Density and Regression Diagnostics
R
Kernel Density
Welcome to this advanced tutorial on kernel density estimation! This guide builds on the foundational kernel concepts from the previous blog post where we covered:
Oct 20, 2025
Shuhan (Alice) Ai
Introduction to Kernel Density Estimation and Rejection Sampling
R
Kernel Density
This tutorial introduces kernel density estimation and rejection sampling using Los Angeles housing price data. These methods are fundamental for exploratory data analysis…
Oct 13, 2025
Shuhan (Alice) Ai
Social Network Analysis R Tutorial Part 1: Basic Visualization
R
SNA
Ever wondered how to map friendships, track protein interactions, or visualize who’s connected to whom in Renaissance Florence? This tutorial will walk you through the…
Sep 30, 2025
Shuhan (Alice) Ai
Survival Analysis R Tutorial
R
Survival Analysis
This tutorial provides R example for survival analysis using PhD dissertation defense timing as the primary example.
Jul 20, 2025
Shuhan (Alice) Ai
What is Survival Analysis?
R
Survival Analysis
This post will introduce survival analysis and its application in higher education research.
Jul 9, 2025
Shuhan (Alice) Ai
How to code Race?
R
Critical Quant
This post will show several ways of race coding in quantitative social science research.
Jun 25, 2025
Shuhan (Alice) Ai
Causal Inference in Network Data: A Tutorial
SNA
Causal Inference
This is a tutorial for the causal inference with network data.
Jun 20, 2025
Yingshi Huang, Shuhan (Alice) Ai, Kayla Teng, Detao Ma
Difference-in-Differences (DID) and Regression Discontinuity Design (RDD)
R
Causal Inference
This tutorial focuses on two widely-used quasi-experimental methods:
Difference-in-Differences (DID)
and
Regression Discontinuity Design (RDD)
.
May 17, 2025
Shuhan (Alice) Ai
Weighting Methods for Causal Inference
R
Causal Inference
In previous posts, we’ve explored the Potential Outcomes framework and matching methods for causal inference. Today, we’ll dive deeper into propensity score methods, which…
May 10, 2025
Shuhan (Alice) Ai
Matching Methods for Causal Inference
R
Causal Inference
Observational data rarely cooperate with our causal questions because treatment groups differ systematically from controls, confounding threatens validity, and randomization…
May 2, 2025
Shuhan (Alice) Ai
Causal Inference: An Introduction for Directed Acyclic Graphs (DAGs) and Structural Causal Models (SCM)
R
Causal Inference
Directed Acyclic Graphs (DAGs)
and
Structural Causal Models (SCMs)
are complementary frameworks for thinking about causality.
Apr 27, 2025
Shuhan (Alice) Ai
Causal Inference: An Introduction for Potential Outcomes Framework
R
Causal Inference
This post provides a introduction to the
Potential Outcomes Framework
(also known as the Neyman-Rubin Causal Model) for causal inference.
Apr 18, 2025
Shuhan (Alice) Ai
Welcome to My Blog
A space for sharing research and reflections.
Apr 1, 2025
Shuhan (Alice) Ai
No matching items