nps_test: Significance tests and confidence intervals for Net Promoter...

Description Usage Arguments Value Author(s) See Also

Description

This function performs one and two sample tests for the Net Promoter score(s) of Recommend data distributions. Currently, only a Wald type test is supported.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
nps.test(...)

nps_test(x, y = NULL, test = "wald", conf = 0.95,
  pseudo_observations = c(0.75, 1.5, 0.75),
  breaks = getOption("nps.breaks"))

nps_test_(x, y = NULL, test = "wald", conf = 0.95,
  pseudo_observations = c(0.75, 1.5, 0.75))

## S3 method for class 'nps_test'
print(x, ...)

Arguments

x

A vector of Recommend scores

y

A vector of Recommend scores, to compare to x. If not specified, a one sample test on x is performed. Defaults to NULL

test

The type of test to perform. One of "wald", "adjusted.wald", or "iterative". "iterative" currently works for one-sample tests only.

conf

the confidence level of the test and intervals. Defaults to 0.95

pseudo_observations

if "adjusted.wald" has been selected, a vector of counts of 'psuedo observations' which will be added to the data, before a Wald interval is constructed. Ignored unless performing the "adjusted.wald" calculation.

breaks

A vector of length three, giving integer Likert scale break-points for Net Promoter categories. Best practice is to set the values you'd like to use at the start of a session, with options(nps.breaks = c(0, 6, 8, 10)) (for the usual setting of 0-6 being Detractors, 7-8 being Passives and 9-10 being Promoters, also the package default), or whichever values you would like. However, a vector may be supplied directly.

...

Not used.

Value

A list of class nps.test containing:

nps.x, nps.y

The Net Promoter score(s)

delta.hat

Where both x and y have been specified, the absolute difference between the two scores

int

The confidence interval generated. For a one sample test, this will be a confidence interval around nps.x. For a two sample test, this will be a confidence interval around the difference between nps.x and nps.y

conf

The confidence level used when performing the test, as specificed by conf in the function parameters

p.value

The p value of the significance test

sig

logical. Whether or not the p.value of the test exceeded 1-conf

se.hat

The estimated standard error of delta.hat for a two sample test, otherwise of x

type

character string indicating whether a one or two sample test was performed

n.x, n.y

Counts for x and y

NULL

Author(s)

Brendan Rocks foss@brendanrocks.com

See Also

nps_var, nps_se, nps


brendan-R/nps documentation built on May 13, 2019, 5:07 a.m.