Description Usage Arguments Details Value Warning Author(s) References Examples

Given a list of effect groups, and the covariates associated with each level, a bugs model file is written using ragged arrays corresponding to output from `winBugsRaggedArray`

1 2 3 4 5 |

`file` |
a character string denoting the name of the bugs model file writen. |

`effects` |
vector of effect groups |

`covariates` |
A list with names corresponding to effects and each element being a vector of covariates applicable at that level |

`observations` |
A character string giving the column of observations, or a vector where the first element is the observations and the remaning are offsets. |

`family` |
Response distribution |

`spatial` |
name of the spatial random effect |

`geostat` |
Is this a geostatistical random effect? Defaults to FALSE for the Besag, York and Mollie discrete spatial variation model |

`prefix` |
the prefix |

`reparam` |
vector of random effect names, subtract covariates at this level from the intercept. |

`brugs` |
make the model file compatible with OpenBugs by using the inprod function in place of inprod2 |

`priors` |
character string of prior distributions, with the name of each element referring to the parameter it is the prior for |

The arguments to the function specify a generalised linear mixed model. A file containing code for a corresponding bugs model is written. The model uses ragged arrays to specify grouping factors, and includes covariates at the appropriate levels to aid in chain convergence. It is intended that the user will edit this file before it's use. The prior distributions in particular may not be appropriate.

A file, suitable for passing to the `bugs`

function in `R2WinBUGS`

.

You are strongly encouraged to modify the model file prior to using it.

Patrick Brown, patrick.brown@utoronto.ca

"Handling unbalanced datasets" in the "Tricks: Advanced Use of the BUGS Language" section of the bugs manual, at http://www.openbugs.net/Manuals/Tricks.html

1 2 3 4 5 |

glmmBUGS documentation built on May 31, 2017, 4:27 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.