| Transition {rdecision} | R Documentation |
A transition in a semi-Markov model
Description
An R6 class representing a transition in a semi-Markov model.
Details
A specialism of class Arrow which is used in a semi-Markov
model to represent a transition between two MarkovStates. The
transition is optionally associated with a cost. The transition probability
is associated with the model (SemiMarkovModel) rather than the
transition.
Super classes
rdecision::Edge -> rdecision::Arrow -> Transition
Methods
Public methods
Inherited methods
Method new()
Create an object of type MarkovTransition.
Usage
Transition$new(source_state, target_state, cost = 0, label = "")
Arguments
source_stateMarkovStatefrom which the transition starts.target_stateMarkovStateto which the transition ends.costCost associated with the transition.
labelCharacter string containing a label for the transition (the name of the event).
Returns
A new Transition object.
Method modvars()
Find all the model variables.
Usage
Transition$modvars()
Details
Find variables of type ModVar that have been
specified as values associated with this MarkovTransition.
Includes operands of these ModVars, if they are expressions.
Returns
A list of ModVars.
Method set_cost()
Set the cost associated with the transition.
Usage
Transition$set_cost(c = 0)
Arguments
cCost associated with the transition.
Returns
Updated Transition object.
Method cost()
Return the cost associated with traversing the edge.
Usage
Transition$cost()
Returns
Cost.
Method clone()
The objects of this class are cloneable with this method.
Usage
Transition$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Author(s)
Andrew J. Sims andrew.sims@newcastle.ac.uk