dtomogplot             package:MCMCpack             R Documentation

_D_y_n_a_m_i_c _T_o_m_o_g_r_a_p_h_y _P_l_o_t

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

     dtomogplot(r0, r1, c0, c1, time.vec=NA, delay=0,
                xlab="fraction of r0 in c0 (p0)",
                ylab="fraction of r1 in c0 (p1)",
                color.palette=heat.colors, bgcol="black", ...)

_A_r_g_u_m_e_n_t_s:

      r0: An (ntables * 1) vector of row sums from row 0.

      r1: An (ntables * 1) vector of row sums from row 1.

      c0: An (ntables * 1) vector of column sums from column 0.

      c1: An (ntables * 1) vector of column sums from column 1.

time.vec: Vector of time periods that correspond to the elements of r0,
          r1, c0, and c1.

   delay: Time delay in seconds between the plotting of the tomography
          lines. Setting a positive delay is useful for visualizing
          temporal dependence.

    xlab: The x axis label for the plot.

    ylab: The y axis label for the plot.

color.palette: Color palette to be used to encode temporal patterns.

   bgcol: The background color for the plot.

     ...: further arguments to be passed

_D_e_t_a_i_l_s:

     Consider the following partially observed 2 by 2 contingency
     table:


                  | Y=0      | Y=1      |
       - - - - -  - - - - -  - - - - -  - - - - -
       X=0        | Y0       |          | r0
       - - - - -  - - - - -  - - - - -  - - - - -
       X=1        | Y1       |          | r1
       - - - - -  - - - - -  - - - - -  - - - - -
                  | c0       | c1       | N

     where r0, r1, c0, c1, and N  are non-negative integers that are
     observed. The interior cell entries are not observed. It is
     assumed that Y0|r0 ~ Binomial(r0, p0) and Y1|r1 ~ Binomial(r1,p1 100
     rs
     algorithm.

     The proposal distribution is centered at the current value of
     theta and has variance-covariance V. If V is specified by the user
     to be 'NULL' then V is calculated as: V = T (-1*H)^{-1} T, where T
     is a the diagonal positive definite matrix formed from the 'tune'
     and H is the approximate Hessian of 'fun' evaluated at its mode.
     This last calculation is done via an initial call to 'optim'.

_V_a_l_u_e:

     An mcmc object that contains the posterior sample.  This  object
     can be summarized by functions provided by the coda package.

_R_e_f_e_r_e_n_c_e_s:

     Andrew Gelman, John B. Carlin, Hal S. Stern, and Donald B. Rubin.
     2003. _Bayesian Data Analysis_. 2nd Edition. Boca Raton: Chapman &
     Hall/CRC.

     Daniel Pemstein, Kevin M. Quinn, and Andrew D. Martin.  2007.  
     _Scythe Statistical Library 1.0._ <URL: http://scythe.wustl.edu>.

     Martyn Plummer, Nicky Best, Kate Cowles, and Karen Vines. 2002.
     _Output Analysis and Diagnostics for MCMC (CODA)_. <URL:
     http://www-fis.iarc.fr/coda/>.

     Christian P. Robert and George Casella. 2004. _Monte Carlo
     Statistical Methods_. 2nd Edition. New York: Springer.

_S_e_e _A_l_s_o:

     'plot.mcmc', 'summary.mcmc', 'optim', 'metrop'

_E_x_a_m_p_l_e_s:

       ## Not run: 
         
         ## logistic regression with an improper uniform prior
         ## X and y are passed as args to MCMCmetrop1R

         logitfun <- function(beta, y, X){
           eta <- X %*% beta
           p <- 1.0/(1.0+exp(-eta))
           sum( y * log(p) + (1-