library(foreign)
## Warning: package 'foreign' was built under R version 3.2.5
r=read.dta("C:/Users/BINH THANG/Dropbox/Korea/STudy/Thesis/data management/DataR/dataR5a.dta")

r1 <- subset(r, cost_inc>1 )

attach(r1)

r1$logC1=log10(r1$cost_inc)

r1$logC2=r1$cost_inc/1000

r1$highper[cost_inc<=62000] <- 0
r1$highper[cost_inc>62000] <- 1


r1$b16a[b16a == 5] <- 0


r1$freeEn[c9==1] <- 1
r1$freeEn[c9>1] <- 0




r1$h1[h1== 1] <- 1
r1$h1[h1== 2] <- 0


r1$c7ad[c7== 2] <- 0
r1$c7ad[c7== 1] <- 1
r1$c7ad[is.na(r1$c7)] <- 0


r1$ant[c5==1& c5==2 & c5==7 & c5==8 & c5==9] <- 0
r1$ant[c5==3|c5==4|c5==5] <- 1
r1$ant[is.na(r1$c5)] <- 0


r1$p1=r1$label1+r1$freeEn+r1$ant+r1$c7ad

r1$p[r1$p1==0] <- 0
r1$p[r1$p1==1] <- 1
r1$p[r1$p1>=2] <- 2

r1$wtp[cost_inc >=1] <- 0
r1$wtp[is.na(r1$wtp)] <- 1






newdata2=r1

attach(newdata2 )
## The following objects are masked from r1:
## 
##     a, a1, advice, ag, age_group, anticam, b1, b10, b10a1, b10a2,
##     b10a3, b10a4, b10a5, b10a6, b10a7, b11, b11a, b11a2, b11a3,
##     b12, b12a, b13, b14, b15, b16, b16a, b17, b18, b18a, b1a,
##     b1a1, b1a2, b1a3, b2, b2a1, b3, b4, b5, b5a, b6, b6_123, b6a,
##     b6a1, b6a2, b6a3, b6a4, b6a5, b6a6, b6a7, b6a7a, b6b, b7, b8,
##     b9, br, branch, branch1, branch2, branch3, c1, c2, c23a, c3,
##     c4, c5, c6, c6a111, c7, c8, c9, clog, clog1, COST, cost_inc,
##     cost1, costincrease, ct, d1, d10, d11, d1a, d2, d3, d3a, d4,
##     d5, d6, d7, d8, d9, Decision, e1, e2, edu, educ1, educ2, f1,
##     ghi1, ghi2, ghiro2, giadinhkoUH, group_age, group_age1, h1,
##     h10a, h10a1, h10a10, h10a11, h10a11a, h10a2, h10a3, h10a4,
##     h10a5, h10a6, h10a7, h10a8, h10a9, h12, h12a, h12a_1, h12log,
##     h13, h2, h3, h4, h5, h6, h7, h8, h9, ha000, ict1a, ict2a,
##     itc1, itc2, l1, l2, l3, l4, l5, l6, label_1, label1, label1a,
##     logb7, logC, logitCost, moneyspent, msdt, n01, n02, n03, n05,
##     n06, n07, n08, n1, n10, n100, n101, n102, n103, n11, n12, n13,
##     n14, n15, n16, n1b, n2, n3, n35, n36, n37, n38, n39,
##     n3posterb, n4, n40, n41, n42, n43, n44, n45, n46, n47, n48,
##     n49, n5, n50, n51, n52, n53, n54, n55, n56, n57, n58, n59, n6,
##     n60, n61, n61a, n62, n62a, n63, n63a, n64, n64a, n65, n65a,
##     n66, n66a, n67, n67a, n68, n68a, n7, n77, n78, n7tren, n8,
##     n88, n89, n8nha, n9, n97, n98, n99, n9khach, noE, noEnvi2,
##     occup1, poli4, poli4a, policy, policy_a, policyeffect,
##     reasons, reasons1, s1, Screening, selfhealth, SH1, smostt,
##     taxIn, ter_fa1, ter_in, tertile_fa, tertile_indi, test,
##     unitsdiffi1, var242, w1, w2, w3, w4

1 Dinh nghia bien so

newdata2$age_group1[newdata2$age_group=="group18-29"] <- 1
newdata2$age_group1[newdata2$age_group=="gr3039"] <- 2
newdata2$age_group1[newdata2$age_group=="gr4049"] <- 3
newdata2$age_group1[newdata2$age_group=="gr5059"] <- 4
newdata2$age_group1[newdata2$age_group=="60plus"] <- 4

newdata2$age_group1=as.factor(newdata2$age_group1)


newdata2$educ2=as.factor(newdata2$educ2)

newdata2$h1=as.factor(newdata2$h1)

newdata2$d1a=as.factor(newdata2$d1a)

newdata2$b6b=as.factor(newdata2$b6b)
newdata2$selfhealth=as.factor(newdata2$selfhealth)

newdata2$b18a=as.factor(newdata2$b18a)

newdata2$b16a=as.factor(newdata2$b16a)



newdata2$smostt=as.factor(newdata2$smostt)

newdata2$ter_in=as.factor(newdata2$ter_in)

newdata2$group_age1=as.factor(newdata2$group_age1)

newdata2$label1=as.factor(newdata2$label1)
newdata2$freeEn=as.factor(newdata2$freeEn)
newdata2$c7ad=as.factor(newdata2$c7ad)
newdata2$ant=as.factor(newdata2$ant)

newdata2$p=as.factor(newdata2$p)


newdata2$in00[newdata2$ter_in==1] <- 1
newdata2$in00[newdata2$ter_in==2 | ter_in==3] <- 0

newdata2$in00=as.factor(newdata2$in00)

attach(newdata2)
## The following objects are masked from newdata2 (pos = 3):
## 
##     a, a1, advice, ag, age_group, ant, anticam, b1, b10, b10a1,
##     b10a2, b10a3, b10a4, b10a5, b10a6, b10a7, b11, b11a, b11a2,
##     b11a3, b12, b12a, b13, b14, b15, b16, b16a, b17, b18, b18a,
##     b1a, b1a1, b1a2, b1a3, b2, b2a1, b3, b4, b5, b5a, b6, b6_123,
##     b6a, b6a1, b6a2, b6a3, b6a4, b6a5, b6a6, b6a7, b6a7a, b6b, b7,
##     b8, b9, br, branch, branch1, branch2, branch3, c1, c2, c23a,
##     c3, c4, c5, c6, c6a111, c7, c7ad, c8, c9, clog, clog1, COST,
##     cost_inc, cost1, costincrease, ct, d1, d10, d11, d1a, d2, d3,
##     d3a, d4, d5, d6, d7, d8, d9, Decision, e1, e2, edu, educ1,
##     educ2, f1, freeEn, ghi1, ghi2, ghiro2, giadinhkoUH, group_age,
##     group_age1, h1, h10a, h10a1, h10a10, h10a11, h10a11a, h10a2,
##     h10a3, h10a4, h10a5, h10a6, h10a7, h10a8, h10a9, h12, h12a,
##     h12a_1, h12log, h13, h2, h3, h4, h5, h6, h7, h8, h9, ha000,
##     highper, ict1a, ict2a, itc1, itc2, l1, l2, l3, l4, l5, l6,
##     label_1, label1, label1a, logb7, logC, logC1, logC2,
##     logitCost, moneyspent, msdt, n01, n02, n03, n05, n06, n07,
##     n08, n1, n10, n100, n101, n102, n103, n11, n12, n13, n14, n15,
##     n16, n1b, n2, n3, n35, n36, n37, n38, n39, n3posterb, n4, n40,
##     n41, n42, n43, n44, n45, n46, n47, n48, n49, n5, n50, n51,
##     n52, n53, n54, n55, n56, n57, n58, n59, n6, n60, n61, n61a,
##     n62, n62a, n63, n63a, n64, n64a, n65, n65a, n66, n66a, n67,
##     n67a, n68, n68a, n7, n77, n78, n7tren, n8, n88, n89, n8nha,
##     n9, n97, n98, n99, n9khach, noE, noEnvi2, occup1, p, p1,
##     poli4, poli4a, policy, policy_a, policyeffect, reasons,
##     reasons1, s1, Screening, selfhealth, SH1, smostt, taxIn,
##     ter_fa1, ter_in, tertile_fa, tertile_indi, test, unitsdiffi1,
##     var242, w1, w2, w3, w4, wtp
## The following objects are masked from r1:
## 
##     a, a1, advice, ag, age_group, anticam, b1, b10, b10a1, b10a2,
##     b10a3, b10a4, b10a5, b10a6, b10a7, b11, b11a, b11a2, b11a3,
##     b12, b12a, b13, b14, b15, b16, b16a, b17, b18, b18a, b1a,
##     b1a1, b1a2, b1a3, b2, b2a1, b3, b4, b5, b5a, b6, b6_123, b6a,
##     b6a1, b6a2, b6a3, b6a4, b6a5, b6a6, b6a7, b6a7a, b6b, b7, b8,
##     b9, br, branch, branch1, branch2, branch3, c1, c2, c23a, c3,
##     c4, c5, c6, c6a111, c7, c8, c9, clog, clog1, COST, cost_inc,
##     cost1, costincrease, ct, d1, d10, d11, d1a, d2, d3, d3a, d4,
##     d5, d6, d7, d8, d9, Decision, e1, e2, edu, educ1, educ2, f1,
##     ghi1, ghi2, ghiro2, giadinhkoUH, group_age, group_age1, h1,
##     h10a, h10a1, h10a10, h10a11, h10a11a, h10a2, h10a3, h10a4,
##     h10a5, h10a6, h10a7, h10a8, h10a9, h12, h12a, h12a_1, h12log,
##     h13, h2, h3, h4, h5, h6, h7, h8, h9, ha000, ict1a, ict2a,
##     itc1, itc2, l1, l2, l3, l4, l5, l6, label_1, label1, label1a,
##     logb7, logC, logitCost, moneyspent, msdt, n01, n02, n03, n05,
##     n06, n07, n08, n1, n10, n100, n101, n102, n103, n11, n12, n13,
##     n14, n15, n16, n1b, n2, n3, n35, n36, n37, n38, n39,
##     n3posterb, n4, n40, n41, n42, n43, n44, n45, n46, n47, n48,
##     n49, n5, n50, n51, n52, n53, n54, n55, n56, n57, n58, n59, n6,
##     n60, n61, n61a, n62, n62a, n63, n63a, n64, n64a, n65, n65a,
##     n66, n66a, n67, n67a, n68, n68a, n7, n77, n78, n7tren, n8,
##     n88, n89, n8nha, n9, n97, n98, n99, n9khach, noE, noEnvi2,
##     occup1, poli4, poli4a, policy, policy_a, policyeffect,
##     reasons, reasons1, s1, Screening, selfhealth, SH1, smostt,
##     taxIn, ter_fa1, ter_in, tertile_fa, tertile_indi, test,
##     unitsdiffi1, var242, w1, w2, w3, w4

2 Tao newdataset: new dataset will work for futher analyst

data=subset(newdata2, select=c(logC1,age_group1, d1a,in00, educ2, selfhealth, c1, smostt, b6b, h1, b18a,b6a,label1,freeEn,ant, c7ad))

attach(data)
## The following objects are masked from newdata2 (pos = 3):
## 
##     age_group1, ant, b18a, b6a, b6b, c1, c7ad, d1a, educ2, freeEn,
##     h1, in00, label1, logC1, selfhealth, smostt
## The following objects are masked from newdata2 (pos = 4):
## 
##     ant, b18a, b6a, b6b, c1, c7ad, d1a, educ2, freeEn, h1, label1,
##     logC1, selfhealth, smostt
## The following objects are masked from r1:
## 
##     b18a, b6a, b6b, c1, d1a, educ2, h1, label1, selfhealth, smostt

3 Tabe 1

require(moonBook)
## Loading required package: moonBook
## Warning: package 'moonBook' was built under R version 3.2.5
mytable(in00~.,data=data)
## 
##      Descriptive Statistics by 'in00'    
## __________________________________________ 
##                   0           1        p  
##                (N=262)     (N=191)  
## ------------------------------------------ 
##  logC1        4.8 ±  0.3  4.8 ±  0.2 0.116
##  age_group1                          0.000
##    - 1       96 (36.6%)  90 (47.1%)       
##    - 2       60 (22.9%)  16 ( 8.4%)       
##    - 3       68 (26.0%)  26 (13.6%)       
##    - 4       38 (14.5%)  59 (30.9%)       
##  d1a                                 0.000
##    - none    79 (30.2%)  97 (50.8%)       
##    - married 183 (69.8%) 94 (49.2%)       
##  educ2                               0.035
##    - 1       44 (17.2%)  51 (27.0%)       
##    - 2       134 (52.3%) 82 (43.4%)       
##    - 3       78 (30.5%)  56 (29.6%)       
##  selfhealth                          0.631
##    - notwell 141 (53.8%) 108 (56.5%)      
##    - good    121 (46.2%) 83 (43.5%)       
##  c1                                  0.030
##    - 1       235 (89.7%) 157 (82.2%)      
##    - 2       27 (10.3%)  34 (17.8%)       
##  smostt                              0.151
##    - light   63 (24.0%)  59 (30.9%)       
##    - medium  98 (37.4%)  73 (38.2%)       
##    - heavy   101 (38.5%) 59 (30.9%)       
##  b6b                                 0.071
##    - 0       178 (69.5%) 115 (60.8%)      
##    - 1       78 (30.5%)  74 (39.2%)       
##  h1                                  1.000
##    - 0       97 (37.0%)  70 (36.6%)       
##    - 1       165 (63.0%) 121 (63.4%)      
##  b18a                                0.843
##    - Good    86 (33.2%)  66 (34.6%)       
##    - bad     173 (66.8%) 125 (65.4%)      
##  b6a                                 0.050
##    - no      221 (86.3%) 149 (78.8%)      
##    - yes     35 (13.7%)  40 (21.2%)       
##  label1                              0.264
##    - 0       222 (85.1%) 154 (80.6%)      
##    - 1       39 (14.9%)  37 (19.4%)       
##  freeEn                              0.839
##    - 0       198 (76.2%) 143 (74.9%)      
##    - 1       62 (23.8%)  48 (25.1%)       
##  ant                                 0.433
##    - 0       144 (55.0%) 97 (50.8%)       
##    - 1       118 (45.0%) 94 (49.2%)       
##  c7ad                                0.015
##    - 0       185 (70.6%) 113 (59.2%)      
##    - 1       77 (29.4%)  78 (40.8%)       
## ------------------------------------------

4 chay thu bayes

#install.packages("bayesQR")

library(bayesQR)
## Warning: package 'bayesQR' was built under R version 3.2.5
a=bayesQR(logC1~age_group1+educ2+in00+ d1a+h1+selfhealth+smostt
               +b18a+b6b+label1+freeEn+ant+c7ad, data, quantile=c(.05,.25,.5,.75,.95), alasso=T, normal.approx=T, ndraw=1000, keep=1, seed=1234)
## ************************************************ 
## * Start estimating quantile  1  of  5 in total * 
## ************************************************ 
## Current iteration :
## [1] 500
## Current iteration :
## [1] 1000
## ************************************************ 
## * Start estimating quantile  2  of  5 in total * 
## ************************************************ 
## Current iteration :
## [1] 500
## Current iteration :
## [1] 1000
## ************************************************ 
## * Start estimating quantile  3  of  5 in total * 
## ************************************************ 
## Current iteration :
## [1] 500
## Current iteration :
## [1] 1000
## ************************************************ 
## * Start estimating quantile  4  of  5 in total * 
## ************************************************ 
## Current iteration :
## [1] 500
## Current iteration :
## [1] 1000
## ************************************************ 
## * Start estimating quantile  5  of  5 in total * 
## ************************************************ 
## Current iteration :
## [1] 500
## Current iteration :
## [1] 1000
summary(a)
## 
## Type of dependent variable: continuous
## Lasso variable selection: yes
## Normal approximation of posterior: yes
## Estimated quantile:  0.05 
## Lower credible bound:  0.025 
## Upper credible bound:  0.975 
## Number of burnin draws:  0 
## Number of retained draws:  1000 
## 
## 
## Summary of the estimated beta:
## 
##                Bayes Estimate  lower upper adj.lower adj.upper
## (Intercept)           3.46695 -1.353 4.581   -29.928    36.862
## age_group12          -0.02895 -0.693 0.412    -1.779     1.721
## age_group13          -0.03336 -0.521 0.459    -0.932     0.866
## age_group14          -0.09108 -0.947 0.401    -1.683     1.501
## educ22                0.14563 -0.358 1.221    -6.808     7.100
## educ23                0.21082 -0.386 1.432    -6.581     7.002
## in001                 0.00228 -0.374 0.476    -1.651     1.656
## d1amarried            0.13220 -0.392 1.471    -5.938     6.202
## h11                   0.13572 -0.254 1.093    -5.264     5.535
## selfhealthgood        0.05868 -0.264 0.429    -1.242     1.359
## smosttmedium          0.09798 -0.294 0.901    -3.724     3.919
## smosttheavy           0.09644 -0.460 1.067    -5.504     5.697
## b18abad               0.11583 -0.248 1.017    -3.924     4.156
## b6b1                  0.02220 -0.298 0.470    -1.440     1.485
## label11              -0.08045 -0.874 0.362    -2.105     1.944
## freeEn1              -0.04543 -0.497 0.301    -1.680     1.589
## ant1                  0.16493 -0.347 1.456    -7.755     8.085
## c7ad1                -0.00200 -0.447 0.359    -0.871     0.867
## 
## *****************************************
## 
## Type of dependent variable: continuous
## Lasso variable selection: yes
## Normal approximation of posterior: yes
## Estimated quantile:  0.25 
## Lower credible bound:  0.025 
## Upper credible bound:  0.975 
## Number of burnin draws:  0 
## Number of retained draws:  1000 
## 
## 
## Summary of the estimated beta:
## 
##                Bayes Estimate  lower upper adj.lower adj.upper
## (Intercept)           4.22389  0.512 4.792   -17.520    25.968
## age_group12           0.02037 -0.271 0.260    -1.815     1.856
## age_group13           0.00356 -0.210 0.241    -0.725     0.732
## age_group14          -0.03128 -0.262 0.185    -0.446     0.384
## educ22                0.01908 -0.175 0.401    -1.814     1.852
## educ23                0.13215 -0.097 0.921    -4.216     4.481
## in001                 0.00932 -0.185 0.220    -1.101     1.120
## d1amarried            0.01205 -0.173 0.380    -2.062     2.087
## h11                   0.04293 -0.141 0.263    -0.854     0.940
## selfhealthgood        0.08491 -0.107 0.355    -1.811     1.981
## smosttmedium          0.16410 -0.146 1.627    -9.113     9.441
## smosttheavy           0.18151 -0.176 1.913   -10.399    10.762
## b18abad               0.11475 -0.138 0.978    -5.187     5.417
## b6b1                  0.00966 -0.165 0.209    -0.487     0.506
## label11              -0.05481 -0.341 0.160    -0.798     0.688
## freeEn1              -0.02701 -0.262 0.380    -2.860     2.806
## ant1                  0.06602 -0.108 0.346    -1.644     1.776
## c7ad1                 0.00861 -0.173 0.199    -0.939     0.956
## 
## *****************************************
## 
## Type of dependent variable: continuous
## Lasso variable selection: yes
## Normal approximation of posterior: yes
## Estimated quantile:  0.5 
## Lower credible bound:  0.025 
## Upper credible bound:  0.975 
## Number of burnin draws:  0 
## Number of retained draws:  1000 
## 
## 
## Summary of the estimated beta:
## 
##                Bayes Estimate   lower upper adj.lower adj.upper
## (Intercept)           4.48446  1.6971 4.987    -8.256    17.225
## age_group12           0.03152 -0.1771 0.253    -0.652     0.715
## age_group13          -0.01389 -0.2235 0.230    -1.020     0.992
## age_group14          -0.01956 -0.2522 0.196    -0.784     0.745
## educ22                0.04202 -0.1547 0.579    -2.061     2.145
## educ23                0.15689 -0.0765 0.941    -3.169     3.482
## in001                 0.02098 -0.1693 0.392    -1.903     1.945
## d1amarried            0.02155 -0.1887 0.369    -1.563     1.606
## h11                   0.05152 -0.0925 0.278    -0.782     0.885
## selfhealthgood        0.07892 -0.0949 0.380    -1.376     1.534
## smosttmedium          0.09161 -0.1532 1.007    -3.851     4.034
## smosttheavy           0.14837 -0.1246 1.234    -4.575     4.872
## b18abad               0.06948 -0.1032 0.532    -2.606     2.745
## b6b1                  0.00822 -0.1699 0.253    -0.977     0.994
## label11              -0.04294 -0.2473 0.145    -0.391     0.305
## freeEn1              -0.02013 -0.2188 0.232    -1.595     1.555
## ant1                  0.05983 -0.1253 0.447    -2.106     2.225
## c7ad1                 0.01560 -0.1554 0.191    -1.066     1.097
## 
## *****************************************
## 
## Type of dependent variable: continuous
## Lasso variable selection: yes
## Normal approximation of posterior: yes
## Estimated quantile:  0.75 
## Lower credible bound:  0.025 
## Upper credible bound:  0.975 
## Number of burnin draws:  0 
## Number of retained draws:  1000 
## 
## 
## Summary of the estimated beta:
## 
##                Bayes Estimate  lower upper adj.lower adj.upper
## (Intercept)           4.64725  1.826 5.252    -8.279    17.574
## age_group12           0.03517 -0.199 0.295    -0.387     0.457
## age_group13          -0.02936 -0.272 0.212    -0.765     0.706
## age_group14          -0.00325 -0.271 0.271    -0.565     0.558
## educ22                0.05756 -0.164 0.508    -1.764     1.879
## educ23                0.17986 -0.132 1.150    -4.375     4.735
## in001                 0.01232 -0.209 0.382    -1.723     1.748
## d1amarried            0.03301 -0.206 0.412    -1.635     1.701
## h11                   0.05987 -0.133 0.296    -0.875     0.995
## selfhealthgood        0.07057 -0.133 0.426    -1.725     1.866
## smosttmedium          0.08886 -0.232 1.224    -4.771     4.949
## smosttheavy           0.16667 -0.164 1.371    -5.100     5.433
## b18abad               0.10812 -0.125 0.740    -3.322     3.538
## b6b1                  0.02328 -0.162 0.282    -1.341     1.387
## label11              -0.01589 -0.252 0.231    -0.468     0.436
## freeEn1               0.00015 -0.224 0.369    -1.353     1.354
## ant1                  0.06553 -0.148 0.645    -2.605     2.736
## c7ad1                 0.01070 -0.162 0.217    -0.616     0.638
## 
## *****************************************
## 
## Type of dependent variable: continuous
## Lasso variable selection: yes
## Normal approximation of posterior: yes
## Estimated quantile:  0.95 
## Lower credible bound:  0.025 
## Upper credible bound:  0.975 
## Number of burnin draws:  0 
## Number of retained draws:  1000 
## 
## 
## Summary of the estimated beta:
## 
##                Bayes Estimate  lower upper adj.lower adj.upper
## (Intercept)            5.0878  2.971 5.762    -0.788    10.963
## age_group12            0.1142 -0.304 0.834    -1.194     1.423
## age_group13            0.0293 -0.369 0.511    -0.819     0.878
## age_group14            0.0756 -0.374 0.658    -0.772     0.924
## educ22                 0.0551 -0.298 0.691    -1.759     1.869
## educ23                 0.1597 -0.278 0.982    -2.008     2.327
## in001                  0.0151 -0.266 0.368    -1.108     1.138
## d1amarried             0.0452 -0.288 0.549    -1.363     1.453
## h11                    0.0795 -0.414 0.557    -1.271     1.430
## selfhealthgood         0.0785 -0.214 0.454    -0.724     0.881
## smosttmedium           0.0452 -0.356 0.664    -1.888     1.978
## smosttheavy            0.1420 -0.323 1.079    -2.092     2.376
## b18abad                0.1003 -0.261 0.938    -1.898     2.098
## b6b1                   0.0163 -0.338 0.449    -0.798     0.830
## label11                0.0474 -0.305 0.529    -0.554     0.649
## freeEn1                0.0461 -0.309 0.559    -1.052     1.144
## ant1                   0.0664 -0.359 0.688    -2.046     2.179
## c7ad1                  0.0406 -0.311 0.395    -0.800     0.881
plot(a, var=1, credint=c(.05, .95), plottype="quantile", main="This is an example")

plot(a, var=2, credint=c(.05, .95), plottype="quantile", main="This is an example")

plot(a, var=3, credint=c(.05, .95), plottype="quantile", main="This is an example")

plot(a, var=4, credint=c(.05, .95), plottype="quantile", main="This is an example")

plot(a, var=5, credint=c(.05, .95), plottype="quantile", main="This is an example")

plot(a, var=6, credint=c(.05, .95), plottype="quantile", main="This is an example")

plot(a, var=7, credint=c(.05, .95), plottype="quantile", main="This is an example")

plot(a, var=8, credint=c(.05, .95), plottype="quantile", main="This is an example")

plot(a, var=9, credint=c(.05, .95), plottype="quantile", main="This is an example")

plot(a, var=10, credint=c(.05, .95), plottype="quantile", main="This is an example")

plot(a, var=11, credint=c(.05, .95), plottype="quantile", main="This is an example")

plot(a, var=12, credint=c(.05, .95), plottype="quantile", main="This is an example")

plot(a, var=13, credint=c(.05, .95), plottype="quantile", main="This is an example")

plot(a, var=14, credint=c(.05, .95), plottype="quantile", main="This is an example")

plot(a, var=15, credint=c(.05, .95), plottype="quantile", main="This is an example")

plot(a, var=16, credint=c(.05, .95), plottype="quantile", main="This is an example")

plot(a, var=17, credint=c(.05, .95), plottype="quantile", main="This is an example")

4.1 Install packages and library

library("brms")
## Warning: package 'brms' was built under R version 3.2.5
## Loading required package: Rcpp
## Warning: package 'Rcpp' was built under R version 3.2.5
## Loading required package: ggplot2
## Warning: package 'ggplot2' was built under R version 3.2.5
## Loading 'brms' package (version 1.5.1). Useful instructions 
## can be found by typing help('brms'). A more detailed introduction 
## to the package is available through vignette('brms_overview').
## 
## Attaching package: 'brms'
## The following object is masked from 'package:bayesQR':
## 
##     prior
library("coda")
## Warning: package 'coda' was built under R version 3.2.5
library("rstan", lib.loc="~/R/win-library/3.2")
## Warning: package 'rstan' was built under R version 3.2.5
## Loading required package: StanHeaders
## Warning: package 'StanHeaders' was built under R version 3.2.5
## rstan (Version 2.14.1, packaged: 2016-12-28 14:55:41 UTC, GitRev: 5fa1e80eb817)
## For execution on a local, multicore CPU with excess RAM we recommend calling
## rstan_options(auto_write = TRUE)
## options(mc.cores = parallel::detectCores())
## 
## Attaching package: 'rstan'
## The following object is masked from 'package:coda':
## 
##     traceplot

4.2 Model 1.1: model for cost-single policy

data1=subset(newdata2, in00==0)

