Description Usage Arguments Value
Function to process a country data to run a hierarchical model in JAGS. The function takes a dataframe with country codes, region codes, observations, observation years, standard errors and data source and returns data in form for input into JAGS.
1 2 3 | processData(d, iso.column, data.column, se.column, obsyear.column,
region.column = NULL, source.column = NULL, start.year = NULL,
end.year = 2015)
|
d |
a dataframe that contains country codes/names, region codes/names, data column, observation years and standard error column |
iso.column |
string specifying name of column which contains country codes/names |
data.column |
string specifying name of column which contains observations |
se.column |
string specifying name of column which contains standard errors |
obsyear.column |
string specifying name of column which contains observation years |
region.column |
string specifying name of column which contains region codes/names. If |
source.column |
string specifying name of column which contains data source. If |
start.year |
furst year for which estimates are required. If |
end.year |
final year for which estimates are required. Default is 2015. |
A list which includes matrices of data, observation years, source type and standard errors of dimensions c x i
where c
is the number of countries and i
is the maximum number of observations. The list also includes counts of countries, regions, source types, years by country
and starting years of each country, which are required to run the JAGS model.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.