getSim: Return resulting percents/variance/mean/CIs for education...

Description Usage Arguments Value

View source: R/getSim.R

Description

This function takes in a dataframe of individuals survey data containing gender, race, age info as in indicator matrix form. takes n samples, perform raking algorism on each sample to get the weights, use the weights to get the percentage for each levels in education and citybelongings.Finally get the mean, variance, CIs for the levels percentages using the samples.

Usage

1
getSim(surveyInput, censusInput, sample, seed, biased)

Arguments

surveyInput

dataframe of individuals survey data containing gender, race, age info

censusInput

dataframe of census constrain data, each column represents a census category

sample

number of samples to take

seed

seeds to be used for sampling

biased

if biased > 0, use biased as the prob of sampling female individuals

Value

A list of the resulting percentages in the samples, the mean/variance/CIs for education levels and citybelonging levels


xinBrueck/raking documentation built on Aug. 6, 2019, 12:14 p.m.