GIplot: Gaussian Interval Plot (GIplot)

Description Usage Arguments Value Examples

View source: R/GIplot.R

Description

The Gaussian Interval Plot (GIplot) is a pictorial representation of the mean and the standard deviation of a quantitative variable. It also flags potential outliers (together with their frequencies) that are c standard deviations away from the mean.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
GIplot(x, ...)

## Default S3 method:
GIplot(
  x,
  ...,
  horizontal = TRUE,
  names = c(),
  add = FALSE,
  at = 0,
  valueOfc = 2.33,
  axisLabel = "",
  main = paste("GI Plot of ", axisLabel),
  spsize = T
)

## S3 method for class 'formula'
GIplot(
  formula,
  dataset = NULL,
  horizontal = TRUE,
  names = c(),
  add = FALSE,
  at = 0,
  valueOfc = 2.33,
  axisLabel = "",
  main = paste("GIPlot of ", axisLabel),
  spsize = T,
  ...
)

Arguments

x

a numeric vector or a single list or a data frame

...

more numeric vectors for the GIplot

horizontal

Logical.TRUE (Default) for horizontal GIPlot and FALSE for vertical.

names

names of the sub-groups for which separate GIPlots are drawn on the same scale.

add

Logical. TRUE adds a new GIplot to the existing plot. FALSE (Default) will create a new plot.

at

If add = TRUE, the position at which the new GIplot should be placed.

valueOfc

the multiplier of sd to determine extreme bounds beyond which values are flagged as outliers. To flag alpha proportion of data in each tail use c = qnorm(1-alpha). When alpha = 0.01, c = qnorm(0.99) = 2.32

axisLabel

label for the axis

main

title of the GIplot.

spsize

Logical. TRUE (Default) adds a sample size to the GIplot.

formula

a formula, such as x ~ grp, where x is a numeric vector of data values to be split into groups according to the grouping variable grp (usually a factor). Note that ~ g1 + g2 is equivalent to g1:g2.

dataset

a data.frame from which the variables in formula should be taken.

Value

displays the GIplot

Examples

1
2
3
4
5
6
7
  #For vectors
  x<- rnorm(90,30,10)
  GIplot(x)

  #For Formula Class
  groupA <- rep(c(1,2,3),30)
  GIplot(x~groupA)

GIplot documentation built on Aug. 2, 2021, 5:07 p.m.

Related to GIplot in GIplot...