5 REM DMCALC2--BASIC Program to calculate values of gambles for 7 REM up to 4 positive outcomes. 8 REM CPT refers to the model and parameters of Tversky & 9 REM Kahneman (1992). CWT refers to the RAM configural 10 REM weight model of Birnbaum & McIntosh (1996). 11 REM Violations of branch independence in choices between 12 REM gambles. Organizational Behavior and Human Decision 13 REM Processes, 67, 91-110. 14 CLS 15 DIM X(10),P(10), SW(10),V(10),W(10) 20 PRINT"Calculates predictions of configural weight theory" 30 PRINT " as discussed by Birnbaum & McIntosh Nov. 16, 95," 40 PRINT " RAM Model with power function of probability" 50 PRINT " and cumulative prospect theory re: Tversky & K 92" 60 PRINT " For CWT u(x) = x; for CPT u(x) = x^.88, 0 < x < $150" 61 REM CPT parameters from Tversky & Kahneman (1992) JRU,.5,.297-323. 63 g = .61: b = .88 65 REM create file 75 INPUT"name of output file";NEMFILE$ 80 INPUT"title of output";TITLE$ 82 OPEN NEMFILE$ FOR OUTPUT AS #1 84 PRINT #1, TITLE$ 86 PRINT #1,"Predictions of two decision models" 87 PRINT #1,"Calculates predictions of configural weight theory" 88 PRINT #1," as in Birnbaum& McIntosh (1996), OBHDP" 89 PRINT #1," and Cum Prospect Theory re: Tversky & K 92, JRU" 90 PRINT #1," gamma = .61 and beta = .88" 92 INPUT"exponent of prob weighting function for CWT (try .6)";AA 93 IF AA < .0001! then AA = .6 94 PRINT #1, " FOR CWT,.exponent of probability = ";AA 95 PRINT #1, "S(p) = p^";AA,"u(x) = x for 0 < x < $150" 97 PRINT #1, "2-outcome Config Wts are WL = .6262 WH = .3738" 98 PRINT #1," For 3-outcomes, WL = .51 WM = .33 WH = .16" 99 PRINT #1," For 4-outcomes, WL=.4 WML=.3 WMH=.2 WH=.1" 100 INPUT"no of outcomes";N 105 IF N < 1 OR N >4 THEN PRINT"try again": GOTO 100 110 STOT=0! 115 PRINT"enter outcomes in order: lowest first" 118 X(0) = 0! 120 FOR I = 1 TO N 130 PRINT"outcome=";I 135 INPUT" value of outcome (9999 to quit)=";X(I) 140 IF X(I)=9999 AND N < 2 THEN CLOSE #1:END 145 IF X(I-1)> X(I) THEN PRINT "Oops! Lower Outcomes first!":GOTO 100 151 INPUT" prob of outcome =";P(I) 155 IF P(I) > 1.00001 THEN PRINT "prob out of range":GOTO 151 160 STOT = STOT+P(I) 165 NEXT 170 IF(STOT-1!)^2 > 1.00001 THEN PRINT"Oops! probsum= ";STOT:GOTO 100 175 EV=0!:CWT=0! 180 FOR I = 1 TO N 185 EV=EV+P(I)*X(I) 190 NEXT 195 IF N = 1 THEN CWT = X(1): CPT=X(1): GOTO 290 198 W(2)=(P(2)^g)/((P(2)^g+(1-P(2))^g)^(1/g)) 200 IF N =2 THEN CPT=((1-W(2))*X(1)^b+W(2)*X(2)^b)^(1/b) 202 W(1)=1-W(2) 204 REM These weights (for 2-outcomes) are fit to T & K (1992) 206 A2 =.6262*P(1)^AA 207 B2 =.3738*P(2)^AA 209 IF N = 2 THEN CWT =(A2*X(1) + B2*X(2))/(A2+B2) 210 SW(1)=A2/(A2+B2): SW(2) = 1-SW(1) 220 IF N =2 THEN GOTO 290 221 REM These weights are fit to Birnbaum & McIntosh (1996) data 222 A=.51*P(1)^AA 224 B1=.33*P(2)^AA 226 C=.16*P(3)^AA 228 SW(1)=A/(A+B1+C):SW(2)=B1/(A+B1+C):SW(3)=C/(A+B1+C) 230 IF N=3 THEN CWT = (A*X(1)+B1*X(2)+C*X(3))/(A+B1+C) 235 W(3)=(P(3)^g)/((P(3)^g+(1-P(3))^g)^(1/g)) 240 W(2)=((P(3)+P(2))^g)/(((P(3)+P(2))^g+(1-(P(3)+P(2)))^g)^(1/g)) 241 W(2)=W(2)-W(3) 245 W(1)=1-W(2)-W(3) 250 IF N =3 THEN CPT=(W(1)*X(1)^b+W(2)*X(2)^b+W(3)*X(3)^b)^(1/b) 251 REM These weights extrapolate to 4 outcomes with weights 252 REM made proportional to rank, with rank 4 = lowest outcome. 255 AF=4*P(1)^AA 260 BF=3*P(2)^AA 262 CF=2*P(3)^AA 264 DF=1*P(4)^AA 266 WTT=AF+BF+CF+DF 268 SW(1)=AF/WTT:SW(2)=BF/WTT:SW(3)=CF/WTT:SW(4)=DF/WTT 272 IF N = 4 THEN CWT = (AF*X(1)+BF*X(2)+CF*X(3)+DF*X(4))/WTT 275 W(4)=(P(4)^g)/((P(4)^g+(1-P(4))^g)^1.639344) 278 W(3)=((P(4)+P(3))^g)/(((P(4)+P(3))^g+(1-(P(4)+P(3)))^g)^(1/g)) 279 W(3)=W(3)-W(4) 280 W(2)=((P(4)+P(3)+P(2))^g) 281 W(2)=W(2)/(((P(4)+P(3)+P(2))^g+(1-(P(4)+P(3)+P(2)))^g)^(1/g)) 282 W(2)= W(2)-W(3)-W(4) 283 W(1)=1! -W(2)-W(3)-W(4) 284 w1=W(1):w2=W(2):w3=W(3):w4=W(4) 285 IF N=4 THEN CPT=(w1*X(1)^b+w2*X(2)^b+w3*X(3)^b+w4*X(4)^b)^(1/b) 290 PRINT"expected value=";EV 295 PRINT "Configural weight RAM prediction=";CWT 300 PRINT "Cumulative prospect prediction = ";CPT 305 INPUT"hit a key";H 310 CLS 312 PRINT #1, "_________________________________________________ " 315 PRINT "outcomes =", 316 FOR I = 1 TO N:PRINT X(I),:NEXT:PRINT "EV=";EV 320 PRINT "probs =",:FOR I= 1 TO N:PRINT P(I),:NEXT:PRINT "" 330 PRINT "config wts=", 331 FOR I = 1 TO N:PRINT SW(I),:NEXT:PRINT "CWT =";CWT 340 PRINT "prospt wts=", 341 FOR I = 1 TO N:PRINT W(I),:NEXT:PRINT "CPT=";CPT 342 PRINT #1,"probs =",:FOR I= 1 TO N:PRINT #1,P(I),:NEXT:PRINT #1, 345 PRINT #1,"outcome=", 346 FOR I = 1 TO N:PRINT #1,X(I),:NEXT:PRINT #1,"EV=";EV 350 PRINT #1, " " 355 PRINT #1,"config wts=", 356 FOR I = 1 TO N:PRINT #1, SW(I),:NEXT:PRINT #1,"CWT =";CWT 360 PRINT #1,"prospt wts=", 361 FOR I = 1 TO N:PRINT #1, W(I),:NEXT:PRINT #1,"CPT=";CPT 390 GOTO 100