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 heavily 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.
.Rproj
file (NOT PSRC.analysis
yet).Rproj
file in RStudiodevtools::install()
to ensure you have the packages this
analysis depends on (also listed in the DESCRIPTION
file).rrtools::use_analysis()
. If asked, go head and overwrite
references.bib
and paper.Rmd
.You are now set up to run the .R files in the analysis directory!
* If you are not using RStudio Desktop, I cannot advise you on how to build the PSRCData package.
The analysis directory contains:
rrtools::use_analysis()
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.docx
, suitable for reading (the code
is replaced by figures and tables in this file).paper.Rmd
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 |
|:------:|-------------------------------------------------------------------|
| 01
| Data cleaning, preparation, optimal matching/clustering processes |
| 02
| Data preparation for running models with Mplus |
| 03
| Interfacing between R and Mplus |
| 9#
| Scripts for supplementary materials. |
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
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.