prjv: Project a vector using a transition matrix.

Description Usage Arguments Details Value Author(s) References Examples

View source: R/prjv.R

Description

Project a vector using a transition matrix.

Usage

1
prjv(m, v)

Arguments

m

A matrix of numeric values in the form of a two-way table of frequencies:

Fr
40 38 37 ...
To 89 89 87 ...
75 74 89 ...
... ... ... ...

m can be constructed using xt.

v

A vector of numeric values with the same number of values as columns in m. v could be the initial distribution of frequencies m.

Details

prjv calculates the...

Value

Returns ...

Author(s)

Bjorn J. Brooks, Lars Y. Pomara, Danny C. Lee

References

PAPER TITLE.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(transitions)                # Load example data
b <- brkpts(transitions$phenofr, # Find 10 probabilistically
            10)                  #  equivalent breakpoints
m <- xt(transitions,             # Make transition matrix
        fr.col=2, to.col=3,
        cnt.col=4, brk=b)
pxy <- jpmf(m)                   # Joint distribution
rmd <- rowSums(pxy)              # Row marginal distribution
cmd <- colSums(pxy)              # Column marginal distribution
r_c <- cpf(pxy,                  # Transition matrix
           margin='p(row|col)')  #  (row | col)
r_c.prj <- prjm(r_c,10^3)        # Project matrix 1,000 steps
seqv <- prjv(r_c.prj,cmd)        # Stable equilibrium vector

bjornbrooks/landat documentation built on May 17, 2019, 7:32 p.m.