quest-package {quest}R Documentation

Pre-processing Questionnaire Data

Description

quest is a package for pre-processing questionnaire data to get it ready for statistical modeling. It contains functions for investigating missing data (e.g., rowNA), reshaping data (e.g., wide2long), validating responses (e.g., revalids), recoding variables (e.g., recodes), scoring (e.g., scores), centering (e.g., centers), aggregating (e.g., aggs), shifting (e.g., shifts), etc. Functions whose first phrases end with an s are vectorized versions of their functions without an s at the end of the first phrase. For example, center inputs a (atomic) vector and outputs a atomic vector to center and/or scale a single variable; centers inputs a data.frame and outputs a data.frame to center and/or scale multiple variables. Functions that end in _by are calculated by group. For example, center does grand-mean centering while center_by does group-mean centering. Putting the two together, centers_by inputs a data.frame and outputs a data.frame to center and/or scale multiple variables by group. Functions that end in _ml calculate a "multilevel" result with a within-group result and between-group result. Functions that end in _if are calculated dependent on the frequency of observed values (aka amount of missing data). The quest package uses the str2str package internally to convert R objects from one structure to another. See str2str for details.

Types of functions

There are three main types of functions. 1) Helper functions that primarily exist to save a few lines of code and are primarily for convenience (e.g., vecNA). 2) Functions for wrangling questionnaire data (e.g., nom2dum, reverses). 3) Functions for preliminary statistical calculation (e.g., means_diff, corp_by).

Abbreviations

See the table below

vrb

variable

grp

group

nm

names

NA

missing values

ov

observed values

prop

proportion

sep

separator

cor

correlations

id

identifier

rtn

return

fun

function

dfm

data.frame

fct

factor

nom

nominal variable

bin

binary variable

dum

dummy variable

pomp

percentage of maximum possible

std

standardize

wth

within-groups

btw

between-groups

Author(s)

Maintainer: David Disabato ddisab01@gmail.com (ORCID)


[Package quest version 0.2.0 Index]