-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch_index.json
More file actions
8 lines (8 loc) · 8.87 KB
/
search_index.json
File metadata and controls
8 lines (8 loc) · 8.87 KB
1
2
3
4
5
6
7
8
[
["index.html", "Bayesian Pulsatile Hormone Modeling with R Welcome", " Bayesian Pulsatile Hormone Modeling with R Nichole E Carlson, Karen Liu, Matthew J Mulvahill, and Ken Horton 2018-02-23 Welcome "],
["preface.html", "Preface", " Preface This is the website for This work by Nichole Carlson, Matt Mulvahill, Karen Liu, and Ken Horton is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. "],
["preface-1.html", "Preface", " Preface This is our preface and an introduction to th structure of the book. "],
["introduction.html", "Chapter 1 Introduction", " Chapter 1 Introduction This is the introduction to the R package Possible sections are Motivation and published research Getting started Brief introduction to the model "],
["appendix-a-development-plan.html", "A Appendix A: Development Plan A.1 Software map A.2 Base code versions for github archiving", " A Appendix A: Development Plan Algorithm incorporation Joint pulses covariates Population model covariates Modularization/refactoring Manual/webbook Package features Summary and diagnostic functions A.1 Software map Single subject Single hormone 2 hormones Options: Orderstat vs Strauss Changing baseline?? Population model Single hormone Single group (no covariates) Covariates (> 1 group) Choose which parameters to do as a regression (- categorical parameters; - continuous parameters), others under single group assumptions. 2 hormones Single group non 1-to-1 (imperfect) 2 driver (method needed) (what does this mean?) Covariates (> 1 group) non 1-to-1, imperfect, ???pamm done (p), need v/nu?? (what does this mean?) 2 driver (method needed) (what does this mean?) A.2 Base code versions for github archiving All variations Major versions Single-subject, single hormone Single-subject, associational (2-hormone) Population model, single hormone Population model, covariates, single hormone Population model, associational (2-hormone) hormone Population model, covariates, associational (2-hormone) hormone Minor versions Fixed baseline vs. change-point baseline vs changing baseline (sinusoidal) Orderstat vs. Strauss prior on pulse location Log-normal vs. truncated t prior on mean mass/width Only truncated-t going forward Inverse Wishart vs. half-Cauchy vs. Uniform prior on re_sd Only Uniform prior going forward Questions Terminology: driver/response OR trigger/response Summary and diagnostic functions mcmc_trace <- function() {} mcmc_posteriors <- function() {} mcmc_locations <- function() {} STAN and other Bayesian R package functions to implement Posterior predicted values/plot rstanarm::posterior_predict() rstanarm::ppc_dens_overlay() rstanarm::ppc_intervals() Posterior densities rstanarm::mcmc_areas() #-------------------------------------------- # STAN examples # Some examples http://mc-stan.org/bayesplot/ #-------------------------------------------- if (!require(bayesplot)) install.packages("bayesplot") ## Loading required package: bayesplot ## This is bayesplot version 1.4.0 ## - Plotting theme set to bayesplot::theme_default() ## - Online documentation at mc-stan.org/bayesplot if (!require(rstanarm)) install.packages("rstanarm") ## Loading required package: rstanarm ## Loading required package: Rcpp ## Loading required package: methods ## rstanarm (Version 2.17.3, packaged: 2018-02-17 05:11:16 UTC) ## - Do not expect the default priors to remain the same in future rstanarm versions. ## Thus, R scripts should specify priors explicitly, even if they are just the defaults. ## - For execution on a local, multicore CPU with excess RAM we recommend calling ## options(mc.cores = parallel::detectCores()) ## - Plotting theme set to bayesplot::theme_default(). if (!require(ggplot2)) install.packages("ggplot2") ## Loading required package: ggplot2 library(bayesplot) library(rstanarm) library(ggplot2) fit <- stan_glm(mpg ~ ., data = mtcars) ## ## SAMPLING FOR MODEL 'continuous' NOW (CHAIN 1). ## ## Gradient evaluation took 5.4e-05 seconds ## 1000 transitions using 10 leapfrog steps per transition would take 0.54 seconds. ## Adjust your expectations accordingly! ## ## ## Iteration: 1 / 2000 [ 0%] (Warmup) ## Iteration: 200 / 2000 [ 10%] (Warmup) ## Iteration: 400 / 2000 [ 20%] (Warmup) ## Iteration: 600 / 2000 [ 30%] (Warmup) ## Iteration: 800 / 2000 [ 40%] (Warmup) ## Iteration: 1000 / 2000 [ 50%] (Warmup) ## Iteration: 1001 / 2000 [ 50%] (Sampling) ## Iteration: 1200 / 2000 [ 60%] (Sampling) ## Iteration: 1400 / 2000 [ 70%] (Sampling) ## Iteration: 1600 / 2000 [ 80%] (Sampling) ## Iteration: 1800 / 2000 [ 90%] (Sampling) ## Iteration: 2000 / 2000 [100%] (Sampling) ## ## Elapsed Time: 0.475231 seconds (Warm-up) ## 0.391947 seconds (Sampling) ## 0.867178 seconds (Total) ## ## ## SAMPLING FOR MODEL 'continuous' NOW (CHAIN 2). ## ## Gradient evaluation took 1.7e-05 seconds ## 1000 transitions using 10 leapfrog steps per transition would take 0.17 seconds. ## Adjust your expectations accordingly! ## ## ## Iteration: 1 / 2000 [ 0%] (Warmup) ## Iteration: 200 / 2000 [ 10%] (Warmup) ## Iteration: 400 / 2000 [ 20%] (Warmup) ## Iteration: 600 / 2000 [ 30%] (Warmup) ## Iteration: 800 / 2000 [ 40%] (Warmup) ## Iteration: 1000 / 2000 [ 50%] (Warmup) ## Iteration: 1001 / 2000 [ 50%] (Sampling) ## Iteration: 1200 / 2000 [ 60%] (Sampling) ## Iteration: 1400 / 2000 [ 70%] (Sampling) ## Iteration: 1600 / 2000 [ 80%] (Sampling) ## Iteration: 1800 / 2000 [ 90%] (Sampling) ## Iteration: 2000 / 2000 [100%] (Sampling) ## ## Elapsed Time: 0.447735 seconds (Warm-up) ## 0.425246 seconds (Sampling) ## 0.872981 seconds (Total) ## ## ## SAMPLING FOR MODEL 'continuous' NOW (CHAIN 3). ## ## Gradient evaluation took 1.7e-05 seconds ## 1000 transitions using 10 leapfrog steps per transition would take 0.17 seconds. ## Adjust your expectations accordingly! ## ## ## Iteration: 1 / 2000 [ 0%] (Warmup) ## Iteration: 200 / 2000 [ 10%] (Warmup) ## Iteration: 400 / 2000 [ 20%] (Warmup) ## Iteration: 600 / 2000 [ 30%] (Warmup) ## Iteration: 800 / 2000 [ 40%] (Warmup) ## Iteration: 1000 / 2000 [ 50%] (Warmup) ## Iteration: 1001 / 2000 [ 50%] (Sampling) ## Iteration: 1200 / 2000 [ 60%] (Sampling) ## Iteration: 1400 / 2000 [ 70%] (Sampling) ## Iteration: 1600 / 2000 [ 80%] (Sampling) ## Iteration: 1800 / 2000 [ 90%] (Sampling) ## Iteration: 2000 / 2000 [100%] (Sampling) ## ## Elapsed Time: 0.435891 seconds (Warm-up) ## 0.419295 seconds (Sampling) ## 0.855186 seconds (Total) ## ## ## SAMPLING FOR MODEL 'continuous' NOW (CHAIN 4). ## ## Gradient evaluation took 1.8e-05 seconds ## 1000 transitions using 10 leapfrog steps per transition would take 0.18 seconds. ## Adjust your expectations accordingly! ## ## ## Iteration: 1 / 2000 [ 0%] (Warmup) ## Iteration: 200 / 2000 [ 10%] (Warmup) ## Iteration: 400 / 2000 [ 20%] (Warmup) ## Iteration: 600 / 2000 [ 30%] (Warmup) ## Iteration: 800 / 2000 [ 40%] (Warmup) ## Iteration: 1000 / 2000 [ 50%] (Warmup) ## Iteration: 1001 / 2000 [ 50%] (Sampling) ## Iteration: 1200 / 2000 [ 60%] (Sampling) ## Iteration: 1400 / 2000 [ 70%] (Sampling) ## Iteration: 1600 / 2000 [ 80%] (Sampling) ## Iteration: 1800 / 2000 [ 90%] (Sampling) ## Iteration: 2000 / 2000 [100%] (Sampling) ## ## Elapsed Time: 0.419634 seconds (Warm-up) ## 0.385577 seconds (Sampling) ## 0.805211 seconds (Total) posterior <- as.matrix(fit) plot_title <- ggtitle("Posterior distributions with medians and 80% intervals") mcmc_areas(posterior, pars = c("cyl", "drat", "am", "wt"), prob = 0.8) + plot_title ppc_intervals(y = mtcars$mpg, yrep = posterior_predict(fit), x = mtcars$wt, prob = 0.5) + labs(x = "Weight (1000 lbs)", y = "MPG", title = "50% posterior predictive intervals \\nvs observed miles per gallon", subtitle = "by vehicle weight") + panel_bg(fill = "gray95", color = NA) + grid_lines(color = "white") "],
["derivations-of-posterior-distributions.html", "B Derivations of posterior distributions B.1 Single-subject", " B Derivations of posterior distributions B.1 Single-subject B.1.1 \\(\\pi(\\nu|\\cdots)\\) – Standard deviation of the random effects $ \\[\\begin{align} \\pi(\\nu_{\\alpha} | \\cdots) &\\propto \\pi(\\nu_{\\alpha}) \\pi(\\alpha_i | \\mu_{\\alpha}, \\nu_{\\alpha}, \\vect{\\kappa}_{\\alpha}) \\\\ where,\\\\ & \\nu_{\\alpha} \\sim Unif(0, a)\\\\ & \\alpha_i | \\mu_{\\alpha}, \\nu_{\\alpha}, \\vect{\\kappa}_{\\alpha} \\sim t^+_4 (\\mu_{\\alpha}, \\nu^2_{\\alpha})\\\\ \\\\ \\end{align}\\] $ The distribution of \\(\\nu_{\\alpha}\\) is evident. The distribution of \\(\\pi(\\alpha_i | \\mu_{\\alpha}, \\nu_{\\alpha}, \\vect{\\kappa}_{\\alpha})\\) is achieved using a normal-gamma mixture: $ \\[\\begin{align} \\pi(\\alpha_i | \\mu_{\\alpha}, \\nu_{\\alpha}, \\vect{\\kappa}_{\\alpha}) &\\sim N^+ (\\mu_{\\alpha}, \\frac{\\nu^2_{\\alpha}}{\\vect{\\kappa}_{\\alpha}})\\\\ where,\\\\ & \\vect{\\kappa}_{\\alpha} \\sim \\Gamma(r/2,r/2)\\\\ \\end{align}\\] $ "]
]