Learn R Programming

aqp (version 2.2)

hzTransitionProbabilities: Horizon Transition Probabilities

Description

Functions for creating and working with horizon (sequence) transition probability matrices.

See the following tutorials for some ideas:

Usage

hzTransitionProbabilities(
  x,
  name = GHL(x, required = TRUE),
  loopTerminalStates = FALSE
)

mostLikelyHzSequence(mc, t0, maxIterations = 10)

Value

A square matrix of transition probabilities. See examples.

The function genhzTableToAdjMat() returns a square adjacency matrix. See examples.

The function mostLikelyHzSequence() returns the most likely sequence of horizons, given a markovchain object initialized from horizon transition probabilities and an initial state, t0. See examples.

Arguments

x

a SoilProfileCollection object.

name

A horizon level attribute in x that names horizons.

loopTerminalStates

should terminal states loop back to themselves?

This is useful when the transition probability matrix will be used to initialize a markovchain object. See examples below.

mc

Passed to markovchain conditionalDistribution()

t0

Passed to markovchain conditionalDistribution()

maxIterations

Maximum number of iterations. Default: 10

Author

D.E. Beaudette

See Also

generalize.hz()

Examples

Run this code

data(sp4)
depths(sp4) <- id ~ top + bottom

# horizon transition probabilities: row -> col transitions
(tp <- hzTransitionProbabilities(sp4, 'name'))



Run the code above in your browser using DataLab