as_nps_cat: Convert numeric variable to NPS categorical variable

View source: R/as_nps_cat.R

as_nps_catR Documentation

Convert numeric variable to NPS categorical variable

Description

Returns a categorical variable with default values over 1, 2, and 3. Suited for running multinomial logistic regression. To calculate the NPS score, use as_nps().

Usage

as_nps_cat(x, det = 1, pas = 2, pro = 3)

Arguments

x

Numeric variable to pass through. Valid range is 0 to 10 inclusive, otherwise returns a NA.

det

Numeric value to represent the code for Detractor. Defaults to 1.

pas

Numeric value to represent the code for Passive. Defaults to 2.

pro

Numeric value to represent the code for Promoter. Defaults to 3.


martinctc/surveytools documentation built on Nov. 21, 2024, 10:48 p.m.