Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use_posterior() only works if the estimation is done with only one ID? #218

Open
Martin-Umpierrez opened this issue Mar 11, 2024 · 2 comments

Comments

@Martin-Umpierrez
Copy link

Dear Felicien,

I would like to inquire about the use_posterior() function. I've been attempting to run estimation and simulation cycles for multiple IDs simultaneously with multiple OCCs. Specifically, I aim to estimate ETAs for the first OCC, then simulate the second OCC using these estimated ETAs and compare them with the true values. When utilizing the mapbayest() function, I encounter no issues in estimating multiple ETAs for multiple IDs. However, trouble arises when I attempt to use the use_posterior() function to simulate with the estimated ETAs for each ID. This results in errors.

To troubleshoot, I removed all IDs and worked with just one, repeating the process. Surprisingly, the problem was resolved, indicating that the issue does not lie with the data or the model itself. I also tried mutiple models and data set

Is it not feasible to achieve what I described? If not, do you have any alternative suggestions?

Thank you.

@FelicienLL
Copy link
Owner

Hi Martin,
If you have n IDs, use_posterior() returns a list of n mrgsolve models, with the ETAs in $PARAM updated with the estimated values. Thus, you can simulate from each mrgsolve model. Would this explain your issue?
I agree this is suboptimal. Modifications in most recent versions of mrgsolve would enable to modify mapbayr so that multiple IDs would be handle as you expected, but I have not implemented that yet.

@Martin-Umpierrez
Copy link
Author

Felicien, thank you very much. I've managed to solve the problem I was having by splitting each of the models generated by use_posterior() and then assigning the corresponding treatment.
Thank you very much again, and I remain attentive to the mentioned update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants