GDATA
Retrieves a commonly analyzed data set.
Required Arguments
IDATA — Data set indicator. (Input)
IDATA | NOBS | NVAR | Description of Data Set |
---|
1 | 16 | 7 | Longley |
2 | 176 | 2 | Wolfer sunspot |
3 | 150 | 5 | Fisher iris |
4 | 144 | 1 | Box and Jenkins Series G |
5 | 13 | 5 | Draper and Smith Appendix B |
6 | 197 | 1 | Box and Jenkins Series A |
7 | 296 | 2 | Box and Jenkins Series J |
8 | 100 | 4 | Robinson Multichannel Time Series |
9 | 113 | 34 | Afifi and Azen Data Set A |
Set IDATA = 0 to print a description of all the data sets above. In this case, the remaining arguments are not referenced.
X — NOBS by NVAR matrix containing the data set. (Output)
NOBS — Number of observations or rows in the output matrix. (Output)
NVAR — Number of variables or columns in the output matrix. (Output)
Optional Arguments
IPRINT — Printing option. (Input)
Default: IPRINT = 0.
IPRINT | Action |
---|
0 | No printing is performed. |
1 | Rows 1 through 10 of X are printed. |
2 | All rows of X are printed. |
When printing is performed, a header listing the data set name and a reference is printed.
LDX — Leading dimension of X exactly as specified in the dimension statement in the calling program. (Input)
Default: LDX = size (X,1).
NDX — Second dimension of the matrix X exactly as specified in the dimension statement of the calling program. (Input)
Default: NDX = size (X,2).
FORTRAN 90 Interface
Generic: CALL GDATA (IDATA, X, NOBS, NVAR,[, …])
Specific: The specific interface names are S_GDATA and D_GDATA.
FORTRAN 77 Interface
Single: CALL GDATA (IDATA, IPRINT, NOBS, NVAR, X, LDX, NDX)
Double: The double precision name is DGDATA.
Description
Routine GDATA retrieves a standard data set frequently cited in statistics textbooks or in this manual. The following table gives the references for each data set:
IDATA | Reference |
---|
1 | Longley (1967) |
2 | Anderson (1971, page 660) |
3 | Fisher (1936); Mardia, Kent, and Bibby (1979, Table 1.2.2 ) |
4 | Box and Jenkins (1976, page 531) |
5 | Draper and Smith (1981, pages 629‑630) |
6 | Box and Jenkins (1976, page 525) |
7 | Box and Jenkins (1976, page 532‑533) |
8 | Robinson (1967, page 204) |
9 | Afifi and Azen (1979, pages 16‑22) |
Example
GDATA is used to copy the Longley data set into the matrix X.
USE GDATA_INT
IMPLICIT NONE
INTEGER LDX, NDX
PARAMETER (LDX=200, NDX=10)
!
INTEGER IDATA, IPRINT, NOBS, NVAR
REAL X(LDX,NDX)
!
IDATA = 1
IPRINT = 2
CALL GDATA (IDATA, X, NOBS, NVAR, IPRINT=IPRINT)
!
END
Output
The Longley data.
Longley, James W. (1967), An appraisal of least squares programs for the electronic computer from the point of view of the user, Journal of the American Statistical Association, 62, 819-841.
This data set consists of 16 observations on 7 variables.
X
1 2 3 4 5 6
1 83.0 234289.0 2356.0 1590.0 107608.0 1947.0
2 88.5 259426.0 2325.0 1456.0 108632.0 1948.0
3 88.2 258054.0 3682.0 1616.0 109773.0 1949.0
4 89.5 284599.0 3351.0 1650.0 110929.0 1950.0
5 96.2 328975.0 2099.0 3099.0 112075.0 1951.0
6 98.1 346999.0 1932.0 3594.0 113270.0 1952.0
7 99.0 365385.0 1870.0 3547.0 115094.0 1953.0
8 100.0 363112.0 3578.0 3350.0 116219.0 1954.0
9 101.2 397469.0 2904.0 3048.0 117388.0 1955.0
10 104.6 419180.0 2822.0 2857.0 118734.0 1956.0
11 108.4 442769.0 2936.0 2798.0 120445.0 1957.0
12 110.8 444546.0 4681.0 2637.0 121950.0 1958.0
13 112.6 482704.0 3813.0 2552.0 123366.0 1959.0
14 114.2 502601.0 3931.0 2514.0 125368.0 1960.0
15 115.7 518173.0 4806.0 2572.0 127852.0 1961.0
16 116.9 554894.0 4007.0 2827.0 130081.0 1962.0
7
1 60323.0
2 61122.0
3 60171.0
4 61187.0
5 63221.0
6 63639.0
7 64989.0
8 63761.0
9 66019.0
10 67857.0
11 68169.0
12 66513.0
13 68655.0
14 69564.0
15 69331.0
16 70551.0
Published date: 03/19/2020
Last modified date: 03/19/2020