This repository has been archived by the owner on Apr 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathREADME.Rmd
70 lines (49 loc) · 3.5 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
title: "Modeling the Effects of Nutrition with Mixed-Effect Bayesian Network"
author: "Jari Turkia"
output:
md_document:
variant: markdown_github
html_document: default
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Modeling the Effects of Nutrition with Mixed-Effect Bayesian Network
This work proposes Mixed-Effect Bayesian Network (MEBN) as a method for modeling the effects of nutrition. It allows to identify both typical and personal correlations between nutrients and their bodily responses. Predicting a personal network of nutritional reactions would allow interesting applications at personal diets and in understanding this complex system. Brief theory of MEBN is given followed by implementation in R and Stan. A real life dataset from a nutritional Sysdimet study is then analyzed with the method and the results are visualized with an interactive JavaScript-visualization.
[View HTML-version of the notebook here](http://htmlpreview.github.io/?https://github.com/turkiaj/StanCon2018/blob/master/PersonalEffectsOfNutrition.html)
## Contents
Main body of the presentation is found here as fully functional RMarkdown notebook, and also HTML and PDF renderitions of it. The notebook uses my R-package "MEBN" for constructing a Mixed-Effect Bayesian Network that models the effects of nutrition from a real life nutritional dataset. The fully Bayesian estimation of the local mixed-effect models at the network is done with Stan. Visualization of the network is created with JavaScript library sigma.js and some customizations of it.
- PersonalEffectsOfNutrition.Rmd : RMarkdown notebook
- PersonalEffectsOfNutrition.html : HTML knit of the notebook with active JavaScript visualization
- PersonalEffectsOfNutrition.pdf : PDF knit of the notebook
- population_graph.htm : HTML document for graph visualization
- biblio.bib : References for the notebook in BibLatex format
- data-folder: The dataset that is used in the notebook analysis
- Data description.csv : CSV file that describes the metadata for analyzed dataset
- mebn-folder: The R-code for constructing MEBN and stan-model definitions
- visualization-folder: JavaScript code for graph visualization
- models-folder: Sampled Stan-models are cached in this folder once the notebook is executed. It is empty by default.
## License
Material in this repository is licensed under CC 4.0
https://creativecommons.org/licenses/by/4.0/
## Requirements
Besides working installation of Stan, following R-packages are required for this notebook to execute correctly.
Use install_packages.r script to install.
** Session Info **
R version 3.4.4 (2018-03-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows Server 2008 R2 x64 (build 7601) Service Pack 1
Matrix products: default
locale:
[1] LC_COLLATE=Finnish_Finland.1252 LC_CTYPE=Finnish_Finland.1252
[3] LC_MONETARY=Finnish_Finland.1252 LC_NUMERIC=C
[5] LC_TIME=Finnish_Finland.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] Rcpp_0.12.16 digest_0.6.15 rprojroot_1.3-2 plyr_1.8.4 grid_3.4.4
[6] gtable_0.2.0 backports_1.1.2 magrittr_1.5 evaluate_0.10.1 scales_0.5.0
[11] pillar_1.2.1 ggplot2_2.2.1 rlang_0.2.0 stringi_1.1.7 lazyeval_0.2.1
[16] rmarkdown_1.9 tools_3.4.4 stringr_1.3.0 munsell_0.4.3 yaml_2.1.19
[21] compiler_3.4.4 colorspace_1.3-2 htmltools_0.3.6 knitr_1.20 tibble_1.4.2