p_highed: High News Interest Oversample

Description Usage Arguments Details Value Source Examples

View source: R/sampling_functions.R

Description

Propensity Score that oversamples high education and high-news interest people

Usage

1
2
3

Arguments

data

A tibble with the columns race, educ, newsint, as coded by the CCES

n

Sample size to sample

Details

We model the true propensity score as being a separable function of race, education, news interest, and whether or not you are in an urban district. There is no explicit correlation between selection and the outcome (say, partisanship), so Meng's rho would be non-zero only so far as the covariates correlates with race, education, and news interest.

Value

A vector of propensity scores ranging from 0 to 1

Source

Inspired by Lauren Kennedy's code in rstanarm

Examples

1
p_highed(sample_n(pop_cces, 100))

kuriwaki/svysim documentation built on Jan. 27, 2021, 5:37 a.m.