Description Details Usage Extending the Model Classes
This package provides a set of R Reference Classes implementing a family of CRC-Spin models. The classes are highly extensible, and can be used to build other Spin-alike models.
The package currently includes the following model classes alone with their associated helper classes:
A simple natural aging model. Serves as a base class for building more complex models that implement stepwise clinical modeling of a study group of subjects.
An implementation of X et al. classic CRC-Spin model. Derives from GenericModel.
An implementation of Y et al. extensions of the classic CRC-Spin model to allow for transition of adenomas through Duke's stages.
Each class utilises a set of helper classes that describe track and objects such as a Person, an organ (e.g. Colon), a disease (e.g. Cancerous Adenomas), risk parameters, and clinical events.
Results of the model runs are available in a study_result matrix that summarises the overall state of the model at each step.
Users of the models who do not wish to extend their functionality only need to call a small number of functions to set up the parameters of a model, then run it.
To create a new model object, call the model's Reference Class constructor, passing the appropriate arguments. e.g.:
m<-CrcSpinModel$new(iterations=99, num_subjects=1000)
If you wish to modify the modeling parameters away from the default, you can
call any available set*Parameter
member functions of the new model
object. e.g.:
...
To run the configured model, call it's run
function:
m$run()
Finally, you can extract results from the study_results
matrix:
m$study_results
The meaning of the result matrices rows and columns for each model are described in the respective model class documentation.
For more information on the models implemented by this package, please see the following vignettes:
Classic CRC Spin Model
Duke's CRC Spin Model
Developers wishing to extend the models may wish to look at the detailed documentation of the main model classes and all their helper helper class. Please note that users of the models generally will not need to know this level of detail.
For documentation of included model classes and their helper classes see:
GenericModel
CrcSpinModel
DukesCrcSpinModel
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.