Physical activity erases the effect of adverse childhood experiences on functional dependence in older age through its impact on the mediation by depression
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Adverse childhood experiences, Depression, Functional dependence, and Physical activity

This repo contains R scripts to analyze the links between adverse childhood experiences (ACEs), depression, functional dependence, and physical activity, using the SHARE panel data survey.


The scripts expect CSV files that are subsequently imported by R. We cannot redistribute data files as per the SHARE project’s conditions of use. However, the data are available free of charge. The SHARE project itself does not provide CSV files. These need to be exported either from Stata or SPSS. By default both will export CSV files with UTF-8 encoding but SPSS includes a byte order mark while Stata does not. Set the relevant file encoding option when importing the CSV files into R (see comments in R/importSHARECSV.R or R/importSHARECSVFuture.R).

Necessary Packages

The scripts assume/require the following packages to be installed in R:

Optional packages

  • ggplot2 if plots are required
  • future for easier multicore/multiprocess evaluation