p.i2i: Prob goes from inside strip to inside strip

Description Usage Arguments Examples

View source: R/pomega.r

Description

Returns the transition probability from inside strip to inside strip. Starting coordinate inside strip is assumed to be a uniform random variable on (-w,w), where w is half-width of strip and cooridnate zero is centre of strip. Position after movement is assumed to be normal with mean equal to starting coordinate and standared deviation sigma.

Deals only with positive initial coordinate as problem is symmetric about zero. Integrates CDF of normal distribution only inside strip, from initial coordinate 0 to w. Integration is done by trapezoid rule.

Usage

1
p.i2i(sigma, dmax, w, nx = 500)

Arguments

sigma

standard deviation of nomal location distribution

dmax

maximum distance can move

w

half-width of strip

nx

number of intervals to use for approximate integral.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
w = 1
sigma = 0.1
dmax = 5*sigma
nx=500
dx=w/nx
xs=seq(0,w,dx)
ws = rep(w,length(xs))
F.rs = F.r.norm(ws,sigma,xtrunc=dmax,mean=xs) - F.r.norm(-ws,sigma,xtrunc=dmax,mean=xs)
plot(xs,F.rs,type="l") # for debugging - remove when confident is debugged
p.i2i(sigma,dmax=dmax,w)

david-borchers/LCE_paper documentation built on Nov. 15, 2020, 1:33 p.m.