Description Usage Arguments Details Value See Also Examples

View source: R/quest_functions.R

`pomps`

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

1 2 3 4 5 6 7 8 9 |

`data` |
data.frame of data. |

`vrb.nm` |
character vector of colnames from |

`mini` |
numeric vector of length 1 specifying the minimum numeric value possible. Note, this is assumed to be the same for each variable. |

`maxi` |
numeric vector of length 1 specifying the maximum numeric value possible. Note, this is assumed to be the same for each variable. |

`relative` |
logical vector of length 1 specifying whether relative POMP
scores (rather than absolute POMP scores) should be created. If TRUE, then
the |

`unit` |
numeric vector of length 1 specifying how many percentage points
is desired for the units. Traditionally, POMP scores use |

`suffix` |
character vector of length 1 specifying the string to add to the end of the column names in the return object. |

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.

data.frame of variables recoded to percentage of maximum possible
(pomp) with units specified by `unit`

and names specified by
`paste0(vrb.nm, suffix)`

.

1 2 3 4 5 6 | ```
vrb_nm <- names(psych::bfi)[grepl(pattern = "A", x = names(psych::bfi))]
pomps(data = psych::bfi, vrb.nm = vrb_nm, min = 1, max = 6) # absolute POMP units
pomps(data = psych::bfi, vrb.nm = vrb_nm, relative = TRUE) # relative POMP units
pomps(data = psych::bfi, vrb.nm = vrb_nm, min = 1, max = 6, unit = 100) # unit = 100
pomps(data = psych::bfi, vrb.nm = vrb_nm, min = 1, max = 6, unit = 50) # unit = 50
pomps(data = psych::bfi, vrb.nm = vrb_nm, min = 1, max = 6, suffix = "_pomp")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.