Count_and_Filter: Filter Raw Surveys, Remove Duplicates and Dropouts

View source: R/filter.R

Count_and_FilterR Documentation

Filter Raw Surveys, Remove Duplicates and Dropouts

Description

This function takes a raw survey list and returns a list with 8 entries: the first is a filtered version of the raw survey data. This function does all of the heavy lifting in removing duplicate survey responses from single respondents, and provides almost all of the counting functionality for the field report.

Usage

Count_and_Filter(
  Survey_List,
  racer_percentile_definition = 0.025,
  speeder_percentile_definition = 0.05
)

Arguments

Survey_List

this is a list containing only the downloaded data from the survey for a multiple-part survey.

racer_percentile_definition

This is the percentile that's serves as the threshold for racers- entered as a number (default is 0.025), any times within this percentile are classified as racers. All racers are speeders, but in some projects we make racing a hard BQ criteria, and speeding needs to be combined with other criteria.

speeder_percentile_definition

This is the percentile that's serves as the threshold for speeders- entered as a number (default is 0.05), any times within this percentile are classified as speeders

Value

A list with eight components:

  1. A list with the filtered survey parts as data.tables

  2. A data.table with the relevant information for the field report

  3. A data.table of survey IDs that were screened out

  4. A data.table of the first survey part with survey IDs deemed as "junk"- incomplete, but not screenouts

  5. The list returned by the Get_Interview_Time function on the filtered data

  6. data.table of Unique_Incomplete_IDs

  7. data.table of Panel_Report_ID_List

  8. data.table of Dropouts_First_Part_Pages

Examples

Count_and_Filter(Cint_Surveys_0)

bpresentati/surveyR documentation built on March 19, 2022, 3:40 a.m.