Closed CarloCocozza closed 1 year ago
@CarloCocozza @arunge:
I looked into it and it because the 10 and 11th user estimates state "herbivore" instead of "herbivores". The translatePriors()-function produces NA's then. @arunge: one could catch the NA's and post a warning and filter them out or post an error
@CarloCocozza @arunge:
I looked into it and it because the 10 and 11th user estimates state "herbivore" instead of "herbivores". The translatePriors()-function produces NA's then. @arunge: one could catch the NA's and post a warning and filter them out or post an error
My bad! Thank you!
@mgross First, thanks for the helpful input to identify the source of the problem!
However, when removing the NA value(s) the model seems to run, but in the end there is another error:
So, this is not all that must be done here. Could you help to catch the problem: https://github.com/Pandora-IsoMemo/resources/pull/101/files ?
Additionally, creating a meaningful warning is not that simple. Currently, I can only tell that there was a NA
and that I removed it.
However, is there a chance to identify which of the priors caused the problem?
grep(x = templateEvaluated, pattern = "NA")
only tells me the line of the NA, which is 215
with the data from above. Is it possible to get the respective prior from that?
There are several values that are used to create templateFilled
.
templateFilled <- tmpl(nimbleTemplate,
likelihood = likelihood,
priorAlpha = priorAlpha,
combineSources = combineSources,
priorSources = priorSources,
priorSourceOffsets = priorSourceOffsets,
priorOffsets = priorOffsets,
priorConcentrations = priorConcentrations,
priorWeights = priorWeights,
userDefinedPriors = userDefinedPriors,
userDefinedEstimates = userDefinedEstimates
)
How is the creation of the template working, where does line 215
come from?
@arunge: the NA's happen in the translatePriors() function, when you userDefinedPriors are generated. Will look into the rest when I have time
@arunge: When removing both user estimates in the app, the model runs for me; so maybe a glitch?
For a potential fix,see :https://github.com/Pandora-IsoMemo/resources/pull/103
With version 23.07.1 on Resources main and on beta we catch the case when prior names are not found or do mismatch with an error message. This should help to identify and avoid inconsistencies in prior names.
2023-08-28_16_48_18_fruitsModel.zip
For the attached model, the attached error message appears when user estimates are included.
@arunge