march.mc.construct: Construct an homogeneous Markov Chain.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/march.mc.R

Description

A march.Mc-class object of order order is constructed from the dataset y. The first maxOrder-order elements of each sequence of the dataset are truncated in order to return a model which can be compared with other Markovian models of visible order maxOrder.

Usage

1
march.mc.construct(y, order, maxOrder = order)

Arguments

y

the march.Dataset-class from which the homogeneous Markov chain will be constructed.

order

the order of the constructed Markov Chain.

maxOrder

the maximum visible order among the set of Markovian models to compare.

Value

the march.Mc-class of order order constructed w.r.t the dataset y and maxOrder.

Author(s)

Ogier Maitre

See Also

march.Mc-class, march.Model-class, march.Dataset-class.

Examples

1
2
3
4
5
# pewee dataset is a data object of the march package in march.Dataset class format.
model <- march.mc.construct(pewee,2)

# print the reduced form of the transition matrix of the Markovian Model.
print(model@RC)

Example output

Attaching package: 'march'

The following object is masked from 'package:datasets':

    sleep

            [,1]        [,2]        [,3]
 [1,] 0.07462687 0.776119403 0.149253731
 [2,] 0.15606936 0.083815029 0.760115607
 [3,] 0.02877698 0.960431655 0.010791367
 [4,] 0.99135447 0.000000000 0.008645533
 [5,] 0.14285714 0.857142857 0.000000000
 [6,] 1.00000000 0.000000000 0.000000000
 [7,] 0.99637681 0.003623188 0.000000000
 [8,] 1.00000000 0.000000000 0.000000000
 [9,] 0.00000000 0.000000000 0.000000000

march documentation built on Nov. 26, 2020, 3:01 p.m.