targets_vec: Calculate targets vector

Description Usage Arguments Details Value Examples

View source: R/functions_poisson.r

Description

targets_vec calculates vector of targets of length s * k

Usage

1
targets_vec(betavec, wh, xmat, s)

Arguments

betavec

vector parameters to poisson model, length s * k (see h, s, k definitions below)

wh

vector of household total weights, length h

xmat

h x k matrix of data for households

s

number of states (or other geographies or subgroups)

Details

See (Khitatrakun, Mermin, Francis, 2016)

h

number of households (or individuals, records, tax returns, etc.)

s

number of states (or other geographies or subgroups)

k

number of characteristics each household has

Value

vector of targets of length s * k

Examples

1
2
3
p <- make_problem(h=10, s=3, k=2)
betavec <- rep(0, p$s * p$k)
targets_vec(betavec, p$wh, p$xmat, p$s)

donboyd5/microweight documentation built on Aug. 17, 2020, 4:48 p.m.