Commit 9f0a6753 authored by linushof's avatar linushof
Browse files

Comments on prior and model specification

parent fa8c607c
model model
{ {
# define priors # specify priors for CPT parameters
## standard-normal priors on probit-transformed CPT parameters correspond to uniform priors on the original scale (cf. Rouder & Lu, 2005)
alpha.phi ~ dnorm(0,1) alpha.phi ~ dnorm(0,1)
gamma.phi ~ dnorm(0,1) gamma.phi ~ dnorm(0,1)
delta.phi ~ dnorm(0,1) delta.phi ~ dnorm(0,1)
rho.lmu ~ dunif(-2.3, 1.61) rho.lmu ~ dunif(-2.3, 1.61)
## to extend the range of the original scale [0,1], use linear link function (cf. Scheibehenne & Pachur, 2015)
alpha <- 2*phi(alpha.phi) alpha <- 2*phi(alpha.phi)
gamma <- 2*phi(gamma.phi) gamma <- 2*phi(gamma.phi)
delta <- 5*phi(delta.phi) delta <- 5*phi(delta.phi)
rho <- exp(rho.lmu) rho <- exp(rho.lmu)
# Trial loop # define CPT model
for (i in start:stop) for (i in start:stop)
{ {
# value function
v.a.o1[i] <- pow(a_o1[i],alpha) v.a.o1[i] <- pow(a_o1[i],alpha)
v.a.o2[i] <- pow(a_o2[i],alpha) v.a.o2[i] <- pow(a_o2[i],alpha)
v.b.o1[i] <- pow(b_o1[i],alpha) v.b.o1[i] <- pow(b_o1[i],alpha)
v.b.o2[i] <- pow(b_o2[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.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))
...@@ -31,8 +39,12 @@ model ...@@ -31,8 +39,12 @@ model
Vf.a[i] <- w.a.p1[i] * v.a.o1[i] + w.a.p2[i] * v.a.o2[i] Vf.a[i] <- w.a.p1[i] * v.a.o1[i] + w.a.p2[i] * v.a.o2[i]
Vf.b[i] <- w.b.p1[i] * v.b.o1[i] + w.b.p2[i] * v.b.o2[i] Vf.b[i] <- w.b.p1[i] * v.b.o1[i] + w.b.p2[i] * v.b.o2[i]
Vf.a.re[i] = pow(Vf.a[i], (1/alpha)) # rescale subjective values to alleviate possible parameter intercorrelations (cf. Krefeld-Schwalb et al., 2021)
Vf.b.re[i] = pow(Vf.b[i], (1/alpha))
Vf.a.re[i] <- pow(Vf.a[i], (1/alpha))
Vf.b.re[i] <- pow(Vf.b[i], (1/alpha))
# stochastic choice rule
binval[i] <- (1)/(1+exp((-1*rho)*(Vf.a.re[i]-Vf.b.re[i]))) binval[i] <- (1)/(1+exp((-1*rho)*(Vf.a.re[i]-Vf.b.re[i])))
choice[i] ~ dbern(binval[i]) choice[i] ~ dbern(binval[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