Last data update: 2014.03.03

R: Compute the vector T^k*p
TkpR Documentation

Compute the vector T^k*p

Description

T is the transition matrix of the random walk on the lattice. By multiplying by the probability density p at time t, you get the probability density at time t+1. Thus, to get the probability density after k steps, pk, compute p_k = T^kp_1. This application of finite Markov processes is described in Barry and McIntyre (2011).

Usage

Tkp(T, k, p)

Arguments

T

transition matrix returned by makeTmatrix.

k

the number of steps in the diffusion.

p

a numerical vector of length equal to the number of nodes, of initial probabilities.

Author(s)

Ronald P. Barry rpbarry@alaska.edu

References

Ronald P. Barry, Julie McIntyre. Estimation animal densities and home range in regions with irregular boundaries and holes: A lattice-based alternative to the kernel density estimator. Ecological Modelling 222 (2011) 1666-1672.

Examples

plot.new()
data(polygon1)
require(splancs)
require(spatstat)

nodeFillingOutput = nodeFilling(poly=polygon1,node.spacing=0.015)
formLatticeOutput = formLattice(nodeFillingOutput)

Pointdata = csr(polygon1,80)
Pointdata = Pointdata[Pointdata[,1]<0.5,]


init.prob = addObservations(formLatticeOutput, Pointdata)
T = makeTmatrix(formLatticeOutput, M = 0.5, sparse=TRUE)
p10 = Tkp(T,10,p=init.prob$init.prob)
cbind(init.prob$init.prob,p10)

Results