I'm working on a project where we need to fit data into some model. I've just started so I'm playing around with different models, but already experiencing "subscript out of bounds" error that I can't seem to fix. I know that it suggests that I'm trying to "access" data that is out of range, but I don't know where this issue originates from.
The code I'm trying to run:
listdata <- list(
  B = d$Brooklyn.Bridge,
  M = d$Manhattan.Bridge,
  W = d$Williamsburg.Bridge,
  Q = d$Queensboro.Bridge, 
  Temp = as.integer(d$High_Temp)
)
m.1 <- ulam(
       alist( total ~ dpois(lambda),
           lambda = exp(beta_B*B + beta_M*M + beta_W*W + beta_Q*Q + beta_temp*Temp + eps),
           beta_B ~ dnorm(0,10),
           beta_M ~ dnorm(0,10),
           beta_W ~ dnorm(0,10),
           beta_Q ~ dnorm(0,10),
           beta_temp ~ dnorm(0,10),
           eps ~ dnorm(0,10)), 
  data = listdata,
  chain = 2,
  iter = 2000,
  warmup = 1000
   )
output:
Error in flist[[symbol_lines[[i]]]][[3]] : subscript out of bounds
The error occurs when running m.1
Note: I'm a beginner in R and Bayesian statistics, but I want to improve on these skills. All feedback is helpful :)
