Books

In development

R for Social Science

An English-language textbook for social-science research

An introduction to R, tidystata, and the tidyverse for students and researchers, with no prior programming experience required. Practical examples use social-science data to teach data preparation, exploration, visualization, and regression, with exercises and worked answers.

The current development edition contains 28 chapters, a preface, and a General Social Survey (GSS) data appendix. The earlier Chinese-language tidyverse 入门 remains available as a reference for readers of that edition.

Stata to R Reference

Stata 转 R 参考手册

A technical reference book for Stata users moving to R, available in English and Chinese. Nearly 1,800 paired examples across 41 chapters connect familiar commands with R approaches, helping readers apply what they already know while learning a different way of working.

The book serves as a practical companion to research, from preparing data to developing more advanced analyses. Readers can follow a topic in depth or consult individual examples as questions arise.

Claude Code 社会科学配置指南

A configuration guide for social science researchers

Written in collaboration with Xinyang Tang, this book introduces social science researchers (using R, Stata, and Python) to Claude Code (or other agentic AI tools) — from installation and daily use to advanced topics like sub-agents, MCP servers, and hooks. The book is written in Chinese.