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/dataR5.dta")

r1 <- subset(r )

attach(r1)

r1$logC1=log10(r1$cost_inc)

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, 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

0.1 define varibles

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

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

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


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

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

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

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

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)

recode

newdata2$d1a[is.na(newdata2$d1a)] <- 9
## Warning in `[<-.factor`(`*tmp*`, is.na(newdata2$d1a), value =
## structure(c(1L, : invalid factor level, NA generated
newdata2$educ2[is.na(newdata2$educ2)] <- 999
## Warning in `[<-.factor`(`*tmp*`, is.na(newdata2$educ2), value =
## structure(c(3L, : invalid factor level, NA generated
newdata2$ter_in[is.na(newdata2$ter_in)] <- 999
## Warning in `[<-.factor`(`*tmp*`, is.na(newdata2$ter_in), value =
## structure(c(1L, : invalid factor level, NA generated
newdata2$selfhealth[is.na(newdata2$selfhealth)] <- 999
## Warning in `[<-.factor`(`*tmp*`, is.na(newdata2$selfhealth), value =
## structure(c(1L, : invalid factor level, NA generated
newdata2$c1[is.na(newdata2$c1)] <- 999
newdata2$smostt[is.na(newdata2$smostt)] <- 999
## Warning in `[<-.factor`(`*tmp*`, is.na(newdata2$smostt), value =
## structure(c(3L, : invalid factor level, NA generated
newdata2$b6a[is.na(newdata2$b6a)] <- 999
## Warning in `[<-.factor`(`*tmp*`, is.na(newdata2$b6a), value =
## structure(c(1L, : invalid factor level, NA generated
newdata2$h1[is.na(newdata2$h1)] <- 999
## Warning in `[<-.factor`(`*tmp*`, is.na(newdata2$h1), value =
## structure(c(1L, : invalid factor level, NA generated
newdata2$b18a[is.na(newdata2$b18a)] <- 999
## Warning in `[<-.factor`(`*tmp*`, is.na(newdata2$b18a), value =
## structure(c(1L, : invalid factor level, NA generated
newdata2$b16a[is.na(newdata2$b16a)] <- 999
## Warning in `[<-.factor`(`*tmp*`, is.na(newdata2$b16a), value =
## structure(c(2L, : invalid factor level, NA generated
newdata2$label1[is.na(newdata2$label1)] <- 999
## Warning in `[<-.factor`(`*tmp*`, is.na(newdata2$label1), value =
## structure(c(1L, : invalid factor level, NA generated
newdata2$freeEn[is.na(newdata2$freeEn)] <- 999
## Warning in `[<-.factor`(`*tmp*`, is.na(newdata2$freeEn), value =
## structure(c(2L, : invalid factor level, NA generated
newdata2$c7ad[is.na(newdata2$c7ad)] <- 999
## Warning in `[<-.factor`(`*tmp*`, is.na(newdata2$c7ad), value =
## structure(c(1L, : invalid factor level, NA generated
newdata2$ant[is.na(newdata2$ant)] <- 999
## Warning in `[<-.factor`(`*tmp*`, is.na(newdata2$ant), value =
## structure(c(1L, : invalid factor level, NA generated
newdata2$p[is.na(newdata2$p)] <- 999
## Warning in `[<-.factor`(`*tmp*`, is.na(newdata2$p), value =
## structure(c(2L, : invalid factor level, NA generated

0.2 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').
library("caret")
## Warning: package 'caret' was built under R version 3.2.5
## Loading required package: lattice
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
options(mc.cores = parallel::detectCores())

1 Model 1: model for cost

1.1 Model 1.1: model for cost-single policy

