Statistical analysis

Depression and Substance Use in the NSDUH

Summary

Three survey years pooled give 174,407 records, of which 134,897 adults have a usable depression outcome. Weighted to the population, 8.44% report a past-year major depressive episode; the unweighted figure is 11.29%.

A penalised logistic regression on seven predictors reaches AUC 0.7406. At the default cut-off it is 88.7% accurate and flags 805 people out of 134,897, which is the clearest demonstration on this site of why accuracy alone is not a useful measure.

Ignoring the survey design also understates standard errors by a factor of roughly 1.74 to 1.96, so confidence intervals computed without it are around half as wide as they should be.

1. Who is in the analysis

Pooling 2022, 2023 and 2024 gives 174,407 records. The analysis sample is 134,897. The 34,875 difference is worth stating precisely, because it is not what it first looks like.

How the analysis sample is arrived at.
StageRecordsWhy
Pooled, three years174,407All respondents, all ages
Aged 12–17−34,875Never asked the adult depression question. Adolescents answer a different instrument.
Adults missing the outcome−4,635Genuine item non-response
Analysis sample134,897Adults 18 and over

Nearly nine in ten of the dropped records are adolescents who were never eligible to answer. Treating that as missing data would be a mistake: it is a restriction on the population. Every result here describes adults, and any statement about "Americans" that includes teenagers would be wrong on this evidence.

Pooling three years also requires dividing each respondent's weight by three. Without that, the weighted totals describe a country three times too large.

Where else data is missing

Where the data is missing Records with no value, out of the pooled file. Two variables account for almost all of it. AMI 135,196 MDE 39,477 HEALTH 79 IRSEX none CATAG6 none INCOME none ALC_PASTMO none MJ_PASTMO none CIG_PASTMO none Records with a missing value
Figure 1. Records with no value, by variable, across the pooled file.
Missing values by variable, pooled across the three years.
VariableMissing% of pooled file
AMI135,19677.52%
MDE39,47722.63%
HEALTH790.05%
IRSEX00.00%
CATAG600.00%
INCOME00.00%
ALC_PASTMO00.00%
MJ_PASTMO00.00%
CIG_PASTMO00.00%

Almost everything is complete. The two exceptions are the depression and mental-illness measures, and as set out above, most of that is adolescents who were never asked rather than adults who declined. Self-rated health is missing for a few dozen people. The substance and demographic variables have no missing values at all, which is unusual and reflects how much editing and imputation SAMHSA does before release.

2. Looking around first

Before any model, the simple percentages. These are weighted, so they estimate the adult population rather than describing the respondents.

Substance use and depression, by survey year Weighted to the population. Three years, and very little movement between them. 2022 2023 2024 0% 15% 30% 45% 60% Alcohol 51.8% overall Marijuana 16.2% overall Cigarettes 14.9% overall Major depressive episode 8.4% overall
Figure 2. Past-month substance use and past-year depression, by survey year.

The striking thing is how little moves. Across three years there is no meaningful trend in any of the four measures. That is worth knowing before reading anything into year-to-year differences, and it is a good reason to pool the years rather than compare them.

Who reports depression Weighted percent with a past-year major depressive episode. Sex Male 6.5% n=60,307 Female 10.3% n=74,590 Household income <$20K 11.2% n=22,429 $20-49K 9.6% n=35,669 $50-74K 8.9% n=20,061 $75K+ 6.8% n=56,738 0% 5% 10% 15% 20%
Figure 3. Depression by sex and by household income.

Women report depression at roughly 1.6 times the rate of men. Income shows a gradient, with the lowest bracket highest, but it is shallow compared with age or self-rated health, and section 6 shows it disappears once the other variables are known.

The outcome itself

The outcome is rare, and that is the whole problem Adults in the analysis sample, by whether they reported a past-year episode. No 119,664 (88.7%) 11.3% Yes: 15,233 people A model that answers “no” to everyone is right 88.7% of the time.
Figure 4. The two classes of the outcome in the analysis sample.

119,664 adults (88.7%) reported no depressive episode; 15,233 (11.3%) did. This picture is the single most important thing for understanding section 7. Any classifier can score 88.7% accuracy on this outcome by never predicting the minority class, and one of ours does exactly that.

3. The survey design, and what ignoring it costs

NSDUH over-samples some groups by design. A respondent's weight says how many people they stand for, and the stratum and replicate identifiers describe how the sample was drawn. All three ship with the public-use files.

It moves the estimates

Prevalence among adults, computed two ways from the same respondents.
MeasureUnweightedWeightedDifference
Alcohol, past month52.65%51.80%+0.85
Marijuana, past month19.32%16.22%+3.10
Cigarettes, past month14.34%14.86%-0.52
Major depressive episode, past year11.29%8.44%+2.85

Depression and marijuana move most, both downward: 11.29% to 8.44% and 19.32% to 16.22%. Both are behaviours concentrated in younger adults, and younger adults are over-represented among respondents.

Depression by age, both ways Within an age band the two agree. The overall rate does not, because the sample over-represents the young. Unweighted Weighted 0% 5% 10% 15% 20% Percent with past-year MDE 18-25 17.3% / 17.8% 26-34 12.5% / 12.6% 35-49 9.2% / 8.2% 50-64 6.3% / 5.9% 65+ 3.1% / 2.9%
Figure 5. Depression by age band, both ways.

The mechanism is visible here. Within an age band the two figures almost agree. It is the mix of ages that differs between the sample and the country, so only the overall figure moves. That is what weighting is for, and it is why an unweighted national rate can be wrong even when every subgroup rate is nearly right.

It changes how precise the estimates are

Respondents are drawn in clusters rather than independently, so they carry less information than the same number of independent draws would. A model that ignores this reports standard errors that are too small.

How far out the standard errors are when the design is ignored Ratio of design-adjusted to naive standard error. 1.0 would mean no difference. ALC_PASTMO x1.89 MJ_PASTMO x1.96 CIG_PASTMO x1.93 IRSEX x1.90 CATAG6 x1.85 INCOME x1.74 HEALTH x1.76 1.0 (no effect) 1.5 2.0 Standard error, design-adjusted relative to naive
Figure 6. Design-adjusted standard errors relative to naive ones, same model.
Standard errors from the same logistic regression, with and without the design.
PredictorNaive SEDesign SERatio
ALC_PASTMO0.018950.03575×1.89
MJ_PASTMO0.020960.04115×1.96
CIG_PASTMO0.024480.04736×1.93
IRSEX0.019010.03621×1.90
CATAG60.008170.01514×1.85
INCOME0.008160.01418×1.74
HEALTH0.010430.01836×1.76

Every standard error grows by between 1.74 and 1.96 times. A confidence interval built on the naive figures is roughly half the width it should be, and a p-value computed from them is correspondingly optimistic. Nothing here reverses a conclusion, because the effects are large and the sample is enormous, but the reported precision would be wrong.

The design-adjusted figures use the stratum and replicate identifiers as the clustering unit. This captures the clustering and the weighting but not the gain from stratification, so it is approximate and tends to be conservative. Read the ratio as the rough scale of the error, not an exact design effect.

4. Who reports depression

Past-year major depressive episode among adults, by subgroup.
GroupnUnweightedWeighted
Sex
  Male60,3078.44%6.47%
  Female74,59013.60%10.33%
Age band
  18-2540,60017.34%17.76%
  26-3427,41412.49%12.62%
  35-4936,5139.17%8.22%
  50-6415,0696.30%5.94%
  65+15,3013.07%2.91%
Household income
  <$20K22,42914.21%11.24%
  $20-49K35,66912.70%9.57%
  $50-74K20,06111.85%8.91%
  $75K+56,7389.05%6.77%
Self-rated health
  Excellent25,9574.52%3.66%
  Very good49,7038.62%6.01%
  Good42,49513.79%9.95%
  Fair or poor16,74223.37%16.60%

The age gradient is the strongest pattern in the data, and self-rated health is the strongest single correlate of all. Both are far more informative than any individual substance measure. Income shows a gradient too, but a shallow one, and it turns out to add nothing once the other variables are known.

5. Squeezing seven variables into three

Seven measures is not many, but they overlap: age, income and health move together, and so do the three substances. Principal components analysis rewrites them as a smaller set of combined scores that carry most of the same information, which makes the grouping in the next step tractable.

The variables are on different scales, so they are standardised first. Without that, a variable coded 1 to 6 would dominate one coded 0 or 1 purely through its range.

