Plotqq: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
(Importing text file)
 
imported>Scott
 
(8 intermediate revisions by 3 users not shown)
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).
 
INPUTS:
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). On the y-label, the parameters of the distribution fit is given (e.g. the mean and standard deviation for a normal distribution).
* 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.
====Inputs====
* translate = scalar, axis translation.
 
OUTPUTS:
* '''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 = <nowiki>''</nowiki>, 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.
 
:* 'beta'
 
:* 'cauchy'
 
:* 'chi squared'
 
:* 'exponential'
 
:* 'gamma'
 
:* 'gumbel'
 
:* 'laplace'
 
:* 'logistic'
 
:* 'lognormal'
 
:* 'normal'    {default}
 
:* 'pareto'
 
:* 'rayleigh'
 
:* 'triangle'
 
:* 'uniform'
 
:* 'weibull'
 
* '''translate''' = scalar, axis translation.
 
====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.
 
* u = values at which the quantiles were evaluated.
* '''q''' =  quantile of the named distribution.
 
* '''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).
 
* histogram: [ {'off'} | 'on' ] Governs the plotting of a histogram of the measured and reference distribution below the main QQ plot.
* '''plots''': [ 'none' | {'final'} ] Governs plotting. If 'none', no plot is created and the function simply returns the fit (see outputs).
* 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.
* '''histogram''': [ {'off'} | 'on' ] Governs the plotting of a histogram of the measured and reference distribution below the main QQ plot.
* color: [ 'b' ] symbol color to use for the plot(s).
 
* '''translate''': [ 0 ] translate the x axis by this offset {default = 0}.  
 
* '''varname''': [ <nowiki>''</nowiki> ] 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===
===Examples===
vals = plotqq(x)
 
vals = plotqq(x,'normal')
vals = plotqq(x)
vals = plotqq(x,'beta')
 
vals = plotqq(x,'normal')
 
vals = plotqq(x,'beta')
 
===See Also===
===See Also===
[[plotedf]], [[plotkd]], [[plotcqq]], [[plotsym]]
[[plotedf]], [[plotkd]], [[plotcqq]], [[plotsym]]

Latest revision as of 13:29, 26 January 2010

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). On the y-label, the parameters of the distribution fit is given (e.g. the mean and standard deviation for a normal distribution).

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.
  • 'beta'
  • 'cauchy'
  • 'chi squared'
  • 'exponential'
  • 'gamma'
  • 'gumbel'
  • 'laplace'
  • 'logistic'
  • 'lognormal'
  • 'normal' {default}
  • 'pareto'
  • 'rayleigh'
  • 'triangle'
  • 'uniform'
  • 'weibull'
  • 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