pm.wbugs {mixstock}R Documentation

Run Pella-Masuda model via WinBUGS

Description

Sets up the Pella-Masuda model and passes it to WinBUGS via R2WinBUGS

Usage

pm.wbugs(x,
n.iter=20000,  n.burnin=floor(n.iter/2),
n.chains=x$R,
n.thin=max(1, floor(n.chains * (n.iter - n.burnin)/1000)),
useWINE, WINE = Sys.getenv("WINE"), WINEPATH="",...)

Arguments

x a mixstock data object
n.iter Total length of each chain
n.burnin Number of burn-in iterations
n.chains Number of chains (default, number of sources)
n.thin thinning rate. Must be a positive integer. Set 'n.thin' > 1 to save memory and computation time if 'n.iter' is large. Default is 'max(1, floor(n.chains * (n.iter-n.burnin) / 1000))' which will only thin if there are at least 2000 simulations.
useWINE run WinBUGS via WINE on Linux? Default is TRUE if WINE environment variable is set
WINE location of WINE binary on Linux
WINEPATH WINE directory on Linux
... other arguments to bugs

Value

a BUGS object (as returned from R2WinBUGS); can be converted to CODA format using as.mcmc.bugs

Author(s)

Ben Bolker

See Also

tmcmc

Examples

data(bolten98)
## Not run: 
bolten98.wbugs <- pm.wbugs(bolten98,tot=1000,clearWD=TRUE)
bolten98.wbugs
## End(Not run)

[Package mixstock version 0.8.4.2 Index]