Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alt_delta() returning similar parameter estimates for all participants #166

Open
Matt-A-Johnson opened this issue Oct 30, 2024 · 1 comment

Comments

@Matt-A-Johnson
Copy link

When using alt_delta() in r I keep getting virtually the same parameter estimates for each participant. I thought alt_delta() should return separate parameter estimates for each participant? I have run the same data through other Rescorla Wagner (RW) models (outside of hBayesDM), and I can see that the values are different for each participant. It is probably me being dim, but why might alt_delta() be returning similar estimates for each participant? Specifically, alt_delta() returns alpha approx. 0.5 for each participant. Any help/advice on this is greatly appreciated- thanks.

Pilot_LM_Data.csv

#Create data frame to house necessary variables:
data_STO <- read.csv("Pilot_LM_Data.csv") %>%
  filter(blockname == "STO") %>%
  select(subjID = subject,
          choice = response,
          outcome = feedback,
          bluePunish = feedback,
          orangePunish = feedback) %>%
  mutate(
    choice = ifelse(choice == 18, 1, 2),
    outcome = ifelse(outcome == 1, 0, 1),
    bluePunish = ifelse(outcome == 0, -1, 1),
    orangePunish = ifelse(outcome == 0, -1, 1)
  )

#Fit learning model:
LR_STO <- alt_delta(
  data = data_STO,
  niter = 4000,
  nwarmup = 1000,
  nchain = 4,
  ncore = 4,
  nthin = 1,
  inits = "vb",
  indPars = "mean",
  modelRegressor = FALSE,
  vb = FALSE,
  inc_postpred = FALSE,
  adapt_delta = 0.95,
  stepsize = 1,
  max_treedepth = 10
)

#Print parameter estimates for each participant:
LR_STO$allIndPars
@lehlsy0904
Copy link
Contributor

Hello,

Thanks for providing all the details. The issue you’re experiencing with alt_delta() returning similar parameter estimates for each participant could be due to shrinkage effect, a common feature in hierarchical Bayesian modeling. In hierarchical models, individual parameter estimates are “pulled” toward the group-level mean, especially when there is limited variability in the data or when participant-level data is sparse. This shrinkage is a useful property for stabilizing estimates but can sometimes mask individual differences if the effect is too strong.

To further investigate, you might try fitting other models in hBayesDM (e.g., bandit2arm_delta, prl_fictitious_rp), which are also designed for two-armed bandit tasks. Testing these alternative models can help you determine whether similar results occur across different models or are specific to alt_delta().

Please feel free to reach out if you have additional questions or need further assistance.

Best,
Eunhwi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants