Analysis Code for Structural Equation Modeling of Subjective Well-Being, Eco-Anxiety, and Pro-Environmental Behavior in Wartime Ukraine
Description
This repository contains the R code and analysis outputs used to reproduce the analyses reported in the manuscript on subjective well-being, eco-anxiety, and pro-environmental behavior in wartime Ukraine. The corresponding de-identified data are available separately at DOI: 10.17632/6sr6fhmsj4.1. The analyses include descriptive statistics, item-level reliability estimation, model-based composite reliability, Spearman correlations with multiple-comparison adjustments, primary and complementary structural equation models with bootstrapped confidence intervals, nested model comparisons, ordinal confirmatory factor analysis of pro-environmental behavior, robustness analyses using MLR estimation, demographic covariates, and reverse-order specifications, as well as power and Monte Carlo sensitivity analyses. The analyses were conducted in R 4.5.1 using the lavaan, semTools, and psych packages.
Files
Steps to reproduce
To reproduce the analyses: 1. Place Opposing_Pathways_analysis.R, Data.csv, and Raw_data.csv in the same working directory. 2. Open the directory as the working folder in R or an R-compatible IDE. 3. Run Opposing_Pathways_analysis.R from beginning to end. 4. The script automatically creates the results_N306 directory and writes the analysis outputs to this folder. The analyses were conducted in R version 4.5.1 using the lavaan, semTools, and psych packages. The analytic sample size is N = 306.
Institutions
- V. N. Karazin Kharkiv National UniversityKharkivs’ka Oblast’, Kharkiv