Last data update: 2014.03.03

R: Generalized Inverse Gaussian Quantile-Quantile and...
GIGPlotsR Documentation

Generalized Inverse Gaussian Quantile-Quantile and Percent-Percent Plots

Description

qqgig produces a generalized inverse Gaussian QQ plot of the values in y.

ppgig produces a generalized inverse Gaussian PP (percent-percent) or probability plot of the values in y.

If line = TRUE, a line with zero intercept and unit slope is added to the plot.

Graphical parameters may be given as arguments to qqgig, and ppgig.

Usage

qqgig(y, chi = 1, psi = 1, lambda = 1,
      param = c(chi, psi, lambda),
      main = "GIG Q-Q Plot",
      xlab = "Theoretical Quantiles",
      ylab = "Sample Quantiles",
      plot.it = TRUE, line = TRUE, ...)

ppgig(y, chi = 1, psi = 1, lambda = 1,
      param = c(chi, psi, lambda),
      main = "GIG P-P Plot",
      xlab = "Uniform Quantiles",
      ylab = "Probability-integral-transformed Data",
      plot.it = TRUE, line = TRUE, ...)

Arguments

y

The data sample.

chi

A shape parameter that by default holds a value of 1.

psi

Another shape parameter that is set to 1 by default.

lambda

Shape parameter of the GIG distribution. Common to all forms of parameterization. By default this is set to 1.

param

Parameters of the generalized inverse Gaussian distribution.

xlab, ylab, main

Plot labels.

plot.it

Logical. TRUE denotes the results should be plotted.

line

Logical. If TRUE, a line with zero intercept and unit slope is added to the plot.

...

Further graphical parameters.

Value

For qqgig and ppgig, a list with components:

x

The x coordinates of the points that are be plotted.

y

The y coordinates of the points that are be plotted.

References

Wilk, M. B. and Gnanadesikan, R. (1968) Probability plotting methods for the analysis of data. Biometrika. 55, 1–17.

See Also

ppoints, dgig.

Examples

par(mfrow = c(1, 2))
y <- rgig(1000, param = c(2, 3, 1))
qqgig(y, param = c(2, 3, 1), line = FALSE)
abline(0, 1, col = 2)
ppgig(y, param = c(2, 3, 1))

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(GeneralizedHyperbolic)
Loading required package: DistributionUtils
Loading required package: RUnit
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/GeneralizedHyperbolic/qqgig.Rd_%03d_medium.png", width=480, height=480)
> ### Name: GIGPlots
> ### Title: Generalized Inverse Gaussian Quantile-Quantile and
> ###   Percent-Percent Plots
> ### Aliases: qqgig ppgig
> ### Keywords: hplot distribution
> 
> ### ** Examples
> 
> par(mfrow = c(1, 2))
> y <- rgig(1000, param = c(2, 3, 1))
> qqgig(y, param = c(2, 3, 1), line = FALSE)
> abline(0, 1, col = 2)
> ppgig(y, param = c(2, 3, 1))
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>