diff --git a/Correlation-Graphs.html b/Correlation-Graphs.html new file mode 100644 index 0000000..b98317c --- /dev/null +++ b/Correlation-Graphs.html @@ -0,0 +1,660 @@ + + + + + + + + + + + + + + + +Correlation Graphs + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+Correlation Graphs +Juo-Lin Tsai +
+
+
+ + +
+
+ +
+
+ +
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
+
## ✓ ggplot2 3.3.5     ✓ purrr   0.3.4
+## ✓ tibble  3.1.2     ✓ dplyr   1.0.7
+## ✓ tidyr   1.1.3     ✓ stringr 1.4.0
+## ✓ readr   1.4.0     ✓ forcats 0.5.1
+
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
+## x dplyr::filter() masks stats::filter()
+## x dplyr::lag()    masks stats::lag()
+ +
## corrplot 0.90 loaded
+ + + + +
+

BDI/RA Correlation Graphs

+
+ +
+

BDI variables with >0.1 or >-0.1 correlation

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +
+

MASQ/RA Correlation Graphs

+
+
+ + + +
+

IDAS Dysphoria, Appetite Loss, Appetite Gain, Ill Temper, Social Anxiety, Panic, Traumatic Intrusions

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+
+

IDAS/RA Correlation Matrix

+
+
+ +
+

IDAS variables with >0.1 or >-0.1 correlation

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +

+ +
+

SWLS/RA Correlation Graphs

+
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + diff --git a/Project-Process.html b/Project-Process.html new file mode 100644 index 0000000..afffb78 --- /dev/null +++ b/Project-Process.html @@ -0,0 +1,303 @@ + + + + + + + + + + + + + + + +Summer of Data Project Progress + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+Summer of Data Project Progress +Juo-Lin Tsai +
+
+
+ + +
+
+ +
+
+
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
+
## ✓ ggplot2 3.3.5     ✓ purrr   0.3.4
+## ✓ tibble  3.1.2     ✓ dplyr   1.0.7
+## ✓ tidyr   1.1.3     ✓ stringr 1.4.0
+## ✓ readr   1.4.0     ✓ forcats 0.5.1
+
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
+## x dplyr::filter() masks stats::filter()
+## x dplyr::lag()    masks stats::lag()
+
## corrplot 0.90 loaded
+
## 
+## Attaching package: 'lubridate'
+
## The following objects are masked from 'package:base':
+## 
+##     date, intersect, setdiff, union
+
+

Plot Actigraphy Activity

+

Code creates a list for the actigraphy files in the Actigraphy Data Box folder. The for loop then reads the raw actigraphy data to plot subjects’ actigraphy activity. To loop through the whole folder, change “actigraphy_files[1:2]” to “actigraphy_files”.

+ +

+

By knitting the graphs together in one cohesive document, we took note of subjects with extended periods of 0 (greater than 1/2 day) in their actigraphy activity.

+
+
+

Check the Extended Periods of 0 Activity

+

We documented the ID and sleep diary entry of subjects with extended periods of 0 actigraphy activity to look for an alignment in an Excel file.

+
+
+

Pre-process the Actigraphy Files

+

The Python code pre-processes the actigraphy files by truncating raw actigraphy data into 5 days with 30 second increments and interpolating the missing values. I wrote the function that loops the raw actigraphy files into new csv files.

+

We reviewed the pre-processed graphs and files for abnormality and/or inconsistency. Subject 2181 was manually pre-processed because of leading 0s.

+
+
+

Compute Rest-Activity Rhythm Measures

+

The nparACT package computes the interdaily stability (IS), intradaily variability (IV), and the relative amplitude (RA) from the pre-processed actigraphy files. The for loop consolidates the rest-activity rhythm measures into “cr_measures” csv document.

+ +

+
+ +
+

Create Correlation Plots, Matrices, and Graphs

+

Code creates a violin plot with medians for gender and relative amplitute. It also renames the ticks so the graph reflects specific gender identities rather than a number that corresponds to the codebook.

+ +

+

By replacing “bdi” with the variable I want to measure, the code generates the matrix for the specific variable.

+ +

+

This line of code calculates the correlation coefficient between the RA and the specific variable that was measured in the previous code. I disregard variables with a correlation coefficient <0.2.

+ +

By replacing “bdi” with the variable I want to measure, the code generates the scatterplot for the specific variable. It also identifies the linear relationship between the RA and the specific variable.

+ +
## `geom_smooth()` using formula 'y ~ x'
+

+

By replacing “erq” with the variable I want to measure, the code produces the Pearson correlation coefficient between the RA and the specific variable.

+ +
+
+
+
+
+
+ + + + + + + + + + +