poa_functions: Functions for decoding POA flags

poa_functionsR Documentation

Functions for decoding POA flags

Description

There are a variety of conventions for representing the true/false/other values that come up in the POA fields. They differ somewhat in what they use for true and false values, but the types of "other" allowed (if any) are all over the map. These functions decode several conventions in common use.

Usage

poa_cms(poa)

poa_cms2(poa)

poa_natural(poa)

Arguments

poa

Vector of POA values to be decoded.

Details

In some cases the distinction between the different types of "other" results is fuzzy. For example, there is a case to be made that any entry other than a clear "true" should be treated as "false", since the condition was not in fact reported as POA. These functions provide some flexibility in this treatment.

  • poa_cms treats Y as true (uppercase only), and any other result as false.

  • poa_cms2 treats Y as true, N as false (uppercase only), and anything else as "other"

  • poa_natural looks at the starting character and treats Y, T, and 1 as true; N, F, and 0 as false, and everything else as "other".

Value

Integer vector of 1 (true), 0 (false), and NA (other) values.

Functions

  • poa_cms(): CMS POA convention, strict interpretation

  • poa_cms2(): CMS POA convention

  • poa_natural(): A default convention that reflects common usages.


rplzzz/AHRQcomorb documentation built on Aug. 10, 2024, 8:12 a.m.