simulation_study.Rmd 27.2 KB
 linushof committed Jul 01, 2021 1 ---  linushof committed Aug 31, 2021 2 3 title: 'Sampling Strategies in Decisions from Experience' author: "Linus Hof, Thorsten Pachur, Veronika Zilker"  linushof committed Jul 02, 2021 4 5 6 7 8 9 bibliography: sampling-strategies-in-dfe.bib output: html_document: code_folding: hide toc: yes toc_float: yes  linushof committed Aug 02, 2021 10  number_sections: no  linushof committed Aug 16, 2021 11 12 13  pdf_document: toc: yes csl: apa.csl  linushof committed Aug 31, 2021 14 15 16 editor_options: markdown: wrap: sentence  linushof committed Jul 01, 2021 17 18 ---  linushof committed Jul 02, 2021 19 20 {r} # load packages  linushof committed Aug 02, 2021 21 22 pacman::p_load(repro, tidyverse,  linushof committed Aug 16, 2021 23 24  knitr, viridis)  linushof committed Jul 02, 2021 25 26   linushof committed Aug 02, 2021 27 # Note  linushof committed Jul 01, 2021 28   linushof committed Aug 02, 2021 29 30 - Some of the R code is folded but can be unfolded by clicking the Code buttons. - This document was created from the commit with the hash r repro::current_hash().  31   linushof committed Aug 02, 2021 32 33 # Abstract  linushof committed Aug 31, 2021 34 Synthetic choice data from decisions from experience is generated by applying different strategies of sample integration to choice problems of 2-prospects.  linushof committed Aug 13, 2021 35 The synthetic data is explored for characteristic choice patterns produced by comprehensive and piecewise forms of sample integration under varying structures of the environment (gamble features) and aspects of the sampling- and decision behavior (model parameters).  linushof committed Aug 02, 2021 36 37 38  # Summary  linushof committed Aug 13, 2021 39 Provide short summary of simulation study results.  linushof committed Jul 01, 2021 40   linushof committed Aug 02, 2021 41 # Introduction  linushof committed Jul 01, 2021 42   linushof committed Aug 31, 2021 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 ## Prospects Let a single prospect be a *probability space* $(\Omega, \Sigma, P)$ [cf. @kolmogorovFoundationsTheoryProbability1950]. $\Omega$ is the *sample space* containing a finite set of possible outcomes $\{\omega_1, ..., \omega_n\}$. $\Sigma$ is a set of subsets of $\Omega$, i.e., the *event space*. $P$ is then a *probability mass function* (PMF) which maps the event space to the set of real numbers in the interval between 0 and 1: $P: \Sigma \mapsto [0,1]$. I.e., the PMF assigns each event $\varsigma_i$ a probability of $0 \leq p_i \leq 1$ with $\sum_{i=1}^{n} p(\varsigma_i) = 1$. The PMF also fulfills the condition $P(\Omega) = 1$. ## Monetary Prospects as Random Variables We can define a random variable on the probability space of a prospect by defining a function that maps the sample space to a measurable space: $X: \Omega \mapsto E$, where $E = \mathbb{R}$. Hence, every subset of $E$ has a preimage in $\Sigma$ and can be assigned a probability. In choice problems, where agents are asked to make a decision between $n$ monetary prospects, the mapping $\Omega \mapsto E$ is often implicit since all elements of $\Omega$ are real numbered (monetary gains or losses) and usually equal to the elements in $\Sigma$. ## Sampling in Decisions from Experience (DFE) In DFE [@hertwigDecisionsExperienceEffect2004], where no summary description of prospects' probability spaces are provided, agents can either first explore them before arriving to a final choice (*sampling paradigm*), or, exploration and exploitation occur simultaneously (*partial-* or *full-feedback paradigm*) [cf. @hertwigDescriptionExperienceGap2009]. Below, only the sampling paradigm is considered. In the context of choice problems between monetary gambles, we define a *single sample* as an outcome obtained when randomly drawing from a prospect's sample space $\Omega$. Technically, a single sample is thus the realization of a discrete random variable $X$, which fulfills the conditions outlined above. In general terms, we define a *sampling strategy* as a systematic approach to generate a sequence of single samples from a choice problem's prospects as a means of exploring their probability spaces. Single samples that are generated from the same prospect reflect a sequence of realizations of random variables that are independent and identically distributed. ### Sampling Strategies and Sample Integration ...  linushof committed Jul 02, 2021 72   linushof committed Aug 02, 2021 73 74 # Method  linushof committed Aug 04, 2021 75 ## Test set  linushof committed Jul 02, 2021 76   linushof committed Aug 31, 2021 77 78 79 80 81 82 83 84 85 Under each condition, i.e., strategy-parameter combinations, all gambles are played by 100 synthetic agents. We test a set of gambles, in which one of the prospects contains a safe outcome and the other two risky outcomes (*safe-risky gambles*). Therefore, 60 gambles from an initial set of 10,000 are sampled. Both outcomes and probabilities are drawn from uniform distributions, ranging from 0 to 20 for outcomes and from .01 to .99 for probabilities of the lower risky outcomes $p_{low}$. The probabilities of the higher risky outcomes are $1-p_{low}$, respectively. To omit dominant prospects, safe outcomes fall between both risky outcomes. The table below contains the test set of 60 gambles. Sampling of gambles was stratified, randomly drawing an equal number of 20 gambles with no, an attractive, and an unattractive rare outcome. Risky outcomes are considered *"rare"* if their probability is $p < .2$ and *"attractive"* (*"unattractive"*) if they are higher (lower) than the safe outcome.  linushof committed Jul 02, 2021 86   linushof committed Aug 16, 2021 87 88 89 {r message=FALSE} gambles <- read_csv("data/gambles/sr_subset.csv") gambles %>% kable()  linushof committed Jul 02, 2021 90 91   linushof committed Aug 02, 2021 92 ## Model Parameters  linushof committed Jul 02, 2021 93   linushof committed Aug 31, 2021 94 **Switching probability** $s$ is the probability with which agents draw the following single sample from the prospect they did not get their most recent single sample from.  linushof committed Aug 13, 2021 95 $s$ is varied between .1 to 1 in increments of .1.  linushof committed Jul 01, 2021 96   linushof committed Aug 31, 2021 97 The **boundary type** is either the minimum value any prospect's sample statistic must reach (absolute) or the minimum value for the difference of these statistics (relative).  linushof committed Aug 02, 2021 98 Sample statistics are sums over outcomes (comprehensive strategy) and sums over wins (piecewise strategy), respectively.  linushof committed Jul 01, 2021 99   linushof committed Aug 13, 2021 100 101 For comprehensive integration, the **boundary value** $a$ is varied between 15 to 75 in increments of 15. For piecewise integration $a$ is varied between 1 to 5 in increments of 1.  linushof committed Jul 01, 2021 102   linushof committed Aug 16, 2021 103 {r message=FALSE}  linushof committed Jul 27, 2021 104 105 106 107 108 109 110 111 # read choice data cols <- list(.default = col_double(), strategy = col_factor(), boundary = col_factor(), gamble = col_factor(), rare = col_factor(), agent = col_factor(), choice = col_factor())  linushof committed Aug 16, 2021 112 choices <- read_csv("data/choices/choices.csv", col_types = cols)  113 114   linushof committed Aug 16, 2021 115 In sum, 2 (strategies) x 60 (gambles) x 100 (agents) x 100 (parameter combinations) = r nrow(choices) choices are simulated.  linushof committed Jul 20, 2021 116   linushof committed Aug 16, 2021 117 # Results  118   linushof committed Aug 31, 2021 119 120 Because we are not interested in deviations from normative choice due to sampling artifacts (e.g., ceiling effects produced by low boundaries), we remove trials in which only one prospect was attended. In addition, we use relative frequencies of sampled outcomes rather than 'a priori' probabilities to compare actual against normative choice behavior.  121 122  {r}  linushof committed Aug 16, 2021 123 124 125 # remove choices where prospects were not attended choices <- choices %>% filter(!(is.na(a_ev_exp) | is.na(b_ev_exp)))  126 127   linushof committed Aug 16, 2021 128 129 130 131 132 {r eval = FALSE} # remove choices where not all outcomes were sampled choices <- choices %>% filter(!(is.na(a_ev_exp) | is.na(b_ev_exp) | a_p1_exp == 0 | a_p2_exp == 0))   linushof committed Jul 20, 2021 133   linushof committed Aug 31, 2021 134 Removing the respective trials, we are left with r nrow(choices) choices.  linushof committed Jul 20, 2021 135   linushof committed Aug 16, 2021 136 ## Sample Size  linushof committed Jul 20, 2021 137   linushof committed Aug 16, 2021 138 139 140 141 142 143 {r message=FALSE} samples <- choices %>% group_by(strategy, s, boundary, a) %>% summarise(n_med = median(n_sample)) samples_piecewise <- samples %>% filter(strategy == "piecewise") samples_comprehensive <- samples %>% filter(strategy == "comprehensive")  144 145   linushof committed Aug 16, 2021 146 The median sample sizes generated by different parameter combinations ranged from r min(samples_piecewise$n_med) to r max(samples_piecewise$n_med) for piecewise integration and r min(samples_comprehensive$n_med) to r max(samples_comprehensive$n_med) for comprehensive integration.  linushof committed Jul 27, 2021 147   linushof committed Aug 16, 2021 148 ### Boundary type and boundary value (a)  149   linushof committed Aug 31, 2021 150 As evidence is accumulated sequentially, relative boundaries and large boundary values naturally lead to larger sample sizes, irrespective of the integration strategy.  linushof committed Jul 20, 2021 151   linushof committed Aug 16, 2021 152 153 {r message=FALSE} group_med <- samples_piecewise %>%  linushof committed Jul 20, 2021 154  group_by(boundary, a) %>%  linushof committed Aug 16, 2021 155  summarise(group_med = median(n_med)) # to get the median across all s values  linushof committed Jul 20, 2021 156   linushof committed Aug 16, 2021 157 158 samples_piecewise %>% ggplot(aes(a, n_med, color = a)) +  linushof committed Jul 20, 2021 159  geom_jitter(alpha = .5, size = 2) +  linushof committed Aug 16, 2021 160 161 162  geom_point(data = group_med, aes(y = group_med), size = 3) + facet_wrap(~boundary) + scale_color_viridis() +  linushof committed Jul 27, 2021 163  labs(title = "Piecewise Integration",  linushof committed Aug 16, 2021 164  x ="a",  linushof committed Jul 20, 2021 165  y="Sample Size",  linushof committed Aug 16, 2021 166  col="a") +  linushof committed Jul 20, 2021 167  theme_minimal()  linushof committed Aug 16, 2021 168   linushof committed Jul 20, 2021 169   linushof committed Aug 16, 2021 170 171 {r message=FALSE} group_med <- samples_comprehensive %>%  linushof committed Jul 20, 2021 172  group_by(boundary, a) %>%  linushof committed Aug 16, 2021 173  summarise(group_med = median(n_med))  linushof committed Jul 20, 2021 174   linushof committed Aug 16, 2021 175 176 samples_comprehensive %>% ggplot(aes(a, n_med, color = a)) +  linushof committed Jul 20, 2021 177  geom_jitter(alpha = .5, size = 2) +  linushof committed Aug 16, 2021 178 179 180  geom_point(data = group_med, aes(y = group_med), size = 3) + facet_wrap(~boundary) + scale_color_viridis() +  linushof committed Jul 27, 2021 181  labs(title = "Comprehensive Integration",  linushof committed Aug 16, 2021 182  x ="a",  linushof committed Jul 20, 2021 183  y="Sample Size",  linushof committed Aug 16, 2021 184  col="a") +  linushof committed Jul 20, 2021 185  theme_minimal()  186 187   linushof committed Aug 16, 2021 188 ### Switching probability (s)  linushof committed Jul 27, 2021 189   linushof committed Aug 31, 2021 190 191 192 For piecewise integration, there is an inverse relationship between switching probability and sample size. I.e., the lower s, the less frequent prospects are compared and thus, boundaries are only approached with larger sample sizes. This effect is particularly pronounced for low probabilities such that the increase in sample size accelerates as switching probability decreases.  linushof committed Jul 20, 2021 193   linushof committed Aug 16, 2021 194 195 {r message=FALSE} group_med <- samples_piecewise %>%  linushof committed Jul 20, 2021 196  group_by(boundary, s) %>%  linushof committed Aug 16, 2021 197  summarise(group_med = median(n_med)) # to get the median across all a values  linushof committed Jul 20, 2021 198   linushof committed Aug 16, 2021 199 200 201 202 203 204 samples_piecewise %>% ggplot(aes(s, n_med, color = s)) + geom_jitter(alpha = .5, size = 2) + geom_point(data = group_med, aes(y = group_med), size = 3) + facet_wrap(~boundary) + scale_color_viridis() +  linushof committed Jul 27, 2021 205  labs(title = "Piecewise Integration",  linushof committed Aug 16, 2021 206  x ="s",  linushof committed Jul 20, 2021 207  y="Sample Size",  linushof committed Aug 16, 2021 208  col="s") +  linushof committed Jul 20, 2021 209 210 211  theme_minimal()   linushof committed Aug 31, 2021 212 213 214 For comprehensive integration, boundary types differ in the effects of switching probability. For absolute boundaries, switching probability has no apparent effect on sample size as the distance of a given prospect to its absolute boundary is not changed by switching to (and sampling from) the other prospect. For relative boundaries, however, samples sizes increase with switching probability.  linushof committed Jul 20, 2021 215   linushof committed Aug 16, 2021 216 217 {r message=FALSE} group_med <- samples_comprehensive %>%  linushof committed Jul 20, 2021 218  group_by(boundary, s) %>%  linushof committed Aug 16, 2021 219  summarise(group_med = median(n_med)) # to get the median across all a values  linushof committed Jul 20, 2021 220   linushof committed Aug 16, 2021 221 222 223 224 225 226 samples_comprehensive %>% ggplot(aes(s, n_med, color = s)) + geom_jitter(alpha = .5, size = 2) + geom_point(data = group_med, aes(y = group_med), size = 3) + facet_wrap(~boundary) + scale_color_viridis() +  linushof committed Jul 27, 2021 227  labs(title = "Comprehensive Integration",  linushof committed Aug 16, 2021 228 229 230  x ="s", y = "Sample Size", col="s") +  linushof committed Jul 20, 2021 231 232 233  theme_minimal()   linushof committed Aug 02, 2021 234 ## Choice Behavior  linushof committed Jul 20, 2021 235   linushof committed Aug 31, 2021 236 Below, in extension to Hills and Hertwig [-@hillsInformationSearchDecisions2010], the interplay of integration strategies, gamble features, and model parameters in their effects on choice behavior in general and their contribution to underweighting of rare events in particular is investigated.  linushof committed Aug 16, 2021 237 238 239 240 241 242 243 244 245 246 247 248 We apply two definitions of underweighting of rare events: Considering false response rates, we define underweighting such that the rarity of an attractive (unattractive) outcome leads to choose the safe (risky) prospect although the risky (safe) prospect has a higher expected value. {r message=FALSE} fr_rates <- choices %>% mutate(ev_ratio_exp = round(a_ev_exp/b_ev_exp, 2), norm = case_when(ev_ratio_exp > 1 ~ "A", ev_ratio_exp < 1 ~ "B")) %>% filter(!is.na(norm)) %>% # exclude trials with normative indifferent options group_by(strategy, s, boundary, a, rare, norm, choice) %>% # group correct and incorrect responses summarise(n = n()) %>% # absolute numbers mutate(rate = round(n/sum(n), 2), # response rates type = case_when(norm == "A" & choice == "B" ~ "false safe", norm == "B" & choice == "A" ~ "false risky")) %>% filter(!is.na(type)) # remove correct responses  linushof committed Jul 20, 2021 249 250   linushof committed Aug 31, 2021 251 Considering the parameters of Prelec's [-@prelecProbabilityWeightingFunction1998] implementation of the weighting function [CPT; cf. @tverskyAdvancesProspectTheory1992], underweighting is reflected by decisions weights estimated to be smaller than the corresponding objective probabilities.  linushof committed Jul 20, 2021 252   linushof committed Aug 16, 2021 253 ### False Response Rates  linushof committed Jul 20, 2021 254   linushof committed Aug 16, 2021 255 256 257 {r message=FALSE} fr_rates_piecewise <- fr_rates %>% filter(strategy == "piecewise") fr_rates_comprehensive <- fr_rates %>% filter(strategy == "comprehensive")  linushof committed Jul 20, 2021 258   259   linushof committed Aug 31, 2021 260 The false response rates generated by different parameter combinations ranged from r min(fr_rates_piecewise$rate) to r max(fr_rates_piecewise$rate) for piecewise integration and from r min(fr_rates_comprehensive$rate) to r max(fr_rates_comprehensive$rate) for comprehensive integration.  linushof committed Aug 16, 2021 261 However, false response rates vary considerably as a function of rare events, indicating that their presence and attractiveness are large determinants of false response rates.  linushof committed Jul 20, 2021 262   linushof committed Aug 16, 2021 263 264 265 266 267 268 {r message=FALSE} fr_rates %>% group_by(strategy, boundary, rare) %>% summarise(min = min(rate), max = max(rate)) %>% kable()  linushof committed Jul 20, 2021 269 270   linushof committed Aug 31, 2021 271 The heatmaps below show the false response rates for all strategy-parameter combinations.  linushof committed Aug 16, 2021 272 273 Consistent with our - somewhat rough - definition of underweighting, the rate of false risky responses is generally higher, if the unattractive outcome of the risky prospect is rare (top panel). Conversely, if the attractive outcome of the risky prospect is rare, the rate of false safe responses is generally higher (bottom panel).  linushof committed Aug 31, 2021 274 As indicated by the larger range of false response rates, the effects of rare events are considerably larger for piecewise integration.  275   linushof committed Aug 16, 2021 276 277 278 279 280 281 282 283 284 285 286 287 288 289 {r message=FALSE} fr_rates %>% filter(strategy == "piecewise", boundary == "absolute") %>% ggplot(aes(a, s, fill = rate)) + facet_grid(type ~ fct_relevel(rare, "attractive", "none", "unattractive"), switch = "y") + geom_tile(colour="white", size=0.25) + scale_x_continuous(expand=c(0,0), breaks = seq(1, 5, 1)) + scale_y_continuous(expand=c(0,0), breaks = seq(.1, 1, .1)) + scale_fill_viridis() + labs(title = "Piecewise Integration | Absolute Boundary", x = "a", y= "s", fill = "% False Responses") + theme_minimal()  290 291   linushof committed Aug 16, 2021 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 {r message=FALSE} fr_rates %>% filter(strategy == "piecewise", boundary == "relative") %>% ggplot(aes(a, s, fill = rate)) + facet_grid(type ~ fct_relevel(rare, "attractive", "none", "unattractive"), switch = "y") + geom_tile(colour="white", size=0.25) + scale_x_continuous(expand=c(0,0), breaks = seq(1, 5, 1)) + scale_y_continuous(expand=c(0,0), breaks = seq(.1, 1, .1)) + scale_fill_viridis() + labs(title = "Piecewise Integration | Relative Boundary", x = "a", y= "s", fill = "% False Responses") + theme_minimal()   linushof committed Jul 20, 2021 307   linushof committed Aug 16, 2021 308 309 {r message=FALSE} fr_rates %>%  linushof committed Jul 20, 2021 310  filter(strategy == "comprehensive", boundary == "absolute") %>%  linushof committed Aug 16, 2021 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325  ggplot(aes(a, s, fill = rate)) + facet_grid(type ~ fct_relevel(rare, "attractive", "none", "unattractive"), switch = "y") + geom_tile(colour="white", size=0.25) + scale_x_continuous(expand=c(0,0), breaks = seq(15, 75, 15)) + scale_y_continuous(expand=c(0,0), breaks = seq(.1, 1, .1)) + scale_fill_viridis() + labs(title = "Comprehensive Integration | Absolute Boundary", x = "a", y= "s", fill = "% False Responses") + theme_minimal()  {r message=FALSE} fr_rates %>%  linushof committed Jul 20, 2021 326  filter(strategy == "comprehensive", boundary == "relative") %>%  linushof committed Aug 16, 2021 327 328 329 330 331 332 333 334 335 336 337  ggplot(aes(a, s, fill = rate)) + facet_grid(type ~ fct_relevel(rare, "attractive", "none", "unattractive"), switch = "y") + geom_tile(colour="white", size=0.25) + scale_x_continuous(expand=c(0,0), breaks = seq(15, 75, 15)) + scale_y_continuous(expand=c(0,0), breaks = seq(.1, 1, .1)) + scale_fill_viridis() + labs(title = "Comprehensive Integration | Relative Boundary", x = "a", y= "s", fill = "% False Responses") + theme_minimal()  338 339   linushof committed Aug 16, 2021 340 #### Switching Probability (s) and Boundary Value (a)  linushof committed Jul 20, 2021 341   linushof committed Aug 31, 2021 342 As for both piecewise and comprehensive integration the differences between boundary types are rather minor and of magnitude than of qualitative pattern, the remaining analyses of false response rates are summarized across absolute and relative boundaries.  linushof committed Jul 20, 2021 343   linushof committed Aug 16, 2021 344 Below, the $s$ and $a$ parameter are considered as additional sources of variation in the false response pattern above and beyond the interplay of integration strategies and the rarity and attractiveness of outcomes.  linushof committed Jul 20, 2021 345   linushof committed Aug 16, 2021 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 {r message=FALSE} fr_rates %>% filter(strategy == "piecewise") %>% ggplot(aes(s, rate, color = a)) + facet_grid(type ~ fct_relevel(rare, "attractive", "none", "unattractive"), switch = "y") + geom_jitter(size = 2) + scale_x_continuous(breaks = seq(0, 1, .1)) + scale_y_continuous(breaks = seq(0, 1, .1)) + scale_color_viridis() + labs(title = "Piecewise Integration", x = "s", y= "% False Responses", color = "a") + theme_minimal()   361   linushof committed Aug 16, 2021 362 363 {r message=FALSE} fr_rates %>%  linushof committed Jul 20, 2021 364  filter(strategy == "comprehensive") %>%  linushof committed Aug 16, 2021 365 366 367 368 369 370  ggplot(aes(s, rate, color = a)) + facet_grid(type ~ fct_relevel(rare, "attractive", "none", "unattractive"), switch = "y") + geom_jitter(size = 2) + scale_x_continuous(breaks = seq(0, 1, .1)) + scale_y_continuous(breaks = seq(0, 1, .1)) + scale_color_viridis() +  linushof committed Jul 27, 2021 371  labs(title = "Comprehensive Integration",  linushof committed Aug 16, 2021 372 373 374 375  x = "s", y= "% False Responses", color = "a") + theme_minimal()  376 377   linushof committed Aug 31, 2021 378 For piecewise integration, switching probability is naturally related to the size of the samples on which the round-wise comparisons of prospects are based on, with low values of $s$ indicating large samples and vice versa.  linushof committed Aug 16, 2021 379 Accordingly, switching probability is positively related to false response rates.  linushof committed Aug 31, 2021 380 381 I.e., the larger the switching probability, the smaller the round-wise sample size and the probability of experiencing a rare event within a given round. Because round-wise comparisons are independent of each other and binomial distributions within a given round are skewed for small samples and outcome probabilities [@kolmogorovFoundationsTheoryProbability1950], increasing boundary values do not reverse but rather amplify this relation.  382   linushof committed Aug 31, 2021 383 384 385 For comprehensive integration, switching probability is negatively related to false response rates, i.e., an increase in $s$ is associated with decreasing false response rates. This relation, however, may be the result of an artificial interaction between the $s$ and $a$ parameter. Precisely, in the current algorithmic implementation of sampling with a comprehensive integration mechanism, decreasing switching probabilities cause comparisons of prospects based on increasingly unequal sample sizes immediately after switching prospects.  linushof committed Aug 16, 2021 386 Consequentially, reaching (low) boundaries is rather a function of switching probability and associated sample sizes than of actual evidence for a given prospect over the other.  387   linushof committed Aug 31, 2021 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 ### Cumulative Prospect Theory In the following, we examine the possible relations between the parameters of the *choice-generating* sampling models and the *choice-describing* cumulative prospect theory. For each distinct strategy-parameter combination, we ran 20 chains of 40,000 iterations each, after a warm-up period of 1000 samples. To reduce potential autocorrelation during the sampling process, we only kept every 20th sample (thinning). {r} # read CPT data cols <- list(.default = col_double(), strategy = col_factor(), boundary = col_factor(), parameter = col_factor()) estimates <- read_csv("data/estimates/estimates_cpt_pooled.csv", col_types = cols)  #### Convergence {r} gel_92 <- max(estimates$Rhat) # get largest scale reduction factor (Gelman & Rubin, 1992)  The potential scale reduction factor$\hat{R}$was$n \leq\$ r round(gel_92, 3) for all estimates, indicating good convergence. #### Piecewise Integration {r} # generate subset of all strategy-parameter combinations (rows) and their parameters (columns) curves_cpt <- estimates %>% select(strategy, s, boundary, a, parameter, mean) %>% pivot_wider(names_from = parameter, values_from = mean)  ##### Weighting function w(p) We start by plotting the weighting curves for all parameter combinations under piecewise integration. {r} cpt_curves_piecewise <- curves_cpt %>% filter(strategy == "piecewise") %>% expand_grid(p = seq(0, 1, .1)) %>% # add vector of objective probabilities mutate(w = round(exp(-delta*(-log(p))^gamma), 2)) # compute decision weights (cf. Prelec, 1998) # all strategy-parameter combinations cpt_curves_piecewise %>% ggplot(aes(p, w)) + geom_path(size = .5) + geom_abline(intercept = 0, slope = 1, color = "red", size = 1) + labs(title = "Piecewise Integration: Weighting functions", x = "p", y= "w(p)") + theme_minimal()  Similarly to the false response rates, the patterns of the weighting function do not differ for the boundary types. {r} cpt_curves_piecewise %>% ggplot(aes(p, w)) + geom_path(size = .5) + geom_abline(intercept = 0, slope = 1, color = "red", size = 1) + facet_wrap(~boundary) labs(title = "Piecewise Integration: Weighting functions", x = "p", y= "w(p)") + theme_minimal()  Regarding the boundary value, we observe a distinct pattern for the smallest boundary, i.e. a = 1. {r} cpt_curves_piecewise %>% ggplot(aes(p, w)) + geom_path(size = .5) + geom_abline(intercept = 0, slope = 1, color = "red", size = 1) + labs(title = "Piecewise Integration: Weighting functions", x = "p", y= "w(p)") + facet_wrap(~a) + theme_minimal()  As a general trend we find that with decreasing switching probabilities, probability weighting becomes more linear. {r} cpt_curves_piecewise %>% ggplot(aes(p, w, color = s)) + geom_path() + geom_abline(intercept = 0, slope = 1, color = "red", size = 1) + labs(title = "Piecewise Integration: Weighting functions", x = "p", y= "w(p)", color = "Switching Probability") + scale_color_viridis() + theme_minimal()  This trend holds for different boundary values. {r} cpt_curves_piecewise %>% ggplot(aes(p, w, color = s)) + geom_path() + geom_abline(intercept = 0, slope = 1, color = "red", size = 1) + facet_wrap(~a) + labs(title = "Piecewise Integration: Weighting functions", x = "p", y= "w(p)", color = "Switching Probability") + scale_color_viridis() + theme_minimal()  ##### Value function v(x) {r} cpt_curves_piecewise <- curves_cpt %>% filter(strategy == "piecewise") %>% expand_grid(x = seq(0, 20, 2)) %>% # add vector of objective outcomes mutate(v = round(x^alpha, 2)) # compute decision weights (cf. Prelec, 1998) # all strategy-parameter combinations cpt_curves_piecewise %>% ggplot(aes(x, v)) + geom_path(size = .5) + geom_abline(intercept = 0, slope = 1, color = "red", size = 1) + labs(title = "Piecewise Integration: Value functions", x = "p", y= "w(p)") + theme_minimal()  {r} cpt_curves_piecewise %>% ggplot(aes(x, v)) + geom_path(size = .5) + geom_abline(intercept = 0, slope = 1, color = "red", size = 1) + facet_wrap(~boundary) + labs(title = "Piecewise Integration: Value functions", x = "p", y= "w(p)") + theme_minimal()  {r} cpt_curves_piecewise %>% ggplot(aes(x, v)) + geom_path(size = .5) + geom_abline(intercept = 0, slope = 1, color = "red", size = 1) + facet_wrap(~a) + labs(title = "Piecewise Integration: Value functions", x = "p", y= "w(p)") + theme_minimal()  {r} cpt_curves_piecewise %>% ggplot(aes(x, v, color = s)) + geom_path(size = .5) + geom_abline(intercept = 0, slope = 1, color = "red", size = 1) + labs(title = "Piecewise Integration: Value functions", x = "p", y= "w(p)") + scale_color_viridis() + theme_minimal()  {r} cpt_curves_piecewise %>% ggplot(aes(x, v, color = s)) + geom_path(size = .5) + geom_abline(intercept = 0, slope = 1, color = "red", size = 1) + facet_wrap(~a) + labs(title = "Piecewise Integration: Value functions", x = "p", y= "w(p)") + scale_color_viridis() + theme_minimal()  #### Comprehensive Integration ##### Weighting function w(p) We start by plotting the weighting curves for all parameter combinations under piecewise integration.  linushof committed Jul 20, 2021 578   linushof committed Aug 31, 2021 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 {r} cpt_curves_comprehensive <- curves_cpt %>% filter(strategy == "comprehensive") %>% expand_grid(p = seq(0, 1, .1)) %>% # add vector of objective probabilities mutate(w = round(exp(-delta*(-log(p))^gamma), 2)) # compute decision weights (cf. Prelec, 1998) # all strategy-parameter combinations cpt_curves_comprehensive %>% ggplot(aes(p, w)) + geom_path(size = .5) + geom_abline(intercept = 0, slope = 1, color = "red", size = 1) + labs(title = "Comprehensive Integration: Weighting functions", x = "p", y= "w(p)") + theme_minimal()  {r} cpt_curves_comprehensive %>% ggplot(aes(p, w)) + geom_path(size = .5) + geom_abline(intercept = 0, slope = 1, color = "red", size = 1) + facet_wrap(~boundary) labs(title = "Comprehensive Integration: Weighting functions", x = "p", y= "w(p)") + theme_minimal()  {r} cpt_curves_comprehensive %>% ggplot(aes(p, w)) + geom_path(size = .5) + geom_abline(intercept = 0, slope = 1, color = "red", size = 1) + labs(title = "Comprehensive Integration: Weighting functions", x = "p", y= "w(p)") + facet_wrap(~a) + theme_minimal()  {r} cpt_curves_comprehensive %>% ggplot(aes(p, w, color = s)) + geom_path() + geom_abline(intercept = 0, slope = 1, color = "red", size = 1) + labs(title = "Comprehensive Integration: Weighting functions", x = "p", y= "w(p)", color = "Switching Probability") + scale_color_viridis() + theme_minimal()  {r} cpt_curves_comprehensive %>% ggplot(aes(p, w, color = s)) + geom_path() + geom_abline(intercept = 0, slope = 1, color = "red", size = 1) + facet_wrap(~a) + labs(title = "Comprehensive Integration: Weighting functions", x = "p", y= "w(p)", color = "Switching Probability") + scale_color_viridis() + theme_minimal()  ##### Value function v(x) {r} cpt_curves_comprehensive <- curves_cpt %>% filter(strategy == "comprehensive") %>% expand_grid(x = seq(0, 20, 2)) %>% # add vector of objective outcomes mutate(v = round(x^alpha, 2)) # compute decision weights (cf. Prelec, 1998) # all strategy-parameter combinations cpt_curves_comprehensive %>% ggplot(aes(x, v)) + geom_path(size = .5) + geom_abline(intercept = 0, slope = 1, color = "red", size = 1) + labs(title = "Comprehensive Integration: Value functions", x = "p", y= "w(p)") + theme_minimal()  {r} cpt_curves_comprehensive %>% ggplot(aes(x, v)) + geom_path(size = .5) + geom_abline(intercept = 0, slope = 1, color = "red", size = 1) + facet_wrap(~boundary) + labs(title = "Comprehensive Integration: Value functions", x = "p", y= "w(p)") + theme_minimal()  {r} cpt_curves_comprehensive %>% ggplot(aes(x, v)) + geom_path(size = .5) + geom_abline(intercept = 0, slope = 1, color = "red", size = 1) + facet_wrap(~a) + labs(title = "Comprehensive Integration: Value functions", x = "p", y= "w(p)") + theme_minimal()  {r} cpt_curves_comprehensive %>% ggplot(aes(x, v, color = s)) + geom_path(size = .5) + geom_abline(intercept = 0, slope = 1, color = "red", size = 1) + labs(title = "Comprehensive Integration: Value functions", x = "p", y= "w(p)") + scale_color_viridis() + theme_minimal()  {r} cpt_curves_comprehensive %>% ggplot(aes(x, v, color = s)) + geom_path(size = .5) + geom_abline(intercept = 0, slope = 1, color = "red", size = 1) + facet_wrap(~a) + labs(title = "Comprehensive Integration: Value functions", x = "p", y= "w(p)") + scale_color_viridis() + theme_minimal()   linushof committed Jul 20, 2021 719   linushof committed Aug 02, 2021 720 # References