How much each component carries Bars are variance per component, the line is the running total. Three reach 56%. 0% 25% 50% 75% 100% 21% PC1 18% PC2 16% PC3 14% PC4 11% PC5 10% PC6 9% PC7
Figure 7. Variance carried by each component, with the running total.
Variance explained by the leading components.
ComponentVarianceCumulative
PC120.85%20.85%
PC218.39%39.23%
PC316.32%55.56%
PC414.05%69.61%
PC511.29%80.90%

The first component carries 20.9%, the second 18.4%, and three together 55.6%. That is a modest reduction rather than a dramatic one. These seven measures genuinely do carry distinct information, so the components should be read as a convenient summary rather than as hidden traits.

What the components actually mean

What the first two components mean Each arrow is one variable. Arrows pointing the same way move together; opposite ways, apart. ALC_PASTMO MJ_PASTMO CIG_PASTMO IRSEX CATAG6 INCOME HEALTH PC1 (21% of variance) PC2 (18%)
Figure 8. The correlation circle. Arrows in the same direction move together; opposite directions move apart.

This is the figure that makes PCA interpretable. Each arrow is one original variable, placed by how strongly it loads on the first two components. Arrows pointing the same way are variables that rise and fall together. Arrows pointing opposite ways move in opposition. A long arrow is well represented by these two components; a short one is not.

Two things fall out of it. The first component contrasts cigarette and marijuana use, together with poorer self-rated health, against higher income. It is close to a disadvantage-and-heavy-use axis: those three rise together and run opposite to income. The second component picks out alcohol and income moving together, against being female and in poorer health, which separates social drinking from everything else.

Note also which arrow is short. CATAG6, the age band, barely registers on either component, so age is poorly represented by this two-dimensional summary. That is a useful warning: age is the second strongest predictor of depression in section 7, and it is nearly invisible here. A variable can matter enormously for an outcome and still contribute little to the main axes of variation among the predictors.

Choosing how many groups

Choosing how many groups Tightness of the clusters as k increases. The bend is where extra groups stop paying. 1 2 3 4 5 6 7 8 k = 4 chosen Number of clusters (k) Within-cluster spread
Figure 9. Cluster tightness as k increases, computed on a 25,000-row subsample.

K-means needs to be told how many groups to find, and there is no correct answer, only a reasonable one. The elbow plot shows how tightly the groups fit as k rises. Tightness always improves with more groups, so the question is where it stops improving quickly. The bend here is around four, which is where extra groups stop buying much.

6. The four groups, and what defines them

Cluster numbers are arbitrary, so each group is named from its own profile. These are the "natural types" the analysis set out to look for, and it is worth being precise about what each one means rather than leaving the labels to do the work.

20%
Polysubstance users

Very high co-use of alcohol, marijuana and cigarettes together. Alcohol 83.6%, marijuana 80.1%, cigarettes 48.5%. Depression 19.6%. n = 26,510.

28%
Younger low-use

Low on every substance. The youngest group, and the lowest income. Alcohol 21.4%, marijuana 5.2%, cigarettes 1.5%. Depression 11.1%. n = 37,171.

34%
Higher-income drinkers

Drink, but almost nothing else. The oldest and highest-income group, and the healthiest. Alcohol 79.9%, marijuana 4.1%, cigarettes 1.5%. Depression 6.2%. n = 45,853.

19%
Older cigarette users

Low alcohol and marijuana, but the highest cigarette use and the poorest self-rated health. Alcohol 16.7%, marijuana 3.8%, cigarettes 20.7%. Depression 12.2%. n = 25,363.

Four groups, and what separates them Past-month use within each cluster. One group is defined almost entirely by marijuana. Alcohol Marijuana Cigarettes Cluster 1 19.7% of sample, n=26,510 MDE 19.6% Cluster 2 27.6% of sample, n=37,171 MDE 11.1% Cluster 3 34.0% of sample, n=45,853 MDE 6.2% Cluster 4 18.8% of sample, n=25,363 MDE 12.2% 0% 25% 50% 75% 100% Percent of cluster reporting past-month use
Figure 10. Past-month use within each group, with the depression rate alongside.
The four groups. Percentages are past-month use within the group.
Groupn% of sample AlcoholMarijuanaCigarettes MDE
Polysubstance users26,51019.7%83.6%80.1%48.5%19.6%
Younger low-use37,17127.6%21.4%5.2%1.5%11.1%
Higher-income drinkers45,85334.0%79.9%4.1%1.5%6.2%
Older cigarette users25,36318.8%16.7%3.8%20.7%12.2%

The separation is mostly about marijuana and about how many substances travel together. Drinking on its own is common and, on this evidence, unremarkable: the largest group drinks at 79.9% and has the lowest depression rate of the four, at 6.2%. It is co-use that marks out the polysubstance group, whose depression rate is more than three times as high.

Clusters are a description, not a discovery. K-means returns four groups from any dataset, including one with no group structure at all. Refitting on twenty random subsamples returns cluster sizes of about 19%, 20%, 28%, 34%, stable to within 0.96 percentage points, so the partition is reproducible. Reproducible is not the same as real: these may be genuine types of people, or convenient cuts through a continuum. Nothing here distinguishes the two, and the names above are shorthand for a profile, not claims that these are natural kinds.

7. Predicting depression, and the trap in accuracy

Which predictors matter, and what the two penalties do

Logistic regression with a penalty term shrinks coefficients toward zero to stop the model chasing noise. The two standard penalties behave differently: LASSO can shrink a coefficient all the way to zero and so drops variables entirely, while ridge shrinks everything but keeps all of them.

What predicts depression, and how the two penalties compare Standardised coefficients. Right of the line raises risk, left lowers it. LASSO Ridge CATAG6 -0.62 HEALTH +0.61 IRSEX +0.29 MJ_PASTMO +0.22 ALC_PASTMO +0.06 CIG_PASTMO +0.05 INCOME -0.00 Standardised coefficient (log-odds)
Figure 11. Standardised coefficients under both penalties. Right of the line raises risk.
Standardised coefficients, ordered by size under LASSO.
PredictorLASSORidgeKept?
CATAG6-0.619-0.619kept
HEALTH+0.609+0.608kept
IRSEX+0.286+0.286kept
MJ_PASTMO+0.220+0.220kept
ALC_PASTMO+0.062+0.063kept
CIG_PASTMO+0.054+0.054kept
INCOME-0.002-0.002kept

The two agree closely on both order and size, which is reassuring: the result is not an artefact of the penalty chosen. CATAG6 and HEALTH dominate, both far ahead of any substance measure. Among the substances, marijuana (+0.220) is roughly three times alcohol (+0.062), which is the basis for the claim that marijuana is the substance most associated with depression.

Income is the interesting case, at -0.002: close to nothing once age, sex, health and substance use are known. The gradient in Figure 3 is real, but it appears to run through those other variables rather than adding anything of its own.

These are log-odds on standardised predictors, so they compare like with like. A coefficient of +0.220 does not mean marijuana users are +0.220 times more likely to be depressed; it means a one standard deviation change in that predictor moves the log-odds by that much. The ratio between two coefficients is meaningful; the number on its own is not, without a baseline.

A tree tells the same story differently

The classification tree, top three splits Each box shows the share of people reaching it and how many of them reported depression. HEALTH <= 2.5 11.3% dep. CATAG6 <= 3.5 7.2% dep. CATAG6 <= 3.5 16.5% dep. HEALTH <= 1.5 10.0% dep. CATAG6 <= 4.5 3.9% dep. HEALTH <= 3.5 23.6% dep. HEALTH <= 3.5 10.6% dep. 11.6% 5.8% dep. 18.8% 12.6% dep. 14.6% 5.2% dep. 11.1% 2.2% dep. 15.1% 20.0% dep. 5.0% 34.4% dep. 16.4% 8.1% dep. 7.5% 16.0% dep. Shaded boxes have above-average depression rates
Figure 12. The classification tree, top three splits. Shading marks branches with higher depression rates.

A classification tree asks a sequence of yes-or-no questions. Its first is HEALTH <= 2.5: is self-rated health at least "good"? That the tree independently picks health as the single most useful question, when the regression also ranked it top, is a stronger result than either method alone.

Reading down the branches, the highest-risk path is poor health combined with younger age, and the lowest is good health with older age. The tree finds no interaction the regression missed, which is itself informative: the relationships here are close to additive.

Then the model is asked to make decisions

A penalised logistic regression on the seven predictors, evaluated by cross-validation, reaches an AUC of 0.7406. AUC is the probability that a randomly chosen person with depression is ranked above a randomly chosen person without it, so 0.7406 means the model carries real signal.

Now the same model, judged by accuracy. It is 88.7% accurate. It also flags 805 people out of 134,897 as depressed, when 11.29% of the sample actually report an episode. Cohen's kappa is 0.0401, effectively zero.

