datacloning / dclone

Data Cloning and MCMC Tools for Maximum Likelihood Methods
https://github.com/datacloning/dclone
7 stars 2 forks source link

Add na.rm argument to parCodaSamples to follow coda.samples #5

Closed psolymos closed 8 years ago

psolymos commented 8 years ago

The current arg list is:

coda.samples(model, variable.names, n.iter, thin = 1, na.rm=TRUE, ...)

whereas

parCodaSamples(cl, model, variable.names = NULL, n.iter, thin = 1, ...) 

As explained on the help page:

This argument was added to handle incompletely defined variables. From JAGS version 4.0.0, users may monitor variables that are not completely defined in the BUGS language description of the model, e.g. if y[i] is defined in a for loop starting from i=3 then y[1], y[2] are not defined. The user may still monitor variable y and the monitored values corresponding to y[1], y[2] will have value NA for all iterations in all chains. Most of the functions in the coda package cannot handle missing values so these variables are dropped by default.

Might be good to check all 'rjags' related functions for changes in arguments.

psolymos commented 8 years ago

It also applies to codaSamples. rjags commit is dated 2015-04-12 (see here). Check old versions and include pkg version dependency.

psolymos commented 8 years ago

d892d208b9d014a82b143cae2fd56a43623f6cd1 closed the issue