Skip to contents

This function checks if x is a tpm (transition probability matrix).

Usage

is_tpm(x)

Arguments

x

A matrix.

Value

Either TRUE or FALSE.

Examples

if (FALSE) {
is_tpm(diag(2))
is_tpm(matrix(1, 2, 2))
}