SlideShare a Scribd company logo
1 of 60
Download to read offline
https://twitter.com/_inundata/status/616658949761302528
http://www.slideshare.net/matsukenbook
p11 p01
= p11 p01 =
n11
n11 + n10
n01
n01 + n00
RR =
p11
p01
=
n11
N1·
/
n01
N0·
=
n11N0·
n01N1·
0
RR < 1
RR = 1
1 < RR
OR =
p11/p10
p01/p00
=
(n11/N1·)/(n10/N1·)
(n01/N0·)/(n00/N0·)
=
(n11/N·1)/(n10/N·1)
(n01/N·0)/(n00/N0·0)
=
n11
p10
/
p01
p00
OR < 1
OR = 1
1 < OR
n11 ⇠ Bin(p11, N1·)
n10 ⇠ Bin(p10, N1·)
n01 ⇠ Bin(p01, N0·)
n00 ⇠ Bin(p00, N0·)
model{	
  
	
  	
  	
  	
  for(i	
  in	
  1:2){	
  
	
  	
  	
  	
  	
  	
  	
  	
  for(j	
  in	
  1:2){	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  n[i,j]	
  ~	
  binomial(N[j],	
  p[j][i]);	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  }	
  
}
 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  mean	
  se_mean	
  	
  	
  	
  	
  sd	
  	
  	
  2.5%	
  	
  	
  	
  25%	
  	
  	
  	
  50%	
  	
  	
  	
  75%	
  	
  97.5%	
  	
  n_eff	
  	
  	
  Rhat	
  
p[0,0]	
  	
  	
  	
  	
  	
  	
  0.58	
  	
  5.0e-­‐4	
  	
  	
  0.02	
  	
  	
  0.53	
  	
  	
  0.56	
  	
  	
  0.58	
  	
  	
  0.59	
  	
  	
  0.63	
  	
  	
  2429	
  	
  	
  	
  1.0	
  
p[1,0]	
  	
  	
  	
  	
  	
  	
  0.42	
  	
  4.9e-­‐4	
  	
  	
  0.03	
  	
  	
  0.37	
  	
  	
  0.41	
  	
  	
  0.42	
  	
  	
  0.44	
  	
  	
  0.47	
  	
  	
  2557	
  	
  	
  	
  1.0	
  
p[0,1]	
  	
  	
  	
  	
  	
  	
  0.42	
  	
  5.0e-­‐4	
  	
  	
  0.02	
  	
  	
  0.37	
  	
  	
  0.41	
  	
  	
  0.42	
  	
  	
  0.44	
  	
  	
  0.47	
  	
  	
  2429	
  	
  	
  	
  1.0	
  
p[1,1]	
  	
  	
  	
  	
  	
  	
  0.58	
  	
  4.9e-­‐4	
  	
  	
  0.03	
  	
  	
  0.53	
  	
  	
  0.56	
  	
  	
  0.58	
  	
  	
  0.59	
  	
  	
  0.63	
  	
  	
  2557	
  	
  	
  	
  1.0	
  
d	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  0.15	
  	
  7.0e-­‐4	
  	
  	
  0.04	
  	
  	
  0.08	
  	
  	
  0.13	
  	
  	
  0.15	
  	
  	
  0.18	
  	
  	
  0.22	
  	
  	
  2513	
  	
  	
  	
  1.0	
  
delta_over	
  	
  	
  	
  1.0	
  	
  	
  	
  	
  0.0	
  	
  	
  	
  0.0	
  	
  	
  	
  1.0	
  	
  	
  	
  1.0	
  	
  	
  	
  1.0	
  	
  	
  	
  1.0	
  	
  	
  	
  1.0	
  	
  10000	
  	
  	
  	
  nan	
  
p11	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  0.58	
  	
  5.0e-­‐4	
  	
  	
  0.02	
  	
  	
  0.53	
  	
  	
  0.56	
  	
  	
  0.58	
  	
  	
  0.59	
  	
  	
  0.63	
  	
  	
  2429	
  	
  	
  	
  1.0	
  
p10	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  0.42	
  	
  5.0e-­‐4	
  	
  	
  0.02	
  	
  	
  0.37	
  	
  	
  0.41	
  	
  	
  0.42	
  	
  	
  0.44	
  	
  	
  0.47	
  	
  	
  2429	
  	
  	
  	
  1.0	
  
p01	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  0.42	
  	
  4.9e-­‐4	
  	
  	
  0.03	
  	
  	
  0.37	
  	
  	
  0.41	
  	
  	
  0.42	
  	
  	
  0.44	
  	
  	
  0.47	
  	
  	
  2557	
  	
  	
  	
  1.0	
  
p00	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  0.58	
  	
  4.9e-­‐4	
  	
  	
  0.03	
  	
  	
  0.53	
  	
  	
  0.56	
  	
  	
  0.58	
  	
  	
  0.59	
  	
  	
  0.63	
  	
  	
  2557	
  	
  	
  	
  1.0	
  
RR	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  1.37	
  	
  2.0e-­‐3	
  	
  	
  	
  0.1	
  	
  	
  1.19	
  	
  	
  	
  1.3	
  	
  	
  1.37	
  	
  	
  1.43	
  	
  	
  1.58	
  	
  	
  2510	
  	
  	
  	
  1.0	
  
OR	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  1.89	
  	
  5.6e-­‐3	
  	
  	
  0.28	
  	
  	
  1.41	
  	
  	
  1.69	
  	
  	
  1.86	
  	
  	
  2.06	
  	
  	
  2.49	
  	
  	
  2466	
  	
  	
  	
  1.0	
  
lp__	
  	
  	
  	
  	
  	
  	
  -­‐548.7	
  	
  	
  	
  0.03	
  	
  	
  1.05	
  -­‐551.6	
  -­‐549.0	
  -­‐548.3	
  -­‐547.9	
  -­‐547.7	
  	
  	
  1586	
  	
  	
  	
  1.0
q =
1
1 ⇢2
"✓
x1 µ1
1
◆2
2⇢
✓
x1 µ1
1
◆ ✓
x2 µ2
2
◆
+
✓
x2 µ2
2
◆2
#
f(x1, x2|µ1, µ2, 2
1, 2
2) =
1
2⇡ 1 2
p
1 ⇢
e q/2
⇢A, ⇢B
(t)
⇢ =
(t)
⇢B ⇢A
= g(⇢
(t)
A , ⇢
(t)
B ) = ⇢
(t)
B ⇢
(t)
A
u
(t)
⇢>0 = g(⇢
(t)
A , ⇢
(t)
B )
(
1
(t)
⇢ > 0
0 otherwise
transformed	
  parameters{	
  
	
  	
  	
  	
  SigmaA[1,2]	
  <-­‐	
  sigmaA[1]*sigmaA[2]*rhoA;	
  
	
  	
  	
  	
  SigmaA[2,1]	
  <-­‐	
  sigmaA[1]*sigmaA[2]*rhoA;	
  
	
  	
  	
  	
  SigmaB[1,2]	
  <-­‐	
  sigmaB[1]*sigmaB[2]*rhoB;	
  
	
  	
  	
  	
  SigmaB[2,1]	
  <-­‐	
  sigmaB[1]*sigmaB[2]*rhoB;	
  
}	
  
model{	
  
	
  	
  	
  	
  for(i	
  in	
  1:N){	
  
	
  	
  	
  	
  	
  	
  	
  	
  xA[i]	
  ~	
  multi_normal(muA,	
  SigmaA);	
  
	
  	
  	
  	
  	
  	
  	
  	
  xB[i]	
  ~	
  multi_normal(muB,	
  SigmaB);	
  
	
  	
  	
  	
  }	
  
}	
  
generated	
  quantities{	
  
	
  	
  	
  	
  real	
  delta_r;	
  
	
  	
  	
  	
  real	
  delta_r_over;	
  
	
  	
  	
  	
  delta_r	
  <-­‐	
  rhoB	
  -­‐	
  rhoA;	
  
	
  	
  	
  	
  delta_r_over	
  <-­‐	
  step(delta_r);	
  
}
 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  mean	
  se_mean	
  	
  	
  	
  	
  sd	
  	
  	
  2.5%	
  	
  	
  	
  25%	
  	
  	
  	
  50%	
  	
  	
  	
  75%	
  	
  97.5%	
  	
  n_eff	
  	
  	
  Rhat	
  
rhoA	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  0.63	
  	
  8.1e-­‐4	
  	
  	
  0.04	
  	
  	
  0.54	
  	
  	
  	
  0.6	
  	
  	
  0.63	
  	
  	
  0.66	
  	
  	
  0.71	
  	
  	
  2876	
  	
  	
  	
  1.0	
  
rhoB	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  0.72	
  	
  6.7e-­‐4	
  	
  	
  0.03	
  	
  	
  0.65	
  	
  	
  	
  0.7	
  	
  	
  0.73	
  	
  	
  0.75	
  	
  	
  0.79	
  	
  	
  2626	
  	
  	
  	
  1.0	
  
delta_r	
  	
  	
  	
  	
  	
  	
  	
  	
  0.1	
  	
  1.0e-­‐3	
  	
  	
  0.06-­‐9.0e-­‐3	
  	
  	
  0.06	
  	
  	
  	
  0.1	
  	
  	
  0.14	
  	
  	
  0.21	
  	
  	
  2790	
  	
  	
  	
  1.0	
  
delta_r_over	
  	
  	
  0.96	
  	
  3.6e-­‐3	
  	
  	
  0.19	
  	
  	
  	
  0.0	
  	
  	
  	
  1.0	
  	
  	
  	
  1.0	
  	
  	
  	
  1.0	
  	
  	
  	
  1.0	
  	
  	
  2814	
  	
  	
  	
  1.0	
  
⇢11(= 1.00)
⇢22(= 1.00)
⇢33(= 1.00)
⇢21
⇢31 ⇢32
⇢2
= ⇢32 ⇢21
transformed	
  parameters{	
  
	
  	
  	
  	
  vector<lower=0>[3]	
  sig2;	
  
	
  	
  	
  	
  matrix[3,3]	
  Sigma;	
  
	
  	
  	
  	
  for(i	
  in	
  1:3){	
  
	
  	
  	
  	
  	
  	
  	
  	
  sig2[i]	
  <-­‐	
  pow(sigma[i],2);	
  
	
  	
  	
  	
  }	
  
	
  	
  	
  	
  Sigma	
  <-­‐	
  diag_matrix(sigma)	
  *	
  rho	
  *	
  diag_matrix(sigma);	
  
}	
  
model{	
  
	
  	
  	
  	
  for(i	
  in	
  1:N){	
  
	
  	
  	
  	
  	
  	
  	
  	
  x[i]	
  ~	
  multi_normal(mu,Sigma);	
  
	
  	
  	
  	
  }	
  
}	
  
generated	
  quantities{	
  	
  	
  	
  	
  
	
  	
  	
  	
  rho_21	
  <-­‐	
  rho[2,1];	
  
	
  	
  	
  	
  rho_31	
  <-­‐	
  rho[3,1];	
  
	
  	
  	
  	
  rho_32	
  <-­‐	
  rho[3,2];	
  
	
  	
  	
  	
  delta_r2	
  <-­‐	
  rho[3,2]	
  -­‐	
  rho[2,1];	
  
	
  	
  	
  	
  delta_r2_over	
  <-­‐	
  step(delta_r2);	
  
}
 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  mean	
  se_mean	
  	
  	
  	
  	
  sd	
  	
  	
  2.5%	
  	
  	
  	
  25%	
  	
  	
  	
  50%	
  	
  	
  	
  75%	
  	
  97.5%	
  	
  n_eff	
  	
  	
  Rhat	
  
rho_21	
  	
  	
  	
  	
  	
  	
  	
  0.45	
  	
  1.3e-­‐3	
  	
  	
  0.06	
  	
  	
  0.33	
  	
  	
  0.41	
  	
  	
  0.45	
  	
  	
  0.49	
  	
  	
  0.57	
  	
  	
  2358	
  	
  	
  	
  1.0	
  
rho_31	
  	
  	
  	
  	
  	
  	
  	
  0.62	
  	
  9.7e-­‐4	
  	
  	
  0.05	
  	
  	
  0.52	
  	
  	
  0.59	
  	
  	
  0.62	
  	
  	
  0.65	
  	
  	
  	
  0.7	
  	
  	
  2406	
  	
  	
  	
  1.0	
  
rho_32	
  	
  	
  	
  	
  	
  	
  	
  0.75	
  	
  6.8e-­‐4	
  	
  	
  0.03	
  	
  	
  0.67	
  	
  	
  0.73	
  	
  	
  0.75	
  	
  	
  0.77	
  	
  	
  0.81	
  	
  	
  2552	
  	
  	
  	
  1.0
(t)
⇢2
= g(⇢21 ⇢32) = ⇢
(t)
32 ⇢
(t)
21
u
(t)
⇢2 >0
(
1
(t)
⇢2 > 0
0 otherwise
 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  mean	
  se_mean	
  	
  	
  	
  	
  sd	
  	
  	
  2.5%	
  	
  	
  	
  25%	
  	
  	
  	
  50%	
  	
  	
  	
  75%	
  	
  97.5%	
  	
  n_eff	
  	
  	
  Rhat	
  
delta_r2	
  	
  	
  	
  	
  	
  	
  0.3	
  	
  1.1e-­‐3	
  	
  	
  0.05	
  	
  	
  0.19	
  	
  	
  0.26	
  	
  	
  0.29	
  	
  	
  0.33	
  	
  	
  0.41	
  	
  	
  2562	
  	
  	
  	
  1.0	
  
delta_r2_over	
  	
  1.0	
  	
  	
  	
  	
  0.0	
  	
  	
  	
  0.0	
  	
  	
  	
  1.0	
  	
  	
  	
  1.0	
  	
  	
  	
  1.0	
  	
  	
  	
  1.0	
  	
  	
  	
  1.0	
  	
  10000	
  	
  	
  	
  nan
x
y
x1 x2
y
Nx = 500
Nx1
= 378
Ny = 122
Ny
Y
i=1
p(x2i, yi|µx2
, µy, 2
x2
, 2
y, 2
x2y)
x2
y
for(i	
  in	
  1:Ny){	
  
	
  	
  	
  	
  y[i]	
  ~	
  multi_normal(mu2,	
  S2);	
  
}
Ny
Y
i=1
p(x2i, yi|µx2
, µy, 2
x2
, 2
y, 2
x2y)
Ny
Y
i=1
p(x2i, yi|µx, µy, 2
x, 2
y, 2
xy)
Nx1Y
j=1
p(x1j|µx, 2
x)
x2
y
for(i	
  in	
  1:Ny){	
  
	
  	
  	
  	
  y[i]	
  ~	
  multi_normal(mu,	
  Sigma);	
  
}	
  
for(i	
  in	
  1:Nx){	
  
	
  	
  	
  	
  x[i]	
  ~	
  normal(mu[1],	
  sqrt(sigma[1]));	
  
}
x
Ny
Y
i=1
p(x2i, yi|µx, µy, 2
x, 2
y, 2
xy)
Nx1Y
j=1
p(x1j|µx, 2
x)
 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  mean	
  se_mean	
  	
  	
  	
  	
  sd	
  	
  	
  2.5%	
  	
  	
  	
  25%	
  	
  	
  	
  50%	
  	
  	
  	
  75%	
  	
  97.5%	
  	
  n_eff	
  	
  	
  Rhat	
  
rho_truncated	
  0.6	
  	
  	
  1.1e-­‐3	
  	
  	
  0.06	
  	
  	
  0.47	
  	
  	
  0.56	
  	
  	
  	
  0.6	
  	
  	
  0.64	
  	
  	
  0.7	
  	
  	
  2824	
  	
  	
  	
  1.0	
  
rho_corrected	
  0.81	
  	
  8.8e-­‐4	
  	
  	
  0.04	
  	
  	
  0.71	
  	
  	
  0.79	
  	
  	
  0.82	
  	
  	
  0.84	
  	
  	
  0.88	
  	
  2182	
  	
  	
  	
  1.0
2
xy
x
y
Nx = 500
Ny = 500
 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  mean	
  se_mean	
  	
  	
  	
  	
  sd	
  	
  	
  2.5%	
  	
  	
  	
  25%	
  	
  	
  	
  50%	
  	
  	
  	
  75%	
  	
  97.5%	
  	
  n_eff	
  	
  	
  Rhat	
  
rho_truncated	
  0.6	
  	
  	
  1.1e-­‐3	
  	
  	
  0.06	
  	
  	
  0.47	
  	
  	
  0.56	
  	
  	
  	
  0.6	
  	
  	
  0.64	
  	
  	
  0.7	
  	
  	
  2824	
  	
  	
  	
  1.0	
  
rho_corrected	
  0.81	
  	
  8.8e-­‐4	
  	
  	
  0.04	
  	
  	
  0.71	
  	
  	
  0.79	
  	
  	
  0.82	
  	
  	
  0.84	
  	
  	
  0.88	
  	
  2182	
  	
  	
  	
  1.0	
  
rho_complete	
  	
  0.83	
  	
  2.9e-­‐4	
  	
  	
  0.01	
  	
  	
  	
  0.8	
  	
  	
  0.82	
  	
  	
  0.83	
  	
  	
  0.84	
  	
  	
  0.86	
  	
  2324	
  	
  	
  	
  1.0
xij = µk + ↵ki + kj + ekij
i
j
k r m
↵ki = µki µk
xij = µr + ↵ri + rj + erij
↵ri = µri µk
erij ⇠ N(0, 2
er)
↵r ⇠ N(0, 2
↵r)
r ⇠ N(0, 2
r)
2
x = 2
↵r + 2
r + 2
er
xij ⇠ N(µr + ↵ri + rj, 2
x)
ICC(2, 1)
ICC(2, 1)(t)
= g( 2(t)
↵r ,
2(t)
r , 2(t)
er ) =
2(t)
↵r
2(t)
↵r +
2(t)
r +
2(t)
er
ICC(2, j)
ICC(2, j)(t)
= g( 2(t)
↵r ,
2(t)
r , 2(t)
er ) =
2(t)
↵r
2(t)
↵r + (
2(t)
r +
2(t)
er )/j
model{	
  
	
  	
  	
  	
  mu	
  ~	
  normal(0,	
  1000);	
  
	
  	
  	
  	
  for(s	
  in	
  1:S){	
  
	
  	
  	
  	
  	
  	
  	
  	
  alpha[s]	
  ~	
  normal(0,	
  tauSubject);	
  
	
  	
  	
  	
  }	
  
	
  	
  	
  	
  for(r	
  in	
  1:R){	
  
	
  	
  	
  	
  	
  	
  	
  	
  beta[r]	
  ~	
  normal(0,	
  tauRater);	
  
	
  	
  	
  	
  }	
  
	
  	
  	
  	
  for(s	
  in	
  1:S)	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  for(r	
  in	
  1:R)	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  nu	
  <-­‐	
  mu	
  +	
  alpha[s]	
  +	
  beta[r];	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Score[s,r]	
  ~	
  normal(nu,	
  tauWithin);	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  }	
  
}	
  
generated	
  quantities{	
  
	
  	
  	
  	
  ICC21	
  <-­‐	
  sig2subject	
  /	
  (sig2subject	
  +	
  sig2rater	
  +	
  sig2within);	
  
	
  	
  	
  	
  ICC24	
  <-­‐	
  sig2subject	
  /	
  (sig2subject	
  +	
  ((sig2rater	
  +	
  sig2within)/4));	
  
}
 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  mean	
  se_mean	
  	
  	
  	
  	
  sd	
  	
  	
  2.5%	
  	
  	
  	
  25%	
  	
  	
  	
  50%	
  	
  	
  	
  75%	
  	
  97.5%	
  	
  n_eff	
  	
  	
  Rhat	
  
sig2subject	
  	
  	
  	
  8.8	
  	
  	
  	
  0.06	
  	
  	
  4.47	
  	
  	
  3.44	
  	
  	
  	
  5.9	
  	
  	
  	
  7.8	
  	
  10.48	
  	
  20.28	
  	
  	
  6130	
  	
  	
  	
  1.0	
  
sig2rater	
  	
  	
  	
  	
  4.29	
  	
  	
  	
  2.33	
  	
  61.98	
  1.7e-­‐3	
  	
  	
  0.03	
  	
  	
  0.16	
  	
  	
  0.58	
  	
  12.73	
  	
  	
  	
  705	
  	
  	
  	
  1.0	
  
sig2within	
  	
  	
  	
  3.65	
  	
  	
  	
  0.03	
  	
  	
  0.84	
  	
  	
  2.37	
  	
  	
  3.03	
  	
  	
  3.52	
  	
  	
  4.12	
  	
  	
  5.57	
  	
  	
  	
  683	
  	
  	
  	
  1.0	
  
ICC21	
  	
  	
  	
  	
  	
  	
  	
  	
  0.64	
  	
  4.9e-­‐3	
  	
  	
  0.14	
  	
  	
  0.28	
  	
  	
  0.57	
  	
  	
  0.66	
  	
  	
  0.74	
  	
  	
  0.85	
  	
  	
  	
  834	
  	
  	
  	
  1.0	
  
ICC24	
  	
  	
  	
  	
  	
  	
  	
  	
  0.86	
  	
  5.0e-­‐3	
  	
  	
  0.11	
  	
  	
  0.61	
  	
  	
  0.84	
  	
  	
  0.89	
  	
  	
  0.92	
  	
  	
  0.96	
  	
  	
  	
  446	
  	
  	
  	
  1.0
xij = µm + ↵mi + mj + emij
↵mi = µmi µm
emij ⇠ N(0, 2
em)
↵m ⇠ N(0, 2
↵m)
m ⇠ N(0, 2
m)
2
x = 2
↵m + 2
em
xij ⇠ N(µm + ↵mi + mj, 2
x)
ICC(2, j)
ICC(3, 1)
ICC(3, 1)(t)
= g( 2(t)
↵m , 2(t)
em ) =
2(t)
↵m
2(t)
↵m +
2(t)
em
ICC(3, j)(t)
= g( 2(t)
↵m , 2(t)
em ) =
2(t)
↵m
2(t)
↵m +
2(t)
em /j
model{	
  
	
  	
  	
  	
  mu	
  ~	
  normal(0,	
  1000);	
  
	
  	
  	
  	
  for(s	
  in	
  1:S){	
  
	
  	
  	
  	
  	
  	
  	
  	
  alpha[s]	
  ~	
  normal(0,	
  tauSubject);	
  
	
  	
  	
  	
  }	
  
	
  	
  	
  	
  for(s	
  in	
  1:S)	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  for(r	
  in	
  1:R)	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  nu	
  <-­‐	
  mu	
  +	
  alpha[s]	
  +	
  beta[r];	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Score[s,r]	
  ~	
  normal(nu,	
  tauWithin);	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  }	
  
}	
  
generated	
  quantities{	
  
	
  	
  	
  	
  ICC31	
  <-­‐	
  sig2subject	
  /	
  (sig2subject	
  +	
  sig2within);	
  	
  
	
  	
  	
  	
  ICC34	
  <-­‐	
  sig2subject	
  /	
  (sig2subject	
  +	
  (sig2within/R));	
  
}
 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  mean	
  se_mean	
  	
  	
  	
  	
  sd	
  	
  	
  2.5%	
  	
  	
  	
  25%	
  	
  	
  	
  50%	
  	
  	
  	
  75%	
  	
  97.5%	
  	
  n_eff	
  	
  	
  Rhat	
  
sig2subject	
  	
  	
  8.82	
  	
  	
  	
  0.05	
  	
  	
  4.48	
  	
  	
  3.39	
  	
  	
  	
  5.8	
  	
  	
  7.79	
  	
  10.67	
  	
  20.29	
  	
  	
  9199	
  	
  	
  	
  1.0	
  
sig2within	
  	
  	
  	
  3.76	
  	
  9.6e-­‐3	
  	
  	
  0.89	
  	
  	
  2.41	
  	
  	
  3.13	
  	
  	
  3.63	
  	
  	
  4.25	
  	
  	
  5.89	
  	
  	
  8580	
  	
  	
  	
  1.0	
  
ICC31	
  	
  	
  	
  	
  	
  	
  	
  	
  0.67	
  	
  1.1e-­‐3	
  	
  	
  0.11	
  	
  	
  0.44	
  	
  	
  	
  0.6	
  	
  	
  0.68	
  	
  	
  0.75	
  	
  	
  0.86	
  	
  	
  9291	
  	
  	
  	
  1.0	
  
ICC34	
  	
  	
  	
  	
  	
  	
  	
  	
  0.89	
  	
  5.5e-­‐4	
  	
  	
  0.05	
  	
  	
  0.76	
  	
  	
  0.86	
  	
  	
  	
  0.9	
  	
  	
  0.92	
  	
  	
  0.96	
  	
  	
  9239	
  	
  	
  	
  1.0
ICC(3, J0
)(t)
= g( 2(t)
↵m , 2(t)
em ) =
2(t)
↵m
2(t)
↵m +
2(t)
em /J0
ICC(2, J0
)(t)
= g( 2(t)
↵r ,
2(t)
r , 2(t)
er ) =
2(t)
↵r
2(t)
↵r + (
2(t)
r +
2(t)
er )/J0
u
(t)
ICC(2,J0) = g( 2(t)
↵r ,
2(t)
r , 2(t)
er ) =
(
1 ICC(2, J0
)(t)
> 0.9
0 otherwise
u
(t)
ICC(3,J0) = g( 2(t)
↵, , 2(t)
em ) =
(
1 ICC(3, J0
)(t)
> 0.9
0 otherwise
generated	
  quantities{	
  
	
  	
  	
  	
  ICC25	
  	
  <-­‐	
  sig2subject	
  /	
  (sig2subject	
  +	
  ((sig2rater	
  +	
  sig2within)/5));	
  
	
  	
  	
  	
  ICC26	
  	
  <-­‐	
  sig2subject	
  /	
  (sig2subject	
  +	
  ((sig2rater	
  +	
  sig2within)/6));	
  
	
  	
  	
  	
  nine6	
  <-­‐	
  step(rho6	
  -­‐	
  0.9);	
  
}
generated	
  quantities{	
  
	
  	
  	
  	
  ICC34	
  <-­‐	
  sig2subject	
  /	
  (sig2subject	
  +	
  (sig2within/R));	
  
	
  	
  	
  	
  ICC35	
  <-­‐	
  sig2subject	
  /	
  (sig2subject	
  +	
  (sig2within/5));	
  
	
  	
  	
  	
  nine	
  <-­‐	
  step(ICC35	
  -­‐	
  0.9);	
  
}
 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  mean	
  se_mean	
  	
  	
  	
  	
  sd	
  	
  	
  2.5%	
  	
  	
  	
  25%	
  	
  	
  	
  50%	
  	
  	
  	
  75%	
  	
  97.5%	
  	
  n_eff	
  	
  	
  Rhat	
  
ICC25	
  	
  	
  	
  	
  	
  	
  	
  	
  0.89	
  	
  4.8e-­‐3	
  	
  	
  	
  0.1	
  	
  	
  0.66	
  	
  	
  0.87	
  	
  	
  0.91	
  	
  	
  0.93	
  	
  	
  0.97	
  	
  	
  	
  411	
  	
  	
  	
  1.0	
  
ICC26	
  	
  	
  	
  	
  	
  	
  	
  	
  0.9	
  	
  	
  4.7e-­‐3	
  	
  	
  0.09	
  	
  	
  	
  0.7	
  	
  	
  0.89	
  	
  	
  0.92	
  	
  	
  0.94	
  	
  	
  0.97	
  	
  	
  	
  388	
  	
  	
  	
  1.0	
  
nine6	
  	
  	
  	
  	
  	
  	
  	
  	
  0.69	
  	
  	
  	
  0.01	
  	
  	
  0.46	
  	
  	
  	
  0.0	
  	
  	
  	
  0.0	
  	
  	
  	
  1.0	
  	
  	
  	
  1.0	
  	
  	
  	
  1.0	
  	
  	
  1375	
  	
  	
  	
  1.0
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  mean	
  se_mean	
  	
  	
  	
  	
  sd	
  	
  	
  2.5%	
  	
  	
  	
  25%	
  	
  	
  	
  50%	
  	
  	
  	
  75%	
  	
  97.5%	
  	
  n_eff	
  	
  	
  Rhat	
  
ICC34	
  	
  	
  	
  	
  	
  	
  	
  	
  0.89	
  	
  5.5e-­‐4	
  	
  	
  0.05	
  	
  	
  0.76	
  	
  	
  0.86	
  	
  	
  	
  0.9	
  	
  	
  0.92	
  	
  	
  0.96	
  	
  	
  9239	
  	
  	
  	
  1.0	
  
ICC35	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  0.91	
  	
  4.7e-­‐4	
  	
  	
  0.05	
  	
  	
  	
  0.8	
  	
  	
  0.88	
  	
  	
  0.92	
  	
  	
  0.94	
  	
  	
  0.97	
  	
  	
  9231	
  	
  	
  	
  1.0	
  
nine	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  0.64	
  	
  4.8e-­‐3	
  	
  	
  0.48	
  	
  	
  	
  0.0	
  	
  	
  	
  0.0	
  	
  	
  	
  1.0	
  	
  	
  	
  1.0	
  	
  	
  	
  1.0	
  	
  	
  9981	
  	
  	
  	
  1.0
基礎からのベイズ統計学 輪読会資料  第8章 「比率・相関・信頼性」

More Related Content

What's hot

敵対的学習に対するラデマッハ複雑度
敵対的学習に対するラデマッハ複雑度敵対的学習に対するラデマッハ複雑度
敵対的学習に対するラデマッハ複雑度Masa Kato
 
Graphic Notes on Linear Algebra and Data Science
Graphic Notes on Linear Algebra and Data ScienceGraphic Notes on Linear Algebra and Data Science
Graphic Notes on Linear Algebra and Data ScienceKenji Hiranabe
 
有向グラフに対する 非線形ラプラシアンと ネットワーク解析
有向グラフに対する 非線形ラプラシアンと ネットワーク解析有向グラフに対する 非線形ラプラシアンと ネットワーク解析
有向グラフに対する 非線形ラプラシアンと ネットワーク解析Yuichi Yoshida
 
21世紀の手法対決 (MIC vs HSIC)
21世紀の手法対決 (MIC vs HSIC)21世紀の手法対決 (MIC vs HSIC)
21世紀の手法対決 (MIC vs HSIC)Toru Imai
 
統計的因果推論 勉強用 isseing333
統計的因果推論 勉強用 isseing333統計的因果推論 勉強用 isseing333
統計的因果推論 勉強用 isseing333Issei Kurahashi
 
パターン認識と機械学習 §6.2 カーネル関数の構成
パターン認識と機械学習 §6.2 カーネル関数の構成パターン認識と機械学習 §6.2 カーネル関数の構成
パターン認識と機械学習 §6.2 カーネル関数の構成Prunus 1350
 
「内積が見えると統計学も見える」第5回 プログラマのための数学勉強会 発表資料
「内積が見えると統計学も見える」第5回 プログラマのための数学勉強会 発表資料 「内積が見えると統計学も見える」第5回 プログラマのための数学勉強会 発表資料
「内積が見えると統計学も見える」第5回 プログラマのための数学勉強会 発表資料 Ken'ichi Matsui
 
スペクトラルグラフ理論入門
スペクトラルグラフ理論入門スペクトラルグラフ理論入門
スペクトラルグラフ理論入門irrrrr
 
Positive-Unlabeled Learning with Non-Negative Risk Estimator
Positive-Unlabeled Learning with Non-Negative Risk EstimatorPositive-Unlabeled Learning with Non-Negative Risk Estimator
Positive-Unlabeled Learning with Non-Negative Risk EstimatorKiryo Ryuichi
 
計算論的学習理論入門 -PAC学習とかVC次元とか-
計算論的学習理論入門 -PAC学習とかVC次元とか-計算論的学習理論入門 -PAC学習とかVC次元とか-
計算論的学習理論入門 -PAC学習とかVC次元とか-sleepy_yoshi
 
[DL輪読会]Deep Neural Networks as Gaussian Processes
[DL輪読会]Deep Neural Networks as Gaussian Processes[DL輪読会]Deep Neural Networks as Gaussian Processes
[DL輪読会]Deep Neural Networks as Gaussian ProcessesDeep Learning JP
 
深層学習の数理
深層学習の数理深層学習の数理
深層学習の数理Taiji Suzuki
 
異常検知と変化検知 第4章 近傍法による異常検知
異常検知と変化検知 第4章 近傍法による異常検知異常検知と変化検知 第4章 近傍法による異常検知
異常検知と変化検知 第4章 近傍法による異常検知Ken'ichi Matsui
 
分析のビジネス展開を考える―状態空間モデルを例に @TokyoWebMining #47
分析のビジネス展開を考える―状態空間モデルを例に @TokyoWebMining #47分析のビジネス展開を考える―状態空間モデルを例に @TokyoWebMining #47
分析のビジネス展開を考える―状態空間モデルを例に @TokyoWebMining #47horihorio
 
Stan で欠測データの相関係数を推定してみた
Stan で欠測データの相関係数を推定してみたStan で欠測データの相関係数を推定してみた
Stan で欠測データの相関係数を推定してみたhoxo_m
 
関数データ解析の概要とその方法
関数データ解析の概要とその方法関数データ解析の概要とその方法
関数データ解析の概要とその方法Hidetoshi Matsui
 
暗号文のままで計算しよう - 準同型暗号入門 -
暗号文のままで計算しよう - 準同型暗号入門 -暗号文のままで計算しよう - 準同型暗号入門 -
暗号文のままで計算しよう - 準同型暗号入門 -MITSUNARI Shigeo
 

What's hot (20)

敵対的学習に対するラデマッハ複雑度
敵対的学習に対するラデマッハ複雑度敵対的学習に対するラデマッハ複雑度
敵対的学習に対するラデマッハ複雑度
 
Graphic Notes on Linear Algebra and Data Science
Graphic Notes on Linear Algebra and Data ScienceGraphic Notes on Linear Algebra and Data Science
Graphic Notes on Linear Algebra and Data Science
 
有向グラフに対する 非線形ラプラシアンと ネットワーク解析
有向グラフに対する 非線形ラプラシアンと ネットワーク解析有向グラフに対する 非線形ラプラシアンと ネットワーク解析
有向グラフに対する 非線形ラプラシアンと ネットワーク解析
 
21世紀の手法対決 (MIC vs HSIC)
21世紀の手法対決 (MIC vs HSIC)21世紀の手法対決 (MIC vs HSIC)
21世紀の手法対決 (MIC vs HSIC)
 
統計的因果推論 勉強用 isseing333
統計的因果推論 勉強用 isseing333統計的因果推論 勉強用 isseing333
統計的因果推論 勉強用 isseing333
 
パターン認識と機械学習 §6.2 カーネル関数の構成
パターン認識と機械学習 §6.2 カーネル関数の構成パターン認識と機械学習 §6.2 カーネル関数の構成
パターン認識と機械学習 §6.2 カーネル関数の構成
 
「内積が見えると統計学も見える」第5回 プログラマのための数学勉強会 発表資料
「内積が見えると統計学も見える」第5回 プログラマのための数学勉強会 発表資料 「内積が見えると統計学も見える」第5回 プログラマのための数学勉強会 発表資料
「内積が見えると統計学も見える」第5回 プログラマのための数学勉強会 発表資料
 
スペクトラルグラフ理論入門
スペクトラルグラフ理論入門スペクトラルグラフ理論入門
スペクトラルグラフ理論入門
 
Positive-Unlabeled Learning with Non-Negative Risk Estimator
Positive-Unlabeled Learning with Non-Negative Risk EstimatorPositive-Unlabeled Learning with Non-Negative Risk Estimator
Positive-Unlabeled Learning with Non-Negative Risk Estimator
 
計算論的学習理論入門 -PAC学習とかVC次元とか-
計算論的学習理論入門 -PAC学習とかVC次元とか-計算論的学習理論入門 -PAC学習とかVC次元とか-
計算論的学習理論入門 -PAC学習とかVC次元とか-
 
[DL輪読会]Deep Neural Networks as Gaussian Processes
[DL輪読会]Deep Neural Networks as Gaussian Processes[DL輪読会]Deep Neural Networks as Gaussian Processes
[DL輪読会]Deep Neural Networks as Gaussian Processes
 
π計算
π計算π計算
π計算
 
深層学習の数理
深層学習の数理深層学習の数理
深層学習の数理
 
異常検知と変化検知 第4章 近傍法による異常検知
異常検知と変化検知 第4章 近傍法による異常検知異常検知と変化検知 第4章 近傍法による異常検知
異常検知と変化検知 第4章 近傍法による異常検知
 
分析のビジネス展開を考える―状態空間モデルを例に @TokyoWebMining #47
分析のビジネス展開を考える―状態空間モデルを例に @TokyoWebMining #47分析のビジネス展開を考える―状態空間モデルを例に @TokyoWebMining #47
分析のビジネス展開を考える―状態空間モデルを例に @TokyoWebMining #47
 
Stan で欠測データの相関係数を推定してみた
Stan で欠測データの相関係数を推定してみたStan で欠測データの相関係数を推定してみた
Stan で欠測データの相関係数を推定してみた
 
動的計画法を極める!
動的計画法を極める!動的計画法を極める!
動的計画法を極める!
 
変分法
変分法変分法
変分法
 
関数データ解析の概要とその方法
関数データ解析の概要とその方法関数データ解析の概要とその方法
関数データ解析の概要とその方法
 
暗号文のままで計算しよう - 準同型暗号入門 -
暗号文のままで計算しよう - 準同型暗号入門 -暗号文のままで計算しよう - 準同型暗号入門 -
暗号文のままで計算しよう - 準同型暗号入門 -
 

Similar to 基礎からのベイズ統計学 輪読会資料 第8章 「比率・相関・信頼性」

Solutions manual for fundamentals of business math canadian 3rd edition by je...
Solutions manual for fundamentals of business math canadian 3rd edition by je...Solutions manual for fundamentals of business math canadian 3rd edition by je...
Solutions manual for fundamentals of business math canadian 3rd edition by je...Pollockker
 
Modul cuti sekolah matematik
Modul cuti sekolah matematikModul cuti sekolah matematik
Modul cuti sekolah matematiktuaran
 
Study Material Numerical Solution of Odinary Differential Equations
Study Material Numerical Solution of Odinary Differential EquationsStudy Material Numerical Solution of Odinary Differential Equations
Study Material Numerical Solution of Odinary Differential EquationsMeenakshisundaram N
 
Physique révision
Physique révisionPhysique révision
Physique révisionbadro96
 
Dynamic equity price pdf
Dynamic equity price pdfDynamic equity price pdf
Dynamic equity price pdfDavid Keck
 
Sistemas de múltiples grados de libertad
Sistemas de múltiples grados de libertadSistemas de múltiples grados de libertad
Sistemas de múltiples grados de libertadEnrique Santana
 
Introduction to neural networks
Introduction to neural networks Introduction to neural networks
Introduction to neural networks Ahmad Hammoudeh
 
Feature Scaling with R.pdf
Feature Scaling with R.pdfFeature Scaling with R.pdf
Feature Scaling with R.pdfShakiruBankole2
 
A Study on the Short Run Relationship b/w Major Economic Indicators of US Eco...
A Study on the Short Run Relationship b/w Major Economic Indicators of US Eco...A Study on the Short Run Relationship b/w Major Economic Indicators of US Eco...
A Study on the Short Run Relationship b/w Major Economic Indicators of US Eco...aurkoiitk
 
Soluções dos exercícios de cinética química digitados
Soluções dos exercícios de cinética química digitadosSoluções dos exercícios de cinética química digitados
Soluções dos exercícios de cinética química digitadosMárcio Martins
 
Financial Data Mining Talk
Financial Data Mining TalkFinancial Data Mining Talk
Financial Data Mining TalkMike Bowles
 
Perfect method for Frames
Perfect method for FramesPerfect method for Frames
Perfect method for Framesandreslahe
 
Task compilation - Differential Equation II
Task compilation - Differential Equation IITask compilation - Differential Equation II
Task compilation - Differential Equation IIJazz Michele Pasaribu
 
Solutions manual for college algebra 10th edition by larson ibsn 9781337282291z
Solutions manual for college algebra 10th edition by larson ibsn 9781337282291zSolutions manual for college algebra 10th edition by larson ibsn 9781337282291z
Solutions manual for college algebra 10th edition by larson ibsn 9781337282291zCerto612
 
Standard normal distribution
Standard normal distributionStandard normal distribution
Standard normal distributionNadeem Uddin
 

Similar to 基礎からのベイズ統計学 輪読会資料 第8章 「比率・相関・信頼性」 (20)

Solutions manual for fundamentals of business math canadian 3rd edition by je...
Solutions manual for fundamentals of business math canadian 3rd edition by je...Solutions manual for fundamentals of business math canadian 3rd edition by je...
Solutions manual for fundamentals of business math canadian 3rd edition by je...
 
Chap8
Chap8Chap8
Chap8
 
Modul cuti sekolah matematik
Modul cuti sekolah matematikModul cuti sekolah matematik
Modul cuti sekolah matematik
 
Time complexity
Time complexityTime complexity
Time complexity
 
Study Material Numerical Solution of Odinary Differential Equations
Study Material Numerical Solution of Odinary Differential EquationsStudy Material Numerical Solution of Odinary Differential Equations
Study Material Numerical Solution of Odinary Differential Equations
 
Physique révision
Physique révisionPhysique révision
Physique révision
 
Dynamic equity price pdf
Dynamic equity price pdfDynamic equity price pdf
Dynamic equity price pdf
 
Sistemas de múltiples grados de libertad
Sistemas de múltiples grados de libertadSistemas de múltiples grados de libertad
Sistemas de múltiples grados de libertad
 
Introduction to neural networks
Introduction to neural networks Introduction to neural networks
Introduction to neural networks
 
Ch02
Ch02Ch02
Ch02
 
Feature Scaling with R.pdf
Feature Scaling with R.pdfFeature Scaling with R.pdf
Feature Scaling with R.pdf
 
Static Models of Continuous Variables
Static Models of Continuous VariablesStatic Models of Continuous Variables
Static Models of Continuous Variables
 
A Study on the Short Run Relationship b/w Major Economic Indicators of US Eco...
A Study on the Short Run Relationship b/w Major Economic Indicators of US Eco...A Study on the Short Run Relationship b/w Major Economic Indicators of US Eco...
A Study on the Short Run Relationship b/w Major Economic Indicators of US Eco...
 
Soluções dos exercícios de cinética química digitados
Soluções dos exercícios de cinética química digitadosSoluções dos exercícios de cinética química digitados
Soluções dos exercícios de cinética química digitados
 
Financial Data Mining Talk
Financial Data Mining TalkFinancial Data Mining Talk
Financial Data Mining Talk
 
Perfect method for Frames
Perfect method for FramesPerfect method for Frames
Perfect method for Frames
 
Task compilation - Differential Equation II
Task compilation - Differential Equation IITask compilation - Differential Equation II
Task compilation - Differential Equation II
 
Solutions manual for college algebra 10th edition by larson ibsn 9781337282291z
Solutions manual for college algebra 10th edition by larson ibsn 9781337282291zSolutions manual for college algebra 10th edition by larson ibsn 9781337282291z
Solutions manual for college algebra 10th edition by larson ibsn 9781337282291z
 
Leading & Lagging Indicators in SAS
Leading & Lagging Indicators in SAS Leading & Lagging Indicators in SAS
Leading & Lagging Indicators in SAS
 
Standard normal distribution
Standard normal distributionStandard normal distribution
Standard normal distribution
 

More from Ken'ichi Matsui

ベータ分布の謎に迫る
ベータ分布の謎に迫るベータ分布の謎に迫る
ベータ分布の謎に迫るKen'ichi Matsui
 
音楽波形データからコードを推定してみる
音楽波形データからコードを推定してみる音楽波形データからコードを推定してみる
音楽波形データからコードを推定してみるKen'ichi Matsui
 
データサイエンティストの仕事とデータ分析コンテスト
データサイエンティストの仕事とデータ分析コンテストデータサイエンティストの仕事とデータ分析コンテスト
データサイエンティストの仕事とデータ分析コンテストKen'ichi Matsui
 
分析コンペティションの光と影
分析コンペティションの光と影分析コンペティションの光と影
分析コンペティションの光と影Ken'ichi Matsui
 
Kaggle Google Quest Q&A Labeling 反省会 LT資料 47th place solution
Kaggle Google Quest Q&A Labeling 反省会 LT資料 47th place solutionKaggle Google Quest Q&A Labeling 反省会 LT資料 47th place solution
Kaggle Google Quest Q&A Labeling 反省会 LT資料 47th place solutionKen'ichi Matsui
 
データ分析コンテストとデータサイエンティストの働きかた
データ分析コンテストとデータサイエンティストの働きかたデータ分析コンテストとデータサイエンティストの働きかた
データ分析コンテストとデータサイエンティストの働きかたKen'ichi Matsui
 
確率分布の成り立ちを理解してスポーツにあてはめてみる
確率分布の成り立ちを理解してスポーツにあてはめてみる確率分布の成り立ちを理解してスポーツにあてはめてみる
確率分布の成り立ちを理解してスポーツにあてはめてみるKen'ichi Matsui
 
SIGNATE 産業技術総合研究所 衛星画像分析コンテスト 2位入賞モデルの工夫点
SIGNATE産業技術総合研究所 衛星画像分析コンテスト2位入賞モデルの工夫点SIGNATE産業技術総合研究所 衛星画像分析コンテスト2位入賞モデルの工夫点
SIGNATE 産業技術総合研究所 衛星画像分析コンテスト 2位入賞モデルの工夫点Ken'ichi Matsui
 
Variational Autoencoderの紹介
Variational Autoencoderの紹介Variational Autoencoderの紹介
Variational Autoencoderの紹介Ken'ichi Matsui
 
数学カフェ 確率・統計・機械学習回 「速習 確率・統計」
数学カフェ 確率・統計・機械学習回 「速習 確率・統計」数学カフェ 確率・統計・機械学習回 「速習 確率・統計」
数学カフェ 確率・統計・機械学習回 「速習 確率・統計」Ken'ichi Matsui
 
DS LT祭り 「AUCが0.01改善したって どういうことですか?」
DS LT祭り 「AUCが0.01改善したって どういうことですか?」DS LT祭り 「AUCが0.01改善したって どういうことですか?」
DS LT祭り 「AUCが0.01改善したって どういうことですか?」Ken'ichi Matsui
 
統計的学習の基礎 4章 前半
統計的学習の基礎 4章 前半統計的学習の基礎 4章 前半
統計的学習の基礎 4章 前半Ken'ichi Matsui
 
第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」
第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」
第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」Ken'ichi Matsui
 
「ベータ分布の謎に迫る」第6回 プログラマのための数学勉強会 LT資料
「ベータ分布の謎に迫る」第6回 プログラマのための数学勉強会 LT資料「ベータ分布の謎に迫る」第6回 プログラマのための数学勉強会 LT資料
「ベータ分布の謎に迫る」第6回 プログラマのための数学勉強会 LT資料Ken'ichi Matsui
 
15分でわかる(範囲の)ベイズ統計学
15分でわかる(範囲の)ベイズ統計学15分でわかる(範囲の)ベイズ統計学
15分でわかる(範囲の)ベイズ統計学Ken'ichi Matsui
 
Random Forest による分類
Random Forest による分類Random Forest による分類
Random Forest による分類Ken'ichi Matsui
 
基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法
基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法
基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法Ken'ichi Matsui
 
「全ての確率はコイン投げに通ず」 Japan.R 発表資料
「全ての確率はコイン投げに通ず」 Japan.R 発表資料「全ての確率はコイン投げに通ず」 Japan.R 発表資料
「全ての確率はコイン投げに通ず」 Japan.R 発表資料Ken'ichi Matsui
 

More from Ken'ichi Matsui (20)

ベータ分布の謎に迫る
ベータ分布の謎に迫るベータ分布の謎に迫る
ベータ分布の謎に迫る
 
音楽波形データからコードを推定してみる
音楽波形データからコードを推定してみる音楽波形データからコードを推定してみる
音楽波形データからコードを推定してみる
 
データサイエンティストの仕事とデータ分析コンテスト
データサイエンティストの仕事とデータ分析コンテストデータサイエンティストの仕事とデータ分析コンテスト
データサイエンティストの仕事とデータ分析コンテスト
 
分析コンペティションの光と影
分析コンペティションの光と影分析コンペティションの光と影
分析コンペティションの光と影
 
Kaggle Google Quest Q&A Labeling 反省会 LT資料 47th place solution
Kaggle Google Quest Q&A Labeling 反省会 LT資料 47th place solutionKaggle Google Quest Q&A Labeling 反省会 LT資料 47th place solution
Kaggle Google Quest Q&A Labeling 反省会 LT資料 47th place solution
 
BERT入門
BERT入門BERT入門
BERT入門
 
データ分析コンテストとデータサイエンティストの働きかた
データ分析コンテストとデータサイエンティストの働きかたデータ分析コンテストとデータサイエンティストの働きかた
データ分析コンテストとデータサイエンティストの働きかた
 
確率分布の成り立ちを理解してスポーツにあてはめてみる
確率分布の成り立ちを理解してスポーツにあてはめてみる確率分布の成り立ちを理解してスポーツにあてはめてみる
確率分布の成り立ちを理解してスポーツにあてはめてみる
 
SIGNATE 産業技術総合研究所 衛星画像分析コンテスト 2位入賞モデルの工夫点
SIGNATE産業技術総合研究所 衛星画像分析コンテスト2位入賞モデルの工夫点SIGNATE産業技術総合研究所 衛星画像分析コンテスト2位入賞モデルの工夫点
SIGNATE 産業技術総合研究所 衛星画像分析コンテスト 2位入賞モデルの工夫点
 
Introduction of VAE
Introduction of VAEIntroduction of VAE
Introduction of VAE
 
Variational Autoencoderの紹介
Variational Autoencoderの紹介Variational Autoencoderの紹介
Variational Autoencoderの紹介
 
数学カフェ 確率・統計・機械学習回 「速習 確率・統計」
数学カフェ 確率・統計・機械学習回 「速習 確率・統計」数学カフェ 確率・統計・機械学習回 「速習 確率・統計」
数学カフェ 確率・統計・機械学習回 「速習 確率・統計」
 
DS LT祭り 「AUCが0.01改善したって どういうことですか?」
DS LT祭り 「AUCが0.01改善したって どういうことですか?」DS LT祭り 「AUCが0.01改善したって どういうことですか?」
DS LT祭り 「AUCが0.01改善したって どういうことですか?」
 
統計的学習の基礎 4章 前半
統計的学習の基礎 4章 前半統計的学習の基礎 4章 前半
統計的学習の基礎 4章 前半
 
第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」
第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」
第13回数学カフェ「素数!!」二次会 LT資料「乱数!!」
 
「ベータ分布の謎に迫る」第6回 プログラマのための数学勉強会 LT資料
「ベータ分布の謎に迫る」第6回 プログラマのための数学勉強会 LT資料「ベータ分布の謎に迫る」第6回 プログラマのための数学勉強会 LT資料
「ベータ分布の謎に迫る」第6回 プログラマのための数学勉強会 LT資料
 
15分でわかる(範囲の)ベイズ統計学
15分でわかる(範囲の)ベイズ統計学15分でわかる(範囲の)ベイズ統計学
15分でわかる(範囲の)ベイズ統計学
 
Random Forest による分類
Random Forest による分類Random Forest による分類
Random Forest による分類
 
基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法
基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法
基礎からのベイズ統計学 輪読会資料 第4章 メトロポリス・ヘイスティングス法
 
「全ての確率はコイン投げに通ず」 Japan.R 発表資料
「全ての確率はコイン投げに通ず」 Japan.R 発表資料「全ての確率はコイン投げに通ず」 Japan.R 発表資料
「全ての確率はコイン投げに通ず」 Japan.R 発表資料
 

Recently uploaded

(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxJohnnyPlasten
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxolyaivanovalion
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystSamantha Rae Coolbeth
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxfirstjob4
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxolyaivanovalion
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxolyaivanovalion
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusTimothy Spann
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxolyaivanovalion
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxMohammedJunaid861692
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改atducpo
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFxolyaivanovalion
 

Recently uploaded (20)

꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptx
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFx
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data Analyst
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptx
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 

基礎からのベイズ統計学 輪読会資料 第8章 「比率・相関・信頼性」

  • 1.
  • 2.
  • 4.
  • 6.
  • 7.
  • 8.
  • 9. p11 p01 = p11 p01 = n11 n11 + n10 n01 n01 + n00
  • 10.
  • 13. n11 ⇠ Bin(p11, N1·) n10 ⇠ Bin(p10, N1·) n01 ⇠ Bin(p01, N0·) n00 ⇠ Bin(p00, N0·) model{          for(i  in  1:2){                  for(j  in  1:2){                          n[i,j]  ~  binomial(N[j],  p[j][i]);                  }          }   }
  • 14.
  • 15.                          mean  se_mean          sd      2.5%        25%        50%        75%    97.5%    n_eff      Rhat   p[0,0]              0.58    5.0e-­‐4      0.02      0.53      0.56      0.58      0.59      0.63      2429        1.0   p[1,0]              0.42    4.9e-­‐4      0.03      0.37      0.41      0.42      0.44      0.47      2557        1.0   p[0,1]              0.42    5.0e-­‐4      0.02      0.37      0.41      0.42      0.44      0.47      2429        1.0   p[1,1]              0.58    4.9e-­‐4      0.03      0.53      0.56      0.58      0.59      0.63      2557        1.0   d                        0.15    7.0e-­‐4      0.04      0.08      0.13      0.15      0.18      0.22      2513        1.0   delta_over        1.0          0.0        0.0        1.0        1.0        1.0        1.0        1.0    10000        nan   p11                    0.58    5.0e-­‐4      0.02      0.53      0.56      0.58      0.59      0.63      2429        1.0   p10                    0.42    5.0e-­‐4      0.02      0.37      0.41      0.42      0.44      0.47      2429        1.0   p01                    0.42    4.9e-­‐4      0.03      0.37      0.41      0.42      0.44      0.47      2557        1.0   p00                    0.58    4.9e-­‐4      0.03      0.53      0.56      0.58      0.59      0.63      2557        1.0   RR                      1.37    2.0e-­‐3        0.1      1.19        1.3      1.37      1.43      1.58      2510        1.0   OR                      1.89    5.6e-­‐3      0.28      1.41      1.69      1.86      2.06      2.49      2466        1.0   lp__              -­‐548.7        0.03      1.05  -­‐551.6  -­‐549.0  -­‐548.3  -­‐547.9  -­‐547.7      1586        1.0
  • 16.
  • 17. q = 1 1 ⇢2 "✓ x1 µ1 1 ◆2 2⇢ ✓ x1 µ1 1 ◆ ✓ x2 µ2 2 ◆ + ✓ x2 µ2 2 ◆2 # f(x1, x2|µ1, µ2, 2 1, 2 2) = 1 2⇡ 1 2 p 1 ⇢ e q/2
  • 18. ⇢A, ⇢B (t) ⇢ = (t) ⇢B ⇢A = g(⇢ (t) A , ⇢ (t) B ) = ⇢ (t) B ⇢ (t) A u (t) ⇢>0 = g(⇢ (t) A , ⇢ (t) B ) ( 1 (t) ⇢ > 0 0 otherwise
  • 19. transformed  parameters{          SigmaA[1,2]  <-­‐  sigmaA[1]*sigmaA[2]*rhoA;          SigmaA[2,1]  <-­‐  sigmaA[1]*sigmaA[2]*rhoA;          SigmaB[1,2]  <-­‐  sigmaB[1]*sigmaB[2]*rhoB;          SigmaB[2,1]  <-­‐  sigmaB[1]*sigmaB[2]*rhoB;   }   model{          for(i  in  1:N){                  xA[i]  ~  multi_normal(muA,  SigmaA);                  xB[i]  ~  multi_normal(muB,  SigmaB);          }   }   generated  quantities{          real  delta_r;          real  delta_r_over;          delta_r  <-­‐  rhoB  -­‐  rhoA;          delta_r_over  <-­‐  step(delta_r);   }
  • 20.
  • 21.                              mean  se_mean          sd      2.5%        25%        50%        75%    97.5%    n_eff      Rhat   rhoA                      0.63    8.1e-­‐4      0.04      0.54        0.6      0.63      0.66      0.71      2876        1.0   rhoB                      0.72    6.7e-­‐4      0.03      0.65        0.7      0.73      0.75      0.79      2626        1.0   delta_r                  0.1    1.0e-­‐3      0.06-­‐9.0e-­‐3      0.06        0.1      0.14      0.21      2790        1.0   delta_r_over      0.96    3.6e-­‐3      0.19        0.0        1.0        1.0        1.0        1.0      2814        1.0  
  • 22.
  • 23. ⇢11(= 1.00) ⇢22(= 1.00) ⇢33(= 1.00) ⇢21 ⇢31 ⇢32
  • 25. transformed  parameters{          vector<lower=0>[3]  sig2;          matrix[3,3]  Sigma;          for(i  in  1:3){                  sig2[i]  <-­‐  pow(sigma[i],2);          }          Sigma  <-­‐  diag_matrix(sigma)  *  rho  *  diag_matrix(sigma);   }   model{          for(i  in  1:N){                  x[i]  ~  multi_normal(mu,Sigma);          }   }   generated  quantities{                  rho_21  <-­‐  rho[2,1];          rho_31  <-­‐  rho[3,1];          rho_32  <-­‐  rho[3,2];          delta_r2  <-­‐  rho[3,2]  -­‐  rho[2,1];          delta_r2_over  <-­‐  step(delta_r2);   }
  • 26.
  • 27.                            mean  se_mean          sd      2.5%        25%        50%        75%    97.5%    n_eff      Rhat   rho_21                0.45    1.3e-­‐3      0.06      0.33      0.41      0.45      0.49      0.57      2358        1.0   rho_31                0.62    9.7e-­‐4      0.05      0.52      0.59      0.62      0.65        0.7      2406        1.0   rho_32                0.75    6.8e-­‐4      0.03      0.67      0.73      0.75      0.77      0.81      2552        1.0
  • 28. (t) ⇢2 = g(⇢21 ⇢32) = ⇢ (t) 32 ⇢ (t) 21 u (t) ⇢2 >0 ( 1 (t) ⇢2 > 0 0 otherwise
  • 29.
  • 30.                            mean  se_mean          sd      2.5%        25%        50%        75%    97.5%    n_eff      Rhat   delta_r2              0.3    1.1e-­‐3      0.05      0.19      0.26      0.29      0.33      0.41      2562        1.0   delta_r2_over    1.0          0.0        0.0        1.0        1.0        1.0        1.0        1.0    10000        nan
  • 31.
  • 32.
  • 33. x y x1 x2 y Nx = 500 Nx1 = 378 Ny = 122
  • 34. Ny Y i=1 p(x2i, yi|µx2 , µy, 2 x2 , 2 y, 2 x2y) x2 y for(i  in  1:Ny){          y[i]  ~  multi_normal(mu2,  S2);   }
  • 35. Ny Y i=1 p(x2i, yi|µx2 , µy, 2 x2 , 2 y, 2 x2y) Ny Y i=1 p(x2i, yi|µx, µy, 2 x, 2 y, 2 xy) Nx1Y j=1 p(x1j|µx, 2 x)
  • 36. x2 y for(i  in  1:Ny){          y[i]  ~  multi_normal(mu,  Sigma);   }   for(i  in  1:Nx){          x[i]  ~  normal(mu[1],  sqrt(sigma[1]));   } x Ny Y i=1 p(x2i, yi|µx, µy, 2 x, 2 y, 2 xy) Nx1Y j=1 p(x1j|µx, 2 x)
  • 37.
  • 38.                            mean  se_mean          sd      2.5%        25%        50%        75%    97.5%    n_eff      Rhat   rho_truncated  0.6      1.1e-­‐3      0.06      0.47      0.56        0.6      0.64      0.7      2824        1.0   rho_corrected  0.81    8.8e-­‐4      0.04      0.71      0.79      0.82      0.84      0.88    2182        1.0 2 xy
  • 40.                            mean  se_mean          sd      2.5%        25%        50%        75%    97.5%    n_eff      Rhat   rho_truncated  0.6      1.1e-­‐3      0.06      0.47      0.56        0.6      0.64      0.7      2824        1.0   rho_corrected  0.81    8.8e-­‐4      0.04      0.71      0.79      0.82      0.84      0.88    2182        1.0   rho_complete    0.83    2.9e-­‐4      0.01        0.8      0.82      0.83      0.84      0.86    2324        1.0
  • 41.
  • 42.
  • 43. xij = µk + ↵ki + kj + ekij i j k r m ↵ki = µki µk
  • 44. xij = µr + ↵ri + rj + erij ↵ri = µri µk erij ⇠ N(0, 2 er) ↵r ⇠ N(0, 2 ↵r) r ⇠ N(0, 2 r) 2 x = 2 ↵r + 2 r + 2 er xij ⇠ N(µr + ↵ri + rj, 2 x)
  • 45.
  • 46. ICC(2, 1) ICC(2, 1)(t) = g( 2(t) ↵r , 2(t) r , 2(t) er ) = 2(t) ↵r 2(t) ↵r + 2(t) r + 2(t) er ICC(2, j) ICC(2, j)(t) = g( 2(t) ↵r , 2(t) r , 2(t) er ) = 2(t) ↵r 2(t) ↵r + ( 2(t) r + 2(t) er )/j
  • 47. model{          mu  ~  normal(0,  1000);          for(s  in  1:S){                  alpha[s]  ~  normal(0,  tauSubject);          }          for(r  in  1:R){                  beta[r]  ~  normal(0,  tauRater);          }          for(s  in  1:S)  {                  for(r  in  1:R)  {                          nu  <-­‐  mu  +  alpha[s]  +  beta[r];                          Score[s,r]  ~  normal(nu,  tauWithin);                  }          }   }   generated  quantities{          ICC21  <-­‐  sig2subject  /  (sig2subject  +  sig2rater  +  sig2within);          ICC24  <-­‐  sig2subject  /  (sig2subject  +  ((sig2rater  +  sig2within)/4));   }
  • 48.
  • 49.                            mean  se_mean          sd      2.5%        25%        50%        75%    97.5%    n_eff      Rhat   sig2subject        8.8        0.06      4.47      3.44        5.9        7.8    10.48    20.28      6130        1.0   sig2rater          4.29        2.33    61.98  1.7e-­‐3      0.03      0.16      0.58    12.73        705        1.0   sig2within        3.65        0.03      0.84      2.37      3.03      3.52      4.12      5.57        683        1.0   ICC21                  0.64    4.9e-­‐3      0.14      0.28      0.57      0.66      0.74      0.85        834        1.0   ICC24                  0.86    5.0e-­‐3      0.11      0.61      0.84      0.89      0.92      0.96        446        1.0
  • 50. xij = µm + ↵mi + mj + emij ↵mi = µmi µm emij ⇠ N(0, 2 em) ↵m ⇠ N(0, 2 ↵m) m ⇠ N(0, 2 m) 2 x = 2 ↵m + 2 em xij ⇠ N(µm + ↵mi + mj, 2 x)
  • 51. ICC(2, j) ICC(3, 1) ICC(3, 1)(t) = g( 2(t) ↵m , 2(t) em ) = 2(t) ↵m 2(t) ↵m + 2(t) em ICC(3, j)(t) = g( 2(t) ↵m , 2(t) em ) = 2(t) ↵m 2(t) ↵m + 2(t) em /j
  • 52. model{          mu  ~  normal(0,  1000);          for(s  in  1:S){                  alpha[s]  ~  normal(0,  tauSubject);          }          for(s  in  1:S)  {                  for(r  in  1:R)  {                          nu  <-­‐  mu  +  alpha[s]  +  beta[r];                          Score[s,r]  ~  normal(nu,  tauWithin);                  }          }   }   generated  quantities{          ICC31  <-­‐  sig2subject  /  (sig2subject  +  sig2within);            ICC34  <-­‐  sig2subject  /  (sig2subject  +  (sig2within/R));   }
  • 53.
  • 54.                            mean  se_mean          sd      2.5%        25%        50%        75%    97.5%    n_eff      Rhat   sig2subject      8.82        0.05      4.48      3.39        5.8      7.79    10.67    20.29      9199        1.0   sig2within        3.76    9.6e-­‐3      0.89      2.41      3.13      3.63      4.25      5.89      8580        1.0   ICC31                  0.67    1.1e-­‐3      0.11      0.44        0.6      0.68      0.75      0.86      9291        1.0   ICC34                  0.89    5.5e-­‐4      0.05      0.76      0.86        0.9      0.92      0.96      9239        1.0
  • 55.
  • 56.
  • 57. ICC(3, J0 )(t) = g( 2(t) ↵m , 2(t) em ) = 2(t) ↵m 2(t) ↵m + 2(t) em /J0 ICC(2, J0 )(t) = g( 2(t) ↵r , 2(t) r , 2(t) er ) = 2(t) ↵r 2(t) ↵r + ( 2(t) r + 2(t) er )/J0 u (t) ICC(2,J0) = g( 2(t) ↵r , 2(t) r , 2(t) er ) = ( 1 ICC(2, J0 )(t) > 0.9 0 otherwise u (t) ICC(3,J0) = g( 2(t) ↵, , 2(t) em ) = ( 1 ICC(3, J0 )(t) > 0.9 0 otherwise
  • 58. generated  quantities{          ICC25    <-­‐  sig2subject  /  (sig2subject  +  ((sig2rater  +  sig2within)/5));          ICC26    <-­‐  sig2subject  /  (sig2subject  +  ((sig2rater  +  sig2within)/6));          nine6  <-­‐  step(rho6  -­‐  0.9);   } generated  quantities{          ICC34  <-­‐  sig2subject  /  (sig2subject  +  (sig2within/R));          ICC35  <-­‐  sig2subject  /  (sig2subject  +  (sig2within/5));          nine  <-­‐  step(ICC35  -­‐  0.9);   }
  • 59.                            mean  se_mean          sd      2.5%        25%        50%        75%    97.5%    n_eff      Rhat   ICC25                  0.89    4.8e-­‐3        0.1      0.66      0.87      0.91      0.93      0.97        411        1.0   ICC26                  0.9      4.7e-­‐3      0.09        0.7      0.89      0.92      0.94      0.97        388        1.0   nine6                  0.69        0.01      0.46        0.0        0.0        1.0        1.0        1.0      1375        1.0                            mean  se_mean          sd      2.5%        25%        50%        75%    97.5%    n_eff      Rhat   ICC34                  0.89    5.5e-­‐4      0.05      0.76      0.86        0.9      0.92      0.96      9239        1.0   ICC35                    0.91    4.7e-­‐4      0.05        0.8      0.88      0.92      0.94      0.97      9231        1.0   nine                    0.64    4.8e-­‐3      0.48        0.0        0.0        1.0        1.0        1.0      9981        1.0