This repository contains the data and code for our research report:
McBride, Elizabeth C., Goulias, Konstadinos G., (2021). A Before-After Intervention Experiment and Survey. Funding Source: US DOT. Project Number: PSR-20-15. https://rosap.ntl.bts.gov/view/dot/58962
The analysis directory contains:
- 📁 data: Data used in the analysis.
- 📁 figures: Plots and other illustrations
- 📁 Mplus: All syntax of models run in Mplus.
- 📁 unused-scripts: Scripts that I am not done writing and cannot yet run, or things I have removed from the main analysis workflow, but I want to keep a record of.
- 📜 .R files: Files to run the analysis, named to indicate the the order to run them in. Please see section .R file naming protocol for a description of the numbering/naming system.
Also in the analysis directory are three
sub-directories that are not used in this project. During the initiation
of this project, the function rrtools::use_analysis() is run. This
function creates the file structure used in this project. They are
included because they will be automatically created when you download
and run this project locally.
- 📁 paper: R Markdown source
document for manuscript. If used, this folder would include code to
reproduce the figures and tables generated by the analysis. It also
has a rendered version,
paper.docx, suitable for reading (the code is replaced by figures and tables in this file). - 📁 supplementary-materials: Would contain Supplementary materials including notes and other documents prepared and collected during the analysis.
- 📁 templates: Contains files
to set reference list/citation style and to style the output of
paper.Rmd
This research compendium has been developed using the statistical programming language R. To work with the compendium, you will need installed on your computer the R software itself and optionally RStudio Desktop. The statistical analysis in this compendium also relies on the proprietary software Mplus. You will need an Mplus license and installation on your computer to run the complete analysis. Mplus version 8.6 was used to run this analysis, although using a later version should not cause any issues.
This compendium was created with the package
rrtools, which creates a
research compendium directory template. There are some files and folders
created by rrtools that are not currently being pushed to GitHub, so
there are a few steps if you want to work on this project from a new
computer:
- Clone the repository as usual
- Install
rrtoolsby following the instructions here - Run
rrtools::use_analysis() - Add the raw data from Box to
/analysis/data/raw_data
- If you get an error
there is no package called ..., then install the package(s) named usinginstall.packages()before re-running the line that threw the error
You are now ready to start using this project compendium!
Below is the format used:
##_##_descriptive-name.R
Underscores (_) separate the sections of the file name. Each section
of the file name has a purpose:
-
First number: category of work being done in the file
Number Description 01Data cleaning and preparation 02Interfacing between Mplus and R to run and analyze models 03Data visualization 9#Scripts for supplementary work -
Second number: file run order within each category. Important for possible dependencies between files.
-
Descriptive name: describes what each file does in words separated by dashes (
-) and underscores (_)
Text and figures : CC-BY-4.0
Code : See the DESCRIPTION file
Data : CC-0 attribution requested in reuse
We welcome contributions from everyone. Before you get started, please see our contributor guidelines. Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.