Plotqq

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search

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