fit1 <- brm(bf(logC1~age_group+educ2+d1a+h1+ter_in+selfhealth+smostt
               +b18a+b6a+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
summary(fit1)
##  Family: asym_laplace (identity) 
## Formula: logC1 ~ age_group + educ2 + d1a + h1 + ter_in + selfhealth + smostt + b18a + b6a + 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.54      0.04     4.45     4.63       2282    1
## age_groupgr3039     0.04      0.03    -0.03     0.10       2277    1
## age_groupgr4049     0.00      0.03    -0.06     0.07       1785    1
## age_groupgr5059    -0.06      0.04    -0.14     0.02       2024    1
## age_group60plus     0.02      0.05    -0.09     0.11       2088    1
## educ22              0.03      0.03    -0.03     0.08       2184    1
## educ23              0.12      0.03     0.06     0.19       2206    1
## d1amarried         -0.02      0.03    -0.08     0.04       1824    1
## h11                 0.02      0.02    -0.02     0.07       2703    1
## ter_in2             0.00      0.03    -0.05     0.05       2465    1
## ter_in3            -0.02      0.03    -0.07     0.04       2154    1
## selfhealthgood      0.08      0.02     0.04     0.12       2930    1
## smosttmedium        0.05      0.03     0.00     0.10       2499    1
## smosttheavy         0.05      0.03    -0.01     0.10       2650    1
## b18abad             0.02      0.02    -0.02     0.07       2727    1
## b6ayes              0.04      0.03    -0.02     0.10       2967    1
## label11            -0.06      0.03    -0.11    -0.01       3556    1
## freeEn1            -0.10      0.03    -0.15    -0.05       2458    1
## ant1                0.05      0.02     0.01     0.09       3049    1
## c7ad1              -0.01      0.02    -0.06     0.03       2889    1
## 
## Family Specific Parameters: 
##       Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## sigma     0.07         0     0.06     0.08       3124    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_groupgr3039>0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr3039) > 0     0.04      0.03    -0.01      Inf       9.26 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_groupgr4049 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr4049) > 0        0      0.03    -0.05      Inf       1.16 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_groupgr5059 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr5059) > 0    -0.06      0.04    -0.13      Inf       0.08 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group60plus>0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group60plus) > 0     0.02      0.05    -0.07      Inf       1.98 
## ---
## '*': 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.31 
## ---
## '*': 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.02    -0.01      Inf        5.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.01 
## ---
## '*': 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,"ter_in2>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ter_in2) > 0        0      0.03    -0.04      Inf       1.02 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"ter_in3>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ter_in3) > 0    -0.02      0.03    -0.06      Inf       0.34 
## ---
## '*': 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.05      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.05      0.03     0.01      Inf      42.96 *
## ---
## '*': 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.03        0      Inf      18.14 
## ---
## '*': 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.02      Inf       4.52 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"b6ayes>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6ayes) > 0     0.04      0.03    -0.01      Inf      11.94 
## ---
## '*': 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.1      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.1      0.03    -0.14      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.05      0.02     0.02      Inf        124 *
## ---
## '*': 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.05      Inf       0.37 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit1)

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

fit1 <- brm(bf(logC1~age_group+educ2+d1a+h1+ter_in+selfhealth+smostt
               +b18a+b6a+label1+freeEn+ant+c7ad, quantile = 0.5), data = newdata2, 
            family = asym_laplace())
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
summary(fit1)
##  Family: asym_laplace (identity) 
## Formula: logC1 ~ age_group + educ2 + d1a + h1 + ter_in + selfhealth + smostt + b18a + b6a + 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.04     4.59     4.76       2204    1
## age_groupgr3039     0.05      0.04    -0.03     0.12       2058    1
## age_groupgr4049    -0.04      0.04    -0.11     0.03       1562    1
## age_groupgr5059    -0.03      0.04    -0.11     0.05       1490    1
## age_group60plus    -0.03      0.05    -0.13     0.09       1579    1
## educ22              0.01      0.03    -0.05     0.07       2280    1
## educ23              0.10      0.04     0.03     0.18       1956    1
## d1amarried          0.00      0.03    -0.06     0.06       1883    1
## h11                 0.03      0.02    -0.01     0.08       3298    1
## ter_in2             0.01      0.03    -0.05     0.06       3150    1
## ter_in3             0.00      0.03    -0.06     0.05       2986    1
## selfhealthgood      0.06      0.02     0.01     0.10       3130    1
## smosttmedium        0.03      0.03    -0.02     0.09       2285    1
## smosttheavy         0.06      0.03     0.00     0.12       2646    1
## b18abad             0.03      0.02    -0.02     0.08       3057    1
## b6ayes              0.06      0.03    -0.01     0.12       3199    1
## label11            -0.05      0.03    -0.12     0.01       3233    1
## freeEn1            -0.09      0.03    -0.14    -0.03       2797    1
## ant1                0.04      0.03    -0.01     0.09       2717    1
## c7ad1              -0.02      0.03    -0.07     0.03       2968    1
## 
## Family Specific Parameters: 
##       Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## sigma     0.09         0     0.09      0.1       3729    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_groupgr3039>0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr3039) > 0     0.05      0.04    -0.02      Inf       8.37 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_groupgr4049 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr4049) > 0    -0.04      0.04     -0.1      Inf       0.14 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_groupgr5059 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr5059) > 0    -0.03      0.04     -0.1      Inf       0.35 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group60plus>0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group60plus) > 0    -0.03      0.05    -0.11      Inf       0.43 
## ---
## '*': 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.03    -0.05      Inf       1.21 
## ---
## '*': 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      10.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.03    -0.04      Inf       1.28 
## ---
## '*': 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.04     0.04      Inf     284.71 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"ter_in2>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ter_in2) > 0     0.01      0.03    -0.04      Inf       1.41 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"ter_in3>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ter_in3) > 0        0      0.03    -0.05      Inf       1.01 
## ---
## '*': 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.02     0.02      Inf        124 *
## ---
## '*': 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.03    -0.01      Inf       7.18 
## ---
## '*': 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.03     0.01      Inf      46.06 *
## ---
## '*': 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.02    -0.01      Inf       8.11 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"b6ayes>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (b6ayes) > 0     0.06      0.03        0      Inf      25.67 *
## ---
## '*': 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.05      0.03    -0.11      Inf       0.07 
## ---
## '*': 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.03    -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.03        0      Inf      13.81 
## ---
## '*': 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.02      0.03    -0.06      Inf       0.29 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit1)

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

fit1 <- brm(bf(logC1~age_group+educ2+d1a+h1+ter_in+selfhealth+smostt
               +b18a+b6a+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
summary(fit1)
##  Family: asym_laplace (identity) 
## Formula: logC1 ~ age_group + educ2 + d1a + h1 + ter_in + selfhealth + smostt + b18a + b6a + 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.89      0.06     4.78     5.00       2417    1
## age_groupgr3039    -0.04      0.05    -0.13     0.05       1797    1
## age_groupgr4049    -0.11      0.05    -0.21    -0.01       1604    1
## age_groupgr5059    -0.06      0.05    -0.16     0.04       1751    1
## age_group60plus    -0.05      0.07    -0.18     0.08       1789    1
## educ22             -0.02      0.03    -0.08     0.05       2278    1
## educ23              0.06      0.04    -0.02     0.14       2145    1
## d1amarried          0.02      0.04    -0.06     0.10       1826    1
## h11                 0.04      0.03    -0.01     0.09       3281    1
## ter_in2             0.04      0.03    -0.01     0.10       2527    1
## ter_in3             0.05      0.04    -0.02     0.12       2683    1
## selfhealthgood      0.06      0.03     0.01     0.11       2959    1
## smosttmedium       -0.03      0.04    -0.10     0.04       2115    1
## smosttheavy         0.08      0.04     0.00     0.16       2090    1
## b18abad             0.02      0.03    -0.03     0.07       2366    1
## b6ayes              0.03      0.03    -0.03     0.10       3187    1
## label11            -0.04      0.03    -0.10     0.03       2786    1
## freeEn1             0.00      0.03    -0.07     0.06       3165    1
## ant1                0.02      0.03    -0.04     0.07       2931    1
## c7ad1               0.01      0.03    -0.04     0.06       3532    1
## 
## Family Specific Parameters: 
##       Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## sigma     0.08         0     0.07     0.09       3850    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_groupgr3039>0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr3039) > 0    -0.04      0.05    -0.11      Inf       0.23 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_groupgr4049 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr4049) > 0    -0.11      0.05    -0.19      Inf       0.01 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_groupgr5059 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr5059) > 0    -0.06      0.05    -0.14      Inf       0.13 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"age_group60plus>0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group60plus) > 0    -0.05      0.07    -0.16      Inf       0.31 
## ---
## '*': 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.04    -0.04      Inf       2.84 
## ---
## '*': 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.04      0.03        0      Inf       14.5 
## ---
## '*': 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.02      0.03    -0.07      Inf        0.4 
## ---
## '*': 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.06      0.04    -0.01      Inf      13.98 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"ter_in2>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ter_in2) > 0     0.04      0.03        0      Inf      13.93 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"ter_in3>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ter_in3) > 0     0.05      0.04    -0.01      Inf      10.08 
## ---
## '*': 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.02      Inf     113.29 *
## ---
## '*': 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.04    -0.09      Inf       0.25 
## ---
## '*': 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.08      0.04     0.01      Inf         39 *
## ---
## '*': 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.03    -0.02      Inf       3.54 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit1,"b6ayes>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6ayes) > 0     0.03      0.03    -0.02      Inf       5.92 
## ---
## '*': 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.03    -0.09      Inf       0.15 
## ---
## '*': 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      0.03    -0.06      Inf       0.84 
## ---
## '*': 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.03    -0.03      Inf        2.4 
## ---
## '*': 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.03    -0.04      Inf       1.84 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit1)

1.4 Model 1.2: model for cost-policy combination

fit2 <- brm(bf(logC1~age_group+educ2+d1a+h1+ter_in+selfhealth+smostt
               +b18a+b6a*p, quantile = 0.25), data = newdata2, 
            family = asym_laplace())
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
summary(fit2)
##  Family: asym_laplace (identity) 
## Formula: logC1 ~ age_group + educ2 + d1a + h1 + ter_in + selfhealth + smostt + b18a + b6a * p 
##          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.50      0.05     4.41     4.59       2140    1
## age_groupgr3039     0.02      0.03    -0.05     0.08       3106    1
## age_groupgr4049    -0.01      0.03    -0.07     0.06       2334    1
## age_groupgr5059    -0.05      0.04    -0.13     0.02       2689    1
## age_group60plus     0.01      0.05    -0.10     0.10       2587    1
## educ22              0.04      0.03    -0.02     0.10       2319    1
## educ23              0.12      0.03     0.06     0.19       1683    1
## d1amarried         -0.01      0.03    -0.07     0.04       2512    1
## h11                 0.01      0.02    -0.03     0.06       2757    1
## ter_in2             0.02      0.03    -0.04     0.07       2611    1
## ter_in3             0.01      0.03    -0.06     0.06       2402    1
## selfhealthgood      0.08      0.02     0.04     0.12       3035    1
## smosttmedium        0.06      0.03     0.01     0.11       2754    1
## smosttheavy         0.06      0.03     0.00     0.12       2494    1
## b18abad             0.04      0.02     0.00     0.09       3305    1
## b6ayes              0.14      0.06     0.02     0.26       1619    1
## p1                  0.00      0.03    -0.06     0.06       2430    1
## p2                 -0.01      0.03    -0.07     0.05       2284    1
## b6ayes:p1          -0.13      0.08    -0.29     0.03       1880    1
## b6ayes:p2          -0.15      0.07    -0.29    -0.01       1740    1
## 
## Family Specific Parameters: 
##       Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## sigma     0.07         0     0.07     0.08       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).
marginal_effects(fit2)

#evidence ratio



hypothesis(fit2,"age_groupgr3039>0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr3039) > 0     0.02      0.03    -0.04      Inf       2.18 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"age_groupgr4049 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr4049) > 0    -0.01      0.03    -0.06      Inf       0.76 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"age_groupgr5059 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr5059) > 0    -0.05      0.04    -0.12      Inf       0.12 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"age_group60plus>0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group60plus) > 0     0.01      0.05    -0.08      Inf       1.25 
## ---
## '*': 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.01      0.03    -0.06      Inf       0.47 
## ---
## '*': 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.02    -0.03      Inf       2.39 
## ---
## '*': 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.04      0.03    -0.02      Inf       6.77 
## ---
## '*': 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.12      0.03     0.07      Inf        Inf *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"ter_in2>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ter_in2) > 0     0.02      0.03    -0.03      Inf       2.81 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"ter_in3>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ter_in3) > 0     0.01      0.03    -0.05      Inf       1.35 
## ---
## '*': 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.08      0.02     0.04      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.06      0.03     0.01      Inf      74.47 *
## ---
## '*': 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.03     0.01      Inf      34.09 *
## ---
## '*': 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.02     0.01      Inf      31.79 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6ayes>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (b6ayes) > 0     0.14      0.06     0.04      Inf      56.97 *
## ---
## '*': 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.03    -0.05      Inf       1.04 
## ---
## '*': 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.03    -0.06      Inf       0.62 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6ayes:p1>0",alpha=0.05)
## Hypothesis Tests for class b:
##                 Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6ayes:p1) > 0    -0.13      0.08    -0.27      Inf       0.05 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6ayes:p2>0",alpha=0.05)
## Hypothesis Tests for class b:
##                 Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6ayes:p2) > 0    -0.15      0.07    -0.27      Inf       0.02 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit2)

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

fit2 <- brm(bf(logC1~age_group+educ2+d1a+h1+ter_in+selfhealth+smostt
               +b18a+b6a*p, quantile = 0.5), data = newdata2, 
            family = asym_laplace())
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
summary(fit2)
##  Family: asym_laplace (identity) 
## Formula: logC1 ~ age_group + educ2 + d1a + h1 + ter_in + selfhealth + smostt + b18a + b6a * p 
##          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.69      0.05     4.60     4.78       3110    1
## age_groupgr3039     0.06      0.04    -0.02     0.13       2501    1
## age_groupgr4049    -0.04      0.04    -0.11     0.03       2155    1
## age_groupgr5059    -0.02      0.04    -0.10     0.07       2161    1
## age_group60plus    -0.02      0.06    -0.13     0.10       2253    1
## educ22              0.01      0.03    -0.05     0.07       2542    1
## educ23              0.10      0.04     0.03     0.18       2605    1
## d1amarried          0.00      0.03    -0.06     0.06       2340    1
## h11                 0.04      0.02    -0.01     0.08       3024    1
## ter_in2             0.01      0.03    -0.05     0.06       3266    1
## ter_in3             0.00      0.03    -0.05     0.06       3265    1
## selfhealthgood      0.05      0.02     0.00     0.10       2861    1
## smosttmedium        0.04      0.03    -0.01     0.09       2401    1
## smosttheavy         0.07      0.03     0.00     0.12       2655    1
## b18abad             0.01      0.03    -0.04     0.06       3273    1
## b6ayes              0.10      0.06    -0.02     0.23       1822    1
## p1                 -0.01      0.03    -0.08     0.06       2554    1
## p2                 -0.04      0.03    -0.09     0.02       2515    1
## b6ayes:p1          -0.07      0.08    -0.23     0.09       1927    1
## b6ayes:p2          -0.07      0.08    -0.23     0.08       1894    1
## 
## Family Specific Parameters: 
##       Estimate Est.Error l-95% CI u-95% CI Eff.Sample Rhat
## sigma      0.1         0     0.09      0.1       3734    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(fit2,"age_groupgr3039>0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr3039) > 0     0.06      0.04        0      Inf      15.19 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"age_groupgr4049 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr4049) > 0    -0.04      0.04     -0.1      Inf       0.18 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"age_groupgr5059 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr5059) > 0    -0.02      0.04    -0.09      Inf       0.56 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"age_group60plus>0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group60plus) > 0    -0.02      0.06    -0.11      Inf       0.69 
## ---
## '*': 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.03    -0.05      Inf       1.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.04      0.02        0      Inf      15.67 
## ---
## '*': 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.03    -0.04      Inf       1.55 
## ---
## '*': 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.1      0.04     0.04      Inf     284.71 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"ter_in2>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ter_in2) > 0     0.01      0.03    -0.04      Inf       1.32 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"ter_in3>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ter_in3) > 0        0      0.03    -0.04      Inf       1.08 
## ---
## '*': 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.02     0.01      Inf      49.63 *
## ---
## '*': 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.04      0.03    -0.01      Inf      12.94 
## ---
## '*': 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.07      0.03     0.01      Inf      60.54 *
## ---
## '*': 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.03    -0.03      Inf       2.22 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6ayes>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (b6ayes) > 0      0.1      0.06        0      Inf      19.62 *
## ---
## '*': 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.01      0.03    -0.07      Inf       0.49 
## ---
## '*': 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.04      0.03    -0.09      Inf       0.13 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6ayes:p1>0",alpha=0.05)
## Hypothesis Tests for class b:
##                 Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6ayes:p1) > 0    -0.07      0.08     -0.2      Inf       0.24 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6ayes:p2>0",alpha=0.05)
## Hypothesis Tests for class b:
##                 Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6ayes:p2) > 0    -0.07      0.08     -0.2      Inf       0.23 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit2)

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

fit2 <- brm(bf(logC1~age_group+educ2+d1a+h1+ter_in+selfhealth+smostt
               +b18a+b6a*p, quantile = 0.75), data = newdata2, 
            family = asym_laplace())
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
summary(fit2)
##  Family: asym_laplace (identity) 
## Formula: logC1 ~ age_group + educ2 + d1a + h1 + ter_in + selfhealth + smostt + b18a + b6a * p 
##          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.87      0.06     4.77     4.99       2486    1
## age_groupgr3039    -0.05      0.04    -0.14     0.04       1564    1
## age_groupgr4049    -0.12      0.05    -0.21    -0.02       1295    1
## age_groupgr5059    -0.08      0.05    -0.18     0.02       1353    1
## age_group60plus    -0.06      0.06    -0.18     0.06       1628    1
## educ22             -0.01      0.03    -0.08     0.06       2299    1
## educ23              0.07      0.04    -0.02     0.15       2156    1
## d1amarried          0.03      0.04    -0.05     0.11       1265    1
## h11                 0.03      0.03    -0.02     0.08       2934    1
## ter_in2             0.05      0.03    -0.01     0.11       2096    1
## ter_in3             0.05      0.04    -0.02     0.12       2295    1
## selfhealthgood      0.06      0.03     0.01     0.11       3321    1
## smosttmedium       -0.03      0.04    -0.10     0.04       2173    1
## smosttheavy         0.09      0.04     0.01     0.16       1983    1
## b18abad             0.02      0.03    -0.03     0.07       3007    1
## b6ayes              0.07      0.07    -0.06     0.23       1389    1
## p1                  0.05      0.04    -0.02     0.12       2403    1
## p2                  0.01      0.03    -0.06     0.08       2321    1
## b6ayes:p1          -0.08      0.10    -0.27     0.11       1656    1
## b6ayes:p2          -0.02      0.09    -0.20     0.15       1300    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).
marginal_effects(fit2)

#evidence ratio



hypothesis(fit2,"age_groupgr3039>0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr3039) > 0    -0.05      0.04    -0.12      Inf       0.14 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"age_groupgr4049 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr4049) > 0    -0.12      0.05     -0.2      Inf       0.01 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"age_groupgr5059 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr5059) > 0    -0.08      0.05    -0.16      Inf       0.07 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"age_group60plus>0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group60plus) > 0    -0.06      0.06    -0.17      Inf       0.23 
## ---
## '*': 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.03      0.04    -0.03      Inf       3.78 
## ---
## '*': 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.03    -0.01      Inf        8.8 
## ---
## '*': 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.03    -0.06      Inf       0.68 
## ---
## '*': 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.07      0.04    -0.01      Inf      14.69 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"ter_in2>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ter_in2) > 0     0.05      0.03    -0.01      Inf      12.89 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"ter_in3>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ter_in3) > 0     0.05      0.04    -0.01      Inf       9.34 
## ---
## '*': 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.06      0.03     0.01      Inf      74.47 *
## ---
## '*': 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.03      0.04    -0.09      Inf       0.27 
## ---
## '*': 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.04     0.02      Inf       61.5 *
## ---
## '*': 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.02      0.03    -0.02      Inf       4.63 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6ayes>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6ayes) > 0     0.07      0.07    -0.04      Inf       5.13 
## ---
## '*': 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.04    -0.01      Inf       10.8 
## ---
## '*': 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.03    -0.04      Inf       1.88 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6ayes:p1>0",alpha=0.05)
## Hypothesis Tests for class b:
##                 Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6ayes:p1) > 0    -0.08       0.1    -0.24      Inf       0.28 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit2,"b6ayes:p2>0",alpha=0.05)
## Hypothesis Tests for class b:
##                 Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6ayes:p2) > 0    -0.02      0.09    -0.17      Inf       0.69 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit2)

#Model 2: model for persistence

1.7 Model 2.1: single policy

prior=get_prior(formula=highper~age_group+educ2+d1a+h1+ter_in+selfhealth+smostt
               +b18a+b6a+label1+freeEn+ant+c7ad, family="bernoulli", data=newdata2)
## Warning: Rows containing NAs were excluded from the model
set.seed(1234) 
 
fit3=brm(formula=highper~age_group+educ2+d1a+h1+ter_in+selfhealth+smostt
               +b18a+b6a+label1+freeEn+ant+c7ad, family="bernoulli", data=newdata2, chains=5, iter=2000, warmup=1000, prior=prior)
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
summary(fit3)
##  Family: bernoulli (logit) 
## Formula: highper ~ age_group + educ2 + d1a + h1 + ter_in + selfhealth + smostt + b18a + b6a + label1 + freeEn + ant + c7ad 
##    Data: newdata2 (Number of observations: 435) 
## 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.50      0.47    -2.44    -0.59       5000    1
## age_groupgr3039     0.31      0.37    -0.41     1.03       3685    1
## age_groupgr4049    -0.36      0.38    -1.13     0.39       3102    1
## age_groupgr5059    -0.26      0.41    -1.08     0.55       3158    1
## age_group60plus    -0.34      0.56    -1.47     0.73       5000    1
## educ22             -0.02      0.29    -0.58     0.55       4278    1
## educ23              0.99      0.36     0.29     1.70       3840    1
## d1amarried          0.03      0.33    -0.61     0.67       3393    1
## h11                 0.46      0.23     0.02     0.90       5000    1
## ter_in2             0.09      0.27    -0.44     0.63       5000    1
## ter_in3             0.09      0.28    -0.47     0.63       5000    1
## selfhealthgood      0.64      0.22     0.22     1.07       5000    1
## smosttmedium        0.37      0.29    -0.20     0.96       4365    1
## smosttheavy         0.74      0.31     0.15     1.36       4194    1
## b18abad             0.39      0.22    -0.06     0.84       5000    1
## b6ayes              0.63      0.31     0.01     1.24       5000    1
## label11            -0.41      0.31    -1.01     0.19       5000    1
## freeEn1            -0.63      0.26    -1.14    -0.13       5000    1
## ant1                0.22      0.23    -0.23     0.65       5000    1
## c7ad1               0.01      0.23    -0.44     0.46       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(fit3,"age_groupgr3039>0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr3039) > 0     0.31      0.37     -0.3      Inf       4.09 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"age_groupgr4049 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr4049) > 0    -0.36      0.38    -0.99      Inf       0.21 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"age_groupgr5059 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr5059) > 0    -0.26      0.41    -0.94      Inf       0.36 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"age_group60plus>0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group60plus) > 0    -0.34      0.56    -1.27      Inf       0.39 
## ---
## '*': 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.03      0.33     -0.5      Inf       1.18 
## ---
## '*': 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.46      0.23      0.1      Inf      49.51 *
## ---
## '*': 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.02      0.29    -0.49      Inf       0.93 
## ---
## '*': 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.99      0.36      0.4      Inf     293.12 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"ter_in2>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ter_in2) > 0     0.09      0.27    -0.35      Inf       1.62 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"ter_in3>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ter_in3) > 0     0.09      0.28    -0.38      Inf       1.71 
## ---
## '*': 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.64      0.22     0.29      Inf     713.29 *
## ---
## '*': 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.37      0.29     -0.1      Inf       9.25 
## ---
## '*': 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.74      0.31     0.23      Inf     226.27 *
## ---
## '*': 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.39      0.22     0.02      Inf      23.75 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit3,"b6ayes>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (b6ayes) > 0     0.63      0.31     0.12      Inf      44.05 *
## ---
## '*': 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.41      0.31    -0.91      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.63      0.26    -1.05      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.22      0.23    -0.15      Inf       4.97 
## ---
## '*': 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.01      0.23    -0.36      Inf        1.1 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit3)

1.8 Model 2.2: policy combination: persistence

prior=get_prior(formula=highper~age_group+educ2+d1a+h1+ter_in+selfhealth+smostt
               +b18a+b6a*p, family="bernoulli", data=newdata2)
## Warning: Rows containing NAs were excluded from the model
set.seed(1234) 
 
fit4=brm(formula=highper~age_group+educ2+d1a+h1+ter_in+selfhealth+smostt
               +b18a+b6a*p, family="bernoulli", data=newdata2, chains=5, iter=2000, warmup=1000, prior=prior)
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
summary(fit4)
##  Family: bernoulli (logit) 
## Formula: highper ~ age_group + educ2 + d1a + h1 + ter_in + selfhealth + smostt + b18a + b6a * p 
##    Data: newdata2 (Number of observations: 435) 
## 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.46      0.47    -2.38    -0.53       5000    1
## age_groupgr3039     0.25      0.37    -0.43     0.97       4074    1
## age_groupgr4049    -0.42      0.38    -1.16     0.31       3621    1
## age_groupgr5059    -0.29      0.41    -1.08     0.50       3582    1
## age_group60plus    -0.35      0.55    -1.46     0.69       5000    1
## educ22             -0.02      0.28    -0.57     0.54       5000    1
## educ23              0.94      0.36     0.24     1.66       5000    1
## d1amarried          0.05      0.32    -0.56     0.67       3813    1
## h11                 0.45      0.22     0.00     0.89       5000    1
## ter_in2             0.13      0.27    -0.40     0.65       5000    1
## ter_in3             0.11      0.27    -0.41     0.64       5000    1
## selfhealthgood      0.59      0.21     0.17     1.01       5000    1
## smosttmedium        0.40      0.28    -0.15     0.96       5000    1
## smosttheavy         0.75      0.31     0.15     1.36       5000    1
## b18abad             0.39      0.23    -0.05     0.85       5000    1
## b6ayes              1.36      0.79    -0.09     2.95       2906    1
## p1                 -0.16      0.30    -0.73     0.42       5000    1
## p2                 -0.14      0.29    -0.72     0.43       5000    1
## b6ayes:p1          -0.76      0.96    -2.69     1.07       2995    1
## b6ayes:p2          -1.02      0.89    -2.81     0.67       2937    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(fit4,"age_groupgr3039>0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr3039) > 0     0.25      0.37    -0.35      Inf       2.99 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"age_groupgr4049 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr4049) > 0    -0.42      0.38    -1.04      Inf       0.16 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"age_groupgr5059 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr5059) > 0    -0.29      0.41    -0.97      Inf       0.31 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"age_group60plus>0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_group60plus) > 0    -0.35      0.55    -1.26      Inf       0.36 
## ---
## '*': 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.05      0.32    -0.47      Inf       1.32 
## ---
## '*': 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.45      0.22     0.08      Inf      39.98 *
## ---
## '*': 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.02      0.28    -0.49      Inf        0.9 
## ---
## '*': 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.94      0.36     0.35      Inf     155.25 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"ter_in2>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ter_in2) > 0     0.13      0.27    -0.31      Inf       2.18 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"ter_in3>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ter_in3) > 0     0.11      0.27    -0.33      Inf       1.93 
## ---
## '*': 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.59      0.21     0.25      Inf      311.5 *
## ---
## '*': 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.4      0.28    -0.06      Inf      11.59 
## ---
## '*': 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.75      0.31     0.26      Inf     160.29 *
## ---
## '*': 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.39      0.23     0.03      Inf      25.04 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"b6ayes>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (b6ayes) > 0     1.36      0.79     0.13      Inf      30.45 *
## ---
## '*': 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.16       0.3    -0.64      Inf       0.43 
## ---
## '*': 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.14      0.29    -0.62      Inf       0.44 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"b6ayes:p1>0",alpha=0.05)
## Hypothesis Tests for class b:
##                 Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6ayes:p1) > 0    -0.76      0.96    -2.34      Inf       0.28 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit4,"b6ayes:p2>0",alpha=0.05)
## Hypothesis Tests for class b:
##                 Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6ayes:p2) > 0    -1.02      0.89    -2.52      Inf       0.14 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit4)

2 model 3: Not willingness to nominated price

2.1 model 3.1: Single policy

prior=get_prior(formula=wtp~age_group+educ2+d1a+h1+ter_in+selfhealth+smostt
               +b18a+b6a+label1+freeEn+ant+c7ad, family="bernoulli", data=newdata2)
## Warning: Rows containing NAs were excluded from the model
set.seed(1234) 
 
fit5=brm(formula=wtp~age_group+educ2+d1a+h1+ter_in+selfhealth+smostt
               +b18a+b6a+label1+freeEn+ant+c7ad, family="bernoulli", data=newdata2, chains=5, iter=2000, warmup=1000, prior=prior)
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
summary(fit5)
##  Family: bernoulli (logit) 
## Formula: wtp ~ age_group + educ2 + d1a + h1 + ter_in + selfhealth + smostt + b18a + b6a + label1 + freeEn + ant + c7ad 
##    Data: newdata2 (Number of observations: 782) 
## 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.49      0.34    -1.15     0.14       5000    1
## age_groupgr3039     0.39      0.27    -0.11     0.92       3332    1
## age_groupgr4049     0.55      0.28     0.02     1.08       2474    1
## age_groupgr5059     0.53      0.30    -0.05     1.12       2762    1
## age_group60plus     0.91      0.37     0.22     1.64       3284    1
## educ22             -0.31      0.20    -0.70     0.08       5000    1
## educ23              0.13      0.24    -0.34     0.60       4004    1
## d1amarried         -0.31      0.23    -0.78     0.12       2958    1
## h11                -0.10      0.16    -0.42     0.21       5000    1
## ter_in2             0.34      0.20    -0.05     0.74       5000    1
## ter_in3             0.40      0.19     0.01     0.78       5000    1
## selfhealthgood      0.17      0.16    -0.14     0.48       5000    1
## smosttmedium       -0.20      0.21    -0.61     0.21       5000    1
## smosttheavy         0.37      0.21    -0.04     0.79       5000    1
## b18abad            -0.42      0.16    -0.73    -0.09       5000    1
## b6ayes             -0.46      0.25    -0.94     0.02       5000    1
## label11             0.44      0.21     0.04     0.84       5000    1
## freeEn1            -0.18      0.19    -0.55     0.18       5000    1
## ant1                0.39      0.17     0.06     0.72       5000    1
## c7ad1              -0.18      0.17    -0.52     0.15       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(fit5,"age_groupgr3039>0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr3039) > 0     0.39      0.27    -0.04      Inf      13.84 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit5,"age_groupgr4049 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (age_groupgr4049) > 0     0.55      0.28     0.11      Inf      46.17 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit5,"age_groupgr5059 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (age_groupgr5059) > 0     0.53       0.3     0.05      Inf      26.93 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit5,"age_group60plus>0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (age_group60plus) > 0     0.91      0.37     0.32      Inf        199 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit5,"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.23     -0.7      Inf       0.09 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit5,"h11>0",alpha=0.05)
## Hypothesis Tests for class b:
##           Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (h11) > 0     -0.1      0.16    -0.36      Inf       0.35 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit5,"educ22>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ22) > 0    -0.31       0.2    -0.64      Inf       0.06 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit5,"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.24    -0.26      Inf       2.44 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit5,"ter_in2>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (ter_in2) > 0     0.34       0.2     0.01      Inf      20.55 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit5,"ter_in3>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (ter_in3) > 0      0.4      0.19     0.08      Inf      48.02 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit5,"selfhealthgood>0",alpha=0.05)
## Hypothesis Tests for class b:
##                      Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (selfhealthgood) > 0     0.17      0.16    -0.09      Inf       5.82 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit5,"smosttmedium>0",alpha=0.05)
## Hypothesis Tests for class b:
##                    Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttmedium) > 0     -0.2      0.21    -0.54      Inf        0.2 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit5,"smosttheavy>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (smosttheavy) > 0     0.37      0.21     0.03      Inf      24.13 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit5,"b18abad>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b18abad) > 0    -0.42      0.16    -0.68      Inf       0.01 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit5,"b6ayes>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6ayes) > 0    -0.46      0.25    -0.87      Inf       0.03 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit5,"label11>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (label11) > 0     0.44      0.21     0.11      Inf      57.14 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit5,"freeEn1>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (freeEn1) > 0    -0.18      0.19    -0.49      Inf        0.2 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit5,"ant1>0",alpha=0.05)
## Hypothesis Tests for class b:
##            Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (ant1) > 0     0.39      0.17     0.11      Inf      91.59 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit5,"c7ad1>0",alpha=0.05)
## Hypothesis Tests for class b:
##             Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (c7ad1) > 0    -0.18      0.17    -0.46      Inf       0.16 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit5)

2.2 model 3.2:policy combination- Notwillingness to nominated price

prior=get_prior(formula=wtp~age_group+educ2+d1a+h1+ter_in+selfhealth+smostt
               +b18a+b6a*p, family="bernoulli", data=newdata2)
## Warning: Rows containing NAs were excluded from the model
set.seed(1234) 
 
fit6=brm(formula=wtp~age_group+educ2+d1a+h1+ter_in+selfhealth+smostt
               +b18a+b6a*p, family="bernoulli", data=newdata2, chains=5, iter=2000, warmup=1000, prior=prior)
## Warning: Rows containing NAs were excluded from the model
## Compiling the C++ model
## Start sampling
summary(fit6)
##  Family: bernoulli (logit) 
## Formula: wtp ~ age_group + educ2 + d1a + h1 + ter_in + selfhealth + smostt + b18a + b6a * p 
##    Data: newdata2 (Number of observations: 782) 
## 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.54      0.35    -1.24     0.14       5000    1
## age_groupgr3039     0.39      0.26    -0.11     0.90       3702    1
## age_groupgr4049     0.56      0.28     0.01     1.11       3098    1
## age_groupgr5059     0.55      0.29    -0.02     1.13       3125    1
## age_group60plus     0.96      0.37     0.23     1.72       3438    1
## educ22             -0.37      0.20    -0.75     0.01       5000    1
## educ23              0.07      0.24    -0.41     0.53       5000    1
## d1amarried         -0.30      0.23    -0.75     0.13       3624    1
## h11                -0.09      0.16    -0.42     0.23       5000    1
## ter_in2             0.32      0.19    -0.06     0.69       5000    1
## ter_in3             0.39      0.19     0.01     0.76       5000    1
## selfhealthgood      0.17      0.16    -0.15     0.49       5000    1
## smosttmedium       -0.20      0.21    -0.60     0.22       5000    1
## smosttheavy         0.33      0.21    -0.08     0.74       5000    1
## b18abad            -0.42      0.16    -0.74    -0.10       5000    1
## b6ayes              0.31      0.48    -0.63     1.24       4070    1
## p1                  0.22      0.21    -0.20     0.64       5000    1
## p2                  0.55      0.21     0.14     0.94       4683    1
## b6ayes:p1          -1.34      0.69    -2.73    -0.05       4556    1
## b6ayes:p2          -1.03      0.58    -2.15     0.12       3934    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(fit6,"age_groupgr3039>0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (age_groupgr3039) > 0     0.39      0.26    -0.03      Inf      14.24 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit6,"age_groupgr4049 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (age_groupgr4049) > 0     0.56      0.28      0.1      Inf      42.86 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit6,"age_groupgr5059 >0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (age_groupgr5059) > 0     0.55      0.29     0.07      Inf      35.23 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit6,"age_group60plus>0",alpha=0.05)
## Hypothesis Tests for class b:
##                       Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (age_group60plus) > 0     0.96      0.37     0.34      Inf      237.1 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit6,"d1amarried>0",alpha=0.05)
## Hypothesis Tests for class b:
##                  Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (d1amarried) > 0     -0.3      0.23    -0.68      Inf        0.1 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit6,"h11>0",alpha=0.05)
## Hypothesis Tests for class b:
##           Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (h11) > 0    -0.09      0.16    -0.36      Inf       0.38 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit6,"educ22>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ22) > 0    -0.37       0.2    -0.69      Inf       0.03 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit6,"educ23>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (educ23) > 0     0.07      0.24    -0.34      Inf       1.62 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit6,"ter_in2>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (ter_in2) > 0     0.32      0.19        0      Inf      18.46 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit6,"ter_in3>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (ter_in3) > 0     0.39      0.19     0.08      Inf      47.08 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit6,"selfhealthgood>0",alpha=0.05)
## Hypothesis Tests for class b:
##                      Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (selfhealthgood) > 0     0.17      0.16     -0.1      Inf       5.82 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit6,"smosttmedium>0",alpha=0.05)
## Hypothesis Tests for class b:
##                    Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttmedium) > 0     -0.2      0.21    -0.54      Inf       0.21 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit6,"smosttheavy>0",alpha=0.05)
## Hypothesis Tests for class b:
##                   Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (smosttheavy) > 0     0.33      0.21    -0.01      Inf      17.25 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit6,"b18abad>0",alpha=0.05)
## Hypothesis Tests for class b:
##               Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b18abad) > 0    -0.42      0.16    -0.69      Inf          0 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit6,"b6ayes>0",alpha=0.05)
## Hypothesis Tests for class b:
##              Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6ayes) > 0     0.31      0.48    -0.48      Inf       2.91 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit6,"p1>0",alpha=0.05)
## Hypothesis Tests for class b:
##          Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (p1) > 0     0.22      0.21    -0.13      Inf       5.35 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit6,"p2>0",alpha=0.05)
## Hypothesis Tests for class b:
##          Estimate Est.Error l-95% CI u-95% CI Evid.Ratio  
## (p2) > 0     0.55      0.21      0.2      Inf     262.16 *
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit6,"b6ayes:p1>0",alpha=0.05)
## Hypothesis Tests for class b:
##                 Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6ayes:p1) > 0    -1.34      0.69    -2.48      Inf       0.02 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
hypothesis(fit6,"b6ayes:p2>0",alpha=0.05)
## Hypothesis Tests for class b:
##                 Estimate Est.Error l-95% CI u-95% CI Evid.Ratio 
## (b6ayes:p2) > 0    -1.03      0.58    -1.98      Inf       0.04 
## ---
## '*': The expected value under the hypothesis lies outside the 95% CI.
plot(fit6)