Learn R Programming

sate (version 2.4.0)

target.population.demographics: Looks up and returns key demographic statistics for target state to be used for calculating sample weights

Description

Looks up and returns six key demographic statistics for a target state to be used for calculating sample weights. State-level population statistics from U.S. Census Bureau, American Community Survey 5-year estimates. Data from state.demographic.info, a saved datafile in sate package.

Usage

target.population.demographics(state)

Value

A one row data.frame with the following statistics: black, ba_or_more, hhincome_over50k, age35plus, woman, hispanic

Arguments

state

The target state, input as two-letter abbreviation (i.e., "GA" "TX" or "FL"). If no state specified, will use "USA".

Examples

Run this code
   library(sate)
   target.population.demographics(state="FL")

   target.population.demographics()   # will return stats for USA

Run the code above in your browser using DataLab