This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kid_score | mom_hs | mom_iq | mom_work | mom_age | |
|---|---|---|---|---|---|
| 65 | Completed | 121.118 | 4 | 27 | |
| 98 | Completed | 89.362 | 4 | 25 | |
| 85 | Completed | 115.443 | 4 | 27 | |
| 83 | Completed | 99.45 | 3 | 25 | |
| 115 | Completed | 92.746 | 4 | 27 | |
| 98 | Did not complete | 107.902 | 1 | 18 | |
| 69 | Completed | 138.893 | 4 | 20 | |
| 106 | Completed | 125.145 | 3 | 23 | |
| 102 | Completed | 81.62 | 1 | 24 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| month | temperature | day.of.week | icecreams.sold | |
|---|---|---|---|---|
| 5 | 18.46 | Su | 60 | |
| 6 | 20.42 | Th | 102 | |
| 1 | 13.02 | Sa | 62 | |
| 3 | 17.98 | We | 46 | |
| 6 | 14.31 | Su | 110 | |
| 4 | 16.87 | Th | 24 | |
| 8 | 23.77 | Th | 52 | |
| 2 | 11.02 | Tu | 26 | |
| 12 | 14.36 | We | 46 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| // Mailmate keybindings | |
| "\U007F" = "archive:"; // ⌫ | |
| "@\U007F" = "deleteMessage:"; // ⌘+⌫ | |
| " " = "scrollPageDownOrNextUnreadMessage:"; | |
| "@S" = "saveAttachments:"; | |
| // Based on: https://mail.google.com/support/bin/answer.py?answer=6594 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(brms) | |
| library(tidyverse) | |
| m1 <- rstanarm::stan_glm(mpg~wt, data=mtcars) | |
| prior_summary(m1) | |
| # see what priors brms will let you set | |
| get_prior(mpg~wt, data=mtcars) | |
| # then then mimic beta priors from rstanarm (inc rstanarm autoscaling) | |
| m2 <- brm(mpg~wt, data=mtcars, sample_prior="only", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Prior <- c(set_prior("normal(0, 30)", class = "b")) | |
| options(mc.cores=parallel::detectCores ()-1) | |
| f.interaction <- bf(Pressure ~ Awareness * | |
| Agency * | |
| Resp.Alt * | |
| VisualPrime * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| title: Quantifying uncertainty | |
| output: html_document | |
| --- | |
| ```{r} | |
| library(tidyverse) | |
| ``` | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| title: "Untitled" | |
| output: html_document | |
| --- | |
| ```{r setup, include=FALSE} | |
| knitr::opts_chunk$set(echo = TRUE) | |
| ``` | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wt | .row | .chain | .iteration | estimate | dist | |
|---|---|---|---|---|---|---|
| 1 | 1 | NA | 1 | 35.63558606434021 | posterior | |
| 1 | 1 | NA | 2 | 28.530141107955775 | posterior | |
| 1 | 1 | NA | 3 | 29.350245281355008 | posterior | |
| 1 | 1 | NA | 4 | 29.451646459250988 | posterior | |
| 1 | 1 | NA | 5 | 29.95125999190543 | posterior | |
| 1 | 1 | NA | 6 | 29.819994020090522 | posterior | |
| 1 | 1 | NA | 7 | 36.52057328196404 | posterior | |
| 1 | 1 | NA | 8 | 35.9813523220044 | posterior | |
| 1 | 1 | NA | 9 | 35.617712360402834 | posterior |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sprintcol <- function(x, sig.digits = 3) { | |
| rounded <- paste(signif(x, sig.digits)) | |
| max.decimal <- | |
| str_extract(rounded, "\\.(\\d+)") %>% | |
| str_length() %>% | |
| max(c(0, .), na.rm = T) - 1 | |
| max.decimal <- max(max.decimal, min(abs(max.decimal), 0)) | |
| sprintf(fmt = glue::glue("%.{max.decimal}f"), x) | |
| } |