Plotqq: Difference between revisions
Jump to navigation
Jump to search
imported>Jeremy (→Inputs) |
imported>Scott |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 9: | Line 9: | ||
===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==== | ====Inputs==== | ||
Line 16: | Line 16: | ||
* '''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. | * '''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. |
Latest revision as of 12: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')