dmphillippo / multinma

Network meta-analysis of individual and aggregate data in Stan
https://dmphillippo.github.io/multinma
35 stars 16 forks source link

error in the example #3

Closed TasnimHamza closed 3 years ago

TasnimHamza commented 4 years ago

Hi David Plaque psoriasis example in multinma package does not work! I got this error when I fit the model:

Chain 4: empty_nested() must be true before calling recover_memory() [1] "Error in sampler$call_sampler(args_list[[i]]) : " [2] " empty_nested() must be true before calling recover_memory()" error occurred during calling the sampler; sampling not done here are whatever error messages were returned

I followed some instructions in google but it doesn't work. Could the problem be only on Mac?

Thanks for the help

All the best, Tasnim

dmphillippo commented 4 years ago

Hi Tasnim,

This is an error coming from Stan, I'm not sure it's a problem with this package. All the checks on Mac are passing on CRAN, and I don't have a Mac myself to test locally.

Which version of Mac OS are you running? And which version of R?

From what I can see, similar issues might be fixed by updating to the latest version of R.

Thanks, David

TasnimHamza commented 4 years ago

Thank you for your reply David

I have a version R 3.6.1 but when I update it to R 3.6.3, I encounter many errors too!

I don't think the problem in Mac though - I have tried with another computer and I got errors too

I thought the problem is not in Stan because your first example (smoking) worked and I assumed in the nma() function you used Stan for this example, don't you? So probably the problem is in the function add_integration?

Best, Tasnim

dmphillippo commented 3 years ago

The latest R version is 4.0.3, however I understand that you might not want to upgrade right away (re-installing packages etc!).

How did you install the multinma package - source or binary? I see that some rstanarm users are having the same errors on R 3.6. If you have a working install of rstan (following the instructions here) you could try installing from source: install.packages("multinma", type = "source").

The error empty_nested() must be true before calling recover_memory() is coming from Stan, so happens when you call nma(). It might only happen for certain types of models (since different models call different code).

If you are getting other errors, can you open a new issue with the details (including the output from sessionInfo())?

TasnimHamza commented 3 years ago

Problem solved =)

Install the package from the source is the solution whereas upgrading R is not necessary in my case - I used R version 3.6.1

Thanks a lot for the help

dmphillippo commented 3 years ago

Great news, thanks Tasnim!