Learn R Programming

rdecision (version 1.1.2)

Transition: A transition in a semi-Markov model

Description

An R6 class representing a transition in a semi-Markov model.

Arguments

Author

Andrew J. Sims andrew.sims@newcastle.ac.uk

Super classes

rdecision::Edge -> rdecision::Arrow -> Transition

Methods

Inherited methods


Method new()

Create an object of type MarkovTransition.

Usage

Transition$new(source, target, cost = 0, label = "")

Arguments

source

MarkovState from which the transition starts.

target

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 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

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.

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.