Person-class: Class representing a person involved in a clinical study

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.



The current age of the person being modeled.


The gender of the person.


String describing the state of the person e.g. "deceased", "living" etc. as required by dervived classes and their drivers


String "yes" or "no" etc. indicating whether the person is undergoing medical treatment that may alter the way they clinical progression is modeled.


A ClinicalHistory object holding the persons medical record.


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


@author Luke Domanski [email protected]

@aliases GenericModel$new


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 [email protected] Luke Domanski [email protected]


Saves the pseudo random number stream state for the person


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.

See Also

Other GenericModel_classes: ClinicalHistory, ClinicalHistory-class; GenericModel, GenericModel-class; Test, Test-class

csiro-crc-spin/SpinModels documentation built on May 12, 2017, 12:26 p.m.