Recode - Set Value of Don't Knows to NaN

From Q
Jump to navigation Jump to search

This tool sets the value of any Don't Know categories in Pick One, Pick One - Multi, Number, and Number - Multi questionsNominal/Ordinal, Nominal/Ordinal - Multi, Numeric, and Numeric - Multi variable sets to NaN.

You will be notified to check any recoded data that was identified as having two or more Don't Know style options.

Technical details

Phrases that are identified as Don't Know type responses are ones that contain one or more of:

  • dk
  • dont know
  • don't know
  • don t know
  • unsure
  • not sure
  • do not know
  • no idea
  • not applicable

The matching of these is not case sensitive.

Additionally, where a label is, in its entirety, NA or na, it is treated as a Don't Know.

Usage

To use this tool in Q:

  1. Select Automate > Browse Online Library > Recode > Set Value of Don't Knows to NaN
  2. Choose whether you wish to add your own custom text to search for in addition to the standard Don't Know style responses listed above
  3. Choose which questions you wish to modify from the list presented

To use this tool in Displayr:

  1. Select a table whose rows contain the variable set you wish to modify, or select one or more variable sets under Data Sets.
  2. Select + Anything > Data > Variables > Modify > Recode > Set Value of Don't Knows to NaN
var __webpack_modules__ = ({});
// The module cache
var __webpack_module_cache__ = {};

// The require function
function __webpack_require__(moduleId) {

// Check if module is in cache
var cachedModule = __webpack_module_cache__[moduleId];
if (cachedModule !== undefined) {
return cachedModule.exports;
}
// Create a new module (and put it into the cache)
var module = (__webpack_module_cache__[moduleId] = {
exports: {}
});
// Execute the module function
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);

// Return the exports of the module
return module.exports;

}

// webpack/runtime/rspack_version
(() => {
__webpack_require__.rv = () => ("1.7.2")
})();
// webpack/runtime/rspack_unique_id
(() => {
__webpack_require__.ruid = "bundler=rspack@1.7.2";
})();
includeWeb('QScript Functions for Removing Dont Know Categories');
removeDKInSelection(false);

See also