Data and code for the manuscript:
Goodreau SM, Pollock ED, Wang LY, Li J, Aslam MV, Katz DA, Hamilton DT, Rosenberg ES. 2022. Declines in pregnancies among US adolescents from 2007 to 2017: behavioral contributors to the trend, Journal of Pediatric and Adolescent Gynecology, doi: https://doi.org/10.1016/j.jpag.2022.07.008
Instructions:
- Open RStudio.
- Obtain the
CAMP.10.yr.pregnancy
project by selecting File>NewProject>Version Control>Git and entering https://github.com/statnet/CAMP.10yr.pregnancy.git for the Repository URL. (Set the directory name and subdirectory as desired given your local file setup). - Build the package by clicking Build>Install>Clean and Install.
- Open the file
scripts/a10_preg_entire_project.R
- Edit the first line of code (line 9) to use the appropriate path on your machine, ending with the directory
CAMP.10yr.pregnancy/scripts
. - Install any needed R packages (listed in lines 12-17 of the script) not currently on your machine by copying the relevant line without the comment marker # into your RStudio window.
- Source or run the script file.