distdata |

Save distribution plot data to a matrix.

Saves the data used to construct a distribution plot to the workfile.

Syntax

series_name.distdata(dtype=dist_type, dist_options) matrix_name

saves the distribution plot data specified by dist_type, where dist_type must be one of the following keywords:

hist | Histogram (default). |

freqpoly | Histogram Polygon. |

edgefreqpoly | Histogram Edge Polygon. |

ash | Average Shifted Histogram. |

kernel | Kernel Density |

theory | Theoretical Distribution. |

cdf | Empirical cumulative distribution function. |

survivor | Empirical survivor function. |

logsurvivor | Empirical log survivor function. |

quantile | Empirical quantile function. |

theoryqq | Theoretical quantile-quantile plot. |

Options

The theoretical quantile-quantile plot type “theoryqq” takes the options described in
qqplot under
“Theoretical Options”.

For the remaining types, dist_options are any of the distribution type-specific options described in
distplot.

Note that the graph display specific options such as “fill,” “nofill,” and “leg,” and “noline” are not relevant for this procedure.

You may use the “prompt” option to force the dialog display

prompt | Force the dialog to appear from within a program. |

Examples

gdp.distdata(dtype=hist, anchor=0, scale=dens, rightclosed) matrix01

creates the data used to draw a histogram from the series GDP with the anchor at 0, density scaling, and right-closed intervals, and stores that data in a matrix called MATRIX01 in the workfile.

unemp.distdata(dtype=kernel, k=b,ngrid=50,b=.5) matrix02

generates the kernel density data computed with a biweight kernel at 50 grid points, using a bandwidth of 0.5 and linear binning, and stores that data in MATRIX02.

wage.distdata(dtype=theoryqq, q=o, dist=logit, p1=.5) matrix03

creates theoretical quantile-quantile data from the series WAGE using the ordinary quantile method to calculate quantiles. The theoretical distribution is the logit distribution, with the location parameter set to 0.5. The data is saved into the matrix MATRIX03.

Cross-references

For a description of distribution graphs and quantile-quantile graphs, see
“Analytical Graph Types”.