par2obs: Simulate binary intensity images

Description Usage Arguments Examples

Description

The generated data Y ~ Bernoulli(p) is the image intensity, where the success probability p is determined by whether the location X, given by polar coords (r,θ), is inside the boundary or not.

Usage

1
par2obs(m, pi.in, pi.out, design, center, gamma.fun)

Arguments

m

m * m observations will be generated over the unit square centered at (0,0).

pi.in

The success probability, P(Y_i = 1), where Y_i is intensity of pixel i if the location is inside the boundary.

pi.out

The success probability, P(Y_i = 1), where Y_i is intensity of pixel i if the location is outside the boundary.

design

Taking values: 'D' for deterministic (equally-spaced grid) design, 'U' for completely uniformly random, or 'J' for jitteredly random design.

center

a two-dimensional vector of Euclidean coordinates (x,y) of the reference point.

gamma.fun

The function to generate boundaries, see ellipse or triangle2.

Examples

1
2
3
4
5
set.seed(2015)
# use ellipse boundary
gamma.fun = ellipse(a = 0.35, b = 0.25)
obs = par2obs(m = 100, pi.in = 0.5, pi.out = 0.2, design = 'J', center = c(0.5,0.5), gamma.fun)
plotBD(obs)

BayesBD documentation built on May 1, 2019, 10:17 p.m.