The modelbuilder package allows the building and analysis of compartmental dynamical systems models without the need to write code.
The package provides a graphical user interface that allows a user to create and analyze compartmental dynamical models without having to write code.
The audience for this app are individuals interested in dynamical models who are new to coding, but nevertheless want to develop and analyze such computer models.
The package has not yet been submitted to CRAN, therefore it currently needs to be installed from Github. To do so, you need the remotes
package. If you don't have it, install it first. The following commands will get you up and running:
install.packages('remotes') remotes::install_github('ahgroup/modelbuilder')
Package installation is a one-time process, unless R itself is being upgraded/reinstalled. Note that the package depends on other packages, which will also be installed as needed.
Every time a new R/Rstudio session is started, the package needs to be loaded:
library('modelbuilder')
followed by starting the main menu for the package:
modelbuilder()
This will bring up a graphical user interface from which everything is done. Once your are done using modelbuilder
, simply close the graphical user interface.
modelbuilder
. Thus, this functionality is meant if you are ready to take matters in your own hand and modify the code beyond what can be done with the modelbuilder
package.A few notes on model building:
sin
or cos
) are not yet implemented.-bSI
outflow for the susceptibles and the corresponding bSI
inflow for infected.Once you think your model is correct, press the Make Model button. modelbuilder
will check to make sure all the information you entered seems valid and follows the above listed rules. That does not mean your model is correct/right! It only means that the error checks couldn't find anything that made it look like an improperly defined modelbuilder
model object. If there are errors, you will be told to fix them. Once no errors are found, you have the option to save your model as an .Rdata file. This is recommended if you want to later load and further edit or analyze it. If you don't save and modelbuilder
closes for whatever reasons, your model is gone.
In addition to the not-yet implemented features stated above, the following are planned:
Let us know if there are others you want to see implemented!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.