single: Single Variable

Description Usage Arguments Value Examples

Description

Provides a recommended statistical method given the measurement level of your data. Appropriate when you are interested in a single variable.

Usage

1
single(data, variable)

Arguments

data

the data as a data frame, with variables encoded as numeric (for interval/ratio variables), ordered (for ordinal variables), or factor (for nominal variables)

variable

a string naming a variable from data

Value

A results object containing:

results$advice the method recommendation
results$plot a scatter plot of the data

Examples

1
2
3
4
5
6
7
exampleData <- data.frame(x1 = rnorm(20),
                          x2 = as.factor(c(rep(1, 10), rep(2, 10))),
                          x3 = as.ordered(c(rep(1, 10), rep(2, 5), rep(3, 5))))

single(exampleData, variable = 'x1')
single(exampleData, variable = 'x2')
single(exampleData, variable = 'x3')

rivkamdevries/Statkat documentation built on May 24, 2019, 2:02 a.m.