Finding threshold for adaptive paradigm via psychometric function

So the math formula without the likelihood function would be

19%20PM

Hmmm, I took your advice and started small–without the lapse parameter or random effects, and I’m still getting an error.

Chain 1: Rejecting initial value:
Chain 1:   Log probability evaluates to log(0), i.e. negative infinity.
Chain 1:   Stan can't start sampling from this initial value.
[1] "Error in sampler$call_sampler(args_list[[i]]) : Initialization failed."

I found a page regarding this error: Rejecting initial value: Log probability evaluates to log(0), i.e. negative infinity. I tried different variations of code and samples from the dataset, but couldn’t get it to run.

Was this the full model you had in mind?

BF <- bf(
  response ~ inv_logit(guess) + (1 - inv_logit(guess)) * inv_logit((norm - threshold) / spread),
  threshold ~ 1, #+ (norm | pid) + (norm|condition), 
  spread~1,
  guess ~ 1, # + (1|pid) + (1|condition), #(1|p|pid) + (1|c|condition),
  family = bernoulli(link = "identity"), #(link = "probit") 
  nl = TRUE)    
  
priors <- c(
  prior(beta(7, 3), nlpar = "threshold"),
  prior(beta(1.4, 1.4), nlpar = "spread", lb = .005, ub = .5),
  #prior(beta(.5, 8), nlpar = "lapse", lb = 0, ub = .1),
  prior(beta(1, 5), nlpar = "guess", lb = 0, ub = .1)
)  

fit <- brm(
  BF,
  data = ace.threshold.t1.samp, #ace.threshold,
  inits = 0,
  control = list(adapt_delta = 0.99),
  prior = priors
)