Plotqq: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
(Importing text file)
imported>Jeremy
(Importing text file)
Line 1: Line 1:
===Purpose===
===Purpose===
Quantile-quantile plot.
Quantile-quantile plot.
===Synopsis===
===Synopsis===
:vals = plotqq(x,distname,''options'')
:vals = plotqq(x,distname,''options'')
===Description===
===Description===
Makes a quantile-quantile plot of a sample in the input (x) against the optional input (distname). A 45 degree line is also plotted. The larger the deviation from the reference line the more likely it is the input (x) does not come from the distribution (distname).
Makes a quantile-quantile plot of a sample in the input (x) against the optional input (distname). A 45 degree line is also plotted. The larger the deviation from the reference line the more likely it is the input (x) does not come from the distribution (distname).
====INPUTS====
====INPUTS====
* '''x''' = matrix (column vector) in which the sample data is stored.
* '''x''' = matrix (column vector) in which the sample data is stored.
* '''distname''' = string, optional distribution name to assume as the parent distribution for the sample. Default value is 'normal'. If distname = 'select' or = '', the user is prompted to select one of the valid distribution types to use. If distname = 'auto' or 'automatic' then the best fitting distribution is used as determined by DISTFIT.
* '''distname''' = string, optional distribution name to assume as the parent distribution for the sample. Default value is 'normal'. If distname = 'select' or = '', the user is prompted to select one of the valid distribution types to use. If distname = 'auto' or 'automatic' then the best fitting distribution is used as determined by DISTFIT.
* '''translate''' = scalar, axis translation.
* '''translate''' = scalar, axis translation.
====OUTPUTS====
====OUTPUTS====
The return value is a structure with the following fields:
The return value is a structure with the following fields:
* '''q''' =  quantile of the named distribution.
* '''q''' =  quantile of the named distribution.
* '''u''' = values at which the quantiles were evaluated.
* '''u''' = values at which the quantiles were evaluated.
===Options===
===Options===
* '''plots''': [ 'none' | {'final'} ] Governs plotting. If 'none', no plot is created and the function simply returns the fit (see outputs).
* '''plots''': [ 'none' | {'final'} ] Governs plotting. If 'none', no plot is created and the function simply returns the fit (see outputs).
* '''histogram''': [ {'off'} | 'on' ] Governs the plotting of a histogram of the measured and reference distribution below the main QQ plot.
* '''histogram''': [ {'off'} | 'on' ] Governs the plotting of a histogram of the measured and reference distribution below the main QQ plot.
* '''translate''': [ 0 ] translate the x axis by this offset {default = 0}.  
* '''translate''': [ 0 ] translate the x axis by this offset {default = 0}.  
* '''varname''': [ '' ] label name to use on x-axis and title. Default is empty which uses the actual input variable name.
* '''varname''': [ '' ] label name to use on x-axis and title. Default is empty which uses the actual input variable name.
* '''color''': [ 'b' ] symbol color to use for the plot(s).
* '''color''': [ 'b' ] symbol color to use for the plot(s).
===Examples===
===Examples===
vals = plotqq(x)
vals = plotqq(x)
vals = plotqq(x,'normal')
vals = plotqq(x,'normal')
vals = plotqq(x,'beta')
vals = plotqq(x,'beta')
===See Also===
===See Also===
[[plotedf]], [[plotkd]], [[plotcqq]], [[plotsym]]
[[plotedf]], [[plotkd]], [[plotcqq]], [[plotsym]]

Revision as of 15:26, 3 September 2008

Purpose

Quantile-quantile plot.

Synopsis

vals = plotqq(x,distname,options)

Description

Makes a quantile-quantile plot of a sample in the input (x) against the optional input (distname). A 45 degree line is also plotted. The larger the deviation from the reference line the more likely it is the input (x) does not come from the distribution (distname).

INPUTS

  • x = matrix (column vector) in which the sample data is stored.
  • distname = string, optional distribution name to assume as the parent distribution for the sample. Default value is 'normal'. If distname = 'select' or = , the user is prompted to select one of the valid distribution types to use. If distname = 'auto' or 'automatic' then the best fitting distribution is used as determined by DISTFIT.
  • translate = scalar, axis translation.

OUTPUTS

The return value is a structure with the following fields:

  • q = quantile of the named distribution.
  • u = values at which the quantiles were evaluated.

Options

  • plots: [ 'none' | {'final'} ] Governs plotting. If 'none', no plot is created and the function simply returns the fit (see outputs).
  • histogram: [ {'off'} | 'on' ] Governs the plotting of a histogram of the measured and reference distribution below the main QQ plot.
  • translate: [ 0 ] translate the x axis by this offset {default = 0}.
  • varname: [ ] label name to use on x-axis and title. Default is empty which uses the actual input variable name.
  • color: [ 'b' ] symbol color to use for the plot(s).

Examples

vals = plotqq(x)

vals = plotqq(x,'normal')

vals = plotqq(x,'beta')

See Also

plotedf, plotkd, plotcqq, plotsym