fit1 <- brm(bf(logC1~age_group1+educ2+in00+d1a+h1+selfhealth+smostt
               +b18a+b6b+label1+freeEn+ant+c7ad, quantile=0.25), data = newdata2, 
            family = asym_laplace())
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 1).
## 
## Chain 1, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 1, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 1, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 1, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 1, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 1, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 1, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 1, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 1, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 1, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 1, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 1, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 4.331 seconds (Warm-up)
##                5.118 seconds (Sampling)
##                9.449 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 2).
## 
## Chain 2, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 2, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 2, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 2, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 2, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 2, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 2, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 2, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 2, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 2, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 2, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 2, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 5.129 seconds (Warm-up)
##                4.873 seconds (Sampling)
##                10.002 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 3).
## 
## Chain 3, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 3, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 3, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 3, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 3, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 3, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 3, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 3, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 3, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 3, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 3, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 3, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 4.737 seconds (Warm-up)
##                5.038 seconds (Sampling)
##                9.775 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 4).
## 
## Chain 4, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 4, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 4, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 4, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 4, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 4, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 4, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 4, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 4, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 4, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 4, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 4, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 4.266 seconds (Warm-up)
##                4.006 seconds (Sampling)
##                8.272 seconds (Total)
summary(fit1)
##  Family: asym_laplace (identity) 
## Formula: logC1 ~ age_group1 + educ2 + in00 + d1a + h1 + selfhealth + smostt + b18a + b6b + label1 + freeEn + ant + c7ad 
##          quantile = 0.25
##    Data: newdata2 (Number of observations: 435) 
## Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1; 
##          total post-warmup samples = 4000
##    WAIC: Not computed
##  
## Population-Level Effects: 
##                Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## Intercept          4.55      0.05     4.46     4.64       2344    1
## age_group12        0.04      0.03    -0.02     0.10       2303    1
## age_group13        0.00      0.03    -0.07     0.06       1727    1
## age_group14       -0.04      0.04    -0.11     0.03       1903    1
## educ22             0.03      0.03    -0.03     0.09       2129    1
## educ23             0.12      0.03     0.06     0.19       1971    1
## in001              0.01      0.03    -0.04     0.06       2268    1
## d1amarried        -0.02      0.03    -0.08     0.03       1861    1
## h11                0.03      0.02    -0.01     0.08       2802    1
## selfhealthgood     0.08      0.02     0.04     0.12       2855    1
## smosttmedium       0.04      0.03    -0.02     0.09       2513    1
## smosttheavy        0.04      0.03    -0.02     0.10       2528    1
## b18abad            0.02      0.02    -0.02     0.07       2798    1
## b6b1              -0.02      0.02    -0.06     0.03       3134    1
## label11           -0.06      0.03    -0.12    -0.01       3101    1
## freeEn1           -0.09      0.02    -0.14    -0.04       2842    1
## ant1               0.04      0.02     0.00     0.09       2812    1
## c7ad1             -0.01      0.02    -0.05     0.03       3127    1
## 
## Family Specific Parameters: 
##       Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## sigma     0.07         0     0.06     0.08       3648    1
## 
## Samples were drawn using sampling(NUTS). For each parameter, Eff.Sample 
## is a crude measure of effective sample size, and Rhat is the potential 
## scale reduction factor on split chains (at convergence, Rhat = 1).
WAIC(fit1)
##   WAIC    SE
##  46.49 34.15
fit2 <- brm(bf(logC1~age_group1+educ2+in00+d1a+h1+selfhealth+smostt
               +b18a+b6b+label1+freeEn+ant+c7ad, quantile=0.50), data = newdata2, 
            family = asym_laplace())
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 1).
## 
## Chain 1, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 1, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 1, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 1, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 1, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 1, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 1, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 1, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 1, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 1, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 1, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 1, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.807 seconds (Warm-up)
##                3.533 seconds (Sampling)
##                7.34 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 2).
## 
## Chain 2, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 2, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 2, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 2, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 2, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 2, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 2, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 2, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 2, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 2, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 2, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 2, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.914 seconds (Warm-up)
##                3.644 seconds (Sampling)
##                7.558 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 3).
## 
## Chain 3, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 3, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 3, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 3, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 3, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 3, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 3, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 3, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 3, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 3, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 3, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 3, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.821 seconds (Warm-up)
##                3.268 seconds (Sampling)
##                7.089 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 4).
## 
## Chain 4, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 4, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 4, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 4, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 4, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 4, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 4, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 4, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 4, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 4, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 4, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 4, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.713 seconds (Warm-up)
##                3.84 seconds (Sampling)
##                7.553 seconds (Total)
summary(fit2)
##  Family: asym_laplace (identity) 
## Formula: logC1 ~ age_group1 + educ2 + in00 + d1a + h1 + selfhealth + smostt + b18a + b6b + label1 + freeEn + ant + c7ad 
##          quantile = 0.5
##    Data: newdata2 (Number of observations: 435) 
## Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1; 
##          total post-warmup samples = 4000
##    WAIC: Not computed
##  
## Population-Level Effects: 
##                Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## Intercept          4.68      0.05     4.58     4.77       2534    1
## age_group12        0.04      0.04    -0.03     0.12       2768    1
## age_group13       -0.04      0.04    -0.11     0.03       1910    1
## age_group14       -0.02      0.04    -0.10     0.05       2036    1
## educ22             0.01      0.03    -0.05     0.07       2018    1
## educ23             0.11      0.04     0.04     0.19       1996    1
## in001              0.00      0.02    -0.04     0.05       3663    1
## d1amarried         0.00      0.03    -0.06     0.06       1854    1
## h11                0.04      0.02    -0.01     0.09       3567    1
## selfhealthgood     0.05      0.02     0.01     0.10       3898    1
## smosttmedium       0.04      0.03    -0.02     0.10       2350    1
## smosttheavy        0.05      0.03    -0.01     0.12       2174    1
## b18abad            0.04      0.02    -0.01     0.09       3259    1
## b6b1              -0.01      0.02    -0.06     0.04       3333    1
## label11           -0.07      0.03    -0.13     0.00       2855    1
## freeEn1           -0.08      0.03    -0.13    -0.02       2996    1
## ant1               0.05      0.03     0.00     0.09       2876    1
## c7ad1             -0.02      0.03    -0.07     0.04       3326    1
## 
## Family Specific Parameters: 
##       Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## sigma     0.09         0     0.09      0.1       4000    1
## 
## Samples were drawn using sampling(NUTS). For each parameter, Eff.Sample 
## is a crude measure of effective sample size, and Rhat is the potential 
## scale reduction factor on split chains (at convergence, Rhat = 1).
WAIC(fit2)
##   WAIC    SE
##  45.45 33.87
fit3 <- brm(bf(logC1~age_group1+educ2+in00+d1a+h1+selfhealth+smostt
               +b18a+b6b+label1+freeEn+ant+c7ad, quantile=0.75), data = newdata2, 
            family = asym_laplace())
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 1).
## 
## Chain 1, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 1, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 1, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 1, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 1, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 1, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 1, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 1, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 1, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 1, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 1, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 1, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 4.573 seconds (Warm-up)
##                5.275 seconds (Sampling)
##                9.848 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 2).
## 
## Chain 2, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 2, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 2, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 2, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 2, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 2, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 2, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 2, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 2, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 2, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 2, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 2, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 4.666 seconds (Warm-up)
##                4.378 seconds (Sampling)
##                9.044 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 3).
## 
## Chain 3, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 3, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 3, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 3, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 3, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 3, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 3, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 3, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 3, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 3, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 3, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 3, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 4.483 seconds (Warm-up)
##                3.737 seconds (Sampling)
##                8.22 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 4).
## 
## Chain 4, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 4, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 4, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 4, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 4, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 4, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 4, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 4, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 4, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 4, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 4, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 4, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 5.229 seconds (Warm-up)
##                4.787 seconds (Sampling)
##                10.016 seconds (Total)
summary(fit3)
##  Family: asym_laplace (identity) 
## Formula: logC1 ~ age_group1 + educ2 + in00 + d1a + h1 + selfhealth + smostt + b18a + b6b + label1 + freeEn + ant + c7ad 
##          quantile = 0.75
##    Data: newdata2 (Number of observations: 435) 
## Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1; 
##          total post-warmup samples = 4000
##    WAIC: Not computed
##  
## Population-Level Effects: 
##                Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## Intercept          4.93      0.06     4.81     5.06       2049    1
## age_group12       -0.05      0.04    -0.13     0.04       1975    1
## age_group13       -0.11      0.05    -0.19    -0.02       1944    1
## age_group14       -0.08      0.05    -0.16     0.02       2008    1
## educ22            -0.01      0.03    -0.07     0.06       2184    1
## educ23             0.07      0.04    -0.01     0.16       2001    1
## in001             -0.04      0.03    -0.10     0.02       2795    1
## d1amarried         0.03      0.04    -0.04     0.10       2036    1
## h11                0.05      0.03     0.01     0.10       2880    1
## selfhealthgood     0.05      0.03     0.00     0.10       2983    1
## smosttmedium      -0.02      0.04    -0.09     0.04       2343    1
## smosttheavy        0.08      0.04     0.00     0.16       2189    1
## b18abad            0.02      0.03    -0.04     0.07       3007    1
## b6b1              -0.04      0.03    -0.09     0.01       2719    1
## label11           -0.05      0.03    -0.12     0.01       2686    1
## freeEn1            0.00      0.03    -0.06     0.06       3520    1
## ant1               0.03      0.03    -0.02     0.08       2751    1
## c7ad1              0.02      0.03    -0.04     0.07       3144    1
## 
## Family Specific Parameters: 
##       Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## sigma     0.08         0     0.07     0.09       4000    1
## 
## Samples were drawn using sampling(NUTS). For each parameter, Eff.Sample 
## is a crude measure of effective sample size, and Rhat is the potential 
## scale reduction factor on split chains (at convergence, Rhat = 1).
WAIC(fit3)
## Warning: 1 (0.2%) p_waic estimates greater than 0.4.
## We recommend trying loo() instead.
##    WAIC    SE
##  152.66 36.38
WAIC(fit1, fit2, fit3)
## Warning: 1 (0.2%) p_waic estimates greater than 0.4.
## We recommend trying loo() instead.
##                WAIC    SE
## fit1          46.49 34.15
## fit2          45.45 33.87
## fit3         152.66 36.38
## fit1 - fit2    1.04 15.15
## fit1 - fit3 -106.17 29.88
## fit2 - fit3 -107.21 21.56
loo(fit1, fit2, fit3) 
##               LOOIC    SE
## fit1          46.50 34.14
## fit2          45.44 33.87
## fit3         152.72 36.38
## fit1 - fit2    1.06 15.15
## fit1 - fit3 -106.22 29.87
## fit2 - fit3 -107.28 21.55
marginal_effects(fit1)

#evidence ratio


hypothesis(fit1,"age_group12>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group12) > 0     0.04      0.03    -0.01      Inf       7.93 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group13 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group13) > 0        0      0.03    -0.06      Inf       0.85 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group14>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group14) > 0    -0.04      0.04     -0.1      Inf       0.19 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"d1amarried>0",alpha=0.05)
## Hypothesis Tests for class b:
##                  Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (d1amarried) > 0    -0.02      0.03    -0.07      Inf       0.32 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"h11>0",alpha=0.05)
## Hypothesis Tests for class b:
##           Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (h11) > 0     0.03      0.02    -0.01      Inf        9.9 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"educ22>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ22) > 0     0.03      0.03    -0.02      Inf       4.93 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"educ23>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (educ23) > 0     0.12      0.03     0.07      Inf        Inf *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"selfhealthgood>0",alpha=0.05)
## Hypothesis Tests for class b:
##                      Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (selfhealthgood) > 0     0.08      0.02     0.04      Inf        Inf *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"smosttmedium>0",alpha=0.05)
## Hypothesis Tests for class b:
##                    Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttmedium) > 0     0.04      0.03    -0.01      Inf      10.98 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"smosttheavy>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttheavy) > 0     0.04      0.03    -0.01      Inf       8.26 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"b18abad>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b18abad) > 0     0.02      0.02    -0.01      Inf       6.09 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"b6b1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1) > 0    -0.02      0.02    -0.05      Inf        0.3 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"label11>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (label11) > 0    -0.06      0.03    -0.11      Inf       0.01 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"freeEn1>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (freeEn1) > 0    -0.09      0.02    -0.13      Inf          0 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"ant1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (ant1) > 0     0.04      0.02     0.01      Inf         49 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"c7ad1>0",alpha=0.05)
## Hypothesis Tests for class b:
##             Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (c7ad1) > 0    -0.01      0.02    -0.04      Inf       0.54 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit1)

4.3 Model 1.1: model for cost-single policy -0.5

fit1 <- brm(bf(logC1~age_group1+educ2+d1a+h1+selfhealth+smostt
               +b18a+b6b+label1+freeEn+ant+c7ad, quantile = 0.5), data = data1, 
            family = asym_laplace())
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 1).
## 
## Chain 1, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 1, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 1, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 1, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 1, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 1, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 1, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 1, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 1, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 1, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 1, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 1, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 2.416 seconds (Warm-up)
##                2.41 seconds (Sampling)
##                4.826 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 2).
## 
## Chain 2, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 2, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 2, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 2, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 2, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 2, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 2, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 2, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 2, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 2, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 2, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 2, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 2.5 seconds (Warm-up)
##                2.694 seconds (Sampling)
##                5.194 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 3).
## 
## Chain 3, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 3, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 3, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 3, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 3, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 3, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 3, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 3, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 3, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 3, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 3, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 3, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 2.476 seconds (Warm-up)
##                2.335 seconds (Sampling)
##                4.811 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 4).
## 
## Chain 4, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 4, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 4, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 4, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 4, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 4, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 4, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 4, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 4, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 4, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 4, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 4, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 2.402 seconds (Warm-up)
##                2.381 seconds (Sampling)
##                4.783 seconds (Total)
summary(fit1)
##  Family: asym_laplace (identity) 
## Formula: logC1 ~ age_group1 + educ2 + d1a + h1 + selfhealth + smostt + b18a + b6b + label1 + freeEn + ant + c7ad 
##          quantile = 0.5
##    Data: data1 (Number of observations: 248) 
## Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1; 
##          total post-warmup samples = 4000
##    WAIC: Not computed
##  
## Population-Level Effects: 
##                Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## Intercept          4.64      0.08     4.49     4.79       2262    1
## age_group12        0.07      0.05    -0.02     0.16       2000    1
## age_group13        0.01      0.05    -0.09     0.10       1970    1
## age_group14        0.00      0.07    -0.13     0.14       1966    1
## educ22             0.01      0.06    -0.09     0.12       1773    1
## educ23             0.11      0.06    -0.01     0.24       1911    1
## d1amarried         0.01      0.04    -0.07     0.09       2198    1
## h11                0.02      0.03    -0.04     0.09       3133    1
## selfhealthgood     0.08      0.03     0.01     0.15       3028    1
## smosttmedium       0.00      0.04    -0.08     0.08       2545    1
## smosttheavy        0.06      0.04    -0.02     0.15       2232    1
## b18abad            0.06      0.04    -0.01     0.13       3345    1
## b6b1              -0.04      0.04    -0.11     0.04       2767    1
## label11           -0.10      0.04    -0.18    -0.01       2561    1
## freeEn1           -0.05      0.04    -0.13     0.04       2532    1
## ant1               0.02      0.04    -0.05     0.10       2226    1
## c7ad1              0.07      0.04    -0.01     0.15       1985    1
## 
## Family Specific Parameters: 
##       Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## sigma      0.1      0.01     0.09     0.11       3512    1
## 
## Samples were drawn using sampling(NUTS). For each parameter, Eff.Sample 
## is a crude measure of effective sample size, and Rhat is the potential 
## scale reduction factor on split chains (at convergence, Rhat = 1).
marginal_effects(fit1)

#evidence ratio



