Software
Research software
An R package and a research dashboard, both in use beyond my own work.
The package fits a class of models that previously required proprietary software. The dashboard is still in service at Penn State.
surveymixr fitting a survey-weighted growth mixture model and plotting
the classes. Simulated data, for demonstration.
R package
surveymixr
Growth mixture models with complex survey designs
Growth mixture modeling is standard practice in developmental research, and so are
complex survey designs with stratification, clustered sampling, and probability
weights. Combining the two correctly has effectively required Mplus.
surveymixr does it in R, with sandwich standard errors that account for
the survey design.
I wrote it because the dissertation needed it: the UK Millennium Cohort Study is a stratified, clustered, weighted sample, and the mixture models in Paper 3 had to account for that.
What it implements
- Stratification, clustering (PSUs), and probability weights, with sandwich standard errors
- Bootstrap Likelihood Ratio Test (BLRT) and the Lo–Mendell–Rubin test for class enumeration, plus cross-validation
- Multiple random starts with convergence tracking and local-maximum detection
- R3STEP auxiliary-variable analysis with classification-uncertainty correction (BCH, ML, and manual)
- Continuous, binary, ordinal, and count outcomes; linear, quadratic, nonlinear, and free-basis growth
- Diagnostics for entropy, class proportions, influence, separation, and residuals
# install.packages("devtools")
devtools::install_github("siyangni/surveymixr")
library(surveymixr)
fit <- gmm_survey(
data = mcs_simulated,
id = "id",
time = "age",
outcome = "selfcontrol",
n_classes = 3,
growth_model = "linear",
strata = "stratum",
cluster = "psu",
weights = "weight",
starts = 500
)
summary(fit)
plot(fit, type = "trajectories")
diagnose_convergence(fit)
plot_trajectories() on simulated data with 4 strata, 80 PSUs,
and survey weights. Class means carry 95% survey-adjusted confidence intervals.
Deployed dashboard
American Authorship Database
Built as Data Engineer, Research Support, Office of Digital Pedagogies and Initiatives, Penn State·May–August 2025
A modular R Shiny application that lets humanities researchers search and analyze a historical publishing archive: 686 books, 65 authors, and 8.1 million recorded copies sold, published between 1843 and 1918. It is deployed and in ongoing use by the Penn State College of the Liberal Arts, under the Digital Liberal Arts Research Initiative.
Each view is a separate module over a shared data layer:
- Overview
- Book explorer
- Sales trends
- Author analysis
- Author networks
- Royalty analysis
- Income query
- Genre analysis
Skills
Methods and tools
- Longitudinal and dynamic models
- Structural equation modeling
- Growth mixture and latent class models
- Multilevel models
- Machine learning
- R
- Python
- PostgreSQL
- Stata
- Mplus
- LaTeX
- HTML