This file explains how to run the LTA code for Kimbrough et al. (2023) - "On the Stability of Norms and Norm-following Propensity: A Cross-Cultural Panel Study with Adolescents" All R scripts were run using R 4.2.2, and all MPlus scripts were run using MPlus 8.8, on a 2023 MacBook Pro. In this folder, you will find 5 main subfolders: 1) model_estimates_real - this contains model estimates derived from application of the 5-class RI-LTA model described in the paper to our raw data (the estimates are stored in a .out file and a .dat file) and a table from the paper showing the distribution of subjects across latent classes (a .csv file). The .dat file was modified ex post to remove the raw data which we are not allowed to share per our ethics approval. These files are used as an input to the (0) Simulate_Data.R script, which generates the file in the next subfolder: 2) simulated_data - this contains 1468 simulated choice patterns based on the model estimates in the model_estimates_real folder 3) input_files - this contains .inp files with MPlus scripts for the LTA and RI-LTA models, for 2-5 classes 4) output_files - this holds the .out and .dat files produced by running each of the MPlus scripts. 5) result_files - this holds figures and tables produced using the .out and .dat files in the output_files folder The resp.dat file contains simulated individual-level responses to the norm-elicitation protocol at T1 and T2. Each row represents a single individual. Since we are unable to share our raw data due to IRB restrictions, we have produced simulated data for the same number of subjects according to the type distribution estimated from the data. See the file (0) Simulate_Data.R for details on how the simulated data were generated. The .inp files run the Mplus analyses. They depend on the resp.dat file. The key variables are contained in the first 22 columns of the resp.dat file. When read into MPlus, they are labelled r1-r11 (T1) and s1-s11 (T2), where the index 1 in the variable name corresponds to the action "give 0" and 11 corresponds to "give 10", r corresponds to the first time period and s refers to the second time period. There are two script files which take this resp.dat file as an input and perform LTA and RI-LTA analyses, using an R package to run the MPlus scripts. To run, you must have a working edition of MPlus version 8.4 or later with the Mixture Add-On (see: https://www.statmodel.com/pricing.shtml) and a recent copy of R installed from the CRAN archive. Before running the scripts in R, make sure you install the MplusAutomation package and scales package using the "install.packages" command. Step 1: Run (0) Simulate_Data.R ~ This generates the simulated data. Step 2: Run (1) Execute_MPlus_scripts.R ~ This runs all the scripts from the .inp files in the input_files folder and produces the .out files and saves them in the output_files folder - NOTE: RI_LTA_5Classes.inp may take a long time to run (the number of "starts" required to get the model to converge is lower for the simulated data than for our raw data). ~ The RI_LTA.png file depicts the main model reported in the paper. A latent random intercept f (with mean=0 and variance=1) and latent class variables c1 and c2 are modeled as together causing the distribution of responses to the dictator game norm elicitation (the eta variables, subscripted 0-10 for the amounts and superscripted 1-2 for the time period). Step 3: Run (2) Produce_figures.R ~ This generates the figures and trp.csv and trc.csv files (which contain the transition matrices for the LTA model) in the relevant subfolders of the result_files folder.