home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-09-29 | 48.1 KB | 1,160 lines |
- UNITED STATES DEPARTMENT OF THE INTERIOR
-
- GEOLOGICAL SURVEY
-
-
-
-
-
-
-
- Brief descriptions of STATPAC and related statistical programs
-
- for the IBM Personal Computer
-
-
- by
-
-
- U.S. Geological Survey
-
-
- Last update August 5, 1984
-
-
-
- Open-File Report 84-522
-
-
-
-
-
-
-
- DISCLAIMER
-
-
- Although program tests have been made, no guarantee (expressed or implied)
- is made by the authors regarding program correctness, accuracy, or proper
- execution on all computer systems.
-
-
-
-
- -------------
- Any use of trade names in this report is for descriptive purposes only and
- does not imply endorsement by the U.S. Geological Survey. This report is
- preliminary and has not been reviewed for conformity with the U.S. Geological
- Survey editorial standards.
-
-
-
-
-
- Contents
-
- ____________________
-
- Page
-
- Introduction ------------------------------------------------- 4
- General remarks on the STATPAC system ------------------------ 5
- STATPAC data files ------------------------------------------- 7
- Classification of programs ----------------------------------- 8
- Programs ----------------------------------------------------- 9
- ADCOLS -------------------------------------------------- 9
- ADROWS -------------------------------------------------- 9
- ANOV-1& ------------------------------------------------- 9
- ANOV-1.BAT ---------------------------------------------- 9
- ANOV-2 -------------------------------------------------- 9
- BASTAT -------------------------------------------------- 9
- CARFIL -------------------------------------------------- 9
- CHARSORT ------------------------------------------------ 10
- CHR2STP ------------------------------------------------- 10
- CMN2STP ------------------------------------------------- 10
- COOR ---------------------------------------------------- 10
- CURVES -------------------------------------------------- 10
- DLCOLS -------------------------------------------------- 10
- DLROWS -------------------------------------------------- 10
- DUPFINDR ------------------------------------------------ 10
- EQBFIT ------------------------------------------------- 11
- EQFILE -------------------------------------------------- 11
- EQMODE -------------------------------------------------- 11
- EQSPIN -------------------------------------------------- 11
- EQTEST --------------------------------------------------- 12
- FINDRG --------------------------------------------------- 12
- FILFIL --------------------------------------------------- 12
- FILONE --------------------------------------------------- 12
- FILTER --------------------------------------------------- 12
- FIXIT ---------------------------------------------------- 12
- FVDGRM$ -------------------------------------------------- 12
- GSCUTM --------------------------------------------------- 12
- GXFIXX --------------------------------------------------- 13
- JKGTLS --------------------------------------------------- 13
- JKPTLS --------------------------------------------------- 13
- MAP---$ -------------------------------------------------- 13
- MAPPLT --------------------------------------------------- 13
- MATRIX --------------------------------------------------- 13
- NEWIDS --------------------------------------------------- 13
- NEWLOC --------------------------------------------------- 13
- NORCHI --------------------------------------------------- 13
- NORMST --------------------------------------------------- 14
- PACR2STP ------------------------------------------------- 14
- PARCOR --------------------------------------------------- 14
- PERMUTER ------------------------------------------------- 14
-
- PRINTT --------------------------------------------------- 14
- POLYGRET ------------------------------------------------- 14
- RANDOM$ -------------------------------------------------- 15
- REGRESS&.FOR --------------------------------------------- 15
- REPLAC---------------------------------------------------- 15
- ROWIDRET-------------------------------------------------- 15
- RRMODE---------------------------------------------------- 15
- SORTT----------------------------------------------------- 16
- SS2DBLOK-------------------------------------------------- 16
- SS2DDRES-------------------------------------------------- 17
- SS2DGAMH-------------------------------------------------- 17
- SS2DGRID-------------------------------------------------- 17
- SS2DMEN&.FOR --------------------------------------------- 17
- SS2DMENU.BAT --------------------------------------------- 18
- SS2DPREP-------------------------------------------------- 18
- SS2DVCTL-------------------------------------------------- 18
- SSS2DXVAL------------------------------------------------- 18
- STATCOR--------------------------------------------------- 18
- STDGRM$--------------------------------------------------- 19
- STP2CHR--------------------------------------------------- 19
- STP2CMN--------------------------------------------------- 19
- STPMEN&.FOR----------------------------------------------- 19
- STPMENU.BAT----------------------------------------------- 19
- STPSORT--------------------------------------------------- 19
- TABFIL---------------------------------------------------- 19
- TABRAN---------------------------------------------------- 19
- TABQ------------------------------------------------------ 20
- TERFIL---------------------------------------------------- 20
- TERFIL$--------------------------------------------------- 20
- TERPLT---------------------------------------------------- 20
- UCODERET-------------------------------------------------- 20
- WHATQ----------------------------------------------------- 20
- XYDGRM$--------------------------------------------------- 20
- XYPLOT---------------------------------------------------- 20
- References Cited----------------------------------------------- 21
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Brief descriptions of STATPAC and related statistical programs
-
- for the IBM Personal Computer
-
-
- Programs written for or modified for the PC
-
- by the U.S. Geological Survey
-
- Last update August 5, 1984
-
-
- Introduction
-
-
- Computer programs described in this report have been developed to be
- run on the IBM personal computer (PC), a desk-top microcomputer that is
- based on the 16-bit, 8088 microprocessor by Intel. The programs take
- advantage of the 8087 numeric co-processor, which greatly accelerates
- floating-point arithmetic operations. This co-processor is not mandatory,
- but some programs which perform a large number of floating-point operations
- will require much longer run times without it. This co-processor is not
- ordinarily included with the PC as originally purchased, but is a highly
- desirable upgrade if maximum utility of these programs is to be realized.
-
- In addition, a FORTRAN 77 (by Microsoft, version 3.20 or later)
- compiler is required, as only FORTRAN source code for the programs is
- supplied on the release diskettes which are available in U.S. Geological
- Survey Public Information 0ffices. BASIC programs are written in IBM
- BASIC, which is a modification of BASIC by Microsoft. Interpreted BASIC
- tends to run slowly, but compiled BASIC programs (run modules created by
- IBM's BASIC compiler) run at much faster speeds. A BASIC compiler is a
- highly desirable software addition.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- General remarks on the STATPAC system
-
-
- The USGS STATPAC system of mathematical and statistical programs
- was developed over more than 20 years by a number of mathematicians
- and programers. The system was originally written in ALGOL for the
- Burroughs 220 and 5000 systems, and later translated into FORTRAN for
- the IBM 360/370, DEC10, and Honeywell Multics systems. The programs are
- used chiefly in the fields of applied geochemistry and petrology, but
- may be used with any data that can be logically arranged into a matrix
- wherein the rows represent samples, or observations, and the columns
- represent variables, or measurements. Each data value can be qualified
- by any one of six different single-character codes which are used, in
- the field of applied geochemistry, to have the following meanings:
-
- N Constituent not detected
-
- L Less than the associated value.
- Constituent present but concentration
- is too low to be measured by the
- analytical method being used
-
- T Trace of constituent is present
-
- G Greater than the associated value.
- Concentration is too large to be
- measured by the analytical
- method being used
-
- H Concentration not measured because of
- analytical interference
-
- B Blank. No value reported
-
- Some of the STATPAC programs ignore the qualifying codes, some
- (such as those for multivariate analysis) reject the data set if the
- codes are present, and others use the codes as appropriate for the
- computation being performed. The qualifying codes can be eliminated
- from the data set if desired (see program REPLAC), but all aspects of
- treatment of the qualified data are the responsibility of the program
- user.
-
- All programs are in FORTRAN 77 except where noted in the program
- descriptions. Programs with names ending in the character "$" are in
- IBM BASIC and either accept or write out standard .CHR files (see below).
- Two subroutines (clears and tickers) are written in 8086 assembly language.
- They are present on the release disks as assembly language source code and as
- ready-to-link object modules. A user desiring to modify these routines must
- have access to a small assembler or a macroassembler.
-
- Data are generally entered into unformatted STATPAC files from
- card-image files using the programs TABFIL or CARFIL (cards to STATPAC
- file), or small data sets can be entered into a STATPAC file with program
- TERFIL (terminal to STATPAC file). All STATPAC files are written with
- the subroutine JKPTLS (in IOS.FOR) and read with subroutine JKGTLS (also
-
-
-
- in IOS.FOR). An output file from any STATPAC FORTRAN program can be
- used as input to any other STATPAC FORTRAN program. Once the data set
- has been entered on a STATPAC file, it can be transformed and modified
- in any manner with program FILFIL (STATPAC file to STATPAC file). Both
- programs CARFIL and FILFIL must be modified, re-compiled, and re-linked
- for each new application.
-
- The program naming convention used here commonly includes 3-character
- identifiers with the following meanings:
-
- CAR a card-image or ASCII file
-
- FIL
- or
- STP a binary STATPAC file
-
- TER the terminal or keyboard
-
- CHR a standardized ASCII file used for input
- to certain BASIC-language programs
- (i.e. those with a "$" at the end
- of their names).
-
- CMN an ASCII file used for data communications
- (i.e., uploading or downloading).
-
- TAB an ASCII data file that contains two rows
- for each observation. See program
- TABFIL.
-
- Some of the FORTRAN programs and subroutines use the metacommand
- NCLUDE: xxxxx.INC. The file xxxxx.INC must be present when the program
- is compiled.
-
- Programs that contain more than a few subroutine segments can be
- linked by typing LINK @xxxxx.LNK, where xxxxx is the program name.
- See for example program RRMODE and RRMODE.LNK or MATRIX and MATRIX.LNK.
-
- The source codes for the programs are contained on 5-1/4 inch double-
- sided floppy diskettes maintained on file in U.S. Geological Survey
- Public Information 0ffices. Users supplying their own diskettes are
- invited to use the micro-computer facilities available in these offices
- to make duplicates. Comments or questions concerning program content should
- be directed to the U.S. Geological Survey's Branch of Resource Analysis in
- Denver, Colorado.
-
-
-
-
-
-
-
-
-
- STATPAC data files
-
- STATPAC data files on the Denver Multics system can be converted to
- ASCII character files with Multics STATPAC program STP2CMN, then downloaded
- to the PC via telephone lines and converted back to binary STATPAC files
- with PC program CMN2STP.
-
- The standard ASCII files needed for input to the BASIC programs can
- be created with program STP2CHR (and converted back with CHR2STP) or can
- be produced with program TERFIL$ by typing data in at the keyboard.
-
- STATPAC programs in FORTRAN generally include declarator statements
- similar to:
-
- CHARACTER*4 ID(2),IVID(m,2),NAME(4)
-
- CHARACTER*1 IA(m)
-
- INTEGER*4 LOC(2)
-
- DIMENSION X(m)
-
- where "m" is the maximum number of variables (columns) allowed in the
- input data file. Binary STATPAC data files contain a "header" record
- followed by N data records. The header record is written by the
- FORTRAN statement:
-
- WRITE(KI) ID,N,M,(IVID(I,1),IVID(I,2),I=1,M)
-
- and read by:
-
- READ(KI) ID,N,M,(IVID(I,1),IVID(I,2),I=1,M)
-
- where KI is the device number, ID is an 8-character data set identifier,
- N is the number of rows in the data matrix and M is the number of columns.
- IVID is an 8-character identifier for each variable (column). Data
- records are written to and read from STATPAC files with the following
- FORTRAN statements, respectively:
-
- CALL JKPTLS(KI,I,NAME,LOC,X,IA,M)
-
- CALL JKGTLS(KI,J,NAME,LOC,X,IA,M,IERR)
-
- where I is a sequential row-number (generally the index for a DO loop),
- J is the row-number from the data file, NAME is a 16-character name for
- an observation (sample identifier), LOC contains two integers (generally
- latitude and longitude of the sampling site), X contains the numeric
- data values, and IA contains the qualifying codes. The first 8 characters
- of NAME are referred to as the primary row ID and the second 8 characters
- form the secondary row ID. IERR is an "unexpected end-of-file" error
- flag from subroutine JKGTLS and should be zero.
-
- By convention, all binary STATPAC data file names end with the
- extension .STP and all ACSII character data files with standardized
-
-
- format for the BASIC programs have extensions of .CHR. Files created
- for transfer of data via phone lines have the extension .CMN. (See
- programs STP2CHR, CHR2STP, STP2CMN and CMN2STP for creating one type
- of data file from another.)
-
- Batch files (with extension .BAT) are used to invoke programs
- that require printer formats with more than 80 characters per line
- (see, for example, programs ANOV-1 and REGRESS). The batch routine,
- started by simply typing the program name, xxxxx, sets the IBM or
- EPSON printer to 132 characters per line, calls the program with name
- xxxxx&, and then resets the printer to 80 characters per line after
- execution.
-
- Classification of programs
-
- Data Entry Sorting Utility
-
- CARFIL CHARSORT ADCOLS
- TABFIL SORTT ADROWS
- TERFIL STPSORT COOR
- TERFIL$ DLCOLS
- DLROWS
- Retrieval DUPFINDR
- File FINDRG
- Conversion POLYGRET FILFIL
- ROWIDRET FILONE
- CHR2STP UCODERET FILTER
- CMN2STP FIXIT
- PACR2STP GSCUTM
- STP2CHR Mathematics & GXFIXX
- STP2CMN Statistics NEWIDS
- NEWLOC
- Graphics ANOV-1 PERMUTER
- ANOV-2 PRINTT
- FVDGRM$ BASTAT REPLAC
- MAP---$ CURVES TABQ
- MAPPLT MATRIX WHATQ
- STDGRM$ NORCHI
- TERPLT NORMST Factor
- XYDGRM$ PARCOR Analysis
- XYPLOT RANDOM$
- REGRESS EQBFIT
- Spatial Statistics STATCOR EQFILE
- (Kriging) TABRAN EQMODE
- EQSPIN
- STPMENU EQTEST
- SS2DMENU RRMODE
- SS2DPREP
- SS2DVCTL
- SS2DGAMH
- SS2DXVAL
- SS2DBLOK
- SS2DGRID
- SS2DDRES
-
- Programs
-
- ADCOLS
- Merges two STATPAC data matrices columnwise. The two matrices
- must have the same number of rows.
- Link with: IOS
-
- ADROWS
- Merges two STATPAC data matrices rowwise. The two matrices must
- have the same number of columns.
- Link with: IOS
-
- ANOV-1& (formerly program D0038)
- 0ne-way nested (hierarchical) analysis of variance. Up to 10
- levels may be nested and the design may be unbalanced. Variance
- component estimates may be written on a STATPAC output file.
- Non-significant mean-square estimates are pooled for revised
- significance tests. Output is directed to the printer which must
- provide 132 characters per line. The first NL variables in the
- STATPAC data file, where NL is the number of nested levels, must
- be indices that specify the position of the observation in the
- ANOV design. See ANOV-1.BAT.
- Link with: IOS
-
- ANOV-1.BAT
- Batch routine to set the IBM or EPSON printer to 132 characters
- per line. Program ANOV-1& is then executed automatically, and
- the printer setting is then returned to 80 characters per line.
- To execute, type "ANOV-1".
-
- ANOV-2
- Two-way analysis of variance with or without within-cell replica-
- tions. Data on the STATPAC file must be ordered replications-
- columns-rows. That is, all replications for col.1,row1 -then
- all replications for col.1,row2 -then col.1,row3, etc. until
- col.1,row"n". The data for col.2,row1 then follow. There may
- be up to 35 variables on the STATPAC input file with up to 100
- columns and 12 rows in the ANOV design. F-ratios are computed
- using the error term in the denominator and again using the pooled
- error and interaction terms. The latter F-ratio is to be used
- only where the interaction variance is not significant.
- Link with: IOS
-
- BASTAT
- Computes basic statistics on a STATPAC data set and constructs
- horizontal bar-type histograms.
- Link with: GRAPH, PRCEN, BDSTA, and IOS.
-
- CARFIL
- Produces a binary STATPAC file from a card-image file. CARFIL
- must be modified and recompiled for each new card-image format.
- Link with: IOS
-
-
-
- CHARSORT
- This program sorts a character file of 3000 records or less in
- either ascending or descending order. No record can exceed a
- length of 127 characters. Record lengths need not be uniform.
- The user can select from one to ten sort fields of varying widths
- in any desired sequence. The sum of the widths of the selected
- sort fields cannot exceed 48 characters. The sorted records are
- written on a character output file. Trailing blanks are stripped
- off each record. If IOS.0BJ is present, after compilation the
- program can be linked by typing "LINK @CHARSORT.LNK".
- Link with: BEEP, C2SORT, CKSAFE, ROSORT, TICKERS
-
- CHR2STP
- To produce a binary STATPAC file from a standard-formatted ASCII
- file. See program STP2CHR for standard format.
- Link with: IOS
-
- CMN2STP To produce a binary STATPAC file from a .CMN (communications)
- file. See program STP2CMN.
- Link with: IOS
-
- COOR
- Transfers the values of latitude and longitude stored as integer
- values in the 'LOC' array of a STATPAC row into corresponding
- STATPAC variables which are expressed in decimal degrees. The
- STATPAC rows containing the additional columns are written on a
- STATPAC output file.
- Link with: IOS
-
- CURVES
- To fit any of seven different functions to two variables by least
- squares. Observed, computed, and residual values may be printed,
- along with the 95% confidence intervals.
- Link with: IOS, MATKLO
-
- DLCOLS
- To create a new STATPAC data file with specified columns (variables)
- deleted.
- Link with: IOS
-
- DLROWS
- To create a new STATPAC data file with specified rows (observations,
- samples) deleted.
- Link with: IOS
-
- DUPFINDR
- Writes to a character output file the row number and primary ID
- of all sets of data points which are within a user-specified
- distance of one another. This specified distance and the variable
- numbers of the XY coordinates are requested at run time.
- Link with: IOS, BEEP, FSORT, and TICKERS
-
- ***********************************************************
-
-
- Programs in the "EQ" series are for "extended Q-mode factor
- analysis of compositional data" (see Miesch, 1976a, 1981). They
- are used principally for the development of petrologic mixing/unmixing
- (differentiation) models. It is required that the variables for
- each observation (row) in the STATPAC data matrix sum precisely to
- some constant, generally 100 percent. The principal advantages of
- "extended Q-mode factor analysis over conventional methods of
- factor analysis are that 1) the factor axes, rather than being
- determined solely by mathematics, can be selected to represent
- real or hypothetical geologic materials, 2) the factor scores,
- rather than being in units of transformed and normalized data, are
- in the same units as the compositional data, and 3) the factor
- loadings sum to unity for each sample and can be interpreted
- directly as mixing/unmixing proportions.
-
- Program EQMODE is always run first. This program creates a
- binary MASTER or E97 file that can be inspected with program
- EQFILE. All of the other programs in the "EQ" series read this
- MASTER(E97) file. Seven of the "EQ" series program are described
- in Miesch (1976b).
-
- EQBFIT
- Used to derive "badness-of-fit" measures of samples to a factor
- model as represented in a MASTER(E97) file. Badness-of-fit, like
- the communality, depends only on the number of factors, and is
- computed as the residual/original value. The overall badness-of-fit
- measure for each sample is the quadratic mean of the measures for
- each variable.
-
- EQFILE
- Used to read a MASTER(E97) file created with program EQMODE and
- to compute varimax loadings and scores. Output may be directed
- to the screen or to a character output file. Output data may
- include any of the following: raw data, maximum and minimum
- values for each variable, principal component loadings, varimax
- loadings, communalities, principal component scores, varimax
- scores, or varimax transformation matrices.
-
- EQMODE
- All of the programs in the "EQ" series are for extended Q-mode
- factor analysis of compositional data that sum to a constant
- (generally 100%) for each observation (sample). Program EQMODE
- creates a file (named "E97") that contains all the basic information
- needed as input by the other programs in the series.
- Link with: TRANS, EIGEN, VARMAX2, IOS
-
- EQSPIN
- Used to rotate a 3-dimensional vector system for display on a
- stereographic-type diagram. System may be rotated in a specified
- direction or so that the 1st principal component axis is vertical.
- May also be used to plot miscellaneous samples on the stereogram
- and to outline the area within the stereogram wherein all plotted
- and hypothetical vectors represent non-negative compositions.
- Compositions represented by 37 points along this boundary are
-
- written out on a character file named "COMP.LST". The 2nd and 3rd
- loadings for the rotated sample vectors and the 37 boundary points
- can be written on a STATPAC file. This may be converted to a .CHR
- file for screen display of the stereogram with program STDGRM$.
- Link with: MATKLO, EXPAND, IOS
-
- EQTEST
- Used to test samples represented in a STATPAC data file for fit
- to a factor model represented in an existing MASTER(E97) file.
- The samples may or may not be those used to develop the model.
- Also derives coordinates of samples for plotting on a stereogram
- if a 3-factor model is being used. STATPAC output file contains
- the sample communalities and initial varimax loadings.
- Link with: IOS
-
- ************************************************************
-
-
- FINDRG
- Used to browse through a STATPAC data file looking for samples
- that contain values for selected variables within specified ranges.
- Link with: IOS
-
- FILFIL
- To read a STATPAC file, make data transformations, and write out
- a new STATPAC file. FILFIL must be modified and recompiled for
- each new application.
- Link with: IOS
-
- FILONE
- To read the header information (N, M, Data set ID, variable ID's)
- and the first observation in a STATPAC data set.
- Link with: IOS
-
- FILTER
- To read the header information (N, M, Data set ID, variable ID's)
- and selected observations in a STATPAC data set.
- Link with: IOS
-
- FIXIT
- Changes selected values and/or qualifying codes in a STATPAC data
- set.
- Link with: IOS
-
- FVDGRM$
- A BASIC program for screen display of factor-variance diagrams
- from a .CHR file. The .CHR files are created with program STP2CHR
- using output files from programs RRMODE or EQMODE.
-
- GSCUTM
- Computes UTM north and east coordinates (expressed as kilometers
- rather than meters) using the STATPAC decimal degrees latitude and
- longitude variables. The UTM coordinates are written on a STATPAC
- output file along with the previously existing variables.
- Link with: IOS
-
- GXFIXX
- To adjust each of the variables in a STATPAC data set to a common
- lower and/or upper cut-off value (i.e., lower and/or upper limits).
- This is to avoid the problem of having values of, say, <10 and <20
- (or >100 and >200) for the same variable. GXFIXX selects the lower
- and/or upper limits that will require the fewest changes in order
- to make the adjustments. Writes a STATPAC output file containing
- the adjusted data.
- Link with: IOS
-
- JKGTLS
- Subroutine to read data records from a binary STATPAC data file.
- Contained in file IOS.FOR
-
- JKPTLS
- Subroutine to write data records to a binary STATPAC data file.
- Contained in file IOS.FOR
-
- MAP---$
- Plots a "symbol" map on the IBM or EPSON printer. As many as seven
- symbols may be used for each map. User specifies the boundaries
- of the map so that the map may represent the entire area covered
- by the data set or only a portion of the area. The symbols may
- be defined by the user or left to the program.
- Link with: IOS
-
- MAPPLT
- Reads in a STATPAC file and produces a file for printer plotting
- of a map of any selected variable. The x-y coordinates may have
- any origin. The map shows numbers ranging from 0-9 that specify
- the decile of the total range in which the mapped value occurs at
- each x-y point on the map. If more than one observation occurs
- at any x-y location, the decile indicates their arithmetic average.
- On option, another map may be printed which shows the numbers of
- values averaged at each location.
- Link with: IOS
-
- MATRIX
- Used to perform matrix computations on small matrices (up to 10x10).
- MATRIX is generally used for experimental work in matrix manipulations.
- Link with: MATRIX1, EIGEN, MATKLO, IOS
-
- NEWIDS
- Writes a revised STATPAC file with modified data set ID, variable
- IDs, and/or sample IDs.
- Link with: IOS
-
- NEWLOC
- Writes a revised STATPAC data file with new values for the 'LOC'
- array which are entered at the terminal.
- Link with: IOS
-
- NORCHI
- Performs chi-square test for normality of a selected STATPAC
- variable. Program computes mean, variance, skewness, and kurtosis
-
- of the selected variable, a table of actual number of observations
- versus theoretical number of observations by class interval, the
- total chi-square value, the degrees of freedom (number of classes
- used minus three), and the probability of exceeding the computed
- value of chi-square. Program prints out to the PC's screen. As
- an option, the test can be performed on the distribution of natural
- logarithms of the STATPAC variable, provided it has no zero or
- negative values.
- Link with: IOS
-
- NORMST
- Reads a STATPAC file of petrochemical data and creates a new
- STATPAC file of CIPW norms.
- Link with: CIPW, IOS.
-
- PACR2STP
- Converts a specially formatted character file retrieved from a
- multics PACER file into a STATPAC output file. Comments in the
- source code give instructions for its use.
- Link with: IOS
-
- PARCOR
- Used to derive partial correlation coefficients. User supplies
- R12, R13, and R23. Program displays R12.3 (the correlation
- between variables 1 and 2 with variable 3 held constant.
-
- PERMUTER
- Rearranges (permutes) rows of a STATPAC input file in a random
- order. The random order will differ each time the program is
- run because the random number generator is initially seeded by
- the PC's system clock. The permuted rows are written on a STATPAC
- output file.
- Link with: IOS, BEEP, CKSAFE, FSORT, RAND, and TICKERS
-
- PRINTT
- Prints the entire STATPAC file.
- Link with: IOS
-
- POLYGRET
- Retrieves from a STATPAC input file those samples whose coordinate
- values lie within a polygonal boundary. The user can select 1)
- only those samples which lie within or on the boundary, or 2)
- only those samples which lie outside the boundary. The retrieved
- sample-rows are written on a STATPAC output file. Nodes of the
- boundary are stored on a previously created character disk file
- which can be written by the EDLIN editor. Each node of the boundary
- is typed on a single line with the north coordinate (decimal degrees
- latitude or other vertical coordinate) typed first and the east
- coordinate typed second. The north and east coordinates must be
- separated by at least one blank space or by a comma. Embedded
- blanks in the north or east coordinates are not permitted. The
- boundary nodes must be entered in a clockwise direction.
- Link with: IOS, AREA, CKSAFE, AND PTLOC
-
-
- RANDOM$
- A BASIC program for writing a character (.CHR) file of uncorrelated
- normal deviates. The file may contain up to 99 columns simulating
- uncorrelated variables and any number of rows.
-
- REGRESS&.FOR (formerly program D0094)
- Step-forward regression program based on method of Efroymson
- (1960) which uses partial correlations to add variables to and
- delete from the regression equation. User supplies significance
- level to be used as criterion for addition and deletion. Observed,
- computed, and residual values may be written on a STATPAC output
- file. See REGRESS.BAT
- Link with: IOS
-
- REGRESS.BAT
- Batch routine for setting the IBM or EPSON printer to 132 characters
- per line. Program REGRESS& is then executed automatically, and
- the printer setting is returned to 80 characters per line. To
- execute, type "REGRESS".
-
- REPLAC
- Used to replace (remove) qualifying codes in a STATPAC data file.
- Values of zero coded by N, L, or T are replaced by values supplied
- by the user. Then all values coded by N, L, or T are multiplied
- by 0.7 and the codes are removed. Values of zero coded by G are
- replaced by values supplied by the user. Then all values coded by
- G are divided by 0.7 and the G is removed. Values coded by H or
- B are replaced with the average uncoded value for the variable,
- and the codes are removed. It is recommended that the data be
- processed through program GXFIXX before REPLAC is used.
- Link with: IOS
-
- ROWIDRET
- Retrieves from a STATPAC input file those rows whose primary or
- secondary IDs (either but not both) are stored on a character
- file which was previously created by the user. The user is given
- the option of retrieving 1) only those rows which are on this
- file, or 2) only those rows which are not. The retrieved rows
- are written on a STATPAC output file. The disk file containing
- the primary or secondary row IDs can be created by the EDLIN
- editor. The individual row IDs (either primary or secondary) are
- entered in FORTRAN format(a8) in columns 1-8, with only one row
- ID per line. Spelling of the row IDs must agree exactly with
- their spelling on the STATPAC input file. Leading and embedded
- blanks in the row IDs must be typed in exactly the same position
- as on the STATPAC file. Trailing blanks, however, need not be
- typed. A retrieval based on both the primary and secondary row
- IDs will require two runs of the program with separate disk files
- of the respective row IDs.
- Link with: IOS, BEEP, CKSAFE
-
- RRMODE
- For R-mode factor analysis. Writes STATPAC output files of factor
- loadings and scores for four kinds of factor models (Principal
-
- Components, Varimax, Oblique model based on the extreme samples,
- and Oblique model based on the extreme variables). Output files
- of the recomputed data, the residuals, and/or badness-of-fit
- measures for the samples. Another output file contains the variable
- communalities. Coefficients used for computing the scores are
- also printed. RRMODE and nine of its subroutines may be compiled
- with batch file RRCOMP, by typing "RRCOMP". The file "RRMODE.INC"
- must be present when compiling in order to satisfy the NCLUDE:
- RRMODE.INC metacommand which is present in all ten RRxxxx files.
- If IOS.OBJ is present, RRMODE can be linked after compilation by
- typing "LINK @RRMODE.LNK".
- Link with: RRPCOM, RREIGN, RRFILE, RRVRMX, RRVROT, RROBLS,
- RROBLV, RRMATK, RRCOEF, and IOS
-
- SORTT
- A BASIC program to sort a character file on selected columns.
- User supplies the beginning card-column number and the field
- length.
-
-
- ************************************************************
-
- Programs in the "SS2D" series implement the geostatistical
- method of estimation of geological variables that is known as
- kriging. STATPAC input data files must have cartesian coordinates
- in the x-y plane for each sample point, and no two sample points
- can have identical x-y coordinates. The variable to be estimated
- must have certain geological and statistical properties (Journel
- and Huijbregts, 1978, pp 196-207). The variable may have some
- qualified values, but qualified values will be bypassed and not
- included in the computations. Programs SS2DXVAL, SS2DGRID, and
- SS2DBLOK have options for using either ordinary or universal krig-
- ing, the spherical, linear-root-parabolic, exponential, gaussian,
- and cubic semivariogram models, nested semivariograms, and geometric
- and zonal anisotropy. The error variance of the observed value
- of the geological variable at each sample point, if known, can be
- included in the kriging. Kriging is done by the moving neighborhood
- technique, and the user specifies the search radius which defines
- the neighborhood size. Two include files, "PTKRIG.INC" and
- "BKKRIG.INC", must be present on disk when these programs and
- their subroutines are compiled.
-
- SS2DBLOK
- Program computes the mean value and kriging variance of a geologic
- variable within a block of ground of any specified shape. Program
- produces a character output file containing the computed area of
- the block, the block variance, the kriged mean of the geologic
- variable, and the kriging variance of that variable, and optionally,
- a list of the sample values used in the estimation together with
- their kriging weights. Coordinates of the nodes defining the
- block can be entered from the terminal at run time, or can be
- stored on a character input file created by, say, the EDLIN editor.
- The north- and east-coordinates for each node are entered on a
- single line, and are separated by a space or comma. They must
-
- be entered in a clockwise direction. If IOS.OBJ is present,
- after compilation the program can be linked by typing
- "LINK @SS2DBLOK.LNK". Link with: AREA, BEEP, CBAR4, CKSAFE,
- COVAR4, CTROID, DOLITL, DRFTRM, DSORT, GETFLE, GRDPTS, GRIDER,
- HLSRCH, IOS, IRREG, KRGOT4, KRIG4B, MAXCOR, MNVAR, NAMFIL, NEIGH,
- PSET4, PTLOC, RAND, TERM, TICKERS, VARIN4, VRBLK4
-
- SS2DDRES
- Program computes drift residuals using method of generalized
- least squares. The user must enter the parameters of an assumed
- variogram and the exponents of the terms of an assumed form of
- drift. This program offers a method of developing a suitable
- variogram/drift model for non-stationary geological variables
- by trial-and-error iterations. Program produces a STATPAC output
- file of the computed drift residuals of the data points and
- their coordinates. This data file can be processed by program
- SS2DGAMH. The STATPAC input file for SS2DDRES must be preprocessed
- by SS2DPREP. After compilation, if IOS.OBJ is present, SS2DDRES
- can be linked by typing "LINK @SS2DDRES.LNK".
- Link with: BEEP, CKSAFE, COVAR4, DOLITL, DRFTRM, DSORT, GETFLE,
- HEADER, INGRD, IOS, KRIG4C, MAXCOR, MNVAR, NEIGH, OUTGEO, PRECHK,
- PSET4, SRCHPB, TERM, TICKERS, VALDOP, VARIN4
-
- SS2DGAMH
- Computes semivariograms (gamma(h)) in one to five directions and
- produces a character file for printer plotting of the graphs.
- Program allows up to twenty distance class intervals, optional
- logarithmic transformations of the geologic variable, and optionally
- creates a "punchout" character file for use by high-resolution
- screen plotting programs (such programs have not been implemented
- on the IBM PC, but the punchout file can be uploaded to the multics
- mainframe for producing these plots). SS2DGAMH requires a character
- control file (see SS2DVCTL below) and a preprocessed STATPAC
- input file (see SS2DPREP below). If IOS.OBJ is present, after
- compilation this program can be linked by typing "LINK @SS2DGAMH.LNK".
- Link with: ATTACH, BEEP, CKSAFE, IOS, RDN, VAROUT, TICKERS
-
- SS2DGRID
- Program estimates values of a geological variable along a grid of
- points specified by the user. Program produces a STATPAC output
- file containing the north- and east-coordinates of each grid
- point, the kriged value, and the kriging variance. Program also
- produces a character output file containing the same information,
- but including a header displaying the user's variogram and grid
- specifications. STATPAC input file to this program must be pre-
- processed by program SS2DPREP. If IOS.OBJ is present, after
- compilation, program can be linked by typing "LINK @SS2DGRID.LNK."
- Link with: BEEP, COVAR4, CKSAFE, DOLITL, DRFTRM, DSORT, GETFLE,
- HEADER, INGRD, IOS, KRIG4P, MAXCOR, MNVAR, NEIGH, OUTGEO, PRECHK,
- PSET4, SRCHPB, TERM, TICKERS,VALDOP, VARIN4
-
- SS2DMEN&.FOR
- Program prints the names of the SS2D series programs on the screen
- and asks the user to enter the name of the particular program which
- is to be executed. The requested program is then run. After normal
- termination of the requested program, the list of names reappears on
- the screen and the user can again name a program to be run. Program
- SS2DMEN& is invoked by SS2DMENU.BAT. To execute the batch process,
- just type the following command: SS2DMENU
- Links required: BEEP,CLEARS
-
- SS2DMENU.BAT
- Batch routine which invokes SS2DMEN&. See description of SS2DMEN&.
-
- SS2DPREP
- Preprocessing program which produces a STATPAC output file which
- is used as input to programs SS2DGAMH, SS2DGRID, and SS2DDRES.
- SS2DPREP sorts the rows of a STATPAC input file in ascending
- order of north- and east-coordinates, checks for duplicated
- data coordinate pairs, and produces the sorted STATPAC output
- file if no duplicates are found. If IOS.OBJ is present, SS2DPREP
- can be linked after compilation by typing "LINK @SS2DPREP.LNK".
- Link with: BEEP, B2SORT, CKSAFE, FSORT, IOS, TICKERS
-
- SS2DVCTL
- Program creates a character control file for use by SS2DGAMH. The
- user is prompted for the distance class intervals for the variogram
- run, directions in which the variograms are to be computed, and
- the allowable angular deviations about the selected directions.
- The user may also select an option which will cause program SS2DGAMH
- to create a variogram plotfile suitable for high resolution plotting
- on the PC's screen.
- Link with: BEEP, CKSAFE
-
- SS2DXVAL
- Program is used to cross-validate semivariogram models to determine
- the suitability of the theoretical semivariogram model for use in
- programs SS2DBLOK, and SS2DGRID. Program computes kriged value
- and kriging standard deviation for each data point, using neighboring
- data points. Observed kriging errors are computed and statistically
- summarized. Program produces a STATPAC output file of the results
- for each data point and a character output file containing the same
- information, but including also a heading record of the users specifi-
- cations of parameters for the cross-validation. After compilation,
- this program can be linked by typing "LINK @SS2DXVAL.LNK".
- Link with: BEEP, CLEARS, COVAR4, CKSAFE, DOLITL, DRFTRM, DSORT,
- GETFLE, HEADER, HLSRCH, IOS, KRIG4P, MAXCOR, MNVAR, NEIGH, OUTGEO,
- PSET4, TERM, TICKERS, VALDOP, VARIN4
-
-
- ************************************************************
-
- STATCOR
- Derives means, variances, ranges, and correlations for variables in
- a STATPAC data file. Qualified values are included in the computations.
- Link with: IOS
-
-
-
-
- STDGRM$
- A BASIC program for screen plotting a stereographic-type diagram
- from a .CHR file made from a .STP file (using program STP2CHR)
- derived as output from program EQSPIN.
-
- STP2CHR
- Produces a standard-formatted ASCII file (to use as input to
- BASIC programs) from a binary STATPAC file.
- Link with: IOS
-
- STP2CMN
- Produces an ASCII file for transfer via telephone lines.
- Link with: IOS
-
- STPMEN&.FOR
- Displays on the screen the names of programs that are helpful in
- kriging and asks the user to enter the name of the particular
- program which is to be executed. The requested program is then run.
- After normal termination of the requested program, the list of names
- reappears on the screen and the user can again name a program to be
- run. Program STPMENU& is invoked by STPMENU.BAT. To execute the
- batch process, just type the following command: STPMENU
- Links required: BEEP,CLEARS
-
- STPMENU.BAT
- Batch file which invokes STPMEN&.
-
- STPSORT
- Sorts the rows of a STATPAC input file by primary row ID, by
- secondary row ID, or by one to three selected STATPAC variables.
- Sorting can be specified to be in either ascending or descending
- order. The STATPAC file cannot exceed 3000 rows. For STATPAC
- variables, the user may specify a sort on the absolute values of
- the variables rather than the signed values. The sorted rows are
- written on a STATPAC output file.
- Link with: BEEP, CKSAFE, IOS, B2SORT, FSORT, ROSORT, TICKERS
-
- TABFIL
- Used to convert an ASCII data file to a binary STATPAC file.
- Each observation in the ASCII file must be represented by two
- rows. The first row must contain the observation ID (up to 16
- characters in columns 1-16). The second row must contain the
- data values separated by commas or blanks. Do not use qualifying
- codes.
- Link with: IOS
-
- TABRAN
- This program creates a table of numbers arranged in a random order.
- User specifies the starting numbers of the sequence and the total
- number of values required.
- Link with: RAND, TICKERS
-
-
-
-
- TABQ
- Produces a summary table of the number and kinds of qualifying
- codes in a STATPAC data file.
- Link with: IOS
-
- TERFIL
- To enter data into a STATPAC file from the keyboard.
- Link with: IOS
-
- TERFIL$
- To enter data into an ASCII file with format standardized for the
- BASIC programs.
-
- TERPLT
- Used to plot a crude ternary diagram on the printer. Any three
- variables can be selected from the STATPAC data file.
- Link with: IOS
-
- UCODERET
- (User_CODEd_RETriever) retrieves from a STATPAC input file those
- rows which meet selection criteria specified by the user in the
- associated function IWANT. (Logical function IWANT begins in
- line 74 of the FORTRAN source program.) The user must 1) recode
- function IWANT so that it expresses the desired retrieval criteria;
- 2) compile the FORTRAN source program; and 3) link the resulting
- object module UCODERET.OBJ with IOS.OBJ. The user is given the
- option of retrieving only those rows which meet the user's selection
- criteria, or only those rows which do not. The retrieved rows
- are written on a STATPAC output file.
- Link with: IOS
-
- WHATQ
- Creates a table showing the numeric values associated with each
- of the six qualifying codes that can be present in a STATPAC data
- file. If more than one numeric value is associated with any
- given code, the data file should be processed through GXFIXX or
- some similar routine before any type of statistical analysis is
- performed.
- Link with: IOS
-
- XYDGRM$
- A BASIC program for screen plotting points on an XY-type diagram
- using a .CHR file. The .CHR file is generally derived from a
- STATPAC (.STP) file using program STP2CHR.
-
- XYPLOT
- Writes for later printing a character output file containing a
- crude x versus y scatter diagram of any two selected STATPAC
- variables. The graph displays as numbers 1-9, the number of data
- pairs which occur at each point on the plot.
- Link with: IOS
-
-
-
-
-
- References cited
-
-
- Efroymson, M. A., 1960, Multiple regression analysis, in Ralston, A.,
- and Wilf, H. S., eds., Mathematical methods for digital computers:
- John Wiley & Sons, New York, p. 191-203.
-
- Journel, A. G., and Huijbregts, Ch. J., 1978, Mining geostatistics:
- Academic Press, New York, 600 p.
-
- Miesch, A. T., 1976a, Q-mode factor analysis of geochemical and petrologic
- data matrices with constant row-sums: U.S. Geological Survey Professional
- Paper 574-G, 47 p.
-
- ___________, 1976b, Interactive computer programs for petrologic modeling
- with extended Q-mode factor analysis: Computers & Geosciences, v. 2,
- no. 4, p. 439-492.
-
- ___________, 1981, Computer methods for geochemical and petrologic mixing
- problems, in Merriam, D. F., ed., Computer applications in the earth
- sciences: Plenum Press, New York, p. 243-265.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-