Skip to content

Commit

Permalink
update paper for revision 1
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardklap committed Nov 4, 2024
1 parent 870c740 commit dc07dfe
Show file tree
Hide file tree
Showing 166 changed files with 1,677 additions and 104 deletions.
17 changes: 17 additions & 0 deletions _freeze/figures-box-cases/execute-results/html.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"hash": "ab012cc116d31448671c57a0210809fb",
"result": {
"engine": "knitr",
"markdown": "---\ntitle: \"Code for use cases box 2\"\nauthor: \"Eduard Klapwijk\"\n---\n\n\n\n\n\nLoad libraries to produce figures:\n\n\n\n\n\n::: {.cell}\n\n```{.r .cell-code}\n#| eval: TRUE\n#| echo: TRUE\n#| message: FALSE\n#| error: FALSE\n#| warning: FALSE\n# load libraries\nlibrary(dplyr)\n```\n\n::: {.cell-output .cell-output-stderr .hidden}\n\n```\n\nAttaching package: 'dplyr'\n```\n\n\n:::\n\n::: {.cell-output .cell-output-stderr .hidden}\n\n```\nThe following objects are masked from 'package:stats':\n\n filter, lag\n```\n\n\n:::\n\n::: {.cell-output .cell-output-stderr .hidden}\n\n```\nThe following objects are masked from 'package:base':\n\n intersect, setdiff, setequal, union\n```\n\n\n:::\n\n```{.r .cell-code}\n#| eval: TRUE\n#| echo: TRUE\n#| message: FALSE\n#| error: FALSE\n#| warning: FALSE\nlibrary(patchwork)\nlibrary(readr)\nlibrary(neuroUp)\n```\n\n::: {.cell-output .cell-output-stderr .hidden}\n\n```\nWarning: package 'neuroUp' was built under R version 4.3.3\n```\n\n\n:::\n:::\n\n\n\n\n\n\nRead data from file and select complete cases: \n\n\n\n\n\n::: {.cell}\n\n```{.r .cell-code .hidden}\n#| eval: TRUE\n#| echo: FALSE\n#| message: FALSE\n#| warning: FALSE\n\n# read data & select complete cases only (ignore NA)\ndata_luna <- read_csv(\"data/luna_reward-learn_dev_BOLD.csv\")\n```\n\n::: {.cell-output .cell-output-stderr .hidden}\n\n```\nNew names:\nRows: 275 Columns: 8\n── Column specification\n──────────────────────────────────────────────────────── Delimiter: \",\" chr\n(1): sex dbl (7): ...1, lunaid, visitnum, age, beta, null, posrpe\nℹ Use `spec()` to retrieve the full column specification for this data. ℹ\nSpecify the column types or set `show_col_types = FALSE` to quiet this message.\n• `` -> `...1`\n```\n\n\n:::\n\n```{.r .cell-code .hidden}\n#| eval: TRUE\n#| echo: FALSE\n#| message: FALSE\n#| warning: FALSE\n\ndata_luna <- data_luna[complete.cases(data_luna), ]\n```\n:::\n\n\n\n\n\n\nSet seed and create figure with Cohens' d for the box:\n\n\n\n\n\n\n::: {.cell}\n\n```{.r .cell-code .hidden}\n#| label: fig1-box\n#| eval: TRUE\n#| echo: FALSE\n#| message: FALSE\n#| warning: FALSE\n#| fig-height: 3\n#| fig-width: 9\n# set seed\nset.seed(1234)\n\n# Estimate Cohen's d\nluna_cohen_fig <- estim_diff(data = data_luna,\n vars_of_interest = c(\"beta\", \"null\"),\n sample_size = 20:232, \n k = 100, \n name = \"Reward learning caudate\")\n# plot figure 3a\nluna_cohen_fig$fig_cohens_d | luna_cohen_fig$fig_d_nozero \n```\n\n::: {.cell-output-display}\n![](figures-box-cases_files/figure-html/fig1-box-1.png){width=864}\n:::\n:::\n\n\n\n\n\n\nSet seed and create figure with correlations for the box:\n\n\n\n\n\n\n::: {.cell}\n\n```{.r .cell-code .hidden}\n#| label: fig2-box\n#| eval: TRUE\n#| echo: FALSE\n#| message: FALSE\n#| warning: FALSE\n#| fig-height: 3\n#| fig-width: 9\n# set seed\nset.seed(1234)\n\n# Estimate correlations between posrpe (parametric association between BOLD and reward prediction error) and age\nluna_corr_fig <- estim_corr(data = data_luna,\n vars_of_interest = c(\"posrpe\", \"age\"),\n sample_size = 20:232, \n k = 100, \n name = \"Reward learning caudate corr. with age\")\n# plot figure 3a\nluna_corr_fig$fig_corr | luna_corr_fig$fig_corr_nozero\n```\n\n::: {.cell-output-display}\n![](figures-box-cases_files/figure-html/fig2-box-1.png){width=864}\n:::\n:::",
"supporting": [
"figures-box-cases_files"
],
"filters": [
"rmarkdown/pagebreak.lua"
],
"includes": {},
"engineDependencies": {},
"preserve": {},
"postProcess": true
}
}
17 changes: 17 additions & 0 deletions _freeze/figures-box-cases/execute-results/ipynb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"hash": "9e9bc47cb2510cc5bffa16da7fb45ce9",
"result": {
"engine": "knitr",
"markdown": "---\ntitle: \"Code for use cases box 2\"\nauthor: \"Eduard Klapwijk\"\n---\n\n\nLoad libraries to produce figures:\n\n\n::: {.cell}\n\n```{.r .cell-code}\n#| eval: TRUE\n#| echo: TRUE\n#| message: FALSE\n#| error: FALSE\n#| warning: FALSE\n# load libraries\nlibrary(dplyr)\n```\n\n::: {.cell-output .cell-output-stderr .hidden}\n\n```\n\nAttaching package: 'dplyr'\n```\n\n\n:::\n\n::: {.cell-output .cell-output-stderr .hidden}\n\n```\nThe following objects are masked from 'package:stats':\n\n filter, lag\n```\n\n\n:::\n\n::: {.cell-output .cell-output-stderr .hidden}\n\n```\nThe following objects are masked from 'package:base':\n\n intersect, setdiff, setequal, union\n```\n\n\n:::\n\n```{.r .cell-code}\n#| eval: TRUE\n#| echo: TRUE\n#| message: FALSE\n#| error: FALSE\n#| warning: FALSE\nlibrary(patchwork)\nlibrary(readr)\nlibrary(neuroUp)\n```\n\n::: {.cell-output .cell-output-stderr .hidden}\n\n```\nWarning: package 'neuroUp' was built under R version 4.3.3\n```\n\n\n:::\n:::\n\n\n\nRead data from file and select complete cases: \n\n\n::: {.cell}\n\n```{.r .cell-code .hidden}\n#| eval: TRUE\n#| echo: FALSE\n#| message: FALSE\n#| warning: FALSE\n\n# read data & select complete cases only (ignore NA)\ndata_luna <- read_csv(\"data/luna_reward-learn_dev_BOLD.csv\")\n```\n\n::: {.cell-output .cell-output-stderr .hidden}\n\n```\nNew names:\nRows: 275 Columns: 7\n── Column specification\n──────────────────────────────────────────────────────── Delimiter: \",\" chr\n(1): sex dbl (6): ...1, visitnum, age, beta, null, posrpe\nℹ Use `spec()` to retrieve the full column specification for this data. ℹ\nSpecify the column types or set `show_col_types = FALSE` to quiet this message.\n• `` -> `...1`\n```\n\n\n:::\n\n```{.r .cell-code .hidden}\n#| eval: TRUE\n#| echo: FALSE\n#| message: FALSE\n#| warning: FALSE\n\ndata_luna <- data_luna[complete.cases(data_luna), ]\n```\n:::\n\n\n\nSet seed and create figure with Cohens' d for the box:\n\n\n\n::: {.cell}\n\n```{.r .cell-code .hidden}\n#| label: fig1-box\n#| eval: TRUE\n#| echo: FALSE\n#| message: FALSE\n#| warning: FALSE\n#| fig-height: 3\n#| fig-width: 9\n# set seed\nset.seed(1234)\n\n# Estimate Cohen's d\nluna_cohen_fig <- estim_diff(data = data_luna,\n vars_of_interest = c(\"beta\", \"null\"),\n sample_size = 20:232, \n k = 100, \n name = \"Reward learning caudate\")\n# plot figure 3a\nluna_cohen_fig$fig_cohens_d | luna_cohen_fig$fig_d_nozero \n```\n\n::: {.cell-output-display}\n![](figures-box-cases_files/figure-ipynb/fig1-box-1.png)\n:::\n:::\n\n\n\nSet seed and create figure with correlations for the box:\n\n\n\n::: {.cell}\n\n```{.r .cell-code .hidden}\n#| label: fig2-box\n#| eval: TRUE\n#| echo: FALSE\n#| message: FALSE\n#| warning: FALSE\n#| fig-height: 3\n#| fig-width: 10\n# set seed\nset.seed(1234)\n\n# Estimate correlations between posrpe (parametric association between BOLD and reward prediction error) and age\nluna_corr_fig <- estim_corr(data = data_luna,\n vars_of_interest = c(\"posrpe\", \"age\"),\n sample_size = 20:232, \n k = 100, \n name = \"Reward learning caudate corr. with age\")\n# plot figure 3a\nluna_corr_fig$fig_corr | luna_corr_fig$fig_corr_nozero\n```\n\n::: {.cell-output-display}\n![](figures-box-cases_files/figure-ipynb/fig2-box-1.png)\n:::\n:::",
"supporting": [
"figures-box-cases_files/figure-ipynb"
],
"filters": [
"rmarkdown/pagebreak.lua"
],
"includes": {},
"engineDependencies": {},
"preserve": null,
"postProcess": false
}
}
17 changes: 17 additions & 0 deletions _freeze/figures-box-cases/execute-results/xml.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"hash": "ad4e4b4d82430411df6a48bd7f2ce02f",
"result": {
"engine": "knitr",
"markdown": "---\ntitle: \"Code for use cases box 2\"\nauthor: \"Eduard Klapwijk\"\n---\n\n\n\n\n\nLoad libraries to produce figures:\n\n\n\n\n\n::: {.cell}\n\n```{.r .cell-code}\n#| eval: TRUE\n#| echo: TRUE\n#| message: FALSE\n#| error: FALSE\n#| warning: FALSE\n\n# load libraries\nlibrary(dplyr)\n```\n\n::: {.cell-output .cell-output-stderr .hidden}\n\n```\n\nAttaching package: 'dplyr'\n```\n\n\n:::\n\n::: {.cell-output .cell-output-stderr .hidden}\n\n```\nThe following objects are masked from 'package:stats':\n\n filter, lag\n```\n\n\n:::\n\n::: {.cell-output .cell-output-stderr .hidden}\n\n```\nThe following objects are masked from 'package:base':\n\n intersect, setdiff, setequal, union\n```\n\n\n:::\n\n```{.r .cell-code}\n#| eval: TRUE\n#| echo: TRUE\n#| message: FALSE\n#| error: FALSE\n#| warning: FALSE\n\nlibrary(patchwork)\nlibrary(readr)\nlibrary(neuroUp)\n```\n\n::: {.cell-output .cell-output-stderr .hidden}\n\n```\nWarning: package 'neuroUp' was built under R version 4.3.3\n```\n\n\n:::\n:::\n\n\n\n\n\n\nRead data from file and select complete cases: \n\n\n\n\n\n::: {.cell}\n\n```{.r .cell-code .hidden}\n#| eval: TRUE\n#| echo: FALSE\n#| message: FALSE\n#| warning: FALSE\n\n# read data & select complete cases only (ignore NA)\ndata_luna <- read_csv(\"data/luna_reward-learn_dev_BOLD.csv\")\n```\n\n::: {.cell-output .cell-output-stderr .hidden}\n\n```\nNew names:\nRows: 275 Columns: 8\n── Column specification\n──────────────────────────────────────────────────────── Delimiter: \",\" chr\n(1): sex dbl (7): ...1, lunaid, visitnum, age, beta, null, posrpe\nℹ Use `spec()` to retrieve the full column specification for this data. ℹ\nSpecify the column types or set `show_col_types = FALSE` to quiet this message.\n• `` -> `...1`\n```\n\n\n:::\n\n```{.r .cell-code .hidden}\n#| eval: TRUE\n#| echo: FALSE\n#| message: FALSE\n#| warning: FALSE\n\ndata_luna <- data_luna[complete.cases(data_luna), ]\n```\n:::\n\n\n\n\n\n\nSet seed and create figure with Cohens' d for the box:\n\n\n\n\n\n\n::: {.cell}\n\n```{.r .cell-code .hidden}\n#| label: fig1-box\n#| eval: TRUE\n#| echo: FALSE\n#| message: FALSE\n#| warning: FALSE\n\n# set seed\nset.seed(1234)\n\n# Estimate Cohen's d\nluna_cohen_fig <- estim_diff(data = data_luna,\n vars_of_interest = c(\"beta\", \"null\"),\n sample_size = 20:232, \n k = 100, \n name = \"Reward learning caudate\")\n# plot figure 3a\nluna_cohen_fig$fig_cohens_d\n```\n\n::: {.cell-output-display}\n![](figures-box-cases_files/figure-jats/fig1-box-1.png)\n:::\n\n```{.r .cell-code .hidden}\n#| label: fig1-box\n#| eval: TRUE\n#| echo: FALSE\n#| message: FALSE\n#| warning: FALSE\n\nluna_cohen_fig$fig_d_nozero\n```\n\n::: {.cell-output-display}\n![](figures-box-cases_files/figure-jats/fig1-box-2.png)\n:::\n:::\n\n\n\n\n\n\nSet seed and create figure with correlations for the box:\n\n\n\n\n\n\n::: {.cell}\n\n```{.r .cell-code .hidden}\n#| label: fig2-box\n#| eval: TRUE\n#| echo: FALSE\n#| message: FALSE\n#| warning: FALSE\n\n# set seed\nset.seed(1234)\n\n# Estimate correlations between posrpe (parametric association between BOLD and reward prediction error) and age\nluna_corr_fig <- estim_corr(data = data_luna,\n vars_of_interest = c(\"posrpe\", \"age\"),\n sample_size = 20:232, \n k = 100, \n name = \"Reward learning caudate corr. with age\")\n# plot figure 3a\nluna_corr_fig$fig_corr\n```\n\n::: {.cell-output-display}\n![](figures-box-cases_files/figure-jats/fig2-box-1.png)\n:::\n\n```{.r .cell-code .hidden}\n#| label: fig2-box\n#| eval: TRUE\n#| echo: FALSE\n#| message: FALSE\n#| warning: FALSE\n\nluna_corr_fig$fig_corr_nozero\n```\n\n::: {.cell-output-display}\n![](figures-box-cases_files/figure-jats/fig2-box-2.png)\n:::\n:::",
"supporting": [
"figures-box-cases_files/figure-jats"
],
"filters": [
"rmarkdown/pagebreak.lua"
],
"includes": {},
"engineDependencies": {},
"preserve": null,
"postProcess": false
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit dc07dfe

Please sign in to comment.