FIM2 <- function (t, condition, s2, m2, c, rate, std,diffdev) { c1 <- as.integer(condition==1)# Single N=1, verbal c2 <- as.integer(condition==2)# Single N=2, verbal c3 <- as.integer(condition==3)# Single N=1, spatial c4 <- as.integer(condition==4)# Single N=2, spatial s2 <- as.numeric(s2 ) m2 <- as.numeric(m2 ) diffdev<- as.numeric(diffdev) content <- c1+c2 stor <- 1*(c1+c3) + 2*(c2+c4) dis <- 0 temp <- sqrt(6)*std/pi # temperature for Boltzman equation asy_i <- (1-c/2)^(stor-1) asy_j <- (c/2) * asy_i # in mixed condition, only 1 distractor of the same content domain is relevant. ai2 <- asy_i * (1-exp(-t * rate)) # activation of new computed element - depends on input activation ai1 as asymptote aj2 <- asy_j * (1-exp(-t * rate)) # activation of wrong new elements by distractors in WM, again using their activation as asymptote pe <- exp(ai2/temp)/(exp(ai2/temp) + (stor-1) * exp(aj2/temp) + (9-stor) * exp(dis/temp)) # Probability of computing the right result pe4 <- exp(asy_i/temp)/(exp(asy_i/temp) + (stor-1) * exp(asy_j/temp) + (9-stor) * exp(dis/temp)) # beliebig viel Zeit, finale Abfrage; hier sind es die anderen Elemente in WM, die als Distraktoren gelten #comp <- (c1+c3) * pe^4 * pe4 + (c2+c4) * pe^2 * pe4 comp <- (c1+c3) * (1/2*pe^3+ 1/2*pe^4 )* pe4 + (c2+c4) * (5/12*pe+5/12*pe^2+2/12*pe^3) * pe4 pred = 1/9 + (1-1/9) * comp }