Predicting Political Party Membership: A Validated Decision Tree Approach
This decision tree analysis was conducted to test nonlinear relationships between a non-political subset of Outlook-On-Life (OOL) survey questions and the binary, target/predictor variable “Tea Party Membership” in 2012. In upcoming research, we look at subsequent election cycles (2016, 2020,2024) to verify alignment with MAGA/Trump support and stability of features.
Theoretical Context - The Insights of Dr. Ronald W. Walters:
The decision tree analysis that follows is grounded in the scholarly framework of the late Dr. Ronald W. Walters, a preeminent political scientist, and tenured faculty member in the Department of Government and Politics at the University of Maryland. Walters argued that a strong, often unstated, hostility fuels the modern conservative movement, generating policies that protect the interests of whites at the expense of others. Dr. Walters understood that the Tea Party’s power did not come from its stated commitments to fiscal conservatism nor limited government. Instead, he saw a movement animated by proxy issues – attitudes about race, immigration, and social change that could be expressed in seemingly race‑neutral language.
The decision tree analysis provides empirical evidence for this proxy structure. By modeling survey responses from nearly 2,300 Americans, the tree reveals a clear hierarchy of belief: what sorts of questions best predict Tea Party membership, and how those questions chain together. The results show that the most powerful predictor is not "lower taxes”, nor "smaller government,” but whether one believes blacks and whites have equal opportunity for acheivement. From there, views of undocumented immigrants becomes the decisive second split. This is not anecdote; it is the structure of the electorate captured in data. What follows is a detailed look at how the model was built, why rarity of the target required a weighting strategy, and the full decision tree that emerges.
Exactly 29 OOL questions served as possible explanatory variables in classification of responses to the question, “Tea Party Membership (TPM).” Care was taken to exclude questions related to political parties, groups, individuals, or topics that were also related to the target variable TeaPartyMem_b:
1. How optimistic are you that you will develop a serious and/or marital relationship? (Optmsm_Rlshp)
2. Are you extremely [optimistic/pessimistic], moderately [optimistic/pessimistic], or slightly [optimistic/pessimistic] (that you will develop a serious and/or marital relationship)? (Optmsm_Rlshp_ntr)
3. When you think about your future, are you generally optimistic, pessimistic, or neither optimistic nor pessimistic? (Optmsm_Futr)
4. [To own a home] For yourself and people like you, how easy or hard is it to reach these goals? (HardToOwnHome)
5. [To have a financially secure retirement] For yourself and people like you, how easy or hard is it to reach these goals? (HardToRetire)
6. [To send one's children to college] For yourself and people like you, how easy or hard is it to reach these goals? (HardToCollege)
7. [To become wealthy] For yourself and people like you, how easy or hard is it to reach these goals? (HardToWealth)
8. [To do better than one's parents did] For yourself and people like you, how easy or hard is it to reach these goals? (HardToBetterParents)
9. Society has reached the point where Blacks and Whites have equal opportunities for achievement. (BWEqulOppty)
10. Over the past few years, Blacks have gotten less than they deserve. (BlksLTDeserve)
11. Irish, Italians, Jews, and many other minorities overcame prejudice and worked their way up. Blacks should do the same without any special favors.
(BlksNoFvrIIJ0)
12. It's really a matter of some people not trying hard enough; if Blacks would only try harder they could be just as well off as Whites. (BlksTryHarder)
13. Generations of slavery and discrimination have created conditions that make it difficult for Blacks to work their way out of the lower class.
(SlavDiscrmHardForBlks)
14. Discrimination against Blacks is no longer a problem in the U.S.
(NoBlkDiscrm)
15. [Black people should teach their children to fight against racial discrimination as much as possible] How much emphasis or de-emphasis should Black people place on each statement in the education of their children? (BlkTchFightDisc)
16. What about Black women? Do you think that generally what happens in this country to Black women will have something to do with what happens in your life? (BlkwomEffect_b)
17. [Black people should teach their children to avoid behaviors that are characteristic of Black stereotypes] How much emphasis or de-emphasis should Black people place on each statement in the education of their children? (BlkTchAvdstyp)
18. [Black people should teach their children to be careful around the police] How much emphasis or de-emphasis should Black people place on each statement in the education of their children? (BlkTchCrfPpI)
19. [The police] How much do you think you can trust the following institutions? (TrustPolice)
20. Which of these classes would you say most members of your family belong to? (ClassFam)
21. Are you a citizen of the United States? (USCit_b)
22. Is anyone in your household on active duty in the U.S. Armed Forces, Military Reserves, or National Guard? (MilitaryHHAct_b)
23. How far along the road to your American Dream do you think you will ultimately get on a 10-point scale where 1 is not far at all and 10 nearly there? (RateDrmPath_10)
24. How would you rate people on welfare? (RatePplwelf_100)
25. How would you rate Latinos? (RateLatino_100)
26. How would you rate Blacks? (RateBlk_100)
27. How would you rate Asians? (RateAsian_100)
28. How would you rate Undocumented Immigrants? (RateUnDoc_100)
29. On a seven-point scale, do you think that Blacks and other minorities are treated the same as Whites in the criminal justice system or do not receive equal treatment? (BWEqulJust_7)
THE CHALLENGE - A Rare Target Variable:
Only 45 out of 2,294 respondents (≈1.96%) identified as Tea Party members (TeaPartyMem_b = 1). Without special handling, a classification model would simply predict “non‑member” for everyone – achieving 98% accuracy but 0% sensitivity. To avoid this, I used case weighting: observations with TeaPartyMem_b = 1 were given a weight of 34, while non‑members kept weight = 1. This effectively balanced the two classes during training, forcing the algorithm to pay attention to the rare but interesting group.
Model design & validation
Split criterion: Gini impurity (Entropy produced identical results)
Pruning method: reduced‑error pruning
Validation: 30% holdout sample (698 observations)
Final tree size: 8 leaves
All code was run in SAS Studio, using a custom macro that applies weighting and repeats the process for robustness.
THE DECISION TREE (step by step):
The final tree uses only four survey questions – a remarkably parsimonious set that still achieves strong predictive power.
**Root split**: belief in equal opportunity
Full question: "Society has reached a point where blacks and whites have equal opportunity for achievement" (BWEqulOppty)
--------------------------------------------------------------------------------------------------------
Left branch (BWEqulOppty = -1,3,4,5 or missing): respondents who do not strongly agree.
Training TPM = 15.7% (baseline is 1.96%, so this group is already more likely to be members).
Right branch (BWEqulOppty = 1,2): respondents who strongly/agree.
Training TPM = 62.4% – a dramatic jump.
Right‑branch subtree (believers in equal opportunity)
Split on RateUnDoc_100 – "How do you rate undocumented immigrants?" (0‑100 scale).
< 15.16 or missing (n=905): TPM = 75.1% (training) / 78.9%(validation).
Final split on RateLatino_100 – "How do you rate Latinos?" (0‑100 scale):
≥ 95.96 → TPM = 91.4% training / 94.4% validation. This leaf is almost pure Tea Party.
< 95.96 → TPM = 70.9% training / 75.8% validation. Still high.
≥ 15.16 (n=348): TPM drops to 29.3% training / 24.3% validation → predicts non‑member.
Left‑branch subtree (weak agreement on equal opportunity)
Split on BWEqulJust_7 – “On a seven-point scale, do you think that Blacks and other minorities are treated the same as Whites in the criminal justice system or do not receive equal treatment?” (values 1,5,9(refused to answer) vs. others).
Values 1,5,9 (n=462): TPM = 36.8% training / 43.6% validation.
Further split on RateUnDoc_100:
< 10.11 → TPM = 66.7% training / 69.4% validation → positive leaf.
≥ 10.11 → TPM = 13.2% training / 25.0% validation → negative leaf.
Other values (n=838): TPM = 4.1% training / 16.2% validation → negative leaf.
The tree reveals a clear interaction: even strong belief in equal opportunity is not enough by itself – it must be combined with negative views on undocumented immigrants (very low RateUnDoc_100) to produce high TPM. And among that group, living in an area with ≥96% Latino population makes Tea Party membership almost certain (94% in validation).
PERFORMANCE & VALIDATION:
The training‑to‑validation AUC gap (0.907 vs. 0.862) is moderate but acceptable – well within the range of a generalizable model. The validation AUC of 0.86 is strong for this type of data, and the model does not exhibit the extreme overfitting (e.g., training AUC near 1.0) that would make it unreliable.
This analysis shows that belief in racial equality for achievement, attitudes toward undocumented immigrants, perceptions of justice, and local demographic context work together to predict Tea Party membership. The model is simple enough to explain and robust enough to trust. The use of validation and case weighting makes these results far more credible than a naïve model that merely maximizes training accuracy.
filename reffile '/home/nhandyjr0/ool_pds.csv';
proc import datafile=reffile
dbms=csv
out=import;
getnames=yes;
run;
proc contents data=import; run;
proc sql;
create table home.ool_rename as
select
W1_A12 as ObamaApprove_b
,w1_l2_4 as TeaPartyMem_b
/* Socio-Econ Information */
,w1_p2 as ClassCat
,w1_p3 as ClassFam
,w1_p13 as USCit_b
,w1_p13a as USCitNat_b
,w1_p4 as Sex_Orient
,w1_p5 as LGBTRel_b
,w1_p6 as MilitaryHHAct_b
,w1_p8 as UnionHH_b
,w1_p9 as ArrestHH_b
,w1_p10 as ConvictFAM_b
,w1_p11 as UnEeHH_b
,w1_j1_b as IncSHPnlty_10
,w1_p14 as HealthIns_b
,w1_p15 as StockInv_b
,w1_p20 as IncomeGrp
,w1_p21 as DigiCable_b
,w1_q1_a as neighcablehard
/* Optimism: Relationships */
,w1_e2 as Optmsm_Rlshp
,w1_e2a as Optmsm_Rlshp_ntr
/* Optimism: Personal Future */
,w1_f1 as Optmsm_Futr
,w1_f1a as Optmsm_Futr_ntr
,w1_f2 as OptmsmUS_Futr
,w1_f2a as OptmsmUS_Futr_ntr
/* Optimism: Life Goals */
,w1_f3 as WorkHardGetAhead
,w1_f4_a as HardToOwnHome
,w1_f4_b as HardToRetire
,w1_f4_c as HardToCollege
,w1_f4_d as HardToWealth
,w1_f4_e as HardToBetterParents
,w1_f5_a as HardChildToOwnHome
,w1_f5_b as HardChildToRetire
,w1_f5_c as HardChildColl
,w1_f5_d as HardChildWealth
,w1_f5_e as HardChildBetPar
,w1_f6 as RateDrmPath_10
/* View on Economy */
,w1_j3a_b as Change2008Pov
/* View on Institutions */
,w1_k1_a as TrustWash
,w1_k1_b as TrustPolice
,w1_k1_c as TrustLegal
,w1_n1h as RateUnion_100
,w1_n1n as RatePubTch_100
/* View on Groups*/
,w1_n1c as RateLatino_100
,w1_n1f as RateAsian_100
,w1_n1d as RateWhite_100
,w1_n1e as RateBlk_100
,w1_n1b as RateNatAm_100
,w1_h2 as NatAmWellProg
,w1_h3 as GovtRespNatAmTdy
,w1_n1g as RateLGBT_100
,w1_n1k as RateUnEe_100
,w1_n1l as RateUnWed_100
,w1_n1a as RatePplWelf_100
,w1_n1m as RateUnDoc_100
/* Inter-racial dating */
,w1_e3 as DatedOSRace_b
,w1_e4 as WillDateOSRace_b
,w1_e7 as SexOSRace_b
,w1_e8 as SexOSRace_ntr
/* Views on black progress */
,w1_h1 as BWEqulOppty
,w1_k4 as BWEqulJust_7
,w1_QB1 as BlkProg20_b
,w1_h4 as BlksLTDeserve
,w1_h5 as BlksNoFvrIIJO
,w1_h6 as BlksTryHarder
,w1_h7 as SlavDiscrmHardForBlks
,w1_h8 as NoBlkDiscrm
/* Views on Black Child-Rearing */
,w1_o1 as BlkTchFightDisc
,w1_o3 as BlkTchNotWhite
,w1_o4 as BlkTchAvdStyp
,w1_o5 as BlkTchCrflPol
/* Effects of Blacks */
,w1_qa2 as BlkEffect_b
,w1_qa2a as BlkEffect_ntr
,w1_QB2 as BlkMenEffect_b
,w1_QB3 as BlkWomEffect_b
/* Views on Black Self-Determination */
,w1_qa4c as BlackOwned
,w1_qa5d as BlackNoWhite
,*
from work.import
order by w1_caseid
;quit;
proc contents data=home.ool_rename(drop=w1_: w2_: PP:) varnum;run;
proc freq data=home.ool_rename(drop=w1_: w2_: PP:);run;
proc means data=home.ool_rename(drop=w1_: w2_: PP:);
run;
data home.ool_clean;
set home.ool_rename(drop=w1_: w2_: PP:);
* clean the num values;
array nums _numeric_;
do over nums;
if nums=998 then nums=.;
end;
* clean the character values;
array chars _character_;
do over chars;
if chars = '-' then chars="";
end;
* convert dep var 0->2(Not TPM) otherwise 1 (IS TPM);
if TeaPartyMem_b =0 then TeaPartyMem_b=2; /*Not TPM*/
else TeaPartyMem_b=1; /*Is TPM*/
run;
proc contents data=home.ool_clean(drop=caseid) varnum;run;
proc freq data=home.ool_clean(drop=caseid);run;
proc means data=home.ool_clean(drop=caseid);
run;
* Delete any existing macro;
%symdel classtree_final;
* Define the macro;
%macro classtree_final(ds=, msopt=, depvar=, growparm=, pruneparm=, weight_factor=);
%local i wf wf_str;
%do i=1 %to %sysfunc(countw(&weight_factor, %str( )));
%let wf = %scan(&weight_factor, &i, %str( ));
%let wf_str= &wf;
%if %sysevalf(&wf > 0) %then %do;
data _temp_weighted_&i;
set &ds;
if &depvar = 1 then weight = &wf;
else weight = 1;
run;
%let data_in = _temp_weighted_&i;
%let weight_stmt = weight weight;
%end;
%else %do;
%let data_in = &ds;
%let weight_stmt = ;
%end;
ods output TreePerformance=fit_&i NodeTable=treenodes;
ods trace on;
title "Weight factor = &wf_str";
title2 "Missing Option = &msopt";
title3 "Growth Parameter = &growparm";
title4 "Prune Parameter = &pruneparm";
proc hpsplit data=&data_in assignmissing=&msopt seed=15531 nodes=detail plots=all;
&weight_stmt;
class &depvar
BWEqulOppty
BWEqulJust_7
/* Optmsm_Rlshp */
/* ClassFam */
/* USCit_b */
/* MilitaryHHAct_b */
/* Optmsm_Rlshp_ntr */
Optmsm_Futr
/* HardToOwnHome */
/* HardToRetire */
/* HardToCollege */
/* HardToWealth */
HardToBetterParents
/* TrustPolice */
/* BlksLTDeserve */
/* BlksNoFvrIIJO */
/* BlksTryHarder */
/* SlavDiscrmHardForBlks */
/* NoBlkDiscrm */
/* BlkTchFightDisc */
/* BlkTchAvdStyp */
/* BlkTchCrflPol */
/* BlkWomEffect_b */
model &depvar =
BWEqulOppty
BWEqulJust_7
RateLatino_100
RateUnDoc_100
/* RateUnion_100 */
/* Optmsm_Rlshp */
/* RateDrmPath_10 */
/* RateBlk_100 */
/*RatePplWelf_100*/
/* ClassFam */
/* USCit_b */
/* MilitaryHHAct_b */
/* Optmsm_Rlshp_ntr */
Optmsm_Futr *this factor gives lift, but has no variable importance;
/* HardToOwnHome */
/* HardToRetire */
/* HardToCollege */
/* HardToWealth */
/*HardToBetterParents*/
/* TrustPolice */
/* BlksLTDeserve */
/* BlksNoFvrIIJO */
/* BlksTryHarder */
/* SlavDiscrmHardForBlks */
/* NoBlkDiscrm */
/* BlkTchFightDisc */
/* BlkTchAvdStyp */
/* BlkTchCrflPol */
/* BlkWomEffect_b */
;
partition fraction(validate=.3);
grow &growparm;
prune &pruneparm;
run;
ods output close;
%if &wf > 0 %then %do;
proc datasets library=work nolist;
delete _temp_weighted_&i;
run;
%end;
%end;
%mend classtree_final;
* Call the macro with a list of weights (use %str to mask spaces);
%classtree_final(ds=home.ool_clean, msopt=similar, depvar=TeaPartyMem_b,
growparm=gini, pruneparm=reducederror,
weight_factor=%str( 34 ));
%classtree_final(ds=home.ool_clean, msopt=similar, depvar=TeaPartyMem_b,
growparm=entropy, pruneparm=reducederror,
weight_factor=%str( 34 ));