Describe the bug
When the check_adapted call is run it tests for the number of accepted particles for each subject, however if every particle has been accepted it fails (returns a matrix full of 1's instead of a vector full of counts)
To Reproduce
Run adaptation on a not successfully burnt in object and this may happen. Gavin has a post_adapt.RData file that seems to exhibit this behaviour to work with.
Expected behavior
If > 20 new particles accepted (ie each particle is unique with > 20 iterations) then adaptation should succeed.
Additional context
original email from Andrew Heathcote:
Then the sapply(…,length) gives you the number of unique values, which works when the apply returns a list because the unique returns vectors of different lengths. However, in my case every sample is always unique so I get a matrix (i.e., all 100 iterations for every one of the 80 subjects, so I get 100 x 80 matrix back every time for each of my 19 parameters).
Hence, I dont understand the test as run_adapt terminated with a message saying I need to run more, whereas this test seems to indicate that I have many more than 20.
Describe the bug When the check_adapted call is run it tests for the number of accepted particles for each subject, however if every particle has been accepted it fails (returns a matrix full of 1's instead of a vector full of counts)
To Reproduce Run adaptation on a not successfully burnt in object and this may happen. Gavin has a post_adapt.RData file that seems to exhibit this behaviour to work with.
Expected behavior If > 20 new particles accepted (ie each particle is unique with > 20 iterations) then adaptation should succeed.
Additional context original email from Andrew Heathcote: