Skip to main content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

DATAPAC

Introduction

The DATAPAC library was written by James Filliben of the Statistical Engineering Division. After these routines were incorporated into the Dataplot program, development of DATAPAC stopped. However, there are some subroutines here that may still be of interest. In particular, there are a number of routines for computing various probability functions.

This software is not formally supported and is not being further developed. It is provided on an "as is" basis. There is no formal documentation for the subroutines. However, most of the subroutines contain usage instructions in the comments in the source code.

These routines are written in Fortran 77 and should be portable to most Fortran 77 compilers.

Contents

You can download the Fortran source code as a single file or you can download specific subroutines.

The following subroutines are available:

  • AUTOCO - compute the sample autocorrelation coefficient
  • BETRAN - generate beta random numbers
  • BINCDF - compute the binomial cumulative distribution function
  • BINPPF - compute the binomial percent point function
  • BINRAN - generate binomial random numbers
  • CAUCDF - compute the Cauchy cumulative distribution function
  • CAUPDF - compute the Cauchy probability density function
  • CAUPLT - generate a Cauchy probability plot (line printer graph)
  • CAUPPF - compute the Cauchy percent point function
  • CAURAN - generate Cauchy random numbers
  • CAUSF - compute the Cauchy sparsity function
  • CHSCDF - compute the chi-square cumulative distribution function
  • CHSPLT - generate a chi-square probability plot (line printer graph)
  • CHSPPF - compute the chi-square percent point function
  • CHSRAN - generate chi-square random numbers
  • CODE - code the elements of a vector (1 for the minimum, 2 for the next larger value, and so on)
  • COPY - copy the elements of one vector into another vector
  • CORR - compute the sample correlation coefficient
  • COUNT - compute the number of observations between a minimum and a maximum value
  • DECOMP - decomposes a weighted data matrix (utility routine used by other routines)
  • DEFINE - set all elements of a vector equal to a specified constant
  • DELETE - delete all elements of a vector within some specified interval
  • DEMOD - perform a complex demodulation
  • DEXCDF - compute the double exponential cumulative distribution function
  • DEXPDF - compute the double exponential probability density function
  • DEXPLT - generate a double exponential probability plot (line printer graph)
  • DEXPPF - compute the double exponential percent point function
  • DEXRAN - generate double exponential random numbers
  • DEXSF - compute the double exponential sparsity function
  • DISCR2 - bin the elements of a vector (output vector contains class midpoints)
  • DISCR3 - bin the elements of a vector (output vector contains 1's, 2's, 3's, and so on)
  • DISCRE - bin the elements of a vector (like DISCR2, but allows specification of min and max class limits)
  • DOT - compute a dot product of two vectors
  • EV1CDF - compute the extreme value type 1 (Gumbel) cumulative distribution function
  • EV1PLT - generate a extreme value type 1 (Gumbel) probability plot (line printer graph)
  • EV1PPF - compute the extreme value type 1 (Gumbel) percent point function
  • EV1RAN - generate extreme value type 1 (Gumbel) random numbers
  • EV2CDF - compute the extreme value type 2 (Frechet) cumulative distribution function
  • EV2PLT - generate a extreme value type 2 (Frechet) probability plot (line printer graph)
  • EV2PPF - compute the extreme value type 2 (Frechet) percent point function
  • EV2RAN - generate extreme value type 2 (Frechet) random numbers
  • EXPCDF - compute the exponential cumulative distribution function
  • EXPPDF - compute the exponential probability density function
  • EXPPLT - generate a exponential probability plot (line printer graph)
  • EXPPPF - compute the exponential percent point function
  • EXPRAN - generate exponential random numbers
  • EXPSF - compute the exponential sparsity function
  • EXTREME - determine whether a type 1 or type 2 extreme value distribution better fits a given data set
  • FCDF - compute the F cumulative distribution function
  • FOURIE - perform a Fourier analysis of a data set
  • FRAN - generate F random numbers
  • FREQ - compute the sample frequency and cumulative sample frequency of a vector
  • GAMCDF - compute the gamma cumulative distribution function
  • GAMPLT - generate a gamma probability plot (line printer graph)
  • GAMPPF - compute the gamma percent point function
  • GAMRAN - generate gamma random numbers
  • GEOCDF - compute the geometric cumulative distribution function
  • GEOPLT - generate a geometric probability plot (line printer graph)
  • GEOPPF - compute the geometric percent point function
  • GEORAN - generate geometric random numbers
  • HFNCDF - compute the half-normal cumulative distribution function
  • HFNPLT - generate a half-normal probability plot (line printer graph)
  • HFNPPF - compute the half-normal percent point function
  • HFNRAN - generate half-normal random numbers
  • HIST - generates histograms based on two different class widths
  • INVXWX - compute the inverse of X'WX
  • LAMCDF - compute the Tukey-Lambda cumulative distribution function
  • LAMPDF - compute the Tukey-Lambda probability density function
  • LAMPLT - generate a Tukey-Lambda probability plot (line printer graph)
  • LAMPPF - compute the Tukey-Lambda percent point function
  • LAMRAN - generate Tukey-Lambda random numbers
  • LAMSF - compute the Tukey-Lambda sparsity function
  • CAUCDF - compute the lognormal cumulative distribution function
  • CAUPDF - compute the lognormal probability density function
  • CAUPLT - generate a lognormal probability plot (line printer graph)
  • CAUPPF - compute the lognormal percent point function
  • CAURAN - generate lognormal random numbers
  • LOC - compute the sample mean, midrange, midmean, and median
  • LOGCDF - compute the logistic cumulative distribution function
  • LOGPDF - compute the logistic probability density function
  • LOGPLT - generate a logistic probability plot (line printer graph)
  • LOGPPF - compute the logistic percent point function
  • LOGRAN - generate logistic random numbers
  • LOGSF - compute the logistic sparsity function
  • MAX - compute the maximum of a data vector
  • MEAN - compute the mean of a data vector
  • MEDIAN - compute the median of a data vector
  • MIDM - compute the midmean of a data vector
  • MIDR - compute the midrange of a data vector
  • MIN - compute the minimum of a data vector
  • MOVE - move selected elements of one vector into another vector
  • NBCDF - compute the negative binomial cumulative distribution function
  • NBPPF - compute the negative binomial percent point function
  • NBRAN - generate negative binomial random numbers
  • NORCDF - compute the normal cumulative distribution function
  • NORPDF - compute the normal probability density function
  • NORPLT - generate a normal probability plot (line printer graph)
  • NORPPF - compute the normal percent point function
  • NORRAN - generate normal random numbers
  • NORSF - compute the normal sparsity function
  • PARCDF - compute the Pareto cumulative distribution function
  • PARPLT - generate a Pareto probability plot (line printer graph)
  • PARPPF - compute the Pareto percent point function
  • PARRAN - generate Pareto random numbers
  • PLOT10 - generate a line printer plot with special plot characters
  • PLOT6 - generate a line printer plot
  • PLOT7 - generate a line printer plot with special plot characters
  • PLOT8 - generate a line printer plot with special plot characters
  • PLOT9 - generate a line printer plot with special plot characters
  • PLOTC - generate a line printer plot with special plot characters
  • PLOTCO - generate a line printer autocorrelation plot
  • PLOTCT - generate a line printer plot for the terminal (71 characters wide)
  • PLOTSC - generate a line printer plot with special plot characters
  • PLOTS - generate a line printer plot of Y vs X
  • PLOTSP - generate a line printer spectrum plot
  • PLOTST - generate a line printer plot of Y vs X for the terminal (71 characters wide)
  • PLOTT - generate a line printer plot of Y vs X for the terminal (71 characters wide)
  • PLOTU - generate a line printer 4-plot
  • PLOTX - generate a line printer run sequence plot
  • PLOTXT - generate a line printer run sequence plot for the terminal (71 characters wide)
  • PLOTXX - generate a line printer lag plot
  • PLTSCT - generate a line printer plot with special plot characters for the terminal (71 characters wide)
  • PLTXXT - generate a line printer lag plot for the terminal (71 characters wide)
  • POICDF - compute the Poisson cumulative distribution function
  • POIPLT - generate a Poisson probability plot (line printer graph)
  • POIPPF - compute the Poisson percent point function
  • POIRAN - generate Poisson random numbers
  • POLY - compute a least squares polynomial fit (calls DECOMP, INVXWX,DOT, FCDF)
  • PROPOR - compute the sample proportion
  • RANGE - compute the sample range
  • RANK - rank a vector of sample observations
  • RANPER - generates a random permutation
  • READ - perform a format-free read of data from a file
  • READG - perform a format-free read of data from a file restricted to a user-specified set of columns
  • RELSD - compute the relative standard deviation of a vector of observations
  • REPLAC - replace all observations in a vector within a given interval with a user-specified constant
  • RETAIN - retain all observations in a vector within a user-specified interval
  • RUNS - perform a runs test
  • SAMPP - compute the sample 100P percent point (i.e., percentile)
  • SCALE - compute the sample range, sample standard deviation, sample relative standard deviation, and sample variance
  • SD - compute the standard deviation of a vector of observations
  • SKIPR - skip over a user-specified number of rows in reading a data file
  • SORTC - sort a vector of sample observations and "carry" a second a vector
  • SORT - sort a vector of sample observations, also return the positions in the original vector
  • SPCORR - compute the sample Spearman rank correlation coefficient between two vectors of observations
  • STMOM3 - compute the third central moment (i.e., the skewness) of a vector of observations
  • STMOM4 - compute the fourth central moment (i.e., the kurtosis) of a vector of observations
  • SUBSE1 - extract the elements of a vector which fall into a user-specified subset (one subset variable)
  • SUBSE2 - extract the elements of a vector which fall into a user-specified subset (two subset variables)
  • SUBSET - extract the elements of a vector which fall into a user-specified subset (one subset variable)
  • TAIL - performs a symmetric distribution tail length analysis
  • TCDF - compute the t cumulative distribution function
  • TIME - perform a time series analysis (autocorrelation plot, a test for white noise, a "pilot" spectrum, and 4 other estimated spectra based on differing bandwidth)
  • TOL - compute normal and distribution-free tolerance limits
  • TPLT - generate a t probability plot (line printer graph)
  • TPPF - compute the t percent point function
  • TRAN - generate t random numbers
  • UNICDF - compute the Uniform cumulative distribution function
  • UNIMED - generate the N order statistic medians (used in creating probability plots)
  • UNIPDF - compute the Uniform probability density function
  • UNIPLT - generate a Uniform probability plot (line printer graph)
  • UNIPPF - compute the Uniform percent point function
  • UNIRAN - generate Uniform random numbers
  • UNISF - compute the Uniform sparsity function
  • VAR - compute the sample variance of a vector of observations
  • WEIB - perform a Weibull distribution analysis (Weibull PPCC analysis)
  • WEICDF - compute the Weibull cumulative distribution function
  • WEIPLT - generate a Weibull probability plot (line printer graph)
  • WEIPPF - compute the Weibull percent point function
  • WEIRAN - generate Weibull random numbers
  • WIND - compute the sample Winsorized mean of a vector of observations
  • WRITE - write a vector of observations in a "neat" fashion

Created July 25, 2012, Updated January 6, 2017