gsi_aggScoresByRepUnit: sum gsi_sim posteriors over populations in reporting units

Description Usage Arguments

Description

given a data frame x that has columns represententing scores (like posterior probs) for each population in the pops.str (which should be a character vector of population names) which are themselves grouped into reporting units according to rep.units (preferably a factor), this returns a new data frame with all the non-pop columns first and then the pop columns aggregated by summing them up.

Usage

1
gsi_aggScoresByRepUnit(x, pops.str, rep.units)

Arguments

x

data frame like that obtained by reading in "pop_pofz_full_em_mle.txt" or a similar output file from gsi_sim (with rownames=1)

pops.str

names of the populations that are the column names of x

rep.units

factor vector of same length as pops.str which given the reporting units of the populations in pops.str


eriqande/gpiper documentation built on May 16, 2019, 8:46 a.m.