generate_random_T {oHMMed}R Documentation

Generate a Random Transition Matrix

Description

This helper function generates a transition matrix at random for testing purposes

Usage

generate_random_T(n = 3)

Arguments

n

(integer) dimension of a transition matrix

Details

Uniform random numbers [0,1] are used to fill the matrix. Rows are then normalized.

Value

random n x n transition matrix

Examples

mat_T <- generate_random_T(3)
mat_T

rowSums(mat_T)

[Package oHMMed version 1.0.2 Index]