Analytic data and code for: Examining psychosocial safety climate and lone vs non-lone worker outcomes using the 2022 U.S. General Social Survey
Data files
Sep 08, 2026 version files 712.78 KB
-
Converting_files_for_data_repository.R
1.53 KB
-
Data_Cleaning_PSC_LWs.R
12.09 KB
-
industry_classification_codes.csv
12.12 KB
-
lw_occupation_codes.csv
545 B
-
occupation_classification_codes.csv
22.99 KB
-
PSC_LWs_analysis.R
6.16 KB
-
PSC_LWs.csv
626.59 KB
-
README.md
30.74 KB
Abstract
This dataset contains cleaned analytic data and accompanying R code used to examine psychosocial safety climate (PSC), occupational stress, and injury risk among lone workers and non-lone workers in the United States. The data are derived from a cross-sectional, nationally representative sample of adults participating in the General Social Survey (GSS).
Lone worker status was identified using a systematic classification approach based on work arrangement variables and occupation codes. Psychosocial safety climate was operationalized using a three-item composite measure reflecting workers’ perceptions of organizational commitment to psychological health. Additional constructs include occupational stress, self-reported work-related injury, demographic characteristics, health indicators, and employment-related factors.
The analytic dataset includes observations for 332 lone workers and 1,436 non-lone workers. The data were used to compare psychosocial and occupational characteristics between groups and to estimate associations between PSC and occupational stress and injury outcomes using multivariable logistic regression models.
This dataset supports research on psychosocial working conditions, occupational health, and vulnerable worker populations, and provides a reproducible framework for examining lone worker classification and psychosocial safety climate using publicly available survey data.
Overview
This repository contains the analytic dataset, R code, and supporting classification files used to examine associations between Psychosocial Safety Climate (PSC) and occupational health outcomes (work-related stress and injury) among lone and non-lone workers in the United States, using data from the 2022 General Social Survey (GSS).
This is a secondary analysis of de-identified, publicly available survey data. No raw GSS microdata are redistributed in this repository. Only the derived analytic dataset created by the authors, and two small occupation/industry classification crosswalks, are shared.
Data Source
Original data: 2022 General Social Survey (GSS), NORC at the University of Chicago, public-use cross-sectional file.
GSS is publicly available at: https://gss.norc.org/
Researchers wishing to reproduce the full processing pipeline from raw GSS data must download the original 2022 GSS data directly from NORC's official GSS Data Explorer / repository and comply with GSS's data use terms. File paths to the raw GSS file in the cleaning script are placeholders and must be updated.
Human Subjects / De-identification Statement
This dataset is derived from the 2022 General Social Survey (GSS), a public-use, de-identified dataset released by NORC at the University of Chicago, which applies its own statistical disclosure limitation procedures prior to public release (e.g., no exact geography below the national/regional level, top-coded/bracketed income and age where applicable, no names, addresses, or dates of birth).
The dataset shared here (PSC_LWs.csv) contains no direct identifiers (no names, addresses, exact birth dates, or exact interview/exam dates). Demographic and health-related variables retained (age in years, sex, race, marital status, education category, and self-rated general health) are unmodified or recoded/binned versions of variables already present in NORC's public-use GSS file and are required as covariates in the study's adjusted statistical models. Total family income (income) was recoded during cleaning but is not used in any reported analysis and has been removed from the shared file to minimize retained indirect identifiers. No variable identifies geography more granular than the national GSS sample, no rare medical condition or diagnosis is recorded (only a 5-category self-rated general health scale), and no religion variable is included. The survey design variables vstrat and vpsu are NORC-assigned variance strata/primary sampling units used for design-based variance estimation and are part of the standard public-use GSS release; they do not indicate geographic location.
Files Included
Data files
| File | Description | Format |
|---|---|---|
PSC_LWs.csv |
Cleaned analytic dataset used for all Aim 1 analyses. One row = one eligible GSS 2022 respondent (currently working full- or part-time, or with a job but temporarily not at work; active-duty military excluded). N = 2,034 respondents, 26 variables. | CSV, comma-delimited, UTF-8, header row |
occupation_classification_codes.csv |
Crosswalk of GSS 2010 Census occupation codes (occ10) to numeric codes and text labels, used as an intermediate step to build Occ_group. Contains no respondent-level data. |
CSV |
lw_occupation_codes.csv |
List of the specific occupation codes (subset of the codes above) considered a priori eligible for "lone work," used together with work-arrangement questions to build the lnwkr_cat classification. Contains no respondent-level data. |
CSV |
industry_classification_codes.csv |
Crosswalk of GSS 2010 Census industry codes (indus10) to numeric codes and text labels, used to build Ind_group/Ind_group8. Contains no respondent-level data. |
CSV |
Software needed: Any spreadsheet program (Excel, Google Sheets, etc.) or a statistical package (R, Python, Stata) can open these CSV files directly. Reproducing the cleaning and analysis scripts requires R with the following packages: readxl, dplyr, janitor, stringr (cleaning), and tidyr, survey, srvyr, gtsummary, flextable, officer, MASS (analysis).
Code files
| File | Description |
|---|---|
Data_Cleaning_PSC_LWs.R |
Reads the raw 2022 GSS file (path is a placeholder — update to your local copy after downloading from NORC), recodes missing-value codes to NA, builds industry and occupation groupings, applies eligibility exclusions (drops retired, student, unemployed, "keeping house," other, and active-duty military/military-occupation respondents), constructs the lone-worker classification and all analytic covariates and outcomes, and writes the analytic file used in this repository. |
PSC_LWs_analysis.R |
Loads the analytic dataset, constructs the standardized PSC composite score (psc_score_std) from the three PSC items, sets up the GSS complex-survey design object (weights/strata/PSU), produces the weighted descriptive table (Table 1), and runs the unadjusted and adjusted survey-weighted regression models (ordinal logistic for stress, logistic for injury) reported for Aim 1. Outputs four Word (.docx) tables. |
Converting_files_for_data_repository.R |
Utility script the authors used to export the Excel-based classification crosswalks (industry, occupation, lone-worker occupation codes) to the CSV files included in this repository. Not needed to reproduce the analysis; included for transparency. Note: file paths in this script currently point to a local Desktop directory and should be genericized before final publication. |
Data Dictionary — PSC_LWs.csv
N = 2,034 rows (one per eligible respondent). Missing values are coded as blank/NA.
| Variable | Description | Type | Values / Coding | Derived from (raw GSS variable) |
|---|---|---|---|---|
id |
Analytic row identifier. A fresh sequential ID (1–2,034) assigned at export time — does not correspond to the original GSS case number. | Integer | 1–2,034 | Generated |
Ind_group |
Detailed industry supergroup (15 categories: Agriculture/Forestry/Fishing/Hunting; Mining/Quarrying/Oil and Gas; Utilities; Construction; Manufacturing; Wholesale and Retail Trade; Transportation and Warehousing; Information; Financial Activities; Professional and Technical Services; Management/Admin/Waste Services; Education and Health Services; Leisure/Hospitality/Other Services; Public Administration; Uncodeable/Missing; Other/Not Applicable) | Categorical | See labels above | Derived from GSS indus10 via industry_classification_codes.csv |
Ind_group8 |
Collapsed 8-category version of Ind_group used in regression models (Construction; Education and Health Services; Leisure/Hospitality/Other Services; Management/Admin/Waste Services; Manufacturing; Transportation and Warehousing; Wholesale and Retail Trade; Other — all remaining categories combined) |
Categorical | See labels above | Derived from Ind_group |
Occ_group |
Detailed occupation supergroup (17 categories, e.g., Management/Business/Financial Operations; Computer/Engineering/Science; Healthcare Practitioners; Sales; Production; Transportation and Material Moving; etc.) | Categorical | See category list in script | Derived from GSS occ10 via occupation_classification_codes.csv |
wrkstat_cat |
Current work status among respondents retained after exclusions | Categorical | Full-time; Part-time; Job but not at work (temporary illness/vacation/strike) | GSS wrkstat |
wrktype_cat |
Employment arrangement | Categorical | Permanent; Temporary/Contracted (independent contractor, on-call, temp agency, contract worker) | GSS wrktype |
wrksched_cat |
Usual work shift | Categorical | Day; Afternoon; Night; Split; Irregular/On-call; Rotating | GSS wrksched |
sex_cat |
Respondent sex | Categorical | MALE; FEMALE | GSS sex |
age_num |
Respondent age in years at time of interview | Numeric (integer) | 18–83 in this sample | GSS age |
marital_cat |
Marital status | Categorical | Married; Widowed; Divorced; Separated; Never married | GSS marital |
race_cat |
Race | Categorical | White; Black; Other | GSS race |
education_group |
Highest education level, collapsed into 4 ordered categories | Ordinal | Less than high school; High school; Some college; College or more | Derived from GSS educ (years of schooling) |
perc_health |
Self-rated general health | Ordinal | Poor; Fair; Good; Very good; Excellent | GSS health1 |
sleep_prb |
Frequency of sleep problems | Ordinal | Never; Rarely; Sometimes; Often | GSS slpprblm |
stress_order |
Frequency of feeling stressed because of work — primary Aim 1 outcome (stress) | Ordinal | Never; Hardly ever; Sometimes; Often; Always | GSS stress |
hurtatwk_num |
Number of times injured at work in the past 12 months, top-coded | Numeric (count) | 0–7, where 7 = "7 or more" | Derived from GSS hurtatwk |
hurt_binary |
Any work injury in the past 12 months — secondary Aim 1 outcome (injury) | Binary | 0 = no injury; 1 = one or more injuries | Derived from hurtatwk_num |
strmgtsup_fact |
PSC item: management supports employees' efforts to deal with work stress | Ordinal (5-pt Likert) | Strongly disagree; Disagree; Neither agree nor disagree; Agree; Strongly agree | GSS strmgtsup |
psysamephys_fact |
PSC item: psychological health is treated as importantly as physical health at my workplace | Ordinal (5-pt Likert) | Same 5-pt scale as above | GSS psysamephys |
allorglevel_fact |
PSC item: psychological well-being of staff is a priority at all levels of the organization | Ordinal (5-pt Likert) | Same 5-pt scale as above | GSS allorglevel |
partteam |
Work arrangement item: works mostly as part of a team vs. mostly alone (input to lone-worker classification) | Categorical | "Yes, I work as part of a team"; "No, I work mostly on my own" | GSS partteam |
wrkhome |
Work arrangement item: frequency of working from home (input to lone-worker classification) | Categorical | Never; A few times a year; About once a month; About once a week; More than once a week; Worker works mainly at home | GSS wrkhome |
lnwkr_cat |
Lone-worker classification (see Methods section below) | Categorical | Non-Lone Worker; Partial Lone Worker; Lone Worker | Derived from wrkhome, partteam, and occupation code (see below) |
wtssps |
GSS post-stratification/final sample weight. Use for all weighted/representative estimates. | Numeric (continuous) | Weight values (unitless) | GSS wtssps |
vstrat |
GSS variance stratum, part of the complex sample design used for design-based (Taylor series) variance estimation | Categorical/numeric code | Strata codes (range 2661–2726 in this sample) | GSS vstrat |
vpsu |
GSS primary sampling unit (PSU) indicator within stratum | Categorical | 1; 2 | GSS vpsu |
Note on the PSC composite score: The standardized PSC score (psc_score_std) used as the main exposure in the regression models is not a pre-computed column in PSC_LWs.csv. It is calculated in PSC_LWs_analysis.R by summing strmgtsup_fact, psysamephys_fact, and allorglevel_fact (each coded 1–5, retaining only respondents with non-missing data on all three items) and then standardizing (z-scoring) the sum. Users who want the pre-computed score can either run the relevant lines of PSC_LWs_analysis.R or contact the authors.
Note on binary recodes used only at analysis time: PSC_LWs_analysis.R also creates Lonewrkr_binary (0 = Non-Lone Worker, 1 = Lone Worker; "Partial Lone Worker" excluded) and sex_binary (0 = Male, 1 = Female) from lnwkr_cat and sex_cat respectively. These are not separate columns in the CSV.
Lone Worker Classification (lnwkr_cat)
Lone worker status was determined using a combination of:
- Work arrangement — respondent works mostly alone (
partteam= "No, I work mostly on my own") and rarely or never works from home (wrkhome= "Never" or "A few times a year"); and - Occupation — whether the respondent's detailed occupation code is on a predefined list of occupations considered eligible for lone work (provided in
lw_occupation_codes.csv, a subset of the codes inoccupation_classification_codes.csv).
Respondents meeting both criteria 1 and 2 are classified Lone Worker; those meeting criterion 1 only are classified Partial Lone Worker; all others are Non-Lone Worker. Respondents missing wrkhome, partteam, or occupation code are coded NA.
Note on income_group
Data_Cleaning_PSC_LWs.R constructs an income_group variable (family income collapsed into ordered brackets) from the raw GSS income item, but it is not used in Table 1 or in any regression model reported for Aim 1. It has been dropped from PSC_LWs.csv to avoid sharing an unnecessary indirect identifier; the cleaning script still shows how it was derived for transparency, but the final select() step in that script no longer includes it in the exported file.
Eligibility / Exclusions
Starting from the 2022 GSS respondent pool, the analytic sample excludes respondents who are retired, students, unemployed/looking for work, keeping house, "other" work status, on active duty military, or in a military-specific occupation. Remaining missing-value codes (e.g., "Don't know," "Refused," "Inapplicable," "Skipped on Web") from the raw GSS file are recoded to NA throughout.
Reproducibility
All processing and analysis steps are documented in the accompanying R scripts. File paths to raw GSS data and the Excel-based classification files in Data_Cleaning_PSC_LWs.R are placeholders and must be updated by users after they obtain the original public 2022 GSS dataset directly from NORC.
Ethics Statement
This study was determined to be exempt from Institutional Review Board (IRB) review. All data shared here are de-identified and derived from the publicly available 2022 General Social Survey. See the Human Subjects / De-identification Statement above for details on identifier handling.
Contact
Corresponding author: Stefani Florez-Acevedo, spflorez@uw.edu, ORCID: https://orcid.org/0000-0001-8148-5799]
Dataset Citation
The data supporting the findings of this study are publicly available in Dryad Digital Repository at: https://doi.org/10.5061/dryad.05qfttfhg
Human subjects data
This dataset is derived from the 2022 General Social Survey (GSS), a public-use, de-identified dataset released by NORC at the University of Chicago, which applies its own statistical disclosure limitation procedures prior to release. The shared file contains no direct identifiers (no names, addresses, exact birth dates, or exam/interview dates). Demographic variables retained (age, sex, race, marital status, education category, self-rated health) are recoded/binned versions of variables in NORC's public-use file, required as covariates in the study's adjusted statistical models. A recoded income bracket variable was removed from the shared file as it was not used in any reported analysis. No variable indicates geography more granular than the national GSS sample, no rare medical condition is recorded, and no religion variable is included.
