Back to Article
Read Me
Download Source

Read Me

Zero-sum social identity, not zero-sum economic beliefs, predict voting behavior in 2024 U.S. presidential election

Authors

Aashia Khan

Zihan Hei

Jeff John

Shane McCarty

Abstract

Background: This readme file was generated on 2025-07-03 by Shane McCarty.

Note: [text within square brackets should be changed to specific information about your dataset.] help text within asterisks should be deleted before finalizing your document**

GENERAL INFORMATION

Principal Investigator Information

Name: Shane McCarty

ORCID: 0000-0001-8930-7049

Institution: Binghamton University

Email: smccarty1@binghamton.edu

Data set

  • Title of data set: 2025 Prolific Health Beliefs Survey
  • Date of data collection: 2025-04-15

  • Geographic location of data collection: online via Prolific

  • Information about funding sources that supported the collection of the data: First-year Research Immersion (FRI) program, Binghamton University

SHARING/ACCESS INFORMATION

  • Licenses/restrictions placed on the data: no restrictions
  • Links to publications that cite or use the data: TBD
  • Links to other publicly accessible locations of the data: TBD
  • Links/relationships to ancillary data sets: TBD
  • Was data derived from another source? No
    • If yes, list source(s):
  • Recommended citation for this dataset: McCarty, S. (2025). Health beliefs on violence, mental health, and food [data set]. [OSF URL TBD]

FILES

File Type Source Details Pr ovided
Data data/originaldata.csv Full data set beyond project No
Data data/alldata.csv alldata needed for project Yes
Data data/select_data.csv cleaned data Yes
R Script scripts/install.R install packages Yes
R Script scripts/clean.R cleaning procedures to produce select_data Yes
Quarto Markdown Document quarto/anova.qmd original report with ANOVAs Yes
Quarto Markdown Document quarto/report.qmd final report with Kruskall Wallis tests Yes
Quarto Markdown Document quarto/manuscript.qmd final manuscript TBD
Quarto Markdown Document quarto/supplementary.qmd additional assumption tests, plots, and more TBD
Quarto Markdown Document quarto/poster.qmd poster of the results TBD
Quarto Markdown Document quarto/presentation.qmd presentation of the results TBD
In [1]:

flowchart TD
    A[alldata.csv] --> B[clean.R]
    B --> C[select_data.csv]
    C --> D[anova.qmd]
    C --> E[report.qmd]
    E --> F[manuscript.qmd]
    F --> G[supplementary.qmd]
    F --> H[presentation.qmd]
    F --> I[poster.qmd]
    
    %% Styling
    classDef dataFile fill:#e1f5fe,stroke:#0277bd,stroke-width:2px
    classDef rScript fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
    classDef qmdFile fill:#e8f5e8,stroke:#2e7d32,stroke-width:2px
    classDef finalOutput fill:#fff3e0,stroke:#f57c00,stroke-width:2px
    
    class A,C dataFile
    class B rScript
    class D,E qmdFile
    class F,G,H,I finalOutput

Documentation

readme.qmd

documentation for the project

Data Files and Dataframes

πŸ”’ alldata.csv and alldata

raw data and original dataframe

πŸ”’ select_data

dataframe used for all analyses

Core R Scripts

πŸ“¦ install.R

installing R packages

🧹 clean.R

cleaning of raw data

mutate race variable into racialidentity_[]

Analysis Reports

πŸ“Š anova.qmd

normality tests and ANOVAs

  • Eleven normality tests and analysis of variance (ANOVA) tests were conducted for each of the zero-sum belief items.

  • Based on the non-normal results, we ran Kruskal Wallis tests instead.

logisticregression.qmd
  • Logistic regression models examining predictors of 2024 U.S. presidential vote choice.

  • Conducted factor analysis on 11 zero-sum belief items, resulting in two reliable factors:

    - ZEROSUM_ECONOMIC (e.g., beliefs about rich vs. poor)

    - ZEROSUM_IDENTITY (e.g., beliefs about racial or social groups)

machinelearning.qmd
  • Classification models predicting 2024 U.S. presidential vote choice using decision trees and random forests.
πŸ“ˆ report.qmd

contains assumption checks, all tests, and plots.

Publication Materials

πŸ“ manuscript.qmd

contains all tests and select plots for manuscript

Statistical tests:

  • 11 Kruskall Wallis tests

  • 1 binomial logistic regression

Figures:

  • Fig 1: POLITICALPARTY, ZEROSUM_3 (Few vs. Many)

  • Fig 2: POLITICALPARTY, ZEROSUM_5 (Minorities vs. White)

  • Fig 3: POLITICALPARTY, ZEROSUM_11 (Undocumented vs. U.S. Citizens)

  • Fig 4: POLITICALPARTY, ZEROSUM_11 (Universal vs. Private Insurance)

  • Fig 5: TRUMPVOTE ~ ZEROSUM_IDENTITY

πŸ“ supplementary.qmd

report.qmd code chunks excluded from the manuscript

Communication Materials

πŸ–ΌοΈ poster.qmd

research poster using posterdown package

πŸ’» presentation.qmd

slides of the research

Data workflow using files

  • install.R β€”> clean.R β€”> anova.qmd β€”> logisticregression.qmd β€”> machinelearning.qmd β€”> report.qmd β€”> manuscript.qmd β€”> supplementary.qmd

    • This workflow was used to produce the final manuscript and supplementary materials.
  • manuscript.qmd β€”> presentation.qmd β€”> poster.qmd

    • The manuscript was converted into a presentation format and poster format
  • Additional related data collected that was not included in the current data package: The 2025 health beliefs data set consists of additional variables beyond the sociodemographics and zero-sum beliefs.

  • Are there multiple versions of the dataset? No.

    • If yes, name of file(s) that was updated:
    • Why was the file updated?
    • When was the file updated?

