get_dweights: Calculate weights to be multiplied by each target so that it...

Description Usage Arguments Details Value Examples

View source: R/functions_poisson.r

Description

get_dweights calculates difference weights

Usage

1
get_dweights(targets, goal = 100)

Arguments

targets

s x k matrix of desired target values

goal

optional scalar – weights multiplied by targets will equal this

Details

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

scalar: sum of squared differences

Examples

1
2
3
p <- make_problem(h=10, s=3, k=2)
dw <- get_dweights(p$targets)
dw * p$targets

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