Learn R Programming

MOrder (version 0.1)

checkTH: Determine if Time Homogeneity is present in the give sequence.

Description

Takes a sequence as input and finds if Time Homogeneity is present or not.

Usage

checkTH(seq)

Arguments

seq
- A sequence whose Time Homogeneity is to be determined

Value

Returns nothing but prints output representing presence or absence of Time Homogeneity

References

[1] Markov Chain Test for Time Dependence and Homogeneity: An Analytical and Empirical Evaluation Baris Tan and Kamil Yilmaz European Journal of Operational Research 137 (2002) 524-543

Examples

Run this code
## Check for a homogenous sequence
seq <- c(1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2)
checkTH(seq)

## Check for a heterogenous sequence
seq <- c(1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,1,2,2,1,1,2,2,1,1,2,2,1,1,2,2,1,1,2,2,1,1)
checkTH(seq)

Run the code above in your browser using DataLab