The model achieves 88.7% accuracy by predicting "not depressed" for almost everyone. With an outcome that occurs in about one in nine adults, always guessing "no" is right about eight times out of nine. Accuracy rewards that. It is not a useful model at this cut-off, and accuracy is the metric that hides it.

The failure is in the decision rule, not the model. The ranking is good; the default 0.50 cut-off is simply far above where the probabilities live for an outcome this rare.

The model ranks well; the default cut-off throws that away Same model, same AUC. Only the probability at which a case is flagged changes. Sensitivity % flagged cut at 0.50 sens 3%, flags 1% cut at 0.30 sens 16%, flags 5% cut at 0.20 sens 39%, flags 15% cut at 0.15 sens 54%, flags 25% cut at 0.10 sens 74%, flags 42% 0% 25% 50% 75% 100% Percent
Figure 13. The same model at different decision thresholds. AUC is identical throughout.
One model, several cut-offs. The shaded row is the default.
Cut-offSensitivitySpecificity PrecisionKappaFlagged
0.502.7%99.7%50.8%0.040805 (1%)
0.3015.8%96.6%37.5%0.1676,421 (5%)
0.2039.0%87.8%29.0%0.23320,496 (15%)
0.1554.2%78.4%24.2%0.21234,070 (25%)
0.1073.5%61.8%19.6%0.16056,950 (42%)

At 0.50 the model finds 2.7% of people with depression. Lowering the cut-off to 0.20 finds 39% of them, at the cost of flagging 15% of everyone for a closer look. Which trade-off is right depends entirely on what happens to a flagged person: a cheap follow-up question justifies a low threshold, a costly intervention does not.

The imbalance is 7.86 to 1. Class weighting and resampling are the other standard responses, and they move the same trade-off along the same curve rather than creating new information.

8. Bottom-line findings

What the groups look like

Adults fall into four recognisable substance-use profiles. A third are higher-income drinkers who drink and do little else, and who have the lowest depression rate of the four. A quarter are younger low-use adults, low on everything. About a fifth are older cigarette users with the poorest self-rated health. And about a fifth are polysubstance users, combining alcohol, marijuana and cigarettes, with a depression rate more than three times the drinkers'. If any group is a public-health priority on this evidence, it is that last one.

What predicts depression

Self-rated health and age are the strongest predictors by a wide margin, and both a penalised regression and a decision tree agree on that independently. Women report substantially higher rates than men. Among substances, marijuana is the strongest signal, roughly three times alcohol or cigarettes. Income adds nothing once the rest is known, and LASSO shrinks it to near zero on its own.

What the survey design changes

Weighting moves the national depression estimate from 11.29% to 8.44%, because the survey over-samples the young and the young report more depression. Accounting for the clustering widens every standard error by 1.74 to 1.96 times. Neither changes a conclusion here, but both change what may honestly be claimed about precision.

What accuracy hides

The clearest methodological result on this page: a model can be 88.7% accurate, carry genuine signal at AUC 0.7406, and still be useless as a classifier, because it answers "no" to almost everyone. Accuracy is the metric that conceals this, and kappa of 0.0401 is the one that reveals it. Whether the model is useful depends entirely on where the decision threshold is set, and that is a question about consequences, not about statistics.

Honest limitations

Self-report. People under-report behaviour they expect to be judged for, and both the substance and the depression measures rest on what respondents said.

No causation. Cross-sectional data. Marijuana use and depression travel together; nothing here shows which came first, or whether something else drives both.

Coarse measurement. "Any use in the past month" treats one drink and daily heavy use identically. Severity, frequency and treatment are not in these variables.

Adults only. Everyone aged 12 to 17 is excluded by construction.

Most of the story is missing. Genetics, life events, social support and care history are not recorded here, which is why AUC 0.7406 is the ceiling rather than a disappointment, and why this model should never be read as diagnostic.

Scope choices. Seven of more than 2,600 available variables were used. Race, education and other substances were available and left out, and a different selection would give a different model.

9. How this was computed

All figures are computed from the SAMHSA public-use files with pandas, scikit-learn and statsmodels, using only the columns needed rather than all 2,650. Random seeds are fixed at 1; changing them moves the cluster labels and the last digits of the cross-validated figures.

The data is not in the repository. Aggregate results are written to tools/derived/, which is committed, so every page rebuilds without it. See the code page.