get_weights: Calculate state weights for each household

Description Usage Arguments Details Value Examples

View source: R/functions_poisson.r

Description

get_weights calculates state weights for each household

Usage

1
get_weights(beta, delta, xmat)

Arguments

beta

s x k matrix of parameters to poisson model

delta

vector of household-specific constants, length h

xmat

h x k matrix of data for households

Details

See (Khitatrakun, Mermin, Francis, 2016, p.4)

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

h x s matrix of state weights for each household

Examples

1
2
3
4
p <- make_problem(h=10, s=3, k=2)
beta <- matrix(0, nrow=p$s, ncol=p$k)
delta <- get_delta(p$wh, beta, p$xmat)
get_weights(beta, delta, p$xmat)

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