File size: 60,013 Bytes
76c7828 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 |
/*-------------------------------*/
*NO CHOICE
/*-------------------------------*/
clear
import delimited "${raw}NoChoice_deidentified.csv", varnames(1)
drop if status==1
tab distributionchannel
drop if distributionchannel=="preview"
tab finished
keep if finished==1
sort newid
quietly by newid: gen dup = cond(_N==1,0,_n)
tab dup
drop if dup!=0
rename q32 attention
g id=_n
g attentionpassed=attention==3
keep if attentionpassed==1
*Treatments
g treatment=1 if condition=="BeforeA"
replace treatment=2 if condition=="AfterA"
replace treatment=3 if condition=="BeforeB"
replace treatment=4 if condition=="AfterB"
label def treat 1 "Before A" 2 "After A" 3 "Before B" 4 "After B"
label val treatment treat
*Beliefs
g beliefbin=q45
g beliefnum=q43
*Recommend b
g recommendb=(recommendationa==2 | recommendationb==2)
*Signal
g signalblue=(fl_211_do=="Signal_blue2" | fl_221_do=="Signal_blue2" | fl_229_do=="Signal_blue2" | fl_127_do=="Signal_blue2")
*Conflict
g conflict=1 if treatment<3 & signalblue==1
replace conflict=1 if treatment>2 & signalblue==0
replace conflict=0 if conflict==.
*Commission
g incentiveA=(condition=="AfterA" | condition=="BeforeA")
g incentiveB=1-incentiveA
*Recommend incentivized
g recommendincentivized=recommendb if treatment>2
replace recommendincentivized=1-recommendb if treatment<3
*Before-After
g before=(treatment==1 | treatment==3)
g after=1-before
*Prosociality
forval i=2(1)5{
recode q8`i' (1=0) (2=1)
}
rename q82 alpha1
rename q83 alpha2
rename q84 alpha3
rename q85 alpha4
rename q176 alpha5
recode alpha5 (1=0) (2=1)
egen alphamiss=rowmiss(alpha1 alpha2 alpha3 alpha4)
tab alphamiss
*alpha1-5 equal 1 is recommend the incentivized option
*RESTRICTING RESPONDENTS TO THOSE WITH COMPLETE ALPHA CHOICES
keep if alphamiss==0
*Prosociality switch
reshape long alpha, i(id) j(number)
sort id number
g previouschoice=alpha[_n-1] if number>1
g steptob=(alpha-previouschoice) if number>1
bys id: egen sumsteptob=total(steptob)
*Alpha value final = number of times you go with the incentive to recommend Y
g alphavalue=0 if sumsteptob==0 & alpha==0 & number==5 /*always choosing X, no incentive*/
replace alphavalue=5 if sumsteptob==0 & alpha==1 & number==5 /*always choosing Y, incentive*/
*Alpha value is the question number when the steptob is 1 for those who switch
replace alphavalue=number-1 if sumsteptob==1 & steptob==1
g inconsistentchoice=(steptob==-1)
bys id: egen inconsistentid=total(inconsistentchoice)
bys id: egen alphavaluefinal=total(alphavalue)
replace alphavaluefinal=. if inconsistentid>0
tab alphavaluefinal, m
cap drop alphavalue inconsistentchoice previouschoice steptob
reshape wide alpha, i(id) j(number)
*Average alpha
tab alphavaluefinal if treatment!=., m
rename recommendincentivized recommendincentive
g female=(gender==2)
replace age="31" if age=="3i"
destring age, replace
recode englishnative (2=0)
g nodifficulty=(difficulty==2)
replace nodifficulty=. if difficulty==.
label var female "Female"
label var age "Age"
gen seeincentivefirst=(condition=="BeforeA" | condition=="BeforeB")
gen selfish=0
replace selfish=1 if alphavaluefinal>3
replace selfish=. if alphavaluefinal==.
gen missingalpha=0
replace missingalpha=1 if alphavaluefinal==.
gen noconflict=1-conflict
g seeincentivefirst_noconflict=seeincentivefirst*noconflict
g recommendincentive_before=recommendincentive if seeincentivefirst==1
g recommendincentive_after=recommendincentive if seeincentivefirst==0
egen stdalpha=std(alphavaluefinal)
g choice="No Choice"
save "${data}nochoice.dta", replace
/*------------------------------*/
*CHOICE EXPERIMENT
/*------------------------------*/
*** CLEANING DEIDENTIFIED DATA
clear
import delimited "${raw}Choice1_deidentified.csv", varnames(1)
drop if status==1
*drop if workerid==""
tab distributionchannel
drop if distributionchannel=="preview"
tab finished
keep if finished==1
sort newid
quietly by newid: gen dup = cond(_N==1,0,_n)
tab dup
drop if dup!=0
rename q32 attention
g id=_n+10000
g attentionpassed=attention==3
keep if attentionpassed==1
***gen IncentiveB
g incentiveB=.
replace incentiveB=1 if condition=="choiceFreeB"
replace incentiveB=1 if condition=="choicePayB"
replace incentiveB=0 if condition=="choiceFreeA"
replace incentiveB=0 if condition=="choicePayA"
g incentiveA=.
replace incentiveA=1 if condition=="choiceFreeA"
replace incentiveA=1 if condition=="choicePayA"
replace incentiveA=0 if condition=="choiceFreeB"
replace incentiveA=0 if condition=="choicePayB"
**Commission
gen commission="commissionB" if incentiveB==1
replace commission="commissionA" if incentiveB==0
*Choice before
g choicebefore=(choicefreeq==1 | choicepay==1)
*Recommendation
g recommendb=(recommendationa==2 | recommendationb==2)
replace recommendb=. if recommendationa==. & recommendationb==.
g recommenda=1-recommendb
g recommendincentive=recommendb if commission=="commissionB"
replace recommendincentive=recommenda if commission=="commissionA"
*Beliefs
g beliefbin=q45
g belief=q43
replace belief=q43*100 if q43<1
*Signal
g signalblue=(fl_298_do=="Signal_blue2" ///
| fl_304_do=="Signal_blue2" ///
| fl_211_do=="Signal_blue2" ///
| fl_221_do=="Signal_blue2" ///
| fl_310_do=="Signal_blue2" ///
| fl_229_do=="Signal_blue2" ///
| fl_325_do=="Signal_blue2" ///
| fl_127_do=="Signal_blue2")
*Conflict
g conflict=0
replace conflict=1 if signalblue==1 & commission=="commissionA"
replace conflict=1 if signalblue==0 & commission=="commissionB"
*Treatment
g treatment="ChoiceFree" if condition=="choiceFreeA" | condition=="choiceFreeB"
replace treatment="ChoicePay" if condition=="choicePayA" | condition=="choicePayB"
*Random assignment to order
g get=fl_264_do if condition=="choiceFreeA" & choicefreeq==2
replace get=fl_265_do if condition=="choiceFreeA" & choicefreeq==1
replace get=fl_289_do if condition=="choiceFreeB" & choicefreeq==1
replace get=fl_287_do if condition=="choiceFreeB" & choicefreeq==2
replace get=fl_342_do if condition=="choicePayA" & choicepayq==2
replace get=fl_272_do if condition=="choicePayA" & choicepayq==1
replace get=fl_320_do if condition=="choicePayB" & choicepayq==1
replace get=fl_331_do if condition=="choicePayB" & choicepayq==2
g getafter=(get=="GetAfter")
g getbefore=1-getafter
g costlydemand=(condition=="choicePayA" | condition=="choicePayB")
g choicewave=1
g study=2 if costlydemand==0
replace study=3 if costlydemand==1
replace age="51" if age=="51`"
replace age="" if age=="re"
destring age, replace
*Prosociality
destring q82 q83 q84 q85 q176, force replace
forval i=2(1)5{
recode q8`i' (1=0) (2=1)
}
rename q82 alpha1
rename q83 alpha2
rename q84 alpha3
rename q85 alpha4
rename q176 alpha5
recode alpha5 (1=0) (2=1)
egen alphamiss=rowmiss(alpha1 alpha2 alpha3 alpha4 alpha5)
keep if alphamiss==0
g choice="Choice"
drop fl_17_do fl_264_do fl_298_do fl_265_do fl_211_do fl_272_do fl_304_do fl_342_do ///
*fl_289_do fl_221_do fl_310_do fl_287_do fl_229_do fl_320_do fl_320_do fl_325_do fl_331_do fl_127_do
save "${data}choice1.dta", replace
/*-------------------------------*/
*PROFESSIONALS STUDY
/*-------------------------------*/
*** CLEAN DE_IDENTIFIED DATA
**PROLIFIC
clear
import delimited "${raw}ProfessionalsProlific_deidentified.csv", varnames(1)
drop if status==1
drop if distributionchannel=="preview"
keep if finished==1
sort newid
quietly by newid: gen dup = cond(_N==1,0,_n)
drop if dup>0
g sample="Prolific"
save "${data}professionals_prolific", replace
*CLOUDRESEARCH
clear
import delimited "${raw}ProfessionalsCloudresearch_deidentified.csv", varnames(1)
g sample="CloudResearch"
drop if status==1
drop if distributionchannel=="preview"
keep if finished==1
sort newid
quietly by newid: gen dup = cond(_N==1,0,_n)
tab dup
drop if dup!=0
drop fl_17_do fl_481_do fl_523_do fl_528_do fl_548_do fl_555_do fl_563_do fl_657_do fl_629_do fl_656_do fl_642_do
rename industry industry_cloudresearch
append using "${data}professionals_prolific.dta", force
g attentionpassed=attention==3
drop if attentionpassed==0
*Choice
g choicebefore=(choicefree==1)
replace choicebefore=. if choicefree==.
drop if choicebefore==.
*Beliefs
g beliefbin=q45
g beliefnum=q43
g belief=q43
replace belief=q43*100 if q43<1
*Recommendation
g recommendb=(recommendationa==2 | recommendationb==2)
replace recommendb=. if recommendationa==. & recommendationb==.
g recommenda=1-recommendb
g recommendincentive=recommenda if condition=="choicefreeA"
replace recommendincentive=recommendb if condition=="choicefreeB"
*Get before
g getafter=(getbefore=="GetAfter")
g getbefore2=(getbefore=="GetBefore")
drop getbefore
rename getbefore2 getbefore
*Signal
g signalblue=signal=="Blue"
*Conflict
g conflict=0
replace conflict=1 if signalblue==1 & (condition=="choicefreeA")
replace conflict=1 if signalblue==0 & (condition=="choicefreeB")
g incentiveA=(commission=="commissionA")
g incentiveB=1-incentiveA
g costlydemand=0
g female=(gender==2)
g choice="Professionals"
g beliefcorrect=0
replace beliefcorrect=1 if beliefbin==4 & signalblue==1 /*signal $2, quality low with 25% chance*/
replace beliefcorrect=1 if beliefbin==8 & signalblue==0 /*signal $0, quality low with 66.7% chance*/
g explanationchoice=q211
destring age, replace
g id=_n+20000
keep recommendincentive getbefore incentiveB incentiveA ///
costlydemand choicebefore belief conflict signalblue ///
female age sample beliefbin choice beliefcorrect ///
newid explanationchoice jobtitle industry shortid currentcountr
g study=1
save "${data}professionals.dta", replace
/*-------------------------------*/
*PROFESSIONALS - JOB TITLES
/*-------------------------------*/
clear
import excel "${raw}Professionals_jobtitles.xlsx", first case(l)
save "${data}professionals_jobtitles.dta", replace
/*-------------------------------*/
*CHOICE 2 - REVERSED
/*-------------------------------*/
*** CLEANING DEIDENTIFIED DATA
clear
import delimited "${raw}Choice2_deidentified.csv", varnames(1)
drop if status==1
tab distributionchannel
drop if distributionchannel=="preview"
tab finished
keep if finished==1
sort newid
quietly by newid: gen dup = cond(_N==1,0,_n)
tab dup
drop if dup>0
drop if q_recaptchascore<.50
g id=_n+30000
g attention=attention_a
replace attention=attention_b if attention_b!=.
replace attention=att_highro if att_highro!=.
replace attention=att_highflipped if att_highflipped!=.
drop attention_a attention_b att_highro att_highflipped
g attentionpassed=attention==3
tab attentionpassed
drop if attentionpassed==0
rename q211 explanationchoice
replace explanationchoice=q188 if explanationchoice==""
drop q188
*Choice before
g choicebefore=.
replace choicebefore=1 if choicefreereghigh==1
replace choicebefore=0 if choicefreereghigh==2
*Beliefs
g beliefbin=q45
*g beliefnum=q43
g belief=q43 if incentives=="$0.15 "
replace belief=q551 if incentives=="$15 "
replace beliefbin=q550 if incentives=="$15 "
replace belief=q43*100 if q43<1
*Recommendation
g recommendb=.
replace recommendb=1 if recommendationb==2
replace recommendb=0 if recommendationb==1
replace recommendb=1 if recommendationb_flip==2
replace recommendb=0 if recommendationb_flip==1
replace recommendb=1 if recommendationa==2
replace recommendb=0 if recommendationa==1
replace recommendb=1 if recommendationa_flip==2
replace recommendb=0 if recommendationa_flip==1
g recommenda=1-recommendb
g recommendincentive=recommendb if commission=="commissionB"
replace recommendincentive=recommenda if commission=="commissionA"
*Signal
g signalblue=.
*replace signalblue=1 if signal=="Blue"
replace signalblue=1 if fl_272_do=="Signal_blue2"
replace signalblue=1 if fl_459_do=="Signal_blue2HIGHINCENTIVES"
replace signalblue=1 if fl_260_do=="Signal_blue2"
replace signalblue=1 if fl_450_do=="Signal_blue2HIGHINCENTIVES"
replace signalblue=1 if fl_248_do=="Signal_blue2REVERSEPRODUCTORDER"
replace signalblue=1 if fl_508_do=="Signal_blue2REVERSEPRODUCTORDER-HIGHINCENTIVES"
replace signalblue=1 if fl_236_do=="Signal_blue2REVERSEPRODUCTORDER"
replace signalblue=1 if fl_469_do=="Signal_blue2REVERSEPRODUCTORDER-HIGHINCENTIVES"
replace signalblue=1 if fl_163_do=="Signal_blue2"
replace signalblue=1 if fl_476_do=="Signal_blue2HIGHINCENTIVES"
replace signalblue=1 if fl_151_do=="Signal_blue2"
replace signalblue=1 if fl_483_do=="Signal_blue2HIGHINCENTIVES"
replace signalblue=1 if fl_139_do=="Signal_blue2REVERSEPRODUCTORDER"
replace signalblue=1 if fl_491_do=="Signal_blue2REVERSEPRODUCTORDER-HIGHINCENTIVES"
replace signalblue=1 if fl_127_do=="Signal_blue2REVERSEPRODUCTORDER"
replace signalblue=1 if fl_499_do=="Signal_blue2REVERSEPRODUCTORDER-HIGHINCENTIVES"
replace signalblue=1 if signal=="Blue"
replace signalblue=0 if fl_272_do=="Signal_red0"
replace signalblue=0 if fl_459_do=="Signal_red0HIGHINCENTIVES"
replace signalblue=0 if fl_260_do=="Signal_red0"
replace signalblue=0 if fl_450_do=="Signal_red0HIGHINCENTIVES"
replace signalblue=0 if fl_248_do=="Signal_redREVERSEPRODUCTORDER"
replace signalblue=0 if fl_508_do=="Signal_redREVERSEPRODUCTORDER-HIGHINCENTIVES"
replace signalblue=0 if fl_236_do=="Signal_redREVERSEPRODUCTORDER"
replace signalblue=0 if fl_469_do=="Signal_redREVERSEPRODUCTORDER-HIGHINCENTIVES"
replace signalblue=0 if fl_163_do=="Signal_red0"
replace signalblue=0 if fl_476_do=="Signal_red0HIGHINCENTIVES"
replace signalblue=0 if fl_151_do=="Signal_red0"
replace signalblue=0 if fl_483_do=="Signal_red0HIGHINCENTIVES"
replace signalblue=0 if fl_139_do=="Signal_redREVERSEPRODUCTORDER"
replace signalblue=0 if fl_491_do=="Signal_redREVERSEPRODUCTORDER-HIGHINCENTIVES"
replace signalblue=0 if fl_127_do=="Signal_redREVERSEPRODUCTORDER"
replace signalblue=0 if fl_499_do=="Signal_redREVERSEPRODUCTORDER-HIGHINCENTIVES"
replace signalblue=0 if signal=="Red"
*Conflict
g conflict=.
replace conflict=1 if signalblue==0 & commission=="commissionB"
replace conflict=0 if signalblue==1 & commission=="commissionB"
replace conflict=1 if signalblue==1 & commission=="commissionA"
replace conflict=0 if signalblue==0 & commission=="commissionA"
g incentiveshigh=(incentives=="$15 ")
g flippedorder=(uncertainproduct=="Product A")
g costlydemand=0
g incentiveA=(commission=="commissionA")
g incentiveB=1-incentiveA
gen incentiveleft=.
replace incentiveleft=1 if incentiveB==1 & flippedorder==1
replace incentiveleft=0 if incentiveB==1 & flippedorder==0
replace incentiveleft=1 if incentiveA==1 & flippedorder==0
replace incentiveleft=0 if incentiveA==1 & flippedorder==1
tab condition
replace condition="ChoiceFree"
g choicewave=2
g getafter=(getbefore=="GetAfter")
cap drop getbefore
g getbefore=1-getafter
g study=4
*Prosociality
forval i=2(1)5{
recode q8`i' (1=0) (2=1)
}
forval i=4(1)8{
recode q54`i' (1=0) (2=1)
}
g alpha1=q82 if incentiveshigh==0
replace alpha1=q544 if incentiveshigh==1
g alpha2=q83 if incentiveshigh==0
replace alpha2=q545 if incentiveshigh==1
g alpha3=q84 if incentiveshigh==0
replace alpha3=q546 if incentiveshigh==1
g alpha4=q85 if incentiveshigh==0
replace alpha4=q547 if incentiveshigh==1
g alpha5=v193 if incentiveshigh==0
recode alpha5 (1=0) (2=1)
replace alpha5=q548 if incentiveshigh==1
egen alphamiss=rowmiss(alpha1 alpha2 alpha3 alpha4 alpha5)
keep if alphamiss==0
g choice="Choice"
drop fl_101_do fl_226_do fl_341_do fl_314_do fl_411_do fl_271_do fl_272_do fl_459_do ///
fl_259_do fl_260_do fl_450_do fl_247_do fl_248_do fl_508_do fl_235_do fl_236_do fl_469_do ///
fl_117_do fl_365_do fl_205_do fl_413_do fl_162_do fl_163_do fl_476_do fl_150_do fl_151_do fl_483_do ///
fl_138_do fl_139_do fl_491_do fl_126_do fl_127_do fl_499_do
save "${data}choice2.dta", replace
/*-------------------------------*/
*CHOICE 3 - wave3
/*-------------------------------*/
*** CLEANING DEIDENTIFIED DATA
clear
import delimited "${raw}Choice3_deidentified.csv", varnames(1)
drop if status==1
*drop if workerid==""
tab distributionchannel
drop if distributionchannel=="preview"
tab finished
keep if finished==1
tab attention
replace attention=q343 if condition=="Highx10" | condition=="Highx100"
keep if attention!=.
gen attentionpassed=(attention==3)
tab attentionpassed
**94.86% passed the attention check (N=2095) out of 2202 who completed the attention check question
drop if attentionpassed!=1
sort newid
quietly by newid: gen dup = cond(_N==1,0,_n)
tab dup
drop if dup!=0
drop if q_recaptchascore<.50
tab status
sort startdate
g id=_n+40000
**Beliefs
replace beliefbin=beliefbin_high if beliefbin==.
drop beliefbin_high
replace belief=belief_high if belief_high!=.
drop belief_high
replace belief=belief*100 if belief<1
replace age="" if age=="casian"
destring age, replace
***Gen recommendB and recommenda dummies
g recommendb=.
replace recommendb=1 if recommendationb==2
replace recommendb=0 if recommendationb==1
replace recommendb=1 if recommendationa==2
replace recommendb=0 if recommendationa==1
g recommenda=1-recommendb
***gen IncentiveB
g incentiveB=.
replace incentiveB=1 if commission=="commissionB"
replace incentiveB=0 if commission=="commissionA"
g incentiveA=.
replace incentiveA=1 if commission=="commissionA"
replace incentiveA=0 if commission=="commissionB"
*GET by treatment
g getafter=(getbefore=="GetAfter")
cap drop getbefore
g getbefore=1-getafter
**gen bluesignal dummy
g signalblue=.
replace signalblue=1 if signal=="Blue"
replace signalblue=1 if fl_750_do=="SignalBlue_HighIncentives"
replace signalblue=1 if fl_773_do=="SignalBlue_HighIncentives"
replace signalblue=1 if fl_785_do=="SignalBlue_HighIncentives"
replace signalblue=1 if fl_528_do=="Signal_blue2"
replace signalblue=1 if fl_555_do=="Signal_blue2"
replace signalblue=1 if fl_555_do=="Signal_blue2"
replace signalblue=1 if fl_629_do=="Signal_blue2"
replace signalblue=1 if fl_642_do=="Signal_blue2"
replace signalblue=0 if signal=="Red"
replace signalblue=0 if fl_750_do=="SignalRed_highIncentives"
replace signalblue=0 if fl_773_do=="SignalRed_highIncentives"
replace signalblue=0 if fl_785_do=="SignalRed_highIncentives"
replace signalblue=0 if fl_528_do=="Signal_red0"
replace signalblue=0 if fl_555_do=="Signal_red0"
replace signalblue=0 if fl_555_do=="Signal_red0"
replace signalblue=0 if fl_629_do=="Signal_red0"
replace signalblue=0 if fl_642_do=="Signal_red0"
g conflict=.
replace conflict=1 if signalblue==0 & commission=="commissionB"
replace conflict=0 if signalblue==1 & commission=="commissionB"
replace conflict=1 if signalblue==1 & commission=="commissionA"
replace conflict=0 if signalblue==0 & commission=="commissionA"
tab commission
g recommendincentive=recommendb if commission=="commissionB"
replace recommendincentive=recommenda if commission=="commissionA"
gen choicebefore=.
replace choicebefore=1 if choicefree==1
replace choicebefore=0 if choicefree==2
replace choicebefore=1 if choicepaybefore==1
replace choicebefore=0 if choicepaybefore==2
replace choicebefore=0 if choicepayafter==2
replace choicebefore=1 if choicepayafter==1
*** DUMMIES FOR STAKE TREATMENTS
gen HighStakes=""
replace HighStakes=condition if condition=="Highx10"
replace HighStakes=condition if condition=="Highx100"
gen Highx10=0
replace Highx10=1 if condition=="Highx10"
gen Highx100=0
replace Highx100=1 if condition=="Highx100"
replace condition="ChoiceFree" if Highx10==1
replace condition="ChoiceFree" if Highx100==1
**Info avoidance
tab ia_choice
gen chooseblindness=ia_choice
replace chooseblindness=0 if ia_choice==2
tab chooseblindness
gen ia_recommend1=.
replace ia_recommend1=1 if ia_rec_quality0==1 | ia_recq2==1 | ia_rec_both2==1 | ia_rec_both0==1
replace ia_recommend1=0 if ia_rec_quality0==2 | ia_recq2==2 | ia_rec_both2==2 | ia_rec_both0==2
gen ia_recommendincentive=1 if ia_recommend1==1 & ia_incentive=="Product 1"
replace ia_recommendincentive=0 if ia_recommend1==0 & ia_incentive=="Product 1"
replace ia_recommendincentive=1 if ia_recommend1==0 & ia_incentive=="Product 2"
replace ia_recommendincentive=0 if ia_recommend1==1 & ia_incentive=="Product 2"
***Prosociality
forval i=1(1)5{
recode alpha`i' (1=0) (2=1)
}
egen alphamiss=rowmiss(alpha1 alpha2 alpha3 alpha4)
keep if alphamiss==0
gen study=6
rename q211 explanationchoice
gen costlydemand=0
replace costlydemand=1 if condition=="PayBefore"
g sample="MTurk"
drop fl_728_do fl_816_do fl_737_do fl_759_do fl_750_do fl_761_do fl_773_do fl_778_do ///
fl_785_do fl_793_do fl_800_do fl_825_do fl_837_do fl_903_do fl_843_do fl_870_do fl_850_do ///
fl_880_do fl_855_do fl_889_do fl_17_do fl_481_do fl_523_do fl_528_do fl_548_do fl_555_do ///
fl_563_do fl_657_do fl_629_do fl_656_do fl_642_do fl_933_do fl_916_do fl_935_do
g choice="Choice"
save "${data}choice3.dta", replace
/*-------------------------------*/
*POOLING ALL CHOICE WAVES INTO 1 DATASET
/*-------------------------------*/
u "${data}choice1.dta", clear
append using "${data}choice2.dta"
append using "${data}choice3.dta"
*Prosociality - switch point
reshape long alpha, i(id) j(number)
sort id number
g previouschoice=alpha[_n-1] if number>1
g steptob=(alpha-previouschoice) if number>1
bys id: egen sumsteptob=total(steptob)
*Alpha value final = number of times you go with the incentive to recommend Y
g alphavalue=0 if sumsteptob==0 & alpha==0 & number==5 /*always choosing X, no incentive*/
replace alphavalue=5 if sumsteptob==0 & alpha==1 & number==5 /*always choosing Y, incentive*/
*Alpha value is the question number when the steptob is 1 for those who switch
replace alphavalue=number-1 if sumsteptob==1 & steptob==1
g inconsistentchoice=(steptob==-1)
bys id: egen inconsistentid=total(inconsistentchoice)
bys id: egen alphavaluefinal=total(alphavalue)
replace alphavaluefinal=. if inconsistentid>0
cap drop alphavalue inconsistentchoice previouschoice steptob
reshape wide alpha, i(id) j(number)
*ATTENTIVE GUYS are DROPPED FOR INCOMPLETE ANSWERS
*KEEP CONSISTENT GUYS IN ALPHA TASK
tab alphavaluefinal, m
egen stdalpha=std(alphavaluefinal)
gen selfish=(alphavaluefinal>3)
replace selfish=. if alphavaluefinal==.
*tab attention0, m
*keep if attention0==1
destring gender age englishnative difficulty, force replace
g female=(gender==2)
recode englishnative (2=0)
g nodifficulty=(difficulty==2)
replace nodifficulty=. if difficulty==.
label var female "Female"
label var age "Age"
g beliefcorrect=0
replace beliefcorrect=1 if beliefbin==4 & signalblue==1
replace beliefcorrect=1 if beliefbin==8 & signalblue==0
replace sample="MTurk"
replace incentiveleft=0 if study!=4
replace incentiveshigh=0 if study!=4
drop if choicebefore==.
tab condition, m
replace condition="ChoiceFree" if condition=="choiceFreeA"
replace condition="ChoiceFree" if condition=="choiceFreeB"
replace condition="PayBefore" if condition=="choicePayA"
replace condition="PayBefore" if condition=="choicePayB"
keep id startdate enddate attentionpassed recommendincentive getbefore incentiveB incentiveA commission costlydemand ///
choicebefore belief beliefbin conflict signalblue female age selfish stdalpha ///
alphavaluefinal beliefcorrect newid shortid ///
sample choice incentiveshigh flippedorder ///
incentiveleft condition study Highx10 Highx100 chooseblindness
append using "${data}professionals.dta"
rename costlydemand incentivecostly
g qualitycostly=0
replace qualitycostly=1 if condition=="PayAfter"
g professionals=(study==1)
g prolific=(sample=="Prolific")
g cloudresearch=(sample=="CloudResearch")
gen professionalscloudresearch=0 if professionals==1 & cloudresearch==1
replace professionalscloudresearch=1 if professionals==1 & cloudresearch==1
replace incentiveshigh=0 if incentiveshigh==.
replace incentiveleft=0 if incentiveleft==.
replace Highx10=0 if Highx10==.
replace Highx100=0 if Highx100==.
g mturkwave=.
replace mturkwave=1 if study==2 | study==3
replace mturkwave=2 if study==4
replace mturkwave=3 if study==6
***drop 1 participant <18 to comply w IRB rules
drop if age<18
replace age=. if age==545
replace condition="ChoiceFree_Professionals" if study==1
tab condition
drop if choicebefore==.
replace study=7 if study==6 & condition=="PayBefore"
replace study=8 if study==6 & condition=="PayAfter"
** waves
g wave1=(study==2 | study==3)
g wave2=(study==4)
g wave3=(study==6 | study==7 | study==8)
**professionals cloudresearch
replace professionalscloudresearch=0 if professionalscloudresearch==.
**probabilistic incentives
g probabilistic_incentive=1 if incentiveshigh==1
replace probabilistic_incentive=1 if professionals==1
replace probabilistic_incentive=0 if professionals==0 & incentiveshigh==0
**locatedUS
g locatedus=1 if study>1
replace locatedus=1 if study==1 & prolific==0
replace locatedus=1 if study==1 & prolific==1 & currentcountryofresidence=="United States"
replace locatedus=0 if study==1 & prolific==1 & currentcountryofresidence!="United States"
drop currentcountryofresidence
**For appendix
g wave="AMT-1" if wave1==1
replace wave="AMT-2" if wave2==1
replace wave="AMT-3" if wave3==1
replace wave="Prolific/CloudResearch" if study==1
g incentivedesign="0.15" if wave1==1
replace incentivedesign="15 (to 1 out of 100)" if incentiveshigh==1 | wave=="Prolific/CloudResearch"
replace incentivedesign="1.50" if Highx10==1
replace incentivedesign="15 (to everyone)" if Highx100==1
replace incentivedesign="0.15" if wave2==1 & incentiveshigh==0
replace incentivedesign="0.15" if wave3==1 & Highx10==0 & Highx100==0
g year=2019 if wave1==1
replace year=2020 if wave2==1 | wave=="Prolific/CloudResearch"
replace year=2021 if wave3==1
g treatment=0 if condition=="ChoiceFree"
replace treatment=1 if professionals==1
replace treatment=2 if condition=="PayBefore"
replace treatment=3 if condition=="PayAfter"
gen selfishseeincentivecostly=stdalpha*incentivecostly
gen selfishseequalitycostly=stdalpha*qualitycostly
gen committ=1-choicebefore
*Separate dummies, instead of factor variables in regression
g professionalsfree=(professionals==1)
g seeincentivecostly=condition=="PayBefore"
g seequalitycostly=condition=="PayAfter"
g incentiveshigh_incentiveleft=incentiveshigh*incentiveleft
*blinding
g avoid_incentiveinfo=(chooseblindness==1)
replace avoid_incentiveinfo=. if chooseblindness==.
gen choiceafter=1-choicebefore
**Recommendations
***Gen indicator for whether participants get their desired choice of info order
gen getyourchoice=0
replace getyourchoice=1 if choicebefore==1 & getbefore==1
replace getyourchoice=1 if choicebefore==0 & getbefore==0
label var getyourchoice "Random Assignment to Preferred Order"
g choicebefore_getyourchoice=choicebefore*getyourchoice
label var choicebefore_getyourchoice "Prefer to See Incentive First X Random Assignment"
g getbeforenoconflict=getbefore*(1-conflict)
g noconflict=1-conflict
g choicebeforenoconflict=choicebefore*(1-conflict)
g choicebefore_getbefore=choicebefore*getbefore
g choicebefore_getbefore_nocon=choicebefore*getbefore*(1-conflict)
g notgetyourchoice=(1-getyourchoice)
g notgetyourchoicenoconflict=(1-getyourchoice)*(1-conflict)
g choicebeforenotgetyourchoice=notgetyourchoice*choicebefore
gen choicebeforegetbefore=choicebefore*getbefore
***Beliefs
g logsignalhigh=-log(2) /*prob signal H if q=L 0.4 / prob signal H if q=H 0.8 --> log(1/2)=-log(2)*/
g logsignallow=log(3) /*prob signal L if q=L 0.6 / prob signal L if quality H 0.2 --> log(3) */
g logitbelief=log(belief/(100-belief)) /*that B is low quality*/
g good=0
replace good=logsignallow if incentiveA==1 & signalblue==0
replace good=logsignalhigh if incentiveB==1 & signalblue==1
g bad=0
replace bad=logsignallow if incentiveB==1 & signalblue==0
replace bad=logsignalhigh if incentiveA==1 & signalblue==1
g goodchoicebefore=good*choicebefore
g badchoicebefore=bad*choicebefore
g goodgetyourchoice=good*getyourchoice
g badgetyourchoice=bad*getyourchoice
g goodnotgetyourchoice=good*(1-getyourchoice)
g badnotgetyourchoice=bad*(1-getyourchoice)
g goodchoicebeforenotgetyourchoice=good*(1-getyourchoice)*choicebefore
g badchoicebeforenotgetyourchoice=bad*(1-getyourchoice)*choicebefore
g bayesianposterior=33 if signalblue==1
replace bayesianposterior=75 if signalblue==0
label var good "Good news (log odds incl.)"
label var bad "Bad news (log odds incl.)"
label var badchoicebefore "Bad news (log) X Pref Inc 1st"
label var goodchoicebefore "Good news (log) X Pref Inc 1st"
label var goodgetyourchoice "Good news (log) X Get Choice"
label var badgetyourchoice "Bad news (log) X Get Choice"
label var goodnotgetyourchoice "Good news (log) X Not Get Choice"
label var badnotgetyourchoice "Bad news (log) X Not Get Choice"
label var goodchoicebeforenotgetyourchoice "Good news (log) X Prefer Inc 1st X Not Get Choice"
label var badchoicebeforenotgetyourchoice "bad news (log) X Prefer Inc 1st X Not Get Choice"
label var bayesianposterior "Bayesian Posterior"
g badsignal=0
replace badsignal=1 if incentiveB==1 & signalblue==0
replace badsignal=1 if incentiveA==1 & signalblue==1
*Gen variables for those who update in correct direction
*belief is likelihood that quality is LOW, so if signal is blue($2), likelihood should be 25
g updatecorrect=(belief<50) if signalblue==1
replace updatecorrect=(belief>50) if signalblue==0
g updatedirection=1 if signalblue==1 & belief<50
replace updatedirection=1 if signalblue==0 & belief>50
replace updatedirection=0 if belief==50
replace updatedirection=-1 if belief>50 & signalblue==1
replace updatedirection=-1 if belief<50 & signalblue==0
g updatewrong=(updatedirection==-1)
**cumulative beliefs distance
g beliefdistance=belief-33.3 if signalblue==1 /*positive difference=too little updating*/
replace beliefdistance=75-belief if signalblue==0 /*positive difference=too little updating*/
g relbeliefdistance=(50-belief)/(50-33) if signalblue==1
replace relbeliefdistance=(50-belief)/(50-75) if signalblue==0
**correct direction - incentivized measure
*Prob quality of B is low, bin #5 - 41-50%
g correctdirbin=0
replace correctdirbin=1 if signalblue==1 & beliefbin<6 & beliefbin!=. /*if signal is blue, $2, it decreases*/
replace correctdirbin=1 if signalblue==0 & beliefbin>4 & beliefbin!=. /*if signal is blue, $0, it decreases*/
*correct bin - incentivized measure
g beliefinbin=0
replace beliefinbin=1 if belief<11 & beliefbin==1
replace beliefinbin=1 if belief>10 & belief<21 & beliefbin==2
replace beliefinbin=1 if belief>20 & belief<31 & beliefbin==3
replace beliefinbin=1 if belief>30 & belief<41 & beliefbin==4
replace beliefinbin=1 if belief>40 & belief<51 & beliefbin==5
replace beliefinbin=1 if belief>50 & belief<61 & beliefbin==6
replace beliefinbin=1 if belief>60 & belief<71 & beliefbin==7
replace beliefinbin=1 if belief>70 & belief<81 & beliefbin==8
replace beliefinbin=1 if belief>80 & belief<91 & beliefbin==9
replace beliefinbin=1 if belief>90 & belief!=. & beliefbin==10
replace beliefinbin=. if belief==. | beliefbin==.
** belief at prior
g belief_prior=0
replace belief_prior=1 if beliefbin==5
replace belief_prior=. if beliefbin==.
*** belief at prior - continuous
g belief_prior_continuos=0
replace belief_prior_continuos=1 if belief==50
replace belief_prior_continuos=. if belief==.
drop newid
save "${data}choice_experiments.dta", replace
/*-----CHOICE - CODED EXPLANATIONS OF CHOICE -------*/
*IMPORT EXPLANATIONS CSV
clear
import excel "${raw}Choice_explanations_deidentified.xlsx", first case(l)
save "${data}coding_explanations.dta", replace
u "${data}choice_experiments.dta", clear
keep if mturkwave==2 | professionals==1
rename id participant_id
g id=shortid
bys id: egen countid=count(id)
tab countid study
drop if alphavaluefinal==. & study!=1
merge 1:m shortid using "${data}coding_explanations.dta", force
rename _merge _mergedecisions
keep if _mergedecisions==3
tab countid study if rater==1
replace condition="ChoiceFree_Professionals" if study==1
egen rowsum=rowtotal(limitbias nomatter commission_expl feeling other)
g mergedcategory=1 if limitbias==1 & rowsum<2
replace mergedcategory=2 if nomatter==1 & rowsum<2
replace mergedcategory=3 if commission_expl==1 & rowsum<2
replace mergedcategory=4 if (feeling==1 | other==1) & (rowsum==1 | rowsum==2)
replace mergedcategory=5 if rowsum==0
replace mergedcategory=6 if rowsum>1 & limitbias==1 & nomatter==1
replace mergedcategory=7 if rowsum>1 & limitbias==1 & commission_expl==1
replace mergedcategory=8 if rowsum>1 & limitbias==1 & (feeling==1 | other==1)
replace mergedcategory=9 if rowsum>1 & commission_expl==1 & nomatter==1
replace mergedcategory=10 if rowsum>1 & nomatter==1 & (feeling==1 | other==1)
replace mergedcategory=11 if rowsum>1 & commission_expl==1 & (feeling==1 | other==1)
g otherreason=(other==1 | feeling==1)
reshape wide limitbias nomatter commission_expl feeling other comments rowsum ///
mergedcategory otherreason, i(shortid) j(rater)
g nocategory1=(limitbias1==0 & nomatter1==0 & commission_expl1==0 & otherreason1==0)
g nocategory2=(limitbias2==0 & nomatter2==0 & commission_expl2==0 & otherreason2==0)
foreach v of newlist limitbias nomatter commission_expl feeling other otherreason nocategory {
egen `v'=rowmean(`v'1 `v'2)
}
egen mergedcategory=rowmean(mergedcategory1 mergedcategory2)
drop shortid
save "${data}Choice_coding_explanations.dta", replace
/*-------------------------------*/
*STAKES STUDY
/*-------------------------------*/
*** CLEANING DEIDENTIFIED DATA
clear
import delimited "${raw}Stakes_deidentified.csv", varnames(1)
drop if status==1
tab distributionchannel
drop if distributionchannel=="preview"
tab finished
keep if finished==1
g attentionpassed=attention==3
keep if attentionpassed==1
sort newid
quietly by newid: gen dup = cond(_N==1,0,_n)
tab dup
drop if dup!=0
drop if q_recaptchascore<.50
g id=_n+50000
*Treatment
g condition2=0.30 if condition=="PayBefore_HighCommission"
replace condition2=0.15 if condition=="PayBefore_main"
replace condition2=0.01 if condition=="PayBeforeLowCommission"
recode choicepaybefore (2=0)
recode choicehighcommission (2=0)
recode choicelowcommission (2=0)
g choicebefore=choicepaybefore if condition=="PayBefore_main"
replace choicebefore=choicehighcommission if condition=="PayBefore_HighCommission"
replace choicebefore=choicelowcommission if condition=="PayBeforeLowCommission"
*Signal
g signalblue=(signal=="Blue")
*Beliefs
g beliefbin=q45
g belief=q43
g beliefcorrect=0
replace beliefcorrect=1 if beliefbin==4 & signalblue==1
replace beliefcorrect=1 if beliefbin==8 & signalblue==0
*Recommendation
g recommendb=(recommendationa==2 | recommendationb==2)
g recommenda=1-recommendb
g recommendincentive=recommenda if commission=="commissionA"
replace recommendincentive=recommendb if commission=="commissionB"
*Conflict
g conflict=0
replace conflict=1 if signalblue==1 & commission=="commissionA"
replace conflict=1 if signalblue==0 & commission=="commissionB"
*Get before
g getbeforenum=(fl_523_do=="GetBeforeIncentiveforA" | ///
fl_548_do=="GetBeforeIncentiveforA" | ///
fl_657_do=="GetBeforeIncentiveforB" | ///
fl_656_do=="GetBeforeIncentiveforB" )
drop getbefore
rename getbeforenum getbefore
destring age, replace
**Gender
gen female=.
replace female=1 if gender==2
replace female=0 if gender==1
*Prosociality
forval i=2(1)5{
recode q8`i' (1=0) (2=1)
}
rename q82 alpha1
rename q83 alpha2
rename q84 alpha3
rename q85 alpha4
rename q176 alpha5
recode alpha5 (1=0) (2=1)
egen alphamiss=rowmiss(alpha1 alpha2 alpha3 alpha4)
keep if alphamiss==0
*Prosociality - switch point
reshape long alpha, i(id) j(number)
sort id number
g previouschoice=alpha[_n-1] if number>1
g steptob=(alpha-previouschoice) if number>1
bys id: egen sumsteptob=total(steptob)
*Alpha value final = number of times you go with the incentive to recommend Y
g alphavalue=0 if sumsteptob==0 & alpha==0 & number==5 /*always choosing X, no incentive*/
replace alphavalue=5 if sumsteptob==0 & alpha==1 & number==5 /*always choosing Y, incentive*/
*Alpha value is the question number when the steptob is 1 for those who switch
replace alphavalue=number-1 if sumsteptob==1 & steptob==1
g inconsistentchoice=(steptob==-1)
bys id: egen inconsistentid=total(inconsistentchoice)
bys id: egen alphavaluefinal=total(alphavalue)
replace alphavaluefinal=. if inconsistentid>0
cap drop alphavalue inconsistentchoice previouschoice steptob
reshape wide alpha, i(id) j(number)
*ATTENTIVE GUYS are DROPPED FOR INCOMPLETE ANSWERS
*KEEP CONSISTENT GUYS IN ALPHA TASK
tab alphavaluefinal, m
gen selfish=(alphavaluefinal>3)
replace selfish=. if alphavaluefinal==.
g choice="Stakes"
drop if choicebefore==.
g conditionnum=1 if condition=="PayBeforeLowCommission"
replace conditionnum=2 if condition=="PayBefore_main"
replace conditionnum=3 if condition=="PayBefore_HighCommission"
keep if conditionnum!=.
label var female "Female"
label var age "Age"
replace age=61 if age==611
g commissionlow=conditionnum==1
g commissionintermediate=conditionnum==2
g commissionhigh=conditionnum==3
g noconflict=1-conflict
g choicebeforenoconflict=choicebefore*noconflict
g incentiveB=commission=="commissionB"
g getyourchoice=0
replace getyourchoice=1 if choicebefore==1 & getbefore==1
replace getyourchoice=1 if choicebefore==0 & getbefore==0
g notgetyourchoice=1-getyourchoice
g choicebeforenotgetyourchoice=choicebefore*notgetyourchoice
g notgetyourchoicenoconflict=noconflict*notgetyourchoice
g commissionlowchoicebefore=commissionlow*choicebefore
g commissionhighchoicebefore=commissionhigh*choicebefore
egen stdalpha=std(alphavaluefinal)
drop responseid newid
drop distributionchannel userlanguage
drop fl_17_do fl_481_do fl_523_do fl_528_do fl_548_do fl_555_do fl_563_do fl_657_do fl_629_do fl_656_do fl_642_do
save "${data}stakes.dta", replace
/*-------------------------------*/
* INFORMATION ARCHITECT STUDY
/*-------------------------------*/
*** INFORMATION ARCHITECTS*****
*** CLEANING DEIDENTIFIED DATA
clear
import delimited "${raw}InformationArchitect_deidentified.csv", varnames(1)
drop if status==1
tab distributionchannel
drop if distributionchannel=="preview"
tab finished
keep if finished==1
sort newid
quietly by newid: gen dup = cond(_N==1,0,_n)
tab dup
drop if dup!=0
drop if q_recaptchascore<.50
gen attentionpassed=.
replace attentionpassed=1 if attention==3
replace attentionpassed=0 if attention==1 | attention==2 | attention==4
tab attentionpassed
**92.11% passed the attention check (N=549) out of 602 who completed the attention check question
drop if attentionpassed!=1
sort startdate
gen id=_n+70000
** condition
replace condition="IA-Advisor" if condition=="DM-Advisor"
replace condition="IA-Client" if condition=="DM-Client"
**Gender
gen female=.
replace female=1 if gender==2
replace female=0 if gender==1
**Age
destring age, replace
gen choicebefore=0
replace choicebefore=1 if condition=="IA-Advisor" & choicedmadvisor==1
replace choicebefore=1 if condition=="IA-Client" & choicedmclient==1
***Prosociality
forval i=1(1)5{
recode alpha`i' (1=0) (2=1)
}
egen alphamiss=rowmiss(alpha1 alpha2 alpha3 alpha4)
keep if alphamiss==0
reshape long alpha, i(id) j(number)
sort id number
g previouschoice=alpha[_n-1] if number>1
g steptob=(alpha-previouschoice) if number>1
bys id: egen sumsteptob=total(steptob)
g alphavalue=0 if sumsteptob==0 & alpha==0 & number==5 /*always choosing X, no incentive*/
replace alphavalue=5 if sumsteptob==0 & alpha==1 & number==5 /*always choosing Y, incentive*/
replace alphavalue=number-1 if sumsteptob==1 & steptob==1
g inconsistentchoice=(steptob==-1)
bys id: egen inconsistentid=total(inconsistentchoice)
bys id: egen alphavaluefinal=total(alphavalue)
replace alphavaluefinal=. if inconsistentid>0
cap drop alphavalue inconsistentchoice previouschoice steptob
reshape wide alpha, i(id) j(number)
gen study=9
sort choicebefore alphavaluefinal
gen missingalpha=0
replace missingalpha=1 if alphavaluefinal==.
sort missingalpha choicebefore
gen id_pair=_n
gen IAAdvisor=(condition=="IA-Advisor")
gen IAClient=(condition=="IA-Client")
drop newid
save "${data}InformationArchitect.dta", replace
*** ADVISORS*****
*** CLEANING DEIDENTIFIED DATA
clear
import delimited "${raw}InformationArchitect_Advisor_deidentified.csv", varnames(1)
drop if status==1
tab distributionchannel
drop if distributionchannel=="preview"
tab finished
keep if finished==1
**Gender
gen female=.
replace female=1 if gender==2
replace female=0 if gender==1
**Age
destring age, replace
**Signal Blue
gen signalblue=.
replace signalblue=1 if fl_211_do=="Signal_blue2"
replace signalblue=0 if fl_211_do=="Signal_red0"
replace signalblue=1 if fl_221_do=="Signal_blue2"
replace signalblue=0 if fl_221_do=="Signal_red0"
replace signalblue=1 if fl_229_do=="Signal_blue2"
replace signalblue=0 if fl_229_do=="Signal_red0"
replace signalblue=1 if fl_127_do=="Signal_blue2"
replace signalblue=0 if fl_127_do=="Signal_red0"
**Beliefs
g beliefcorrect=0
replace beliefcorrect=1 if beliefbin==4 & signalblue==1
replace beliefcorrect=1 if beliefbin==8 & signalblue==0
*Recommendation
g recommendb=(recommendationa==2 | recommendationb==2)
*Conflict
gen conflict=0
replace conflict=1 if condition=="AfterA" & signalblue==1
replace conflict=1 if condition=="AfterB" & signalblue==0
replace conflict=1 if condition=="BeforeA" & signalblue==1
replace conflict=1 if condition=="BeforeB" & signalblue==0
**gen id
gen id_advisor=_n+75000
**Prosociality
forval i=1(1)5{
recode alpha`i' (1=0) (2=1)
}
reshape long alpha, i(id_advisor) j(number)
sort id_advisor number
g previouschoice=alpha[_n-1] if number>1
g steptob=(alpha-previouschoice) if number>1
bys id_advisor: egen sumsteptob=total(steptob)
*Alpha value final = number of times you go with the incentive to recommend Y
g alphavalue=0 if sumsteptob==0 & alpha==0 & number==5 /*always choosing X, no incentive*/
replace alphavalue=5 if sumsteptob==0 & alpha==1 & number==5 /*always choosing Y, incentive*/
*Alpha value is the question number when the steptob is 1 for those who switch
replace alphavalue=number-1 if sumsteptob==1 & steptob==1
g inconsistentchoice=(steptob==-1)
bys id_advisor: egen inconsistentid=total(inconsistentchoice)
bys id_advisor: egen alphavaluefinal=total(alphavalue)
replace alphavaluefinal=. if inconsistentid>0
cap drop alphavalue inconsistentchoice previouschoice steptob
reshape wide alpha, i(id_advisor) j(number)
gen study=9
tab conflict
*Recommend incentive
gen recommendincentive=0
replace recommendincentive=1 if (condition=="AfterA" | condition=="BeforeA" ) & recommendb==0
replace recommendincentive=1 if (condition=="AfterB" | condition=="BeforeB" ) & recommendb==1
gen treatment=0
replace treatment =1 if condition=="BeforeA" | condition=="BeforeB"
replace treatment =2 if condition=="AfterA" | condition=="AfterB"
gen incentiveforA=.
replace incentiveforA=1 if (condition=="AfterA" | condition=="BeforeA" )
replace incentiveforA=0 if (condition=="AfterB" | condition=="BeforeB" )
gen incentiveB=1-incentiveforA
drop newid
save "${data}InformationArchitect_advisors.dta", replace
******* APPENDIX *********
/*-------------------------------*/
*NO CHOICE - TOGETHER for APPENDIX
/*-------------------------------*/
clear
import delimited "${raw}NoChoiceSimoultaneous_deidentified.csv", varnames(1)
drop if status==1
*drop if workerid==""
tab distributionchannel
drop if distributionchannel=="preview"
tab finished
keep if finished==1
sort newid
quietly by newid: gen dup = cond(_N==1,0,_n)
tab dup
drop if dup!=0
rename q32 attention
g attentionpassed=attention==3
keep if attentionpassed==1
tab q_recaptchascore
drop if q_recaptchascore<.5
sort startdate
gen id=_n + 80000
*Beliefs
g beliefbin=q45
g beliefnum=q43
**Gender
gen female=.
replace female=1 if gender==2
replace female=0 if gender==1
gen treatment=0
replace treatment =1 if condition=="BeforeA" | condition=="BeforeB"
replace treatment =2 if condition=="AfterA" | condition=="AfterB"
replace treatment =3 if condition=="TogetherA" | condition=="TogetherB"
g recommendb=(recommendationa==2 | recommendationb==2)
gen signalblue=.
replace signalblue=1 if fl_259_do=="All-Signalblue-incentiveA"
replace signalblue=0 if fl_259_do=="All-Signalred-incentiveA"
replace signalblue=0 if fl_268_do=="All-Signalred-incentiveB"
replace signalblue=1 if fl_268_do=="All-Signalblue-incentiveB"
replace signalblue=1 if fl_211_do=="Signal_blue2"
replace signalblue=0 if fl_211_do=="Signal_red0"
replace signalblue=1 if fl_221_do=="Signal_blue2"
replace signalblue=0 if fl_221_do=="Signal_red0"
replace signalblue=1 if fl_229_do=="Signal_blue2"
replace signalblue=0 if fl_229_do=="Signal_red0"
replace signalblue=1 if fl_127_do=="Signal_blue2"
replace signalblue=0 if fl_127_do=="Signal_red0"
gen conflict=0
replace conflict=1 if cond=="AfterA" & signalblue==1
replace conflict=1 if cond=="AfterB" & signalblue==0
replace conflict=1 if cond=="BeforeA" & signalblue==1
replace conflict=1 if cond=="BeforeB" & signalblue==0
replace conflict=1 if cond=="TogetherA" & signalblue==1
replace conflict=1 if cond=="TogetherB" & signalblue==0
tab conflict
gen recommendincentive=0
replace recommendincentive=1 if (cond=="AfterA" | cond=="BeforeA" | cond=="TogetherA") & recommendb==0
replace recommendincentive=1 if (cond=="AfterB" | cond=="BeforeB" | cond=="TogetherB") & recommendb==1
gen incentiveforA=.
replace incentiveforA=1 if (cond=="AfterA" | cond=="BeforeA" | cond=="TogetherA")
replace incentiveforA=0 if (cond=="AfterB" | cond=="BeforeB" | cond=="TogetherB")
gen incentiveB=1-incentiveforA
*Prosociality
forval i=2(1)5{
recode q8`i' (1=0) (2=1)
}
rename q82 alpha1
rename q83 alpha2
rename q84 alpha3
rename q85 alpha4
rename q176 alpha5
recode alpha5 (1=0) (2=1)
egen alphamiss=rowmiss(alpha1 alpha2 alpha3 alpha4)
tab alphamiss
*alpha1-5 equal 1 is recommend the incentivized option
*RESTRICTING RESPONDENTS TO THOSE WITH COMPLETE ALPHA CHOICES
keep if alphamiss==0
*Prosociality switch
reshape long alpha, i(id) j(number)
sort id number
g previouschoice=alpha[_n-1] if number>1
g steptob=(alpha-previouschoice) if number>1
bys id: egen sumsteptob=total(steptob)
*Alpha value final = number of times you go with the incentive to recommend Y
g alphavalue=0 if sumsteptob==0 & alpha==0 & number==5 /*always choosing X, no incentive*/
replace alphavalue=5 if sumsteptob==0 & alpha==1 & number==5 /*always choosing Y, incentive*/
*Alpha value is the question number when the steptob is 1 for those who switch
replace alphavalue=number-1 if sumsteptob==1 & steptob==1
g inconsistentchoice=(steptob==-1)
bys id: egen inconsistentid=total(inconsistentchoice)
bys id: egen alphavaluefinal=total(alphavalue)
replace alphavaluefinal=. if inconsistentid>0
tab alphavaluefinal, m
cap drop alphavalue inconsistentchoice previouschoice steptob
reshape wide alpha, i(id) j(number)
*alpha
tab alphavaluefinal if treatment!=., m
gen seeincentivefirst=(treatment==1)
gen Together=(treatment==3)
gen noconflict=1-conflict
gen wave=2
gen missingalpha=(alphavaluefinal==.)
drop responseid newid shortid
save "${data}NoChoiceSimoultaneous.dta", replace
/*-------------------------------*/
*CHOICE DETERMINISTIC
/*-------------------------------*/
clear
import delimited "${raw}ChoiceDeterministic_deidentified.csv", varnames(1)
drop if status==1
tab distributionchannel
drop if distributionchannel=="preview"
tab finished
keep if finished==1
sort newid
quietly by newid: gen dup = cond(_N==1,0,_n)
tab dup
drop if dup!=0
drop if q_recaptchascore<.50
g id=_n + 90000
tab attention, m
g attentionpassed=attention==3
tab attentionpassed
**78.89% passed the attention check (N=953) out of 1200 who completed the attention check question and were not excluded according to the criteria above
drop if attentionpassed!=1
tab belief
replace belief=belief*100 if belief<1
***Gen recommendB and recommenda dummies
g recommendb=.
replace recommendb=1 if recommendationb==2
replace recommendb=0 if recommendationb==1
replace recommendb=1 if recommendationa==2
replace recommendb=0 if recommendationa==1
g recommenda=1-recommendb
***gen IncentiveB
g incentiveB=.
replace incentiveB=1 if commission=="commissionB"
replace incentiveB=0 if commission=="commissionA"
g incentiveA=.
replace incentiveA=1 if commission=="commissionA"
replace incentiveA=0 if commission=="commissionB"
*GET by treatment
g getafter=(getbefore=="GetAfter")
cap drop getbefore
g getbefore=1-getafter
**gen bluesignal dummy
g signalblue=.
replace signalblue=1 if fl_528_do=="Signal_blue2"
replace signalblue=1 if fl_1034_do=="Signal_blue2"
replace signalblue=1 if fl_555_do=="Signal_blue2"
replace signalblue=1 if fl_1047_do=="Signal_blue2"
replace signalblue=1 if fl_629_do=="Signal_blue2"
replace signalblue=1 if fl_642_do=="Signal_blue2"
replace signalblue=1 if fl_1060_do=="Signal_blue2"
replace signalblue=1 if fl_1073_do=="Signal_blue2"
replace signalblue=0 if fl_528_do=="Signal_red0"
replace signalblue=0 if fl_555_do=="Signal_red0"
replace signalblue=0 if fl_1047_do=="Signal_red0"
replace signalblue=0 if fl_1034_do=="Signal_red0"
replace signalblue=0 if fl_629_do=="Signal_red0"
replace signalblue=0 if fl_642_do=="Signal_red0"
replace signalblue=0 if fl_1060_do=="Signal_red0"
replace signalblue=0 if fl_1073_do=="Signal_red0"
drop if signalblue==.
g conflict=.
replace conflict=1 if signalblue==0 & commission=="commissionB"
replace conflict=0 if signalblue==1 & commission=="commissionB"
replace conflict=1 if signalblue==1 & commission=="commissionA"
replace conflict=0 if signalblue==0 & commission=="commissionA"
tab commission
g recommendincentive=recommendb if commission=="commissionB"
replace recommendincentive=recommenda if commission=="commissionA"
gen choicebefore=.
replace choicebefore=1 if choicefree==1
replace choicebefore=0 if choicefree==2
**Gender
gen female=.
replace female=1 if gender==2
replace female=0 if gender==1
***Prosociality
forval i=1(1)5{
recode alpha`i' (1=0) (2=1)
}
egen alphamiss=rowmiss(alpha1 alpha2 alpha3 alpha4)
keep if alphamiss==0
g sample="MTurk"
rename q211 explanationchoice
gen costlydemand=0
reshape long alpha, i(id) j(number)
sort id number
g previouschoice=alpha[_n-1] if number>1
g steptob=(alpha-previouschoice) if number>1
bys id: egen sumsteptob=total(steptob)
*Alpha value final = number of times you go with the incentive to recommend Y
g alphavalue=0 if sumsteptob==0 & alpha==0 & number==5 /*always choosing X, no incentive*/
replace alphavalue=5 if sumsteptob==0 & alpha==1 & number==5 /*always choosing Y, incentive*/
*Alpha value is the question number when the steptob is 1 for those who switch
replace alphavalue=number-1 if sumsteptob==1 & steptob==1
g inconsistentchoice=(steptob==-1)
bys id: egen inconsistentid=total(inconsistentchoice)
bys id: egen alphavaluefinal=total(alphavalue)
replace alphavaluefinal=. if inconsistentid>0
tab alphavaluefinal, m
cap drop alphavalue inconsistentchoice previouschoice steptob
reshape wide alpha, i(id) j(number)
*Average alpha
tab alphavaluefinal, m
gen Deterministic=(condition=="ChoiceFree_Deterministic")
egen stdalpha=std(alphavaluefinal)
* prepare data for regressions
g getbefore_Deterministic=getbefore*Deterministic
label var getbefore_Deterministic "Get Before X Deterministic"
gen Not_getyourchoice=0
replace Not_getyourchoice=1 if choicebefore==1 & getbefore==0
replace Not_getyourchoice=1 if choicebefore==0 & getbefore==1
gen getyourchoice=1-Not_getyourchoice
gen choicebefore_Notgetyourchoice=choicebefore*Not_getyourchoice
gen noconflict=1-conflict
gen noconflict_choicebefore=noconflict*choicebefore
gen noconflict_Notgetyourchoice=noconflict*Not_getyourchoice
gen choicebefore_Deterministic=choicebefore*Deterministic
gen choicebefore_getyourchoiceDet=choicebefore*getyourchoice*Deterministic
gen choicebefore_noconflict=choicebefore*noconflict
gen Deterministic_noconflict=Deterministic*noconflict
gen Deterministic_choicebeforeNocon=Deterministic*noconflict*choicebefore
label var getyourchoice "Random Assignment to Preferred Order"
label var choicebefore_getyourchoice "Prefer to See Incentive First X Random Assignment"
gen getyourchoice_Det=getyourchoice*Deterministic
drop responseid newid shortid dup
drop fl_728_do fl_17_do fl_481_do fl_523_do fl_528_do fl_1034_do fl_548_do fl_555_do fl_1047_do fl_563_do fl_657_do fl_629_do fl_1060_do fl_656_do fl_642_do fl_1073_do
save "${data}Choice_Deterministic.dta", replace
/*-------------------------------*/
*PREDICTIONS
/*-------------------------------*/
clear
import excel "${raw}predictions_explanations_coded_deidentified.xlsx", firstrow
save "${data}predictions_explanations_coded.dta", replace
clear
import excel "${raw}predictions_deidentified.xlsx", firstrow
drop if _n<3
drop if status==1
drop if q_relevantidduplicate==1
drop if q_relevantidfraudscore!=0
destring predictbeforered_es_1 predictafterred_es_1 predictbeforeblue_es_1 predictafterblue_es_1, force replace
g predictbeforered1=predictbeforered_es_1
g predictafterred1=predictafterred_es_1
g predictbeforeblue1=predictbeforeblue_es_1
g predictafterblue1=predictafterblue_es_1
g gapred=predictbeforered1-58 if predictbeforered1!=.
replace gapred=68-predictafterred1 if predictafterred1!=.
g gapblue=predictbeforeblue1-75 if predictbeforeblue1!=.
replace gapblue=86-predictafterblue1 if predictafterblue1!=.
g gap=gapred if gapred!=.
replace gap=gapblue if gapblue!=.
g choice="Predictions"
tab gap
drop if gap==.
merge 1:1 shortid using "${data}predictions_explanations_coded.dta"
g attentivenum=attentive=="YES"
tab attentivenum
keep if attentivenum==1
tab gender
destring age, force replace
tabstat age
replace gap=gap/100
replace gapred=gapred/100
replace gapblue=gapblue/100
egen meangap=mean(gap)
egen sdgap=sd(gap)
egen ngap=count(gap)
g logap = meangap - sdgap/(sqrt(ngap))
g higap = meangap + sdgap/(sqrt(ngap))
g predicteddirection=predictafterred if predictafterred!=.
replace predicteddirection=predictbeforered if predictbeforered!=.
replace predicteddirection=predictafterblue if predictafterblue!=.
replace predicteddirection=predictbeforeblue if predictbeforeblue!=.
g before=1 if predictbeforered!=. | predictbeforeblue!=.
replace before=0 if predictafterred!=. | predictafterblue!=.
g predictcorrect=1 if (predicteddirection==1 & before==0) | (predicteddirection==3 & before==1)
replace predictcorrect=0 if (predicteddirection==2 & before==0) | (predicteddirection==2 & before==1)
replace predictcorrect=-1 if (predicteddirection==3 & before==0) | (predicteddirection==1 & before==1)
drop _merge responseid
save "${data}predictionsstudy.dta", replace
/*-------------------------------*/
*CLIENTS
/*-------------------------------*/
*** NOCHOICE, CHOICE AND STAKES EXPERIMENTS - MAIN
clear
import delimited using "${raw}Clients/Clients_Main_deidentified.csv", varnames(1)
gen follow=.
replace follow=1 if client_choiceb==1 & advisor_recommendb==1
replace follow=1 if client_choiceb==0 & advisor_recommendb==0
replace follow=0 if client_choiceb==0 & advisor_recommendb==1
replace follow=0 if client_choiceb==1 & advisor_recommendb==0
save "${data}Clients_Main.dta", replace
*** CLIENTS ** NOCHOICE, CHOICE AND STAKES EXPERIMENTS - MPL
clear
import delimited using "${raw}Clients/Clients_MPL_deidentified.csv", varnames(1)
gen follow=.
replace follow=1 if advisor_recommends_producty==1 & client_choicey==1
replace follow=1 if advisor_recommends_producty==0 & client_choicey==0
replace follow=0 if advisor_recommends_producty==0 & client_choicey==1
replace follow=0 if advisor_recommends_producty==1 & client_choicey==0
save "${data}Clients_MPL.dta", replace
*** CLIENTS ** NOCHOICE, CHOICE AND STAKES EXPERIMENTS - BLINDING
clear
import delimited using "${raw}Clients/Clients_Blinding_deidentified.csv", varnames(1)
gen follow=.
replace follow=1 if recommendation_infoavoidance==1 & choice1==1
replace follow=1 if recommendation_infoavoidance==0 & choice1==0
replace follow=0 if recommendation_infoavoidance==0 & choice1==1
replace follow=0 if recommendation_infoavoidance==1 & choice1==0
save "${data}Clients_Blinding.dta", replace
*** CLIENTS ** INFORMATION ARCHITECTS - MAIN
clear
import delimited using "${raw}Clients/Clients_InfoArchitectsMain_deidentified.csv", varnames(1)
gen follow=.
replace follow=1 if client_choiceb==1 & advisor_recommendb==1
replace follow=1 if client_choiceb==0 & advisor_recommendb==0
replace follow=0 if client_choiceb==0 & advisor_recommendb==1
replace follow=0 if client_choiceb==1 & advisor_recommendb==0
save "${data}Clients_InfoArchitectsMain.dta", replace
*** CLIENTS ** INFORMATION ARCHITECTS - MPL ADVISORS
clear
import delimited using "${raw}Clients/Clients_IAAdvisors_MPL_deidentified.csv", varnames(1)
gen follow=.
replace follow=1 if advisor_recommends_producty==1 & client_choicey==1
replace follow=1 if advisor_recommends_producty==0 & client_choicey==0
replace follow=0 if advisor_recommends_producty==0 & client_choicey==1
replace follow=0 if advisor_recommends_producty==1 & client_choicey==0
save "${data}Clients_IAAdvisors_MPL.dta", replace
*** CLIENTS ** INFORMATION ARCHITECTS - MPL INFO ARCHITECTS
clear
import delimited using "${raw}Clients/Clients_IAInfoArchitects_MPL_deidentified.csv", varnames(1)
gen follow=.
replace follow=1 if advisor_recommends_producty==1 & client_choicey==1
replace follow=1 if advisor_recommends_producty==0 & client_choicey==0
replace follow=0 if advisor_recommends_producty==0 & client_choicey==1
replace follow=0 if advisor_recommends_producty==1 & client_choicey==0
save "${data}Clients_IAInfoArchitects_MPL.dta", replace
*** CLIENTS ** NOCHOICE SIMULTANEOUS - MAIN
clear
import delimited using "${raw}Clients/Clients_NoChoiceSimultaneousMain_deidentified.csv", varnames(1)
gen follow=.
replace follow=1 if advisor_recommendb==1 & client_choiceb==1
replace follow=1 if advisor_recommendb==0 & client_choiceb==0
replace follow=0 if advisor_recommendb==0 & client_choiceb==1
replace follow=0 if advisor_recommendb==1 & client_choiceb==0
save "${data}Clients_NoChoiceSimultaneousMain.dta", replace
*** CLIENTS ** NOCHOICE SIMULTANEOUS - MPL
clear
import delimited using "${raw}Clients/Clients_NoChoiceSimultaneousMPL_deidentified.csv", varnames(1)
gen follow=.
replace follow=1 if advisor_recommends_producty==1 & client_choicey==1
replace follow=1 if advisor_recommends_producty==0 & client_choicey==0
replace follow=0 if advisor_recommends_producty==0 & client_choicey==1
replace follow=0 if advisor_recommends_producty==1 & client_choicey==0
save "${data}Clients_NoChoiceSimultaneousMPL.dta", replace
*** CLIENTS ** CHOICE DETERMINISTIC - MAIN
clear
import delimited using "${raw}Clients/Clients_ChoiceDeterministic_Main_deidentified.csv", varnames(1)
gen follow=.
replace follow=1 if advisor_recommendb==1 & client_choiceb==1
replace follow=1 if advisor_recommendb==0 & client_choiceb==0
replace follow=0 if advisor_recommendb==0 & client_choiceb==1
replace follow=0 if advisor_recommendb==1 & client_choiceb==0
save "${data}Clients_ChoiceDeterministic_Main.dta", replace
*** CLIENTS ** CHOICE DETERMINISTIC - MPL
clear
import delimited using "${raw}Clients/Clients_ChoiceDeterministic_MPL_deidentified.csv", varnames(1)
gen follow=.
replace follow=1 if advisor_recommends_producty==1 & client_choicey==1
replace follow=1 if advisor_recommends_producty==0 & client_choicey==0
replace follow=0 if advisor_recommends_producty==0 & client_choicey==1
replace follow=0 if advisor_recommends_producty==1 & client_choicey==0
save "${data}Clients_ChoiceDeterministic_MPL.dta", replace
*drop unnecessary files
rm "${data}choice1.dta"
rm "${data}choice2.dta"
rm "${data}choice3.dta"
rm "${data}professionals_prolific.dta"
rm "${data}coding_explanations.dta"
|