sconjoint: Structural Deep Learning for Conjoint Experiments

Welcome

sconjoint is an R package implementing the structural deep learning estimator for forced-choice conjoint experiments developed by Acharya, Hainmueller, and Xu (2026) (paper). The estimator embeds a deep neural network inside a random-utility logit so that each respondent’s preference vector \(\hat{\boldsymbol\beta}(\mathbf Z_i) \in \mathbb{R}^p\) varies smoothly and flexibly with her observed covariates \(\mathbf Z\). Double / debiased machine learning [DML; Chernozhukov et al. (2018)] inference delivers honest respondent-clustered standard errors on all population-level quantities.

The key advance over the standard AMCE framework (Hainmueller, Hopkins, and Yamamoto 2014) is that \(\hat{\boldsymbol\beta}(\mathbf Z_i)\) gives the joint distribution of preferences across attributes for each respondent, enabling structural quantities — marginal rates of substitution, counterfactual choice probabilities, preference polarization, willingness to pay — that require the full preference vector rather than one-attribute-at-a-time marginal effects.

This book is the primary user documentation for the package. It walks from installation through four complete worked examples, a simulation sanity check, and visualization options.

library(sconjoint)
data(package = "sconjoint")$results[, c("Item", "Title")]
     Item     
[1,] "br2017" 
[2,] "bs2013" 
[3,] "gs2020" 
[4,] "simdata"
[5,] "sw2022" 
     Title                                                               
[1,] "Ballard-Rosa, Martin & Scheve (2017) tax-plan conjoint"            
[2,] "Bechtel-Scheve (2013) climate-treaty conjoint"                     
[3,] "Graham-Svolik (2020) candidate-choice conjoint on democratic norms"
[4,] "Simulated conjoint with known ground truth"                        
[5,] "Saha-Weeks (2022) candidate-choice conjoint"                       

Bundled datasets

The package ships four conjoint datasets from published replication materials, covering candidate choice, democratic norms, tax preferences, and climate treaties.

ImportantBundled data are reduced-\(\mathbf Z\) illustrations

These bundled datasets carry a smaller set of respondent moderators (\(\mathbf Z\)) than the full replication data used in the paper (for example, sw2022 here exposes 3 moderators versus 19 in the paper). The worked examples are therefore illustrative of the workflow and API, not exact reproductions: the structural quantities they produce will differ from the paper’s published numbers, and the chapters deliberately avoid quoting fixed figures. Consult the paper for the definitive estimates. The examples also use light training settings (small K, n_epochs) for fast rendering; production fits use K = 10 and n_epochs >= 1000.

sw2022Saha and Weeks (2022): candidate choice

1,191 respondents \(\times\) 3 tasks \(\times\) 2 profiles = 7,146 rows.

Column Role Levels
agenda Attribute 3 levels
talent Attribute 7 levels
children Attribute 4 levels
cand_gender Attribute 2 levels
prior_office Attribute 2 levels
resp_female Moderator (\(\mathbf Z\)) binary
age Moderator (\(\mathbf Z\)) age in years
pid Moderator (\(\mathbf Z\)) factor: Democrat, Republican (GOP), Independent

gs2020Graham and Svolik (2020): democratic norms

1,605 respondents \(\times\) $$13 matchups \(\times\) 2 profiles = 41,314 rows.

Column Role Levels
copartisan Attribute Not, Co-partisan
p1 Attribute numeric 1–4 (econ. policy position)
p2 Attribute numeric 1–4 (social policy position)
dem_code Attribute 16-level factor (good governance, undemocratic, valence)
cand_sex Attribute Male, Female
cand_race Attribute White, Black, Hispanic, Asian
cand_pro Attribute 9-level factor (profession)
resp_ideo Moderator (\(\mathbf Z\)) 1–7 ideology
resp_pid Moderator (\(\mathbf Z\)) party ID (-3 to 3)
+ 10 more Moderator (\(\mathbf Z\)) Trump approval, demographics, attitudes

br2017Ballard-Rosa, Martin, and Scheve (2017): tax preferences

2,000 respondents \(\times\) 8 tasks \(\times\) 2 profiles = 32,000 rows.

Column Role Levels
rate_L10rate_375P Attribute numeric (tax rate %)
revenue_score Attribute numeric (\(-2\) to \(+2\))
resp_pid7 Moderator (\(\mathbf Z\)) 1–7 party ID
+ 11 more Moderator (\(\mathbf Z\)) demographics, beliefs, attitudes

bs2013Bechtel and Scheve (2013): climate treaties

2,500 respondents \(\times\) 4 tasks \(\times\) 2 profiles = 20,000 rows.

Column Role Levels
distribution Attribute categorical
emissions Attribute categorical
monitoring Attribute categorical
participation Attribute categorical
sanctions Attribute categorical
cost_usd Attribute numeric (USD/month)
resp_female Moderator (\(\mathbf Z\)) binary
resp_age Moderator (\(\mathbf Z\)) age in years
resp_ideo Moderator (\(\mathbf Z\)) 0–10 ideology

Organization

The user guide is structured into the following chapters:

Authors

How to Cite

Acharya, Avidit, Jens Hainmueller, and Yiqing Xu. 2026. sconjoint: Structural Deep-Learning Estimation for Conjoint Experiments — User Manual (v0.1.0). https://github.com/xuyiqing/sconjoint

@manual{sconjoint2026,
  title = {sconjoint: Structural Deep-Learning Estimation for Conjoint Experiments --- User Manual},
  author = {Acharya, Avidit and Hainmueller, Jens and Xu, Yiqing},
  year = {2026},
  note = {R package version 0.1.0},
  url = {https://github.com/xuyiqing/sconjoint}
}

Report Bugs

Please report any bugs by submitting an issue on GitHub or emailing Yiqing Xu (yiqingxu [at] stanford.edu). Please include a minimally reproducible example and your sessionInfo() output.

sconjoint: Lifecycle: experimental License: MIT