Description Usage Arguments Value
View source: R/reweight_samp.R
This function allows for the reweighting of any dataset with information on age (in 10 year increments from 15 to 65), race (black, hispanic, or other), and region of Washington to match the ACS based joint age / race distribution and proportion of MSM in each region.
1 2 3 4 5 6 7 | reweight_data(
obs_data,
age_c_name = "age.grp",
race_c_name = "race",
reg_c_name = "region",
ego_id_name = "ego.id"
)
|
obs_data |
The observed data for which weights are wanted. |
age_c_name |
The name of the age column in the data frame. |
race_c_name |
The name of the race column in the data frame. |
reg_c_name |
The name of the region column in the data frame. |
ego_id_name |
The name of the column with unique identifiers for each ego. |
A vector of weights such that the observations with these weights match the Washington Age / Race distribution and regional MSM distribution.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.