Looking at effects of purpose in life on risk of cognitive impairment on Health and Retirement Study participants using Cox Proportional Hazards model. This will build a report providing summary statistics, Cox regression results, and a cumulative hazard plot between lower and upper tertiles of Purpose in Life scores.
code/build_table1.R
- creates summary statistics dataframe for table building
code/run_analysis.R
- runs Cox model on data and saves the coxph object
code/build_cumhazplot.R
- builds a ggsurvplot object visualizing cumulative hazard from
code/run_analysis.R
code/render_report.R
- creates the HTML report from 'final_project_report.Rmd'
Makefile
- contains rules for building the report, docker image, and running the docker image
make .reportbuildwill generate the objects for compiling the report- it will also create an empty file called
.reportbuildin the project root directory, so thatmakeproperly knows when to update outputs project_imagerule will take Renv files and directory files needed to build Docker imagepull_imagedependency rule forda_dockerhub_reportusing Dockerhub imageda_dockerhub_reportbuilds the report using Dockerhub imageda_local_reportbuilds the report using locally built Docker image
Dockerfile
- contains container structure and commands to run report building in the container
- run
make project_imageto build the local Docker image (may take some time). - run
make da_local_reportto build the report which will output to /report folder.
- run
make da_dockerhub_reportto pull Dockerhub image and being report-building. - Built report will appear in report/ folder.