markov.disturbance {spgs}R Documentation

Construct feasible Random Noise Generating a First-Order Markov Chain

Description

Produces a sequence of random noise which would generate an observed sequence of finite symbols provided that the sequence of symbols results from a first-order Markov chain.

Usage

markov.disturbance(x, chain = NULL, random = TRUE, bandwidth = 1, 
estimates = is.null(chain))

Arguments

x

A sequence of finite symbols represented as a character vector.

chain

A list containing two named components which specify a first-order Markov chain. The ‘⁠trans.mat⁠’ component holds the stochastic transition matrix for the chain while the ‘⁠stat.dist⁠’ component holds the stationary distribution of the chain. If not specified, ‘⁠chain⁠’ is estimated from ‘⁠x⁠’ using estimateMarkovChain.

random

This can be a logical value or a number in the range 0-1. If ‘⁠TRUE⁠’, random noise will be generated. If ‘⁠FALSE⁠’, the constant value 0.5 will be used as the noise source. If a value in the range 0-1 is specified, that value will be used as a constant noise source. the default value is ‘⁠TRUE⁠’.

bandwidth

This value, which should be in the range 0-1, specifies the maximum peak-to-peak bandwidth of the random noise generated. The default value is 1.

estimates

A logical value specifying if the Markov chain estimates should be included in the return.

Value

If ‘⁠estimates⁠’ is ‘⁠TRUE⁠’, returns a list containing the following components:

disturbance

the sequence of random noise as a numeric vector.

trans.mat

The stochastic transition matrix estimated from x, if ‘⁠chain⁠’ is NULL; otherwise a copy of ‘⁠trans.mat⁠’ component of ‘⁠chain⁠’.

stat.dist

The stationary distribution estimated from x, if ‘⁠chain⁠’ is NULL; otherwise a copy of the ‘⁠stat.dist⁠’ component of ‘⁠chain⁠’.

Otherwise, if ‘⁠estimate⁠’ is ‘⁠FALSE⁠’, returns the sequence of random noise as a numeric vector.

Author(s)

Andrew Hart and Servet Martínez

See Also

markov.test, diid.test, diid.disturbance


[Package spgs version 1.0-4 Index]