# pomp: Recode a Numeric Vector to Percentage of Maximum Possible... In quest: Prepare Questionnaire Data for Analysis

## Description

`pomp` recodes a numeric vector to percentage of maximum possible (POMP) units. This can be useful when data is measured with arbitrary units (e.g., Likert scale).

## Usage

 `1` ```pomp(x, mini, maxi, relative = FALSE, unit = 1) ```

## Arguments

 `x` numeric vector. `mini` numeric vector of length 1 specifying the minimum numeric value possible. `maxi` numeric vector of length 1 specifying the maximum numeric value possible. `relative` logical vector of length 1 specifying whether relative POMP scores (rather than absolute POMP scores) should be created. If TRUE, then the `mini` and `maxi` arguments are ignored. See details for the distinction between absolute and relative POMP scores. `unit` numeric vector of length 1 specifying how many percentage points is desired for the units. Traditionally, POMP scores use `unit` = 1 (default) such that one unit is one percentage point. However, another option is to use `unit` = 100 such that one unit is all 100 percentage points (i.e., proportion of maximum possible). This argument also gives the flexibility of specifying units in between 1 and 100 percentage points. For example, `unit` = 50 would mean that one unit represents going from low (i.e., 25th percentile) to high (i.e., 75th percentile) on the variable.

## Details

There are too common approaches to POMP scores: 1) absolute POMP units where the minimum and maximum are the smallest/largest values possible from the measurement instrument (e.g., 1 to 7 on a Likert scale) and 2) relative POMP units where the minimum and maximum are the smallest/largest values observed in the data (e.g., 1.3 to 6.8 on a Likert scale). Both will be correlated perfectly with the original units as they are each linear transformations.

## Value

numeric vector from recoding `x` to percentage of maximum possible (pomp) with units specified by `unit`.

`pomps`
 ```1 2 3 4 5``` ```vec <- psych::bfi[] pomp(x = vec, mini = 1, maxi = 6) # absolute POMP units pomp(x = vec, relative = TRUE) # relative POMP units pomp(x = vec, mini = 1, maxi = 6, unit = 100) # unit = 100 pomp(x = vec, mini = 1, maxi = 6, unit = 50) # unit = 50 ```