gibbsC               package:mixstock               R Documentation

_R_u_n _m_i_x_e_d _s_t_o_c_k _a_n_a_l_y_s_i_s _G_i_b_b_s _s_a_m_p_l_e_r, _i_n _C

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

     Runs a Gibbs sampler MCMC for mixed stock analysis, calling a
     routine written in C (for code).  Low-level function, called by
     other functions.

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

     gibbsC(a=1, startiter, maxiter, data, mixsamp=NULL, sourcesamp=NULL,
     startfval=NULL, thin=1, fprior=NULL, outfile=FALSE,
     outfn="mixstock-gibbs", randseed=1001, rptiter=-1, debug=FALSE,
     contrun=FALSE,contrib.start=NULL,sourcefreq.start=NULL)

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

       a: Prior strength parameter

startiter: Number of iterations to discard (burn-in)

 maxiter: Total number of chain steps

    data: A 'mixstock.data' object

 mixsamp: Marker sample from mixed populations

sourcesamp: Marker samples from sources

startfval: Where to start the chain: 0=

    thin: thinning factor

  fprior: Bayesian prior

 outfile: send data to an output file?

   outfn: name of output file

randseed: random-number seed

 rptiter: frequency for sending reports to screen

   debug: debug?

 contrun: continuation run? set fval and sourcefreq directly

contrib.start: vector of starting contributions

sourcefreq.start: matrix of starting source freqs

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

     a numeric matrix containing samples from the chain: each row is a
     vector of estimated contribution frequencies from each rookery

_N_o_t_e:

     gibbsC calls C code to generate multinomial deviates derived from
     the randlib.c library (version 1.3: <URL:
     http://odin.mdacc.tmc.edu/anonftp/>), written by Barry W. Brown,
     James Lovato, Kathy Russell, and John Venier, derived in turn from
     page 559 of: Devroye, Luc, Non-Uniform Random Variate Generation. 
     Springer-Verlag, New York, 1986.

_A_u_t_h_o_r(_s):

     Ben Bolker

