dump.format {bayescount}R Documentation

PRODUCE A CHARACTER STRING IN THE R DUMP FORMAT TO BE USED WITH JAGS

Description

Function used by bayescount.single() and run.model() to convert a numeric vector of data or initial values to a character string in the correct format to be read by JAGS as either data or initial values, using the jags.model function.

Usage

dump.format(variable, value)

Arguments

variable A list of character strings representing the name(s) of the variable(s) as used in the JAGS model
value A list of numeric vectors, matrices or arrays representing the value(s) of the above variable(s), in the same order

Value

A charcter string in the R dump format.

Author(s)

Matthew Denwood m.denwood@vet.gla.ac.uk funded as part of the DEFRA VTRI project 0101.

See Also

bayescount.single run.jags

Examples


initial.values.1 <- dump.format(list("mean", "sd", "lambda"), list("1", "0.1", c(4,2,7,0,6,9,1,4,12,1)))
initial.values.2 <- dump.format(list("mean", "sd", "lambda"), list("10", "10", c(4,2,7,0,6,9,1,4,12,1)))
data <- dump.format(list("N", "Count"), list("10", c(4,2,7,0,6,9,1,4,12,1)))


[Package bayescount version 0.8.2 Index]