05 Model comparison and hypothesis testing
Shravan Vasishth September 03, 2019
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 1 / 64
05 Model comparison and hypothesis testing Shravan Vasishth - - PowerPoint PPT Presentation
05 Model comparison and hypothesis testing Shravan Vasishth September 03, 2019 Shravan Vasishth 05 Model comparison and hypothesis testing 1 / 64 September 03, 2019 Introduction Bayes rule can be written with reference to a specific
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 1 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 2 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 3 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 4 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 5 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 6 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 7 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 8 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 9 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 10 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 11 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 12 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 13 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 14 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 15 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 16 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 17 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 18 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 19 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 20 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 21 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 22 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 23 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 24 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 25 / 64
↑
↑
↑
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 26 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 27 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 28 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 29 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 30 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 31 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 32 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 33 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 34 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 35 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 36 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 37 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 38 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 39 / 64
model_example1 <- " data { int<lower=0> ndata; vector[ndata] x; } parameters { real<lower=0> sigma; real delta; } transformed parameters { real mu; mu = delta * sigma; } model { sigma ~ cauchy(0, 1); delta ~ cauchy(0, 1); x ~ normal(mu, sigma); }" Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 40 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 41 / 64
Histogram of delta.posterior
delta.posterior Density −3 −2 −1 1 2 3 0.0 1.0 2.0 Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 42 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 43 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 44 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 45 / 64
# Parameters to be monitored parameters <- c("delta") model_example2 <- " // One-Sample Comparison of Means data { int<lower=0> ndata; vector[ndata] x; } parameters { real<lower=0> sigma; real<upper=0> delta; } transformed parameters { real mu; mu = delta * sigma; } model { // delta and sigma Come From (Half) Cauchy Distributions sigma ~ cauchy(0, 1); delta ~ cauchy(0, 1); // Data x ~ normal(mu, sigma); }" Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 46 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 47 / 64
Posterior distribution and prior (line)
delta.posterior Density −3.0 −2.5 −2.0 −1.5 −1.0 −0.5 0.0 2 4 6 Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 48 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 49 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 50 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 51 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 52 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 53 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 54 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 55 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 56 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 57 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 58 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 59 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 60 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 61 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 62 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 63 / 64
Shravan Vasishth 05 Model comparison and hypothesis testing September 03, 2019 64 / 64