Last data update: 2014.03.03

R: Student's t Quantile-Quantile Plot
qqtR Documentation

Student's t Quantile-Quantile Plot

Description

Plots the quantiles of a data sample against the theoretical quantiles of a Student's t distribution.

Usage

qqt(y, df = Inf, ylim = range(y), main = "Student's t Q-Q Plot", 
    xlab = "Theoretical Quantiles", ylab = "Sample Quantiles", plot.it = TRUE, ...) 
qqf(y, df1, df2, ylim=range(y), main= "F Distribution Q-Q Plot",
    xlab = "Theoretical Quantiles", ylab = "Sample Quantiles", plot.it = TRUE, ...)

Arguments

y

a numeric vector or array containing the data sample

df

degrees of freedom for the t-distribution. The default df=Inf represents the normal distribution.

df1

numerator degrees of freedom for the F-distribution.

df2

denominator degrees of freedom for the F-distribution.

ylim

plotting range for y

main

main title for the plot

xlab

x-axis title for the plot

ylab

y-axis title for the plot

plot.it

whether or not to produce a plot

...

other arguments to be passed to plot

Details

This function is analogous to qqnorm for normal probability plots. In fact qqt(y,df=Inf) is identical to qqnorm(y) in all respects except the default title on the plot.

Value

A list is invisibly returned containing the values plotted in the QQ-plot:

x

theoretical quantiles of the t-distribution or F-distribution

y

the data sample, same as input y

Author(s)

Gordon Smyth

See Also

qqnorm

Examples

#  See also the lmFit examples

y <- rt(50,df=4)
qqt(y,df=4)
abline(0,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(limma)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/limma/qqt.Rd_%03d_medium.png", width=480, height=480)
> ### Name: qqt
> ### Title: Student's t Quantile-Quantile Plot
> ### Aliases: qqt qqf
> ### Keywords: distributions
> 
> ### ** Examples
> 
> #  See also the lmFit examples
> 
> y <- rt(50,df=4)
> qqt(y,df=4)
> abline(0,1)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>