landat-package: Functions for calculating Information Theoretic measures from...

Description Details Brief overview Author(s) References Examples

Description

A set of functions for calculating...

Details

landat provides a set of functions designed to express...

Brief overview

landat provides a set of functions for interpretation of ....

Example ...
Figure 1.

Author(s)

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

Maintainer: Bjorn J. Brooks <bjorn@geobabble.org>

References

The forthcoming publication will give a detailed thematic description of how these functions can be applied to satellite remote sensing data sets:

TITLE. in composition.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
### Example 1, Calculate projection matrix for a polygon of ~450 MODIS pixels
library(landat)
data(transitions)                       # Load example data
b <- brkpts(transitions$phenofr, # 4 probabilistically
            4)                   #  equivalent breakpoints
m <- xt(transitions, fr.col=2,   # Construct a two-way table
        to.col=3, cnt.col=4,
        brk=b)
# Each col & row of matrix, m, will contain proportionately same num vals
pxy <- jpmf(m)                      # Joint distribution
rmd <- rowSums(pxy)                 # Row marginal distribution
cmd <- colSums(pxy)                 # Column marginal distribution
r_c <- cpf(pxy,margin='p(row|col)') # Cond.probs (row | col) of matrix m
colSums(r_c)                    # Check that each column sums to 1
r_c.prj <- prjm(r_c,10^3)          # Project joint pr matrix 1,000 steps


# Test that matrix has an equivalent number of non-zero marginal sums
if (length(rmd[rmd>0]) == length(cmd[cmd>0])) {
  rmd.prj <- prjv(rmd,r_c.prj)     # Project r by the prj mtrx to get stable eq vec
}
# Compare RMD & RMD-when-projected 1,000 steps by transition matrix
rmd
rmd.prj
### Example 1, Calculate projection matrix for a polygon of ~450 MODIS pixels
library(landat)
data(transitions)                       # Load example data
b <- brkpts(transitions$phenofr, # 4 probabilistically
            4)                   #  equivalent breakpoints
m <- xt(transitions, fr.col=2,   # Construct a two-way table
        to.col=3, cnt.col=4,
        brk=b)
# Each col & row of matrix, m, will contain proportionately same num vals
pxy <- jpmf(m)                       # Joint distribution
rmd <- rowSums(pxy)                   # Row marginal distribution
cmd <- colSums(pxy)                   # Column marginal distribution
r_c <- cpf(pxy,margin='p(row|col)') # Cond.probs (row | col) of matrix m
r_c.prj <- prjm(r_c,10^3)          # Project matrix 1,000 steps

# Test that matrix has an equivalent number of non-zero marginal sums
if (length(rmd[rmd>0]) == length(cmd[cmd>0])) {
  seqv <- prjv(r_c.prj,cmd)       # Iterate cmd by the prj mtrx to get stable eq vec
}
# Compare RMD & RMD-when-projected 1,000 steps by transition matrix
rmd
seqv
# % change in row marginal distribution when projected 1,000 steps
100*(seqv-rmd)/rmd

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