turnout_query: Calculate estimated election turnout by demographic...

Description Usage Arguments Value

Description

Calculates estimated election turnout by demographic characteristic for British Election Study survey data.

Usage

1
2
turnout_query(data, dgraphic, vote, wt, validated = TRUE, result = 0,
  sample = FALSE, percent = TRUE, write = FALSE)

Arguments

data

A dataframe containing British Election Study internet or face to face survey data.

dgraphic

The name of the variable for the demographic characteristic of interest. Must be defined between quotation marks.

vote

The name of the variable which captures response from suvey respondent to the question if they voted or not in the election of interest. Must be defined between quotation marks.

wt

The name of the weight variable to be used in analysis. Must be defined between quotation marks.

validated

Use when survey respondent's vote registeration has not been validated by British Election Study. A boolean which if FALSE filters data to show those survey respondents who are over the age of 18 and say they are registered to vote. Removes 'Dont Know' responses. If FALSE result must be defined. Default value is TRUE.

result

Use when validated is FALSE. A numeric between 0 and 1 for the known turnout percentage for the election in Great Britain. Default value is 0.

sample

A boolean which if TRUE returns the unweighted sample size. FALSE returns weighted sample size. Default value is FALSE. If {validated

is FALSE then result must be default. percent must be FALSE to show sample sizes.

Value

A tibble or CSV containing turnout estimates for selected demographic.


yespmedleon/clbes documentation built on May 10, 2019, 1:54 a.m.