Skip to content

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

@Matt-A-Johnson

Description

@Matt-A-Johnson

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions