Plotqq: Difference between revisions
Jump to navigation
Jump to search
imported>Jeremy (Importing text file) |
imported>Scott |
||
(7 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). | |||
==== | 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. | * '''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 = <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. | * '''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. | * '''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''': [ <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). | * '''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')