Description Usage Arguments Details Value Examples
View source: R/functions_poisson.r
get_weights
calculates state weights for each household
1 | get_weights(beta, delta, xmat)
|
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 |
See (Khitatrakun, Mermin, Francis, 2016, p.4)
number of households (or individuals, records, tax returns, etc.)
number of states (or other geographies or subgroups)
number of characteristics each household has
h x s matrix of state weights for each household
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.