Commit 4a06c24d authored by linushof's avatar linushof
Browse files

use (uninformative) beta priors

parent 5935156d
model
{
# specify priors for CPT parameters
# we use uninformative priors for CPT parameters to facilitate comparison of different generative mechanisms
## standard-normal priors on probit-transformed CPT parameters correspond to uniform priors on the original scale (cf. Rouder & Lu, 2005)
alpha ~ dbeta(1,1)
gamma.pre ~ dbeta(1,1)
delta.pre ~ dbeta(1,1)
rho.pre ~ dbeta(1,1)
alpha.phi ~ dnorm(0,1)
gamma.phi ~ dnorm(0,1)
delta.phi ~ dnorm(0,1)
rho.lmu ~ dunif(-2.3, 1.61)
## extend scales to a reasonable range (cf. Scheibehenne & Pachur, 2015)
## to extend the range of the original scale [0,1], use linear link function (cf. Scheibehenne & Pachur, 2015)
alpha <- 2*phi(alpha.phi)
gamma <- 2*phi(gamma.phi)
delta <- 5*phi(delta.phi)
rho <- exp(rho.lmu)
gamma <- 2 * (gamma.pre)
delta <- 10 * (delta.pre)
rho <- 5 * (rho.pre)
# define CPT model
......@@ -24,16 +21,16 @@ model
# value function
v.a.o1[i] <- pow(a_o1[i],alpha)
v.a.o2[i] <- pow(a_o2[i],alpha)
v.b.o1[i] <- pow(b_o1[i],alpha)
v.b.o2[i] <- pow(b_o2[i],alpha)
v.a.o1[i] <- pow(a_o1[i], alpha)
v.a.o2[i] <- pow(a_o2[i], alpha)
v.b.o1[i] <- pow(b_o1[i], alpha)
v.b.o2[i] <- pow(b_o2[i], alpha)
# weighting function (cf. Prelec, 1998)
w.a.p2[i] <- (delta * (pow(a_p2_exp[i],gamma))) / (delta * (pow(a_p2_exp[i],gamma)) + pow(a_p1_exp[i],gamma))
w.a.p2[i] <- (delta * (pow(a_p2_exp[i], gamma))) / (delta * (pow(a_p2_exp[i], gamma)) + pow(a_p1_exp[i], gamma))
w.a.p1[i] <- 1-w.a.p2[i]
w.b.p1[i] <- (delta * (pow(b_p1[i],gamma))) / (delta * (pow(b_p1[i],gamma)) + pow(b_p2[i],gamma))
w.b.p1[i] <- (delta * (pow(b_p1[i], gamma))) / (delta * (pow(b_p1[i],gamma)) + pow(b_p2[i], gamma))
w.b.p2[i] <- 1-w.b.p1[i]
Vf.a[i] <- w.a.p1[i] * v.a.o1[i] + w.a.p2[i] * v.a.o2[i]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment