solve_mm_weights: Weight the records of the PUMS so the averages in mm_df will...

Description Usage Arguments Details Value

View source: R/mm.R

Description

Weight the records of the PUMS so the averages in mm_df will be obtained

Usage

1
2
solve_mm_weights(place_id, mm_row, pums, assumption = "independence",
  meq = 2)

Arguments

place_id

unique code identifying the place

mm_row

dataframe of 1 row, includes place_id, puma_id, and averages, with names matching PUMS

pums

the subsetted PUMS from which the sample will be drawn

assumption

"independence"

meq

(number of moments + 1) to match (2 is default and corresponds to matching the average)

Details

the function solve.QP from the "quadprog" package is used.

Value

x vector of length of the number of records in the PUMS. These are probabilities for each of the records.


leerichardson/spew documentation built on May 21, 2019, 1:39 a.m.