p.o2i: Prob goes from outside strip to inside strip

Description Usage Arguments Examples

View source: R/pomega.r

Description

Returns the transition probability from outside strip to inside strip. Starting coordinate outside strip is assumed to be a uniform random variable on (w,w+dmax), where w is half-width of strip, dmax is maximum distance from strip to consider, 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 w to w+dmax. Integration is done by trapezoid rule.

Usage

1
p.o2i(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
sigma = 3
dmax = 9*sigma
nx=30
dx=dmax/nx
w = 1
xs=seq(w,dmax+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")
p.o2i(sigma,dmax=sigma,w,nx=30)

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