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 MarkovState
s. 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_state
MarkovState
from which the transition starts.target_state
MarkovState
to which the transition ends.cost
Cost associated with the transition.
label
Character 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 ModVar
s, if they are expressions.
Returns
A list of ModVar
s.
Method set_cost()
Set the cost associated with the transition.
Usage
Transition$set_cost(c = 0)
Arguments
c
Cost 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
deep
Whether to make a deep clone.
Author(s)
Andrew J. Sims andrew.sims@newcastle.ac.uk