mergeBugsData: Merge results from BUGS into a data.frame or SPDF

Description Usage Arguments Author(s) Examples

Description

merge the result from bugs function

Usage

1
2
3
4
5
6
7
8
## S4 method for signature 'data.frame'
mergeBugsData(
x, bugsSummary, by.x = NULL, newcol = "mean", ...
)
## S4 method for signature 'SpatialPolygonsDataFrame'
mergeBugsData(
x, bugsSummary, by.x = NULL, newcol = "mean", ...
)

Arguments

x

spatial polygon object i.e population data set (popdata)

bugsSummary

posterior distribution result from summaryChain function

by.x

the common term from the spatial polygon object and the bugs function result

newcol

the summary statistic that to be merged back to the data frame

...

additional arguments

Author(s)

Patrick Brown

Examples

1
2
3
4
5
if(require('diseasemapping')){
	data('popdata')
	newdata = c("3560102"=2, "3560104"=3)
	popdatatry = mergeBugsData(popdata, newdata, by.x="CSDUID")
}

glmmBUGS documentation built on May 2, 2018, 1:03 a.m.