-
Dear All, I am struggling with some translation from my NONMEM models to mrgsolve models. I have used $NMEXT to import THETA, OMEGA and SIGMA estimates easily and also read the guide to write [PARAM] block. But, struggling with other blocks. Is there a complete example of translating a complete NONMEM control stream to mrgsolve model? or a video or something? I appreciate any help. Best regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @mike2g - Thanks for your interest in mrgsolve. I can help with some translation examples. One thing to know is that there are a couple of different ways you can code the model. The historical pattern is a little like NONMEM, but different in several important ways. We introduced these differences when we started mrgsolve to make models easier to read, decrease the amount of compartment indexing (e.g. There is a NONMEM-like model model coded into mrgsolve along with a nonmem control stream that would let you look at a simple model that you might fit in NONMEM and the corresponding mrgsolve code. You can load the model with library(mrgsolve)
mod <- modlib("nm-like") to look at the model code run see(mod) or you can extract the code with mod@code There is a corresponding control stream, also inside the package, that you can get to with file.show(system.file("nonmem", "1005", "1005.ctl", package = "mrgsolve")) Running that command should open up a file called 1005.ctl and that contains the equivalent control stream. Note that the mrgsolve model is the NONMEM-style coding ... containing the extra syntax to make the model look more like NONMEM. You can see some examples of some population models that don't have the new-ish NONMEM-like syntax here: These are some models that I coded from the literature. Some of them were translated from control streams that I got from DDMoRe. The basic features of the models should be familiar, but they are all implemented in mrgsolve syntax. That might be a good place to start. I will post again with some links to other examples that might be more helpful. For now, be sure to check out the model specification portion of the user guide This is a bit of a firehose, but should be a helpful reference for the different code blocks. There is an intro to mrgsolve slide deck here: If you click on And of course, you are welcome to post here if / when you run into trouble with your model. We like to answer questions and get people up and running and productive with mrgsolve. I hope this helps. Kyle |
Beta Was this translation helpful? Give feedback.
Hi @mike2g -
Thanks for your interest in mrgsolve. I can help with some translation examples.
One thing to know is that there are a couple of different ways you can code the model. The historical pattern is a little like NONMEM, but different in several important ways. We introduced these differences when we started mrgsolve to make models easier to read, decrease the amount of compartment indexing (e.g.
DADT(5)
) etc. We recently (in the last 1.5 years or so) added some syntax that allows you to code a model that is more like what you'd write in NONMEM. The rationale behind this was to make translating easier, so that you have to do less conversions between the syntax. This isn't really "…