tomogplot {MCMCpack}R Documentation

Tomography Plot

Description

tomogplot is used to produce a tomography plot (see King, 1997) for a series of partially observed 2 x 2 contingency tables.

Usage

tomogplot(
  r0,
  r1,
  c0,
  c1,
  xlab = "fraction of r0 in c0 (p0)",
  ylab = "fraction of r1 in c0 (p1)",
  bgcol = "white",
  ...
)

Arguments

r0

An (ntables×1)(ntables \times 1) vector of row sums from row 0.

r1

An (ntables×1)(ntables \times 1) vector of row sums from row 1.

c0

An (ntables×1)(ntables \times 1) vector of column sums from column 0.

c1

An (ntables×1)(ntables \times 1) vector of column sums from column 1.

xlab

The x axis label for the plot.

ylab

The y axis label for the plot.

bgcol

The background color for the plot.

...

further arguments to be passed

Details

Consider the following partially observed 2 by 2 contingency table:

| Y=0Y=0 | Y=1Y=1 |
--------- --------- --------- ---------
X=0X=0 | Y0Y_0 | | r0r_0
--------- --------- --------- ---------
X=1X=1 | Y1Y_1 | | r1r_1
--------- --------- --------- ---------
| c0c_0 | c1c_1 | NN

where r0r_0, r1r_1, c0c_0, c1c_1, and NN are non-negative integers that are observed. The interior cell entries are not observed. It is assumed that Y0r0Binomial(r0,p0)Y_0|r_0 \sim \mathcal{B}inomial(r_0, p_0) and Y1r1Binomial(r1,p1)Y_1|r_1 \sim \mathcal{B}inomial(r_1, p_1).

This function plots the bounds on the maximum likelihood estimatess for (p0, p1).

References

Gary King, 1997. A Solution to the Ecological Inference Problem. Princeton: Princeton University Press.

Jonathan C. Wakefield. 2004. “Ecological Inference for 2 x 2 Tables.” Journal of the Royal Statistical Society, Series A. 167(3): 385445.

See Also

MCMChierEI, MCMCdynamicEI, dtomogplot

Examples


r0 <- rpois(100, 500)
r1 <- rpois(100, 200)
c0 <- rpois(100, 100)
c1 <- (r0 + r1) - c0
tomogplot(r0, r1, c0, c1)


[Package MCMCpack version 1.7-0 Index]