METHODOLOGICAL INFORMATION

Description of methods used for collection/generation of data:

include links or references to publications or other documentation containing experimental design or protocols used in data collection

Methods for processing the data:

The Qualtrics survey was posted to the Prolific platform, resulting in XXX of participants who completed the survey.

describe how the submitted data were generated from the raw or collected data

Instrument- or software-specific information needed to interpret the data:

include full name and version of software, and any necessary packages or libraries needed to run scripts.

In [2]:
Show the code
#sessionInfo()

include any additional methodological information needed to interpret and/or use the data, as appropriate:

Sociodemographics

AGE

What is your age? (enter a whole number, such as 45) 

GENDER

Gender identity is how someone feels about their own gender. There are many ways a person can describe their gender identity and many labels a person can use. Which of the following terms best describes your current gender identity?

o Girl or woman  (1) 

o Boy or man  (2) 

o Nonbinary, genderfluid, or genderqueer  (3) 

o I am not sure or questioning  (4) 

o I don’t know what this question means  (-50) 

o Decline to answer  (-99)

RACIALIDENTITY

What is your racial/ethnic identity?

β–’        American Indian or Alaska Native  (1) 

β–’        Asian  (2)

β–’        Black or African American  (3) 

β–’        Hispanic or Latine  (4) 

β–’        Middle Eastern or North African  (5) 

β–’        Native Hawaiian or Pacific Islander  (6) 

β–’        White  (7)

β–’        Other  (8) __________________________________________________

β–’        βŠ—Prefer not to say  (-99)

SOCIALCLASS

Think of this ladder as representing where people stand in the United States. At the top of the ladder are the people who are the best off – those who have the most money, the most education, and the most respected jobs. At the bottom are the people who are the worst off – those who have the least money, least education, the least respected jobs, or no job. The higher up you are on this ladder, the closer you are to the people at the very top; the lower you are, the closer you are to the people at the very bottom.   

If you are a college student, please tell us where you think your family would be on this ladder. For everyone else, please select the rung where you think you stand at this time in your life relative to other people in the United States.

o 10  (10) 

o 9  (9) 

o 8  (8) 

o 7  (7) 

o 6  (6) 

o 5  (5) 

o 4  (4) 

o 3  (3) 

o 2  (2) 

o 1  (1)

POLITICALAFFIL

What is your political party affiliation?

o Conservative Party  (1) 

o Democratic Party  (2) 

o Libertarian Party  (3) 

o Republican Party  (4) 

o Socialist or Green Party  (5) 

o None of the above  (6)

POLITICALBELIEFS

What are your political beliefs?

o Far Left / Leftist  (1) 

o Very Liberal  (2) 

o Liberal  (3) 

o Moderate  (4) 

o Conservative  (5) 

o Very Conservative  (6) 

o Alt-Right / Far-Right  (7) 

o Prefer not to say  (-99) 

o None of the above or don’t know  (-50)

Zero Sum Beliefs

ZEROSUM_1

Life is so devised that when somebody gains, others have to lose.

ZEROSUM_2

When some people are getting poorer, it means that other people are getting richer.

ZEROSUM_3

The wealth of a few is acquired at the expense of many.

ZEROSUM_4

As women face less sexism, men end up facing more sexism.

ZEROSUM_5

Less discrimination against minorities means more discrimination against whites.

ZEROSUM_6

More opportunity for transwomen means less opportunity for people who are assigned female at birth.

ZEROSUM_7

More health care access for undocumented immigrants means less access for U.S. citizens.

ZEROSUM_8

If there is equal pay for women, men will get lower wages.

ZEROSUM_9

LGBTQ+ rights mean less freedom for religious groups.

ZEROSUM_10

Accessible healthcare for people with disabilities means longer wait times for non-disabled patients.

ZEROSUM_11

Universal healthcare means worse healthcare for those who can afford private insurance.

Outcomes

VOTE2024

Who did you vote for in the 2024 election? 

o Donald Trump  (1) 

o Kamala Harris  (2) 

o Jill Stein  (3) 

o Robert Kennedy Jr.  (4) 

o Chase Oliver  (5) 

o Claudia De La Cruz  (6) 

o Cornel West  (7) 

o DID NOT VOTE IN 2024  (8) 

o Prefer not to say  (-99)

TRUMPVOTE

mutated variable from VOTE2024

o Kamala Harris  (0) 

o Donald Trump  (1) 

Standards and calibration information, if appropriate: *

Environmental/experimental conditions: *

Describe any quality-assurance procedures performed on the data: *

People involved with sample collection, processing, analysis, and/or submission:

DATA-SPECIFIC INFORMATION FOR: select_data.csv

repeat this section for each dataset, folder or file, as appropriatedefined]

  • Number of variables:
  • Number of cases/rows:
  • Variable List: list variable name(s), description(s), unit(s) and value labels as appropriate for each
  • Missing data codes: list code/symbol and definition
  • Specialized formats or other abbreviations used:

DATA-SPECIFIC INFORMATION FOR: [FILENAME]

repeat this section for each dataset, folder or file, as appropriate

  • Number of variables:
  • Number of cases/rows:
  • Variable List: list variable name(s), description(s), unit(s) and value labels as appropriate for each
  • Missing data codes: list code/symbol and definition
  • Specialized formats or other abbreviations used:

Source

This readme.qmd is adapted from a Readme Template for Data: Kozlowski, Wendy. (2025) Readme Template for Data. Cornell University eCommons Repository. https://doi.org/10.7298/mhns-zm71