hypothesis(fit1,"age_group12>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group12) > 0     0.07      0.05        0      Inf      18.51 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group13 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group13) > 0     0.01      0.05    -0.07      Inf       1.32 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group14>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group14) > 0        0      0.07     -0.1      Inf       1.01 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"d1amarried>0",alpha=0.05)
## Hypothesis Tests for class b:
##                  Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (d1amarried) > 0     0.01      0.04    -0.06      Inf       1.49 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"h11>0",alpha=0.05)
## Hypothesis Tests for class b:
##           Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (h11) > 0     0.02      0.03    -0.03      Inf       3.17 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"educ22>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ22) > 0     0.01      0.06    -0.08      Inf       1.48 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"educ23>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (educ23) > 0     0.11      0.06     0.01      Inf      26.78 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"selfhealthgood>0",alpha=0.05)
## Hypothesis Tests for class b:
##                      Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (selfhealthgood) > 0     0.08      0.03     0.02      Inf     101.56 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"smosttmedium>0",alpha=0.05)
## Hypothesis Tests for class b:
##                    Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttmedium) > 0        0      0.04    -0.07      Inf       0.98 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"smosttheavy>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttheavy) > 0     0.06      0.04    -0.01      Inf      11.99 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"b18abad>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b18abad) > 0     0.06      0.04        0      Inf      17.26 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"b6b1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1) > 0    -0.04      0.04     -0.1      Inf       0.18 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"label11>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (label11) > 0     -0.1      0.04    -0.17      Inf       0.01 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"freeEn1>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (freeEn1) > 0    -0.05      0.04    -0.12      Inf       0.12 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"ant1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ant1) > 0     0.02      0.04    -0.04      Inf       2.65 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"c7ad1>0",alpha=0.05)
## Hypothesis Tests for class b:
##             Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (c7ad1) > 0     0.07      0.04        0      Inf       18.8 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit1)

4.4 Model 1.1: model for cost-single policy -0.75

fit1 <- brm(bf(logC1~age_group1+educ2+d1a+h1+selfhealth+smostt
               +b18a+b6b+label1+freeEn+ant+c7ad, quantile = 0.75), data = data1, 
            family = asym_laplace())
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 1).
## 
## Chain 1, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 1, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 1, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 1, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 1, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 1, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 1, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 1, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 1, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 1, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 1, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 1, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 2.991 seconds (Warm-up)
##                2.989 seconds (Sampling)
##                5.98 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 2).
## 
## Chain 2, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 2, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 2, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 2, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 2, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 2, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 2, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 2, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 2, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 2, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 2, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 2, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.129 seconds (Warm-up)
##                3.103 seconds (Sampling)
##                6.232 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 3).
## 
## Chain 3, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 3, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 3, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 3, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 3, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 3, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 3, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 3, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 3, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 3, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 3, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 3, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.567 seconds (Warm-up)
##                3.651 seconds (Sampling)
##                7.218 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 4).
## 
## Chain 4, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 4, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 4, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 4, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 4, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 4, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 4, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 4, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 4, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 4, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 4, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 4, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.355 seconds (Warm-up)
##                2.839 seconds (Sampling)
##                6.194 seconds (Total)
summary(fit1)
##  Family: asym_laplace (identity) 
## Formula: logC1 ~ age_group1 + educ2 + d1a + h1 + selfhealth + smostt + b18a + b6b + label1 + freeEn + ant + c7ad 
##          quantile = 0.75
##    Data: data1 (Number of observations: 248) 
## Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1; 
##          total post-warmup samples = 4000
##    WAIC: Not computed
##  
## Population-Level Effects: 
##                Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## Intercept          4.93      0.08     4.77     5.09       2618    1
## age_group12        0.03      0.05    -0.07     0.13       2117    1
## age_group13       -0.01      0.06    -0.12     0.11       2208    1
## age_group14        0.01      0.08    -0.14     0.18       2377    1
## educ22            -0.05      0.06    -0.16     0.07       2003    1
## educ23             0.02      0.06    -0.10     0.13       2166    1
## d1amarried         0.00      0.05    -0.10     0.10       2309    1
## h11                0.03      0.04    -0.04     0.10       3063    1
## selfhealthgood     0.05      0.04    -0.02     0.12       2683    1
## smosttmedium      -0.03      0.05    -0.12     0.07       2217    1
## smosttheavy        0.05      0.05    -0.05     0.15       2473    1
## b18abad            0.04      0.04    -0.04     0.12       2748    1
## b6b1              -0.07      0.04    -0.14     0.01       2807    1
## label11           -0.13      0.06    -0.24    -0.02       2875    1
## freeEn1            0.05      0.04    -0.03     0.13       2914    1
## ant1               0.03      0.04    -0.03     0.11       2747    1
## c7ad1              0.10      0.04     0.03     0.18       2502    1
## 
## Family Specific Parameters: 
##       Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## sigma     0.08      0.01     0.07     0.09       3548    1
## 
## Samples were drawn using sampling(NUTS). For each parameter, Eff.Sample 
## is a crude measure of effective sample size, and Rhat is the potential 
## scale reduction factor on split chains (at convergence, Rhat = 1).
marginal_effects(fit1)

#evidence ratio



hypothesis(fit1,"age_group12>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group12) > 0     0.03      0.05    -0.06      Inf       2.27 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group13 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group13) > 0    -0.01      0.06     -0.1      Inf       0.84 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group14>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group14) > 0     0.01      0.08    -0.12      Inf       1.21 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"d1amarried>0",alpha=0.05)
## Hypothesis Tests for class b:
##                  Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (d1amarried) > 0        0      0.05    -0.08      Inf       1.02 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"h11>0",alpha=0.05)
## Hypothesis Tests for class b:
##           Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (h11) > 0     0.03      0.04    -0.03      Inf       4.68 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"educ22>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ22) > 0    -0.05      0.06    -0.14      Inf       0.27 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"educ23>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ23) > 0     0.02      0.06    -0.08      Inf        1.6 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"selfhealthgood>0",alpha=0.05)
## Hypothesis Tests for class b:
##                      Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (selfhealthgood) > 0     0.05      0.04    -0.01      Inf      12.16 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"smosttmedium>0",alpha=0.05)
## Hypothesis Tests for class b:
##                    Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttmedium) > 0    -0.03      0.05     -0.1      Inf       0.41 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"smosttheavy>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttheavy) > 0     0.05      0.05    -0.03      Inf       5.91 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"b18abad>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b18abad) > 0     0.04      0.04    -0.03      Inf       4.33 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"b6b1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1) > 0    -0.07      0.04    -0.13      Inf       0.04 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"label11>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (label11) > 0    -0.13      0.06    -0.22      Inf       0.01 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"freeEn1>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (freeEn1) > 0     0.05      0.04    -0.01      Inf       10.2 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"ant1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ant1) > 0     0.03      0.04    -0.02      Inf       4.71 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"c7ad1>0",alpha=0.05)
## Hypothesis Tests for class b:
##             Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (c7ad1) > 0      0.1      0.04     0.04      Inf     284.71 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit1)

WAIC(fit, fit10, fit100)

4.5 Model 1.2: model for cost-policy combination

fit2 <- brm(bf(logC1~age_group1+educ2+d1a+h1+selfhealth+smostt
               +b18a+b6b*p, quantile = 0.25), data = data1, 
            family = asym_laplace())
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 1).
## 
## Chain 1, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 1, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 1, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 1, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 1, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 1, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 1, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 1, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 1, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 1, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 1, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 1, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.417 seconds (Warm-up)
##                3.342 seconds (Sampling)
##                6.759 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 2).
## 
## Chain 2, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 2, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 2, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 2, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 2, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 2, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 2, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 2, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 2, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 2, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 2, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 2, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.309 seconds (Warm-up)
##                3.449 seconds (Sampling)
##                6.758 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 3).
## 
## Chain 3, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 3, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 3, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 3, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 3, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 3, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 3, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 3, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 3, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 3, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 3, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 3, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.488 seconds (Warm-up)
##                3.169 seconds (Sampling)
##                6.657 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 4).
## 
## Chain 4, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 4, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 4, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 4, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 4, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 4, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 4, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 4, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 4, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 4, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 4, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 4, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.977 seconds (Warm-up)
##                3.359 seconds (Sampling)
##                7.336 seconds (Total)
summary(fit2)
##  Family: asym_laplace (identity) 
## Formula: logC1 ~ age_group1 + educ2 + d1a + h1 + selfhealth + smostt + b18a + b6b * p 
##          quantile = 0.25
##    Data: data1 (Number of observations: 248) 
## Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1; 
##          total post-warmup samples = 4000
##    WAIC: Not computed
##  
## Population-Level Effects: 
##                Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## Intercept          4.49      0.06     4.38     4.60       2849    1
## age_group12        0.05      0.04    -0.02     0.12       2767    1
## age_group13        0.03      0.04    -0.04     0.12       2213    1
## age_group14       -0.06      0.05    -0.16     0.04       2547    1
## educ22             0.05      0.04    -0.02     0.12       2735    1
## educ23             0.13      0.04     0.05     0.21       2813    1
## d1amarried         0.00      0.04    -0.07     0.07       2245    1
## h11                0.01      0.03    -0.05     0.07       3097    1
## selfhealthgood     0.10      0.03     0.05     0.15       3300    1
## smosttmedium       0.02      0.04    -0.05     0.09       2245    1
## smosttheavy        0.04      0.04    -0.04     0.11       2426    1
## b18abad            0.08      0.03     0.03     0.14       3221    1
## b6b1              -0.06      0.06    -0.17     0.05       1869    1
## p1                -0.03      0.04    -0.11     0.04       2198    1
## p2                -0.03      0.04    -0.12     0.05       2064    1
## b6b1:p1            0.02      0.07    -0.13     0.16       2069    1
## b6b1:p2            0.05      0.07    -0.09     0.19       1886    1
## 
## Family Specific Parameters: 
##       Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## sigma     0.07         0     0.06     0.08       3196    1
## 
## Samples were drawn using sampling(NUTS). For each parameter, Eff.Sample 
## is a crude measure of effective sample size, and Rhat is the potential 
## scale reduction factor on split chains (at convergence, Rhat = 1).
marginal_effects(fit2)

#evidence ratio



hypothesis(fit1,"age_group12>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group12) > 0     0.03      0.05    -0.06      Inf       2.27 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group13 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group13) > 0    -0.01      0.06     -0.1      Inf       0.84 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group14>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group14) > 0     0.01      0.08    -0.12      Inf       1.21 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"d1amarried>0",alpha=0.05)
## Hypothesis Tests for class b:
##                  Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (d1amarried) > 0        0      0.04    -0.06      Inf       1.18 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"h11>0",alpha=0.05)
## Hypothesis Tests for class b:
##           Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (h11) > 0     0.01      0.03    -0.04      Inf       1.92 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"educ22>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ22) > 0     0.05      0.04    -0.01      Inf        9.9 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"educ23>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (educ23) > 0     0.13      0.04     0.06      Inf    1332.33 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"selfhealthgood>0",alpha=0.05)
## Hypothesis Tests for class b:
##                      Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (selfhealthgood) > 0      0.1      0.03     0.06      Inf        Inf *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"smosttmedium>0",alpha=0.05)
## Hypothesis Tests for class b:
##                    Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttmedium) > 0     0.02      0.04    -0.04      Inf       2.51 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"smosttheavy>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttheavy) > 0     0.04      0.04    -0.02      Inf       4.99 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b18abad>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (b18abad) > 0     0.08      0.03     0.04      Inf     443.44 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6b1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1) > 0    -0.06      0.06    -0.15      Inf        0.2 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"p1>0",alpha=0.05)
## Hypothesis Tests for class b:
##          Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (p1) > 0    -0.03      0.04     -0.1      Inf       0.22 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"p2>0",alpha=0.05)
## Hypothesis Tests for class b:
##          Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (p2) > 0    -0.03      0.04     -0.1      Inf       0.28 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6b1:p1>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1:p1) > 0     0.02      0.07     -0.1      Inf       1.37 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6b1:p2>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1:p2) > 0     0.05      0.07    -0.07      Inf       2.79 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit2)

4.6 Model 1.2: model for cost-policy combination p=0.5

fit2 <- brm(bf(logC1~age_group1+educ2+d1a+h1+selfhealth+smostt
               +b18a+b6b*p, quantile = 0.5), data = data1, 
            family = asym_laplace())
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 1).
## 
## Chain 1, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 1, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 1, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 1, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 1, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 1, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 1, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 1, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 1, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 1, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 1, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 1, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.019 seconds (Warm-up)
##                2.812 seconds (Sampling)
##                5.831 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 2).
## 
## Chain 2, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 2, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 2, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 2, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 2, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 2, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 2, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 2, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 2, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 2, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 2, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 2, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 2.953 seconds (Warm-up)
##                2.896 seconds (Sampling)
##                5.849 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 3).
## 
## Chain 3, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 3, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 3, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 3, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 3, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 3, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 3, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 3, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 3, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 3, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 3, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 3, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 2.968 seconds (Warm-up)
##                2.938 seconds (Sampling)
##                5.906 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 4).
## 
## Chain 4, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 4, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 4, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 4, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 4, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 4, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 4, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 4, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 4, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 4, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 4, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 4, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.047 seconds (Warm-up)
##                2.482 seconds (Sampling)
##                5.529 seconds (Total)
summary(fit2)
##  Family: asym_laplace (identity) 
## Formula: logC1 ~ age_group1 + educ2 + d1a + h1 + selfhealth + smostt + b18a + b6b * p 
##          quantile = 0.5
##    Data: data1 (Number of observations: 248) 
## Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1; 
##          total post-warmup samples = 4000
##    WAIC: Not computed
##  
## Population-Level Effects: 
##                Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## Intercept          4.66      0.08     4.51     4.82       2324    1
## age_group12        0.05      0.04    -0.04     0.14       2880    1
## age_group13        0.01      0.05    -0.09     0.10       2443    1
## age_group14       -0.03      0.06    -0.16     0.09       2163    1
## educ22             0.02      0.06    -0.08     0.14       1977    1
## educ23             0.11      0.06    -0.01     0.24       1922    1
## d1amarried         0.00      0.04    -0.08     0.08       2429    1
## h11                0.01      0.04    -0.06     0.08       2793    1
## selfhealthgood     0.07      0.03     0.00     0.14       2763    1
## smosttmedium       0.00      0.04    -0.09     0.08       2576    1
## smosttheavy        0.06      0.04    -0.03     0.14       2684    1
## b18abad            0.05      0.04    -0.02     0.13       2718    1
## b6b1              -0.05      0.07    -0.18     0.08       1927    1
## p1                 0.05      0.06    -0.06     0.15       2140    1
## p2                 0.00      0.05    -0.10     0.09       1965    1
## b6b1:p1           -0.06      0.09    -0.24     0.13       1951    1
## b6b1:p2            0.06      0.09    -0.11     0.25       1833    1
## 
## Family Specific Parameters: 
##       Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## sigma      0.1      0.01     0.09     0.11       3552    1
## 
## Samples were drawn using sampling(NUTS). For each parameter, Eff.Sample 
## is a crude measure of effective sample size, and Rhat is the potential 
## scale reduction factor on split chains (at convergence, Rhat = 1).
marginal_effects(fit2)

#evidence ratio



hypothesis(fit1,"age_group12>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group12) > 0     0.03      0.05    -0.06      Inf       2.27 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group13 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group13) > 0    -0.01      0.06     -0.1      Inf       0.84 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group14>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group14) > 0     0.01      0.08    -0.12      Inf       1.21 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"d1amarried>0",alpha=0.05)
## Hypothesis Tests for class b:
##                  Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (d1amarried) > 0        0      0.04    -0.07      Inf       1.03 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"h11>0",alpha=0.05)
## Hypothesis Tests for class b:
##           Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (h11) > 0     0.01      0.04    -0.05      Inf       1.59 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"educ22>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ22) > 0     0.02      0.06    -0.06      Inf        1.9 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"educ23>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (educ23) > 0     0.11      0.06        0      Inf      22.12 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"selfhealthgood>0",alpha=0.05)
## Hypothesis Tests for class b:
##                      Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (selfhealthgood) > 0     0.07      0.03     0.01      Inf      54.56 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"smosttmedium>0",alpha=0.05)
## Hypothesis Tests for class b:
##                    Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttmedium) > 0        0      0.04    -0.07      Inf       0.99 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"smosttheavy>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttheavy) > 0     0.06      0.04    -0.02      Inf       8.52 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b18abad>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b18abad) > 0     0.05      0.04    -0.01      Inf      13.08 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6b1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1) > 0    -0.05      0.07    -0.16      Inf       0.34 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"p1>0",alpha=0.05)
## Hypothesis Tests for class b:
##          Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (p1) > 0     0.05      0.06    -0.05      Inf       4.58 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"p2>0",alpha=0.05)
## Hypothesis Tests for class b:
##          Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (p2) > 0        0      0.05    -0.08      Inf       0.88 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6b1:p1>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1:p1) > 0    -0.06      0.09    -0.21      Inf       0.33 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6b1:p2>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1:p2) > 0     0.06      0.09    -0.09      Inf        2.8 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit2)

4.7 Model 1.2: model for cost-policy combination p=0.75

fit2 <- brm(bf(logC1~age_group1+educ2+d1a+h1+selfhealth+smostt
               +b18a+b6b*p, quantile = 0.75), data = data1, 
            family = asym_laplace())
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 1).
## 
## Chain 1, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 1, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 1, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 1, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 1, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 1, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 1, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 1, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 1, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 1, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 1, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 1, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.816 seconds (Warm-up)
##                3.122 seconds (Sampling)
##                6.938 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 2).
## 
## Chain 2, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 2, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 2, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 2, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 2, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 2, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 2, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 2, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 2, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 2, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 2, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 2, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 4.344 seconds (Warm-up)
##                4.23 seconds (Sampling)
##                8.574 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 3).
## 
## Chain 3, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 3, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 3, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 3, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 3, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 3, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 3, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 3, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 3, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 3, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 3, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 3, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 4.569 seconds (Warm-up)
##                3.291 seconds (Sampling)
##                7.86 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 4).
## 
## Chain 4, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 4, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 4, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 4, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 4, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 4, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 4, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 4, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 4, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 4, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 4, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 4, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 4.094 seconds (Warm-up)
##                3.539 seconds (Sampling)
##                7.633 seconds (Total)
summary(fit2)
##  Family: asym_laplace (identity) 
## Formula: logC1 ~ age_group1 + educ2 + d1a + h1 + selfhealth + smostt + b18a + b6b * p 
##          quantile = 0.75
##    Data: data1 (Number of observations: 248) 
## Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1; 
##          total post-warmup samples = 4000
##    WAIC: Not computed
##  
## Population-Level Effects: 
##                Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## Intercept          4.90      0.08     4.74     5.06       2181 1.00
## age_group12        0.04      0.05    -0.07     0.15       1724 1.00
## age_group13        0.03      0.06    -0.09     0.13       1412 1.00
## age_group14        0.07      0.08    -0.10     0.22       1676 1.00
## educ22             0.01      0.06    -0.11     0.11       1848 1.00
## educ23             0.04      0.05    -0.07     0.15       2022 1.00
## d1amarried         0.00      0.05    -0.10     0.10       1794 1.00
## h11                0.03      0.04    -0.04     0.10       2231 1.00
## selfhealthgood     0.04      0.04    -0.03     0.11       2434 1.00
## smosttmedium      -0.08      0.05    -0.17     0.01       1963 1.00
## smosttheavy        0.03      0.05    -0.06     0.12       1831 1.00
## b18abad            0.08      0.04    -0.01     0.15       2139 1.00
## b6b1              -0.16      0.06    -0.28    -0.03       1244 1.01
## p1                 0.06      0.05    -0.04     0.17       1800 1.00
## p2                -0.01      0.05    -0.11     0.10       1645 1.00
## b6b1:p1            0.12      0.10    -0.06     0.31       1872 1.00
## b6b1:p2            0.26      0.09     0.08     0.43       1219 1.01
## 
## Family Specific Parameters: 
##       Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## sigma     0.08      0.01     0.07     0.09       3553    1
## 
## Samples were drawn using sampling(NUTS). For each parameter, Eff.Sample 
## is a crude measure of effective sample size, and Rhat is the potential 
## scale reduction factor on split chains (at convergence, Rhat = 1).
#evidence ratio



hypothesis(fit1,"age_group12>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group12) > 0     0.03      0.05    -0.06      Inf       2.27 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group13 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group13) > 0    -0.01      0.06     -0.1      Inf       0.84 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group14>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group14) > 0     0.01      0.08    -0.12      Inf       1.21 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"d1amarried>0",alpha=0.05)
## Hypothesis Tests for class b:
##                  Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (d1amarried) > 0        0      0.05    -0.09      Inf       0.86 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"h11>0",alpha=0.05)
## Hypothesis Tests for class b:
##           Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (h11) > 0     0.03      0.04    -0.03      Inf       3.85 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"educ22>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ22) > 0     0.01      0.06    -0.09      Inf       1.42 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"educ23>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ23) > 0     0.04      0.05    -0.05      Inf       3.96 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"selfhealthgood>0",alpha=0.05)
## Hypothesis Tests for class b:
##                      Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (selfhealthgood) > 0     0.04      0.04    -0.02      Inf       7.79 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"smosttmedium>0",alpha=0.05)
## Hypothesis Tests for class b:
##                    Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttmedium) > 0    -0.08      0.05    -0.16      Inf       0.05 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"smosttheavy>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttheavy) > 0     0.03      0.05    -0.05      Inf       2.53 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b18abad>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (b18abad) > 0     0.08      0.04     0.01      Inf      29.53 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6b1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1) > 0    -0.16      0.06    -0.26      Inf       0.01 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"p1>0",alpha=0.05)
## Hypothesis Tests for class b:
##          Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (p1) > 0     0.06      0.05    -0.02      Inf       7.35 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"p2>0",alpha=0.05)
## Hypothesis Tests for class b:
##          Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (p2) > 0    -0.01      0.05    -0.09      Inf       0.81 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6b1:p1>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1:p1) > 0     0.12       0.1    -0.03      Inf       8.83 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6b1:p2>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (b6b1:p2) > 0     0.26      0.09     0.11      Inf     332.33 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit2)

#Model 2: model for persistence

4.8 Model 2.1: single policy

prior=get_prior(formula=highper~age_group1+educ2+d1a+h1+selfhealth+smostt
               +b18a+b6b+label1+freeEn+ant+c7ad, family="bernoulli", data=data1)
## Warning: Rows containing NAs were excluded from the model
set.seed(1234) 
 
fit3=brm(formula=highper~age_group1+educ2+d1a+h1+selfhealth+smostt
               +b18a+b6b+label1+freeEn+ant+c7ad, family="bernoulli", data=data1, chains=5, iter=2000, warmup=1000, prior=prior)
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
## 
## SAMPLING FOR MODEL 'bernoulli(logit) brms-model' NOW (CHAIN 1).
## 
## Chain 1, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 1, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 1, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 1, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 1, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 1, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 1, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 1, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 1, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 1, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 1, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 1, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 0.777 seconds (Warm-up)
##                0.759 seconds (Sampling)
##                1.536 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'bernoulli(logit) brms-model' NOW (CHAIN 2).
## 
## Chain 2, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 2, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 2, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 2, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 2, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 2, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 2, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 2, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 2, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 2, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 2, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 2, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 0.81 seconds (Warm-up)
##                0.753 seconds (Sampling)
##                1.563 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'bernoulli(logit) brms-model' NOW (CHAIN 3).
## 
## Chain 3, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 3, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 3, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 3, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 3, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 3, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 3, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 3, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 3, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 3, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 3, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 3, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 0.76 seconds (Warm-up)
##                0.765 seconds (Sampling)
##                1.525 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'bernoulli(logit) brms-model' NOW (CHAIN 4).
## 
## Chain 4, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 4, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 4, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 4, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 4, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 4, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 4, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 4, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 4, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 4, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 4, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 4, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 0.812 seconds (Warm-up)
##                0.682 seconds (Sampling)
##                1.494 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'bernoulli(logit) brms-model' NOW (CHAIN 5).
## 
## Chain 5, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 5, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 5, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 5, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 5, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 5, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 5, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 5, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 5, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 5, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 5, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 5, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 0.789 seconds (Warm-up)
##                0.687 seconds (Sampling)
##                1.476 seconds (Total)
summary(fit3)
##  Family: bernoulli (logit) 
## Formula: highper ~ age_group1 + educ2 + d1a + h1 + selfhealth + smostt + b18a + b6b + label1 + freeEn + ant + c7ad 
##    Data: data1 (Number of observations: 248) 
## Samples: 5 chains, each with iter = 2000; warmup = 1000; thin = 1; 
##          total post-warmup samples = 5000
##    WAIC: Not computed
##  
## Population-Level Effects: 
##                Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## Intercept         -1.51      0.63    -2.73    -0.25       5000    1
## age_group12        0.55      0.44    -0.30     1.43       3120    1
## age_group13        0.16      0.46    -0.76     1.07       3159    1
## age_group14        0.00      0.53    -1.04     1.05       3524    1
## educ22            -0.25      0.42    -1.06     0.57       3600    1
## educ23             0.81      0.49    -0.14     1.78       3450    1
## d1amarried        -0.13      0.41    -0.93     0.66       3463    1
## h11                0.35      0.31    -0.27     0.97       5000    1
## selfhealthgood     0.77      0.29     0.19     1.34       5000    1
## smosttmedium       0.42      0.38    -0.32     1.16       4700    1
## smosttheavy        0.69      0.40    -0.08     1.47       4500    1
## b18abad            0.59      0.31    -0.05     1.20       5000    1
## b6b1              -0.19      0.32    -0.82     0.41       5000    1
## label11           -0.60      0.44    -1.45     0.25       5000    1
## freeEn1           -0.15      0.34    -0.82     0.52       5000    1
## ant1               0.15      0.29    -0.42     0.73       5000    1
## c7ad1              0.48      0.32    -0.13     1.13       5000    1
## 
## Samples were drawn using sampling(NUTS). For each parameter, Eff.Sample 
## is a crude measure of effective sample size, and Rhat is the potential 
## scale reduction factor on split chains (at convergence, Rhat = 1).
hypothesis(fit1,"age_group12>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group12) > 0     0.03      0.05    -0.06      Inf       2.27 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group13 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group13) > 0    -0.01      0.06     -0.1      Inf       0.84 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group14>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group14) > 0     0.01      0.08    -0.12      Inf       1.21 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"d1amarried>0",alpha=0.05)
## Hypothesis Tests for class b:
##                  Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (d1amarried) > 0    -0.13      0.41    -0.81      Inf       0.59 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"h11>0",alpha=0.05)
## Hypothesis Tests for class b:
##           Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (h11) > 0     0.35      0.31    -0.17      Inf       6.86 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"educ22>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ22) > 0    -0.25      0.42    -0.94      Inf       0.37 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"educ23>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (educ23) > 0     0.81      0.49     0.02      Inf      20.65 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"selfhealthgood>0",alpha=0.05)
## Hypothesis Tests for class b:
##                      Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (selfhealthgood) > 0     0.77      0.29     0.29      Inf     216.39 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"smosttmedium>0",alpha=0.05)
## Hypothesis Tests for class b:
##                    Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttmedium) > 0     0.42      0.38    -0.22      Inf       6.34 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"smosttheavy>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (smosttheavy) > 0     0.69       0.4     0.03      Inf      23.51 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"b18abad>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (b18abad) > 0     0.59      0.31     0.08      Inf      29.86 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"b6b1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1) > 0    -0.19      0.32    -0.72      Inf       0.38 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"label11>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (label11) > 0     -0.6      0.44    -1.32      Inf        0.1 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"freeEn1>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (freeEn1) > 0    -0.15      0.34    -0.71      Inf        0.5 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"ant1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ant1) > 0     0.15      0.29    -0.33      Inf       2.26 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"c7ad1>0",alpha=0.05)
## Hypothesis Tests for class b:
##             Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (c7ad1) > 0     0.48      0.32    -0.04      Inf      15.08 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit3)

4.9 Model 2.2: policy combination: persistence

prior=get_prior(formula=highper~age_group1+educ2+d1a+h1+selfhealth+smostt
               +b18a+b6b*p, family="bernoulli", data=data1)
## Warning: Rows containing NAs were excluded from the model
set.seed(1234) 
 
fit4=brm(formula=highper~age_group1+educ2+d1a+h1+selfhealth+smostt
               +b18a+b6b*p, family="bernoulli", data=data1, chains=5, iter=2000, warmup=1000, prior=prior)
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
## 
## SAMPLING FOR MODEL 'bernoulli(logit) brms-model' NOW (CHAIN 1).
## 
## Chain 1, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 1, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 1, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 1, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 1, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 1, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 1, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 1, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 1, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 1, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 1, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 1, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 0.999 seconds (Warm-up)
##                0.957 seconds (Sampling)
##                1.956 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'bernoulli(logit) brms-model' NOW (CHAIN 2).
## 
## Chain 2, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 2, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 2, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 2, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 2, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 2, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 2, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 2, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 2, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 2, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 2, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 2, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 0.998 seconds (Warm-up)
##                1.031 seconds (Sampling)
##                2.029 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'bernoulli(logit) brms-model' NOW (CHAIN 3).
## 
## Chain 3, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 3, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 3, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 3, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 3, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 3, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 3, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 3, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 3, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 3, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 3, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 3, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 0.984 seconds (Warm-up)
##                1 seconds (Sampling)
##                1.984 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'bernoulli(logit) brms-model' NOW (CHAIN 4).
## 
## Chain 4, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 4, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 4, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 4, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 4, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 4, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 4, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 4, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 4, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 4, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 4, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 4, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 1.075 seconds (Warm-up)
##                1.078 seconds (Sampling)
##                2.153 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'bernoulli(logit) brms-model' NOW (CHAIN 5).
## 
## Chain 5, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 5, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 5, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 5, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 5, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 5, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 5, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 5, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 5, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 5, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 5, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 5, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 1.169 seconds (Warm-up)
##                1.093 seconds (Sampling)
##                2.262 seconds (Total)
summary(fit4)
##  Family: bernoulli (logit) 
## Formula: highper ~ age_group1 + educ2 + d1a + h1 + selfhealth + smostt + b18a + b6b * p 
##    Data: data1 (Number of observations: 248) 
## Samples: 5 chains, each with iter = 2000; warmup = 1000; thin = 1; 
##          total post-warmup samples = 5000
##    WAIC: Not computed
##  
## Population-Level Effects: 
##                Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## Intercept         -1.60      0.67    -2.93    -0.32       5000    1
## age_group12        0.47      0.44    -0.40     1.35       4826    1
## age_group13        0.10      0.47    -0.81     1.01       4182    1
## age_group14       -0.13      0.53    -1.16     0.93       4232    1
## educ22            -0.10      0.42    -0.92     0.71       4434    1
## educ23             0.90      0.49    -0.05     1.88       4773    1
## d1amarried        -0.07      0.41    -0.88     0.74       4429    1
## h11                0.24      0.31    -0.35     0.86       5000    1
## selfhealthgood     0.73      0.29     0.20     1.29       5000    1
## smosttmedium       0.33      0.38    -0.41     1.06       5000    1
## smosttheavy        0.68      0.41    -0.12     1.47       5000    1
## b18abad            0.59      0.31    -0.01     1.21       5000    1
## b6b1              -0.03      0.61    -1.20     1.17       3827    1
## p1                 0.44      0.43    -0.40     1.28       5000    1
## p2                 0.12      0.43    -0.71     0.97       4661    1
## b6b1:p1           -0.79      0.81    -2.36     0.81       3897    1
## b6b1:p2            0.28      0.78    -1.22     1.82       3935    1
## 
## Samples were drawn using sampling(NUTS). For each parameter, Eff.Sample 
## is a crude measure of effective sample size, and Rhat is the potential 
## scale reduction factor on split chains (at convergence, Rhat = 1).
hypothesis(fit1,"age_group12>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group12) > 0     0.03      0.05    -0.06      Inf       2.27 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group13 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group13) > 0    -0.01      0.06     -0.1      Inf       0.84 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group14>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group14) > 0     0.01      0.08    -0.12      Inf       1.21 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"d1amarried>0",alpha=0.05)
## Hypothesis Tests for class b:
##                  Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (d1amarried) > 0    -0.07      0.41    -0.75      Inf       0.77 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"h11>0",alpha=0.05)
## Hypothesis Tests for class b:
##           Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (h11) > 0     0.24      0.31    -0.26      Inf       3.47 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"educ22>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ22) > 0     -0.1      0.42     -0.8      Inf       0.69 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"educ23>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (educ23) > 0      0.9      0.49     0.09      Inf      30.65 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"selfhealthgood>0",alpha=0.05)
## Hypothesis Tests for class b:
##                      Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (selfhealthgood) > 0     0.73      0.29     0.27      Inf     191.31 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"smosttmedium>0",alpha=0.05)
## Hypothesis Tests for class b:
##                    Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttmedium) > 0     0.33      0.38     -0.3      Inf       4.09 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"smosttheavy>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (smosttheavy) > 0     0.68      0.41     0.01      Inf      20.19 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"b18abad>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (b18abad) > 0     0.59      0.31     0.09      Inf      35.23 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"b6b1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1) > 0    -0.03      0.61    -1.02      Inf       0.93 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"p1>0",alpha=0.05)
## Hypothesis Tests for class b:
##          Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (p1) > 0     0.44      0.43    -0.28      Inf       5.47 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"p2>0",alpha=0.05)
## Hypothesis Tests for class b:
##          Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (p2) > 0     0.12      0.43    -0.58      Inf       1.51 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"b6b1:p1>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1:p1) > 0    -0.79      0.81    -2.11      Inf        0.2 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"b6b1:p2>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1:p2) > 0     0.28      0.78       -1      Inf       1.76 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit4)

5 model for income=1

5.1 Model 1.1: model for cost-single policy

data2=subset(newdata2, in00==1)
            
fit1 <- brm(bf(logC1~age_group1+educ2+d1a+h1+selfhealth+smostt
               +b18a+b6b+label1+freeEn+ant+c7ad, quantile = 0.25), data = data2, 
            family = asym_laplace())
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 1).
## 
## Chain 1, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 1, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 1, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 1, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 1, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 1, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 1, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 1, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 1, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 1, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 1, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 1, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 2.769 seconds (Warm-up)
##                2.938 seconds (Sampling)
##                5.707 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 2).
## 
## Chain 2, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 2, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 2, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 2, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 2, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 2, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 2, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 2, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 2, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 2, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 2, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 2, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.276 seconds (Warm-up)
##                2.847 seconds (Sampling)
##                6.123 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 3).
## 
## Chain 3, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 3, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 3, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 3, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 3, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 3, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 3, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 3, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 3, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 3, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 3, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 3, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.031 seconds (Warm-up)
##                3.075 seconds (Sampling)
##                6.106 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 4).
## 
## Chain 4, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 4, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 4, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 4, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 4, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 4, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 4, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 4, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 4, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 4, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 4, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 4, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.033 seconds (Warm-up)
##                2.969 seconds (Sampling)
##                6.002 seconds (Total)
summary(fit1)
##  Family: asym_laplace (identity) 
## Formula: logC1 ~ age_group1 + educ2 + d1a + h1 + selfhealth + smostt + b18a + b6b + label1 + freeEn + ant + c7ad 
##          quantile = 0.25
##    Data: data2 (Number of observations: 187) 
## Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1; 
##          total post-warmup samples = 4000
##    WAIC: Not computed
##  
## Population-Level Effects: 
##                Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## Intercept          4.65      0.07     4.50     4.79       2532    1
## age_group12       -0.07      0.09    -0.27     0.08       2043    1
## age_group13       -0.14      0.07    -0.28     0.00       1630    1
## age_group14       -0.10      0.07    -0.23     0.04       1584    1
## educ22            -0.01      0.04    -0.09     0.08       2265    1
## educ23             0.09      0.06    -0.03     0.20       2021    1
## d1amarried         0.01      0.06    -0.12     0.13       1604    1
## h11                0.05      0.04    -0.02     0.12       2699    1
## selfhealthgood     0.06      0.03    -0.01     0.13       3123    1
## smosttmedium       0.07      0.05    -0.04     0.17       2069    1
## smosttheavy       -0.01      0.05    -0.12     0.10       2433    1
## b18abad            0.00      0.04    -0.07     0.07       2348    1
## b6b1              -0.02      0.04    -0.09     0.05       3174    1
## label11           -0.01      0.04    -0.09     0.07       2690    1
## freeEn1           -0.11      0.04    -0.19    -0.02       2442    1
## ant1               0.05      0.04    -0.02     0.11       2940    1
## c7ad1             -0.06      0.04    -0.13     0.01       2561    1
## 
## Family Specific Parameters: 
##       Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## sigma     0.07      0.01     0.06     0.08       3497    1
## 
## Samples were drawn using sampling(NUTS). For each parameter, Eff.Sample 
## is a crude measure of effective sample size, and Rhat is the potential 
## scale reduction factor on split chains (at convergence, Rhat = 1).
#evidence ratio



hypothesis(fit1,"age_group12>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group12) > 0    -0.07      0.09    -0.23      Inf       0.25 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group13 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group13) > 0    -0.14      0.07    -0.26      Inf       0.02 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group14>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group14) > 0     -0.1      0.07    -0.21      Inf       0.08 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"d1amarried>0",alpha=0.05)
## Hypothesis Tests for class b:
##                  Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (d1amarried) > 0     0.01      0.06     -0.1      Inf       1.16 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"h11>0",alpha=0.05)
## Hypothesis Tests for class b:
##           Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (h11) > 0     0.05      0.04    -0.01      Inf      12.33 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"educ22>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ22) > 0    -0.01      0.04    -0.08      Inf       0.68 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"educ23>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ23) > 0     0.09      0.06    -0.01      Inf      13.87 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"selfhealthgood>0",alpha=0.05)
## Hypothesis Tests for class b:
##                      Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (selfhealthgood) > 0     0.06      0.03        0      Inf      24.48 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"smosttmedium>0",alpha=0.05)
## Hypothesis Tests for class b:
##                    Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttmedium) > 0     0.07      0.05    -0.02      Inf       8.13 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"smosttheavy>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttheavy) > 0    -0.01      0.05     -0.1      Inf       0.66 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"b18abad>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b18abad) > 0        0      0.04    -0.06      Inf       0.96 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"b6b1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1) > 0    -0.02      0.04    -0.07      Inf       0.48 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"label11>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (label11) > 0    -0.01      0.04    -0.08      Inf       0.69 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"freeEn1>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (freeEn1) > 0    -0.11      0.04    -0.18      Inf       0.01 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"ant1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ant1) > 0     0.05      0.04    -0.01      Inf      10.24 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"c7ad1>0",alpha=0.05)
## Hypothesis Tests for class b:
##             Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (c7ad1) > 0    -0.06      0.04    -0.12      Inf       0.05 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit1)

5.2 Model 1.1: model for cost-single policy -0.5

fit1 <- brm(bf(logC1~age_group1+educ2+d1a+h1+selfhealth+smostt
               +b18a+b6b+label1+freeEn+ant+c7ad, quantile = 0.5), data = data2, 
            family = asym_laplace())
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 1).
## 
## Chain 1, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 1, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 1, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 1, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 1, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 1, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 1, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 1, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 1, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 1, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 1, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 1, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 2.439 seconds (Warm-up)
##                2.332 seconds (Sampling)
##                4.771 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 2).
## 
## Chain 2, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 2, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 2, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 2, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 2, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 2, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 2, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 2, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 2, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 2, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 2, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 2, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 2.103 seconds (Warm-up)
##                2.541 seconds (Sampling)
##                4.644 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 3).
## 
## Chain 3, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 3, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 3, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 3, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 3, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 3, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 3, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 3, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 3, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 3, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 3, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 3, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 2.164 seconds (Warm-up)
##                2.315 seconds (Sampling)
##                4.479 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 4).
## 
## Chain 4, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 4, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 4, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 4, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 4, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 4, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 4, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 4, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 4, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 4, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 4, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 4, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 2.184 seconds (Warm-up)
##                2.095 seconds (Sampling)
##                4.279 seconds (Total)
summary(fit1)
##  Family: asym_laplace (identity) 
## Formula: logC1 ~ age_group1 + educ2 + d1a + h1 + selfhealth + smostt + b18a + b6b + label1 + freeEn + ant + c7ad 
##          quantile = 0.5
##    Data: data2 (Number of observations: 187) 
## Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1; 
##          total post-warmup samples = 4000
##    WAIC: Not computed
##  
## Population-Level Effects: 
##                Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## Intercept          4.73      0.07     4.59     4.87       2367    1
## age_group12       -0.03      0.07    -0.18     0.11       2133    1
## age_group13       -0.14      0.07    -0.28     0.00       1751    1
## age_group14       -0.08      0.06    -0.21     0.05       1672    1
## educ22             0.00      0.05    -0.09     0.09       1981    1
## educ23             0.10      0.06    -0.02     0.22       1842    1
## d1amarried         0.01      0.05    -0.10     0.12       1800    1
## h11                0.08      0.04     0.00     0.15       2921    1
## selfhealthgood     0.05      0.03    -0.02     0.11       3325    1
## smosttmedium       0.07      0.05    -0.02     0.16       2024    1
## smosttheavy        0.03      0.05    -0.07     0.14       1805    1
## b18abad            0.03      0.04    -0.04     0.10       3221    1
## b6b1              -0.03      0.03    -0.10     0.04       2979    1
## label11           -0.03      0.05    -0.13     0.06       2854    1
## freeEn1           -0.10      0.04    -0.19    -0.02       3001    1
## ant1               0.05      0.04    -0.03     0.11       2694    1
## c7ad1             -0.07      0.03    -0.14    -0.01       2887    1
## 
## Family Specific Parameters: 
##       Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## sigma     0.09      0.01     0.08      0.1       3350    1
## 
## Samples were drawn using sampling(NUTS). For each parameter, Eff.Sample 
## is a crude measure of effective sample size, and Rhat is the potential 
## scale reduction factor on split chains (at convergence, Rhat = 1).
#evidence ratio



hypothesis(fit1,"age_group12>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group12) > 0    -0.03      0.07    -0.16      Inf        0.5 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group13 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group13) > 0    -0.14      0.07    -0.26      Inf       0.03 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group14>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group14) > 0    -0.08      0.06    -0.18      Inf       0.13 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"d1amarried>0",alpha=0.05)
## Hypothesis Tests for class b:
##                  Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (d1amarried) > 0     0.01      0.05    -0.08      Inf        1.6 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"h11>0",alpha=0.05)
## Hypothesis Tests for class b:
##           Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (h11) > 0     0.08      0.04     0.02      Inf      46.62 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"educ22>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ22) > 0        0      0.05    -0.08      Inf       0.89 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"educ23>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ23) > 0      0.1      0.06    -0.01      Inf      16.09 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"selfhealthgood>0",alpha=0.05)
## Hypothesis Tests for class b:
##                      Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (selfhealthgood) > 0     0.05      0.03        0      Inf      14.75 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"smosttmedium>0",alpha=0.05)
## Hypothesis Tests for class b:
##                    Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttmedium) > 0     0.07      0.05    -0.01      Inf      13.55 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"smosttheavy>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttheavy) > 0     0.03      0.05    -0.05      Inf       2.84 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"b18abad>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b18abad) > 0     0.03      0.04    -0.03      Inf       4.55 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"b6b1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1) > 0    -0.03      0.03    -0.09      Inf       0.21 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"label11>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (label11) > 0    -0.03      0.05    -0.11      Inf       0.34 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"freeEn1>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (freeEn1) > 0     -0.1      0.04    -0.17      Inf       0.01 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"ant1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ant1) > 0     0.05      0.04    -0.01      Inf       8.69 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"c7ad1>0",alpha=0.05)
## Hypothesis Tests for class b:
##             Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (c7ad1) > 0    -0.07      0.03    -0.13      Inf       0.01 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit1)

5.3 Model 1.1: model for cost-single policy -0.75

fit1 <- brm(bf(logC1~age_group1+educ2+d1a+h1+selfhealth+smostt
               +b18a+b6b+label1+freeEn+ant+c7ad, quantile = 0.75), data = data2, 
            family = asym_laplace())
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 1).
## 
## Chain 1, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 1, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 1, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 1, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 1, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 1, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 1, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 1, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 1, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 1, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 1, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 1, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 2.647 seconds (Warm-up)
##                3.191 seconds (Sampling)
##                5.838 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 2).
## 
## Chain 2, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 2, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 2, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 2, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 2, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 2, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 2, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 2, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 2, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 2, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 2, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 2, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.11 seconds (Warm-up)
##                3.258 seconds (Sampling)
##                6.368 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 3).
## 
## Chain 3, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 3, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 3, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 3, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 3, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 3, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 3, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 3, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 3, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 3, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 3, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 3, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 2.745 seconds (Warm-up)
##                2.654 seconds (Sampling)
##                5.399 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 4).
## 
## Chain 4, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 4, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 4, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 4, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 4, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 4, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 4, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 4, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 4, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 4, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 4, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 4, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 2.575 seconds (Warm-up)
##                2.501 seconds (Sampling)
##                5.076 seconds (Total)
summary(fit1)
##  Family: asym_laplace (identity) 
## Formula: logC1 ~ age_group1 + educ2 + d1a + h1 + selfhealth + smostt + b18a + b6b + label1 + freeEn + ant + c7ad 
##          quantile = 0.75
##    Data: data2 (Number of observations: 187) 
## Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1; 
##          total post-warmup samples = 4000
##    WAIC: Not computed
##  
## Population-Level Effects: 
##                Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## Intercept          4.90      0.08     4.74     5.06       2180    1
## age_group12       -0.02      0.09    -0.19     0.17       2118    1
## age_group13       -0.15      0.08    -0.31     0.02       1735    1
## age_group14       -0.10      0.07    -0.24     0.04       1687    1
## educ22             0.00      0.05    -0.09     0.11       2108    1
## educ23             0.09      0.07    -0.05     0.22       1957    1
## d1amarried         0.00      0.06    -0.12     0.11       1667    1
## h11                0.08      0.04     0.00     0.16       3112    1
## selfhealthgood     0.04      0.04    -0.03     0.11       3603    1
## smosttmedium       0.03      0.05    -0.06     0.13       2548    1
## smosttheavy        0.12      0.05     0.02     0.22       2807    1
## b18abad            0.03      0.04    -0.05     0.11       2882    1
## b6b1              -0.03      0.04    -0.11     0.05       2203    1
## label11            0.04      0.06    -0.07     0.15       2654    1
## freeEn1           -0.05      0.05    -0.15     0.04       3201    1
## ant1               0.01      0.04    -0.08     0.09       3054    1
## c7ad1             -0.08      0.05    -0.17     0.01       2327    1
## 
## Family Specific Parameters: 
##       Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## sigma     0.08      0.01     0.07     0.09       4000    1
## 
## Samples were drawn using sampling(NUTS). For each parameter, Eff.Sample 
## is a crude measure of effective sample size, and Rhat is the potential 
## scale reduction factor on split chains (at convergence, Rhat = 1).
#evidence ratio



hypothesis(fit1,"age_group12>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group12) > 0    -0.02      0.09    -0.17      Inf       0.62 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group13 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group13) > 0    -0.15      0.08    -0.28      Inf       0.04 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group14>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group14) > 0     -0.1      0.07    -0.22      Inf       0.08 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"d1amarried>0",alpha=0.05)
## Hypothesis Tests for class b:
##                  Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (d1amarried) > 0        0      0.06     -0.1      Inf       1.11 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"h11>0",alpha=0.05)
## Hypothesis Tests for class b:
##           Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (h11) > 0     0.08      0.04     0.02      Inf      40.24 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"educ22>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ22) > 0        0      0.05    -0.08      Inf       1.09 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"educ23>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ23) > 0     0.09      0.07    -0.03      Inf       7.71 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"selfhealthgood>0",alpha=0.05)
## Hypothesis Tests for class b:
##                      Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (selfhealthgood) > 0     0.04      0.04    -0.02      Inf       6.49 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"smosttmedium>0",alpha=0.05)
## Hypothesis Tests for class b:
##                    Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttmedium) > 0     0.03      0.05    -0.05      Inf        2.8 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"smosttheavy>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (smosttheavy) > 0     0.12      0.05     0.03      Inf      75.92 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"b18abad>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b18abad) > 0     0.03      0.04    -0.04      Inf       3.15 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"b6b1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1) > 0    -0.03      0.04    -0.09      Inf       0.35 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"label11>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (label11) > 0     0.04      0.06    -0.05      Inf       3.49 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"freeEn1>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (freeEn1) > 0    -0.05      0.05    -0.13      Inf       0.15 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"ant1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ant1) > 0     0.01      0.04    -0.06      Inf       1.27 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"c7ad1>0",alpha=0.05)
## Hypothesis Tests for class b:
##             Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (c7ad1) > 0    -0.08      0.05    -0.15      Inf       0.04 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit1)

WAIC(fit, fit10, fit100)

5.4 Model 1.2: model for cost-policy combination

fit2 <- brm(bf(logC1~age_group1+educ2+d1a+h1+selfhealth+smostt
               +b18a+b6b*p, quantile = 0.25), data = data2, 
            family = asym_laplace())
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 1).
## 
## Chain 1, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 1, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 1, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 1, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 1, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 1, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 1, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 1, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 1, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 1, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 1, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 1, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 4.424 seconds (Warm-up)
##                4.374 seconds (Sampling)
##                8.798 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 2).
## 
## Chain 2, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 2, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 2, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 2, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 2, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 2, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 2, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 2, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 2, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 2, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 2, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 2, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.957 seconds (Warm-up)
##                3.228 seconds (Sampling)
##                7.185 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 3).
## 
## Chain 3, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 3, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 3, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 3, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 3, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 3, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 3, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 3, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 3, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 3, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 3, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 3, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 4.373 seconds (Warm-up)
##                3.459 seconds (Sampling)
##                7.832 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 4).
## 
## Chain 4, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 4, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 4, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 4, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 4, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 4, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 4, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 4, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 4, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 4, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 4, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 4, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.895 seconds (Warm-up)
##                4.036 seconds (Sampling)
##                7.931 seconds (Total)
summary(fit2)
##  Family: asym_laplace (identity) 
## Formula: logC1 ~ age_group1 + educ2 + d1a + h1 + selfhealth + smostt + b18a + b6b * p 
##          quantile = 0.25
##    Data: data2 (Number of observations: 187) 
## Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1; 
##          total post-warmup samples = 4000
##    WAIC: Not computed
##  
## Population-Level Effects: 
##                Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## Intercept          4.65      0.09     4.47     4.82       1504 1.00
## age_group12       -0.14      0.08    -0.30     0.03       1997 1.00
## age_group13       -0.16      0.07    -0.30    -0.03       1481 1.00
## age_group14       -0.11      0.07    -0.23     0.02       1338 1.00
## educ22            -0.03      0.05    -0.11     0.06       1771 1.00
## educ23             0.03      0.06    -0.09     0.16       1436 1.01
## d1amarried         0.05      0.06    -0.07     0.17       1362 1.00
## h11                0.06      0.04    -0.02     0.13       2737 1.00
## selfhealthgood     0.05      0.04    -0.02     0.13       2348 1.00
## smosttmedium       0.07      0.05    -0.03     0.17       1631 1.01
## smosttheavy        0.00      0.06    -0.11     0.11       1417 1.01
## b18abad           -0.04      0.03    -0.10     0.03       2659 1.00
## b6b1               0.02      0.09    -0.17     0.19       1026 1.00
## p1                -0.02      0.06    -0.14     0.09       1418 1.00
## p2                 0.00      0.06    -0.13     0.12       1349 1.00
## b6b1:p1            0.02      0.11    -0.20     0.23       1084 1.00
## b6b1:p2           -0.09      0.10    -0.29     0.11        966 1.01
## 
## Family Specific Parameters: 
##       Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## sigma     0.07      0.01     0.06     0.08       2928    1
## 
## Samples were drawn using sampling(NUTS). For each parameter, Eff.Sample 
## is a crude measure of effective sample size, and Rhat is the potential 
## scale reduction factor on split chains (at convergence, Rhat = 1).
#evidence ratio



hypothesis(fit1,"age_group12>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group12) > 0    -0.02      0.09    -0.17      Inf       0.62 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group13 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group13) > 0    -0.15      0.08    -0.28      Inf       0.04 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group14>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group14) > 0     -0.1      0.07    -0.22      Inf       0.08 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"d1amarried>0",alpha=0.05)
## Hypothesis Tests for class b:
##                  Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (d1amarried) > 0     0.05      0.06    -0.05      Inf       4.01 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"h11>0",alpha=0.05)
## Hypothesis Tests for class b:
##           Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (h11) > 0     0.06      0.04    -0.01      Inf      13.34 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"educ22>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ22) > 0    -0.03      0.05     -0.1      Inf       0.39 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"educ23>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ23) > 0     0.03      0.06    -0.07      Inf       2.04 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"selfhealthgood>0",alpha=0.05)
## Hypothesis Tests for class b:
##                      Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (selfhealthgood) > 0     0.05      0.04    -0.01      Inf      11.74 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"smosttmedium>0",alpha=0.05)
## Hypothesis Tests for class b:
##                    Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttmedium) > 0     0.07      0.05    -0.02      Inf       9.75 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"smosttheavy>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttheavy) > 0        0      0.06    -0.09      Inf       1.03 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b18abad>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b18abad) > 0    -0.04      0.03    -0.09      Inf       0.16 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6b1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1) > 0     0.02      0.09    -0.14      Inf       1.37 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"p1>0",alpha=0.05)
## Hypothesis Tests for class b:
##          Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (p1) > 0    -0.02      0.06    -0.13      Inf       0.53 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"p2>0",alpha=0.05)
## Hypothesis Tests for class b:
##          Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (p2) > 0        0      0.06    -0.11      Inf          1 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6b1:p1>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1:p1) > 0     0.02      0.11    -0.16      Inf       1.26 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6b1:p2>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1:p2) > 0    -0.09       0.1    -0.26      Inf       0.24 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit2)

5.5 Model 1.2: model for cost-policy combination p=0.5

fit2 <- brm(bf(logC1~age_group1+educ2+d1a+h1+selfhealth+smostt
               +b18a+b6b*p, quantile = 0.5), data = data2, 
            family = asym_laplace())
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 1).
## 
## Chain 1, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 1, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 1, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 1, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 1, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 1, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 1, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 1, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 1, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 1, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 1, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 1, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 2.976 seconds (Warm-up)
##                2.695 seconds (Sampling)
##                5.671 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 2).
## 
## Chain 2, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 2, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 2, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 2, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 2, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 2, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 2, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 2, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 2, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 2, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 2, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 2, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 2.866 seconds (Warm-up)
##                2.888 seconds (Sampling)
##                5.754 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 3).
## 
## Chain 3, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 3, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 3, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 3, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 3, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 3, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 3, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 3, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 3, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 3, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 3, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 3, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 2.986 seconds (Warm-up)
##                2.077 seconds (Sampling)
##                5.063 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 4).
## 
## Chain 4, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 4, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 4, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 4, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 4, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 4, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 4, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 4, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 4, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 4, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 4, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 4, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 2.806 seconds (Warm-up)
##                3.23 seconds (Sampling)
##                6.036 seconds (Total)
summary(fit2)
##  Family: asym_laplace (identity) 
## Formula: logC1 ~ age_group1 + educ2 + d1a + h1 + selfhealth + smostt + b18a + b6b * p 
##          quantile = 0.5
##    Data: data2 (Number of observations: 187) 
## Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1; 
##          total post-warmup samples = 4000
##    WAIC: Not computed
##  
## Population-Level Effects: 
##                Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## Intercept          4.77      0.08     4.61     4.92       1896    1
## age_group12       -0.02      0.08    -0.18     0.13       2128    1
## age_group13       -0.14      0.07    -0.28     0.00       1632    1
## age_group14       -0.08      0.07    -0.20     0.05       1489    1
## educ22            -0.01      0.05    -0.10     0.08       1968    1
## educ23             0.08      0.07    -0.04     0.21       1677    1
## d1amarried         0.04      0.05    -0.07     0.14       1921    1
## h11                0.06      0.04    -0.01     0.13       3219    1
## selfhealthgood     0.05      0.04    -0.03     0.12       2981    1
## smosttmedium       0.07      0.04    -0.02     0.16       2423    1
## smosttheavy        0.05      0.05    -0.05     0.15       2518    1
## b18abad           -0.01      0.04    -0.08     0.06       3110    1
## b6b1               0.01      0.07    -0.13     0.16       1826    1
## p1                -0.05      0.06    -0.16     0.06       2296    1
## p2                -0.07      0.05    -0.18     0.03       2124    1
## b6b1:p1           -0.04      0.09    -0.23     0.14       2053    1
## b6b1:p2           -0.06      0.09    -0.24     0.11       1749    1
## 
## Family Specific Parameters: 
##       Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## sigma     0.09      0.01     0.08     0.11       3399    1
## 
## Samples were drawn using sampling(NUTS). For each parameter, Eff.Sample 
## is a crude measure of effective sample size, and Rhat is the potential 
## scale reduction factor on split chains (at convergence, Rhat = 1).
marginal_effects(fit2)

#evidence ratio



hypothesis(fit1,"age_group12>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group12) > 0    -0.02      0.09    -0.17      Inf       0.62 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group13 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group13) > 0    -0.15      0.08    -0.28      Inf       0.04 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group14>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group14) > 0     -0.1      0.07    -0.22      Inf       0.08 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"d1amarried>0",alpha=0.05)
## Hypothesis Tests for class b:
##                  Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (d1amarried) > 0     0.04      0.05    -0.05      Inf          3 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"h11>0",alpha=0.05)
## Hypothesis Tests for class b:
##           Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (h11) > 0     0.06      0.04        0      Inf      19.94 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"educ22>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ22) > 0    -0.01      0.05    -0.08      Inf       0.81 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"educ23>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ23) > 0     0.08      0.07    -0.03      Inf       8.64 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"selfhealthgood>0",alpha=0.05)
## Hypothesis Tests for class b:
##                      Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (selfhealthgood) > 0     0.05      0.04    -0.01      Inf       8.98 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"smosttmedium>0",alpha=0.05)
## Hypothesis Tests for class b:
##                    Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttmedium) > 0     0.07      0.04        0      Inf      18.14 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"smosttheavy>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttheavy) > 0     0.05      0.05    -0.03      Inf       4.66 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b18abad>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b18abad) > 0    -0.01      0.04    -0.07      Inf       0.67 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6b1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1) > 0     0.01      0.07    -0.11      Inf       1.28 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"p1>0",alpha=0.05)
## Hypothesis Tests for class b:
##          Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (p1) > 0    -0.05      0.06    -0.14      Inf        0.2 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"p2>0",alpha=0.05)
## Hypothesis Tests for class b:
##          Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (p2) > 0    -0.07      0.05    -0.16      Inf       0.09 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6b1:p1>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1:p1) > 0    -0.04      0.09     -0.2      Inf       0.49 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6b1:p2>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1:p2) > 0    -0.06      0.09    -0.21      Inf       0.31 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit2)

5.6 Model 1.2: model for cost-policy combination p=0.75

fit2 <- brm(bf(logC1~age_group1+educ2+d1a+h1+selfhealth+smostt
               +b18a+b6b*p, quantile = 0.75), data = data2, 
            family = asym_laplace())
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 1).
## 
## Chain 1, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 1, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 1, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 1, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 1, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 1, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 1, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 1, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 1, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 1, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 1, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 1, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.201 seconds (Warm-up)
##                4.143 seconds (Sampling)
##                7.344 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 2).
## 
## Chain 2, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 2, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 2, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 2, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 2, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 2, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 2, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 2, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 2, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 2, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 2, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 2, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.854 seconds (Warm-up)
##                4.619 seconds (Sampling)
##                8.473 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 3).
## 
## Chain 3, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 3, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 3, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 3, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 3, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 3, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 3, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 3, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 3, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 3, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 3, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 3, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.756 seconds (Warm-up)
##                3.26 seconds (Sampling)
##                7.016 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'asym_laplace(identity) brms-model' NOW (CHAIN 4).
## 
## Chain 4, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 4, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 4, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 4, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 4, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 4, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 4, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 4, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 4, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 4, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 4, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 4, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 3.24 seconds (Warm-up)
##                2.705 seconds (Sampling)
##                5.945 seconds (Total)
summary(fit2)
##  Family: asym_laplace (identity) 
## Formula: logC1 ~ age_group1 + educ2 + d1a + h1 + selfhealth + smostt + b18a + b6b * p 
##          quantile = 0.75
##    Data: data2 (Number of observations: 187) 
## Samples: 4 chains, each with iter = 2000; warmup = 1000; thin = 1; 
##          total post-warmup samples = 4000
##    WAIC: Not computed
##  
## Population-Level Effects: 
##                Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## Intercept          4.92      0.09     4.75     5.11       1980    1
## age_group12       -0.03      0.09    -0.20     0.17       1609    1
## age_group13       -0.18      0.08    -0.33    -0.01       1410    1
## age_group14       -0.10      0.07    -0.24     0.04       1328    1
## educ22            -0.02      0.05    -0.11     0.07       2342    1
## educ23             0.08      0.07    -0.06     0.22       1850    1
## d1amarried         0.02      0.06    -0.11     0.12       1364    1
## h11                0.08      0.04     0.01     0.16       3562    1
## selfhealthgood     0.04      0.04    -0.04     0.11       3189    1
## smosttmedium       0.01      0.05    -0.08     0.10       2159    1
## smosttheavy        0.09      0.05    -0.01     0.20       2348    1
## b18abad            0.01      0.04    -0.07     0.09       2901    1
## b6b1               0.07      0.08    -0.09     0.23       1562    1
## p1                 0.00      0.06    -0.13     0.12       1809    1
## p2                -0.03      0.06    -0.16     0.08       1957    1
## b6b1:p1           -0.14      0.11    -0.36     0.08       1738    1
## b6b1:p2           -0.12      0.10    -0.30     0.07       1698    1
## 
## Family Specific Parameters: 
##       Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## sigma     0.08      0.01     0.06     0.09       3333    1
## 
## Samples were drawn using sampling(NUTS). For each parameter, Eff.Sample 
## is a crude measure of effective sample size, and Rhat is the potential 
## scale reduction factor on split chains (at convergence, Rhat = 1).
marginal_effects(fit2)

#evidence ratio



hypothesis(fit1,"age_group12>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group12) > 0    -0.02      0.09    -0.17      Inf       0.62 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group13 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group13) > 0    -0.15      0.08    -0.28      Inf       0.04 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group14>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group14) > 0     -0.1      0.07    -0.22      Inf       0.08 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"d1amarried>0",alpha=0.05)
## Hypothesis Tests for class b:
##                  Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (d1amarried) > 0     0.02      0.06    -0.09      Inf       1.67 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"h11>0",alpha=0.05)
## Hypothesis Tests for class b:
##           Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (h11) > 0     0.08      0.04     0.02      Inf       58.7 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"educ22>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ22) > 0    -0.02      0.05     -0.1      Inf       0.49 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"educ23>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ23) > 0     0.08      0.07    -0.03      Inf       7.49 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"selfhealthgood>0",alpha=0.05)
## Hypothesis Tests for class b:
##                      Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (selfhealthgood) > 0     0.04      0.04    -0.02      Inf       6.03 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"smosttmedium>0",alpha=0.05)
## Hypothesis Tests for class b:
##                    Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttmedium) > 0     0.01      0.05    -0.07      Inf       1.28 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"smosttheavy>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (smosttheavy) > 0     0.09      0.05     0.01      Inf      24.32 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b18abad>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b18abad) > 0     0.01      0.04    -0.06      Inf       1.32 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6b1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1) > 0     0.07      0.08    -0.06      Inf       4.42 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"p1>0",alpha=0.05)
## Hypothesis Tests for class b:
##          Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (p1) > 0        0      0.06     -0.1      Inf       1.12 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"p2>0",alpha=0.05)
## Hypothesis Tests for class b:
##          Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (p2) > 0    -0.03      0.06    -0.14      Inf        0.4 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6b1:p1>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1:p1) > 0    -0.14      0.11    -0.32      Inf       0.11 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6b1:p2>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1:p2) > 0    -0.12       0.1    -0.27      Inf       0.13 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit2)

#Model 2: model for persistence

5.7 Model 2.1: single policy

prior=get_prior(formula=highper~age_group1+educ2+d1a+h1+selfhealth+smostt
               +b18a+b6b+label1+freeEn+ant+c7ad, family="bernoulli", data=data2)
## Warning: Rows containing NAs were excluded from the model
set.seed(1234) 
 
fit3=brm(formula=highper~age_group1+educ2+d1a+h1+selfhealth+smostt
               +b18a+b6b+label1+freeEn+ant+c7ad, family="bernoulli", data=data2, chains=5, iter=2000, warmup=1000, prior=prior)
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
## 
## SAMPLING FOR MODEL 'bernoulli(logit) brms-model' NOW (CHAIN 1).
## 
## Chain 1, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 1, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 1, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 1, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 1, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 1, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 1, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 1, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 1, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 1, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 1, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 1, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 0.738 seconds (Warm-up)
##                0.696 seconds (Sampling)
##                1.434 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'bernoulli(logit) brms-model' NOW (CHAIN 2).
## 
## Chain 2, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 2, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 2, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 2, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 2, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 2, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 2, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 2, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 2, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 2, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 2, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 2, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 0.688 seconds (Warm-up)
##                0.709 seconds (Sampling)
##                1.397 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'bernoulli(logit) brms-model' NOW (CHAIN 3).
## 
## Chain 3, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 3, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 3, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 3, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 3, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 3, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 3, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 3, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 3, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 3, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 3, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 3, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 0.654 seconds (Warm-up)
##                0.686 seconds (Sampling)
##                1.34 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'bernoulli(logit) brms-model' NOW (CHAIN 4).
## 
## Chain 4, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 4, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 4, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 4, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 4, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 4, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 4, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 4, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 4, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 4, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 4, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 4, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 0.685 seconds (Warm-up)
##                0.677 seconds (Sampling)
##                1.362 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'bernoulli(logit) brms-model' NOW (CHAIN 5).
## 
## Chain 5, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 5, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 5, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 5, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 5, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 5, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 5, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 5, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 5, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 5, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 5, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 5, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 0.718 seconds (Warm-up)
##                0.664 seconds (Sampling)
##                1.382 seconds (Total)
summary(fit3)
##  Family: bernoulli (logit) 
## Formula: highper ~ age_group1 + educ2 + d1a + h1 + selfhealth + smostt + b18a + b6b + label1 + freeEn + ant + c7ad 
##    Data: data2 (Number of observations: 187) 
## Samples: 5 chains, each with iter = 2000; warmup = 1000; thin = 1; 
##          total post-warmup samples = 5000
##    WAIC: Not computed
##  
## Population-Level Effects: 
##                Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## Intercept         -1.18      0.76    -2.69     0.28       4373    1
## age_group12       -0.14      0.80    -1.72     1.43       4178    1
## age_group13       -1.34      0.76    -2.91     0.09       3639    1
## age_group14       -0.85      0.66    -2.18     0.38       3376    1
## educ22             0.16      0.46    -0.74     1.07       4649    1
## educ23             1.21      0.63     0.00     2.47       4080    1
## d1amarried         0.20      0.61    -0.92     1.42       3541    1
## h11                0.89      0.38     0.18     1.65       5000    1
## selfhealthgood     0.55      0.36    -0.12     1.27       5000    1
## smosttmedium       0.41      0.50    -0.54     1.40       4236    1
## smosttheavy        0.51      0.53    -0.54     1.53       4059    1
## b18abad            0.36      0.39    -0.39     1.11       5000    1
## b6b1              -0.16      0.37    -0.88     0.55       5000    1
## label11           -0.19      0.48    -1.12     0.75       5000    1
## freeEn1           -1.03      0.43    -1.89    -0.20       5000    1
## ant1               0.29      0.39    -0.48     1.07       5000    1
## c7ad1             -0.33      0.38    -1.08     0.41       5000    1
## 
## Samples were drawn using sampling(NUTS). For each parameter, Eff.Sample 
## is a crude measure of effective sample size, and Rhat is the potential 
## scale reduction factor on split chains (at convergence, Rhat = 1).
hypothesis(fit1,"age_group12>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group12) > 0    -0.02      0.09    -0.17      Inf       0.62 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group13 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group13) > 0    -0.15      0.08    -0.28      Inf       0.04 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group14>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group14) > 0     -0.1      0.07    -0.22      Inf       0.08 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"d1amarried>0",alpha=0.05)
## Hypothesis Tests for class b:
##                  Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (d1amarried) > 0      0.2      0.61    -0.78      Inf       1.61 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"h11>0",alpha=0.05)
## Hypothesis Tests for class b:
##           Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (h11) > 0     0.89      0.38     0.29      Inf     137.89 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"educ22>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ22) > 0     0.16      0.46    -0.59      Inf        1.8 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"educ23>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (educ23) > 0     1.21      0.63     0.18      Inf      38.37 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"selfhealthgood>0",alpha=0.05)
## Hypothesis Tests for class b:
##                      Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (selfhealthgood) > 0     0.55      0.36    -0.02      Inf      16.61 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"smosttmedium>0",alpha=0.05)
## Hypothesis Tests for class b:
##                    Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttmedium) > 0     0.41       0.5    -0.41      Inf       3.96 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"smosttheavy>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttheavy) > 0     0.51      0.53    -0.35      Inf       5.07 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"b18abad>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b18abad) > 0     0.36      0.39    -0.27      Inf       4.53 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"b6b1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1) > 0    -0.16      0.37    -0.78      Inf       0.49 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"label11>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (label11) > 0    -0.19      0.48    -0.97      Inf       0.54 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"freeEn1>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (freeEn1) > 0    -1.03      0.43    -1.75      Inf       0.01 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"ant1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ant1) > 0     0.29      0.39    -0.35      Inf       3.39 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"c7ad1>0",alpha=0.05)
## Hypothesis Tests for class b:
##             Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (c7ad1) > 0    -0.33      0.38    -0.95      Inf       0.24 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit3)

5.8 Model 2.2: policy combination: persistence

prior=get_prior(formula=highper~age_group1+educ2+d1a+h1+selfhealth+smostt
               +b18a+b6b*p, family="bernoulli", data=data2)
## Warning: Rows containing NAs were excluded from the model
set.seed(1234) 
 
fit4=brm(formula=highper~age_group1+educ2+d1a+h1+selfhealth+smostt
               +b18a+b6b*p, family="bernoulli", data=data2, chains=5, iter=2000, warmup=1000, prior=prior)
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
## 
## SAMPLING FOR MODEL 'bernoulli(logit) brms-model' NOW (CHAIN 1).
## 
## Chain 1, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 1, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 1, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 1, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 1, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 1, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 1, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 1, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 1, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 1, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 1, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 1, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 0.984 seconds (Warm-up)
##                0.895 seconds (Sampling)
##                1.879 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'bernoulli(logit) brms-model' NOW (CHAIN 2).
## 
## Chain 2, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 2, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 2, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 2, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 2, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 2, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 2, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 2, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 2, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 2, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 2, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 2, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 0.925 seconds (Warm-up)
##                0.852 seconds (Sampling)
##                1.777 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'bernoulli(logit) brms-model' NOW (CHAIN 3).
## 
## Chain 3, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 3, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 3, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 3, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 3, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 3, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 3, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 3, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 3, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 3, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 3, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 3, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 0.844 seconds (Warm-up)
##                0.889 seconds (Sampling)
##                1.733 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'bernoulli(logit) brms-model' NOW (CHAIN 4).
## 
## Chain 4, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 4, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 4, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 4, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 4, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 4, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 4, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 4, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 4, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 4, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 4, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 4, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 0.863 seconds (Warm-up)
##                0.844 seconds (Sampling)
##                1.707 seconds (Total)
## 
## 
## SAMPLING FOR MODEL 'bernoulli(logit) brms-model' NOW (CHAIN 5).
## 
## Chain 5, Iteration:    1 / 2000 [  0%]  (Warmup)
## Chain 5, Iteration:  200 / 2000 [ 10%]  (Warmup)
## Chain 5, Iteration:  400 / 2000 [ 20%]  (Warmup)
## Chain 5, Iteration:  600 / 2000 [ 30%]  (Warmup)
## Chain 5, Iteration:  800 / 2000 [ 40%]  (Warmup)
## Chain 5, Iteration: 1000 / 2000 [ 50%]  (Warmup)
## Chain 5, Iteration: 1001 / 2000 [ 50%]  (Sampling)
## Chain 5, Iteration: 1200 / 2000 [ 60%]  (Sampling)
## Chain 5, Iteration: 1400 / 2000 [ 70%]  (Sampling)
## Chain 5, Iteration: 1600 / 2000 [ 80%]  (Sampling)
## Chain 5, Iteration: 1800 / 2000 [ 90%]  (Sampling)
## Chain 5, Iteration: 2000 / 2000 [100%]  (Sampling)
##  Elapsed Time: 1.016 seconds (Warm-up)
##                0.816 seconds (Sampling)
##                1.832 seconds (Total)
summary(fit4)
##  Family: bernoulli (logit) 
## Formula: highper ~ age_group1 + educ2 + d1a + h1 + selfhealth + smostt + b18a + b6b * p 
##    Data: data2 (Number of observations: 187) 
## Samples: 5 chains, each with iter = 2000; warmup = 1000; thin = 1; 
##          total post-warmup samples = 5000
##    WAIC: Not computed
##  
## Population-Level Effects: 
##                Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## Intercept         -0.70      0.81    -2.30     0.89       5000    1
## age_group12       -0.01      0.79    -1.55     1.59       5000    1
## age_group13       -1.40      0.76    -2.92     0.04       4113    1
## age_group14       -0.82      0.67    -2.15     0.47       3680    1
## educ22             0.09      0.45    -0.80     0.98       5000    1
## educ23             0.93      0.64    -0.30     2.19       5000    1
## d1amarried         0.31      0.59    -0.81     1.48       4123    1
## h11                0.91      0.38     0.19     1.66       5000    1
## selfhealthgood     0.54      0.36    -0.17     1.22       5000    1
## smosttmedium       0.49      0.49    -0.43     1.50       5000    1
## smosttheavy        0.54      0.52    -0.45     1.55       5000    1
## b18abad            0.15      0.36    -0.56     0.85       5000    1
## b6b1              -0.12      0.76    -1.58     1.38       3078    1
## p1                -1.04      0.58    -2.19     0.11       3962    1
## p2                -0.70      0.58    -1.88     0.43       4334    1
## b6b1:p1            0.35      0.99    -1.60     2.27       3527    1
## b6b1:p2           -0.39      0.92    -2.17     1.40       3177    1
## 
## Samples were drawn using sampling(NUTS). For each parameter, Eff.Sample 
## is a crude measure of effective sample size, and Rhat is the potential 
## scale reduction factor on split chains (at convergence, Rhat = 1).
hypothesis(fit1,"age_group12>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group12) > 0    -0.02      0.09    -0.17      Inf       0.62 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group13 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group13) > 0    -0.15      0.08    -0.28      Inf       0.04 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group14>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group14) > 0     -0.1      0.07    -0.22      Inf       0.08 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"d1amarried>0",alpha=0.05)
## Hypothesis Tests for class b:
##                  Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (d1amarried) > 0     0.31      0.59    -0.64      Inf       2.34 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"h11>0",alpha=0.05)
## Hypothesis Tests for class b:
##           Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (h11) > 0     0.91      0.38     0.31      Inf     146.06 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"educ22>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ22) > 0     0.09      0.45    -0.66      Inf       1.37 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"educ23>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ23) > 0     0.93      0.64    -0.11      Inf      12.89 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"selfhealthgood>0",alpha=0.05)
## Hypothesis Tests for class b:
##                      Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (selfhealthgood) > 0     0.54      0.36    -0.05      Inf      13.84 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"smosttmedium>0",alpha=0.05)
## Hypothesis Tests for class b:
##                    Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttmedium) > 0     0.49      0.49     -0.3      Inf        5.3 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"smosttheavy>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttheavy) > 0     0.54      0.52    -0.31      Inf        5.5 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"b18abad>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b18abad) > 0     0.15      0.36    -0.45      Inf        1.9 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"b6b1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1) > 0    -0.12      0.76    -1.34      Inf       0.73 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"p1>0",alpha=0.05)
## Hypothesis Tests for class b:
##          Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (p1) > 0    -1.04      0.58       -2      Inf       0.04 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"p2>0",alpha=0.05)
## Hypothesis Tests for class b:
##          Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (p2) > 0     -0.7      0.58    -1.66      Inf       0.13 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"b6b1:p1>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1:p1) > 0     0.35      0.99    -1.29      Inf       1.77 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"b6b1:p2>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6b1:p2) > 0    -0.39      0.92    -1.89      Inf       0.51 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit4)

LS0tDQp0aXRsZTogJ2FsbCBtb2RlbHM6IGNpZ2FyZXR0ZSBwcmljZScNCmF1dGhvcjogIkJpbmggVGhhbmcsIFRyYW4iDQpkYXRlOiAiMjMgSnVseSAyMDE3Ig0Kb3V0cHV0OiANCiAgaHRtbF9kb2N1bWVudDogDQogICAgY29kZV9kb3dubG9hZDogdHJ1ZQ0KICAgIGNvZGVfZm9sZGluZzogaGlkZQ0KICAgIG51bWJlcl9zZWN0aW9uczogeWVzDQogICAgdGhlbWU6IGpvdXJuYWwNCiAgICB0b2M6IFRSVUUNCiAgICB0b2NfZmxvYXQ6IFRSVUUNCiAgICANCiNEb2MgZHUgbGlldSAgICANCi0tLQ0KYGB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