When I run this command:
fit <- mod$sample(
data = ds,
seed = 123,
chains = 1,
refresh = 500,
adapt_delta = 0.975,
step_size = 0.1
I get this error message:
Error in lapply(X = X, FUN = FUN, ...) :
anyNA() applied to non-(list or vector) of type 'closure'
that isn’t very informative for me as it arises from somewhere within the CmdStanR method
Although @Jonah has very helpfully posted the coding for CmdStanR on Github [GitHub - stan-dev/cmdstanr: CmdStanR: the R interface to CmdStan], I can’t find the code for the
Can someone tell me where it is, please?
Maybe there should be checks for data types.
EDIT: Ari beat me to it :)
That function would be here: cmdstanr/model.R at master · stan-dev/cmdstanr · GitHub
Most arguments look good to me, the only think that could be causing issue is
ds. Is it a list?
Many thanks for such a quick response.
A good second place! I will try what you suggest. Thanks.