writeJagsFile {polySegratioMM}R Documentation

Writes BUGS file for processing by JAGS

Description

Given the model and priors a file is written to disk for subsequent JAGS run. BUGS code contained in the model and priors objects is combined and alterered if necessary

Usage

writeJagsFile(model, priors, stem = "test")

Arguments

model

object of class modelSegratioMM specifying model parameters, ploidy etc

priors

Object of class priorsSegratioMM specifying priors

stem

File name stem for BUGS file (default “test”)

Value

None.

Author(s)

Peter Baker p.baker1@uq.edu.au

See Also

segRatio dump

Examples

## simulate small autooctaploid data set
a1 <- sim.autoMarkers(8,c(0.7,0.2,0.1),n.markers=100,n.individuals=50)

## compute segregation ratios
sr <-  segregationRatios(a1$markers)

## set up model for 3 components of autooctoploid
x <- setModel(3,8)
x2 <- setPriors(x)

dumpData(sr, x)
inits <- setInits(x,x2)
dumpInits(inits)
##x.priors <- setPriors(x, "vague")
writeJagsFile(x, x2, stem="test")



[Package polySegratioMM version 0.6-4 Index]