Description Details Fields Methods Note See Also
This class represents a person involved in a clinical study and provides a mechanism to record the person's clinical history, their involvement in a treatment program, and their life state.
The class implements a function modelDeathFromOtherCauses
modeling general death of the person.
age
The current age of the person being modeled.
sex
The gender of the person.
state
String describing the state of the person e.g. "deceased", "living" etc. as required by dervived classes and their drivers
in_treatment_program
String "yes" or "no" etc. indicating whether the person is undergoing medical treatment that may alter the way they clinical progression is modeled.
clinical_history
A ClinicalHistory
object holding the
persons medical record.
study_id
Study ID number assigned to the person
initialize(study_id = 0, base_seed = NA, age = 1, sex = NA_character_,
state = "living", in_treatment_program = "no",
clinical_history = ClinicalHistory$new(), random_seed_state = NA, ...)
Create and initialize a new instance of a Person
This function creates and initializes a new instance of the Person class.
@param age initial age of the person.
@param sex the person's sex, if not specific, will be randomly chosen.
@param in_treatment_program whether the person is currently in a treatment program.
@param clinical_history the person's existing clinical history/record,
if not specified a new empty/blank ClinicalHistory
is created.
@param study_id an integer assigned as their identifier within the study.
@param base_seed integer RNG seed used for modeling
@param random_seed_state the pseudo random number stream state to start if continuing from a previously saved study state
@param ... additional model values/parameters
@return a new object of type Person with specified configuration
@seealso GenericModel
for usage
@family model_initializers
@callGraph
@author Luke Domanski luke.domanski@@csiro.au
@aliases GenericModel$new
modelDeathFromOtherCauses()
Models whether the person dies from natural/common causes
Models whether the person dies from natural/common causes
based on probabilities recorded in the death_rate_female
and death_rate_male
arrays upon package loading.
@author Rob Dunne rob.dunne@@csiro.au Luke Domanski luke.domanski@@csiro.au
restoreRNGState()
Saves the pseudo random number stream state for the person
saveRNGState()
Saves the pseudo random number stream state for the person
The main aim of this class is to act as a framework for building person
representations operated on by more complex extensions of the
GenericModel
model driver class.
Other GenericModel_classes: ClinicalHistory
,
ClinicalHistory-class
;
GenericModel
,
GenericModel-class
; Test
,
Test-class
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.