identityChain: Identity Markov chain

View source: R/generators.R

identityChainR Documentation

Identity Markov chain

Description

Builds the Markov chain whose transition matrix is the identity: every state is absorbing, so the chain never moves.

Usage

identityChain(n, states = NULL, name = "Identity chain")

Arguments

n

The number of states. It can be omitted when states is given.

states

An optional character vector of n state names. Defaults to as.character(1:n).

name

The name slot of the result.

Details

The chain is the neutral element of the product of transition matrices (identityChain(n) * mc equals mc for a chain mc on the same states) and the extreme case of lazyChain. Every state is its own closed class, so every distribution is stationary.

Value

A markovchain object with n states.

See Also

randomMarkovChain, lazyChain

Examples

identityChain(3)
identityChain(states = c("a", "b"))
absorbingStates(identityChain(3))


markovchain documentation built on Oct. 10, 2026, 9:07 a.m.