APL2STAT Copyright (c) 1993, John Fox and Michael Friendly 14 July 1993 APL2STAT ReadMe File John Fox and Michael Friendly York University What is APL2STAT? ---------------- APL2STAT is an integrated set of APL2 programs (functions and operators) for statistical analysis, with an emphasis on statistical graphics. The programs use a simple object system and employ a common procedure for accessing data. Because APL2STAT is not a statistical package, but rather is built upon a general, extensible, interactive programming language (i.e., APL2), it is simple to modify and supplement. In its current form, APL2STAT includes functions and operators (among others) for jackknifing and bootstrapping any statistic; for linear models estimated by least-squares with extensive diagnostics; for linear regression analysis with autocorrelated errors; for robust regression analysis; and for dichotomous and polytomous logit models. Graphical capabilities include a variety of scatterplots, boxplots, scatterplot matrices, partial regression and residual plots, regression influence plots, Box-Cox and Box- Tidwell transformation constructed-variable plots, lowess scatterplot smoothing, and multivariate graphical displays. Points on plots may be interactively identified, deleted, moved, and highlighted using a pointing device (such as a mouse) or the cursor keys. APL2STAT is programmed for IBM's APL2 implementation for the IBM/PC and compatibles, and is furnished in two forms: for the freeware TRYAPL2 interpreter and for IBM's commercial APL2 interpreter. The latter environment (called simply "the APL2 interpreter" below) permits much larger workspaces on 386 and 486- class machines. This document assumes some knowledge of the APL2 programming language (see, e.g., Gilman and Rose, 1984, or Brown, Pakin, and Polivka, 1988), and of the specific implementation of APL2 employed. As well, because information about all APL2STAT user functions is available through the HOW function, this document is brief. Note that APL symbols are rendered as the symbol name preceeded by a '.', as in '.delta' for the APL delta character. Files included in Version 2.00 of APL2STAT: ------------------------------------------ APL2STAT is distributed in two .ZIP files, created with PKZIP 2.04c. A2STRY20.ZIP contains files that are used with either APL2/PC or with TryAPL2. A2SATF20.ZIP contains files that are only useful with APL2/PC. Directory of A2STRY20.ZIP APL2STAT.200 496k | APL2STAT component file DATA .TRY 172k | Dataset component file DATAINDX.TXT 5k | Index to DATA.TRY MANUAL .DOC 68k | APL2STAT User Guide - ascii version MANUAL .LJ3 152k | APL2STAT User Guide - Laserjet III version PS .DRV 7k | Postscript driver READDATA.EXE 191k | READ_DATA program for TryAPL2 README 10k | Overview & installation instructions SASOUT .EXE 204k | SASOUT program for TryAPL2 SHELL .TRY 11k | APL2STAT SHELL for TryAPL2 Directory of A2SATF20.ZIP APL2STAT.ATF 348k | APL2STAT transfer file for IBM/PC APL2 DATA .ATF 98k | Dataset transfer file for IBM/PC APL2 READDATA.ATF 17k | Source for READDATA.EXE SASOUT .ATF 22k | Source for SASOUT.EXE SHELL .ATF 6k | APL2STAT SHELL for IBM/PC APL2 COPYING 18k | GNU General Public License To prepare to install APL2STAT (see below), you must first extract the files from the archived .ZIP files. It is recommended that you extract the files to floppy disks for storage: C:\> pkunzip -x a2stry20 a: -- to create a 'TRY' disk C:\> pkunzip -x a2satf20 a: -- to create a 'ATF' disk Please note that A2STRY.ZIP expands to about 1.35Mb and requires a high-density 3.5" diskette. Knowledgeable users may wish to extract these file to a temporary directory instead. Printing the User Guide ----------------------- The APL2STAT User Guide is provided in two forms: as a file formatted for printing on a Laserjet III printer (MANUAL.LJ3), and as a DOS ascii file (MANUAL.DOC) for those without access to a Laserjet III. Use the DOS PRINT command to print a hardcopy of MANUAL.DOC (or use any file viewer to read it on screen): C:\> print a:manual.doc Note: The .DOC version of the manual contains lines wider than 80 columns. If possible, set your printer to print at 12 cpi to avoid line-wrapping. Use the DOS COPY command to print a hardcopy of MANUAL.LJ3. Note that you must use the /b switch to copy this file to the printer as a binary file: C:\> copy /b a:manual.lj3 prn: Note: The .LJ3 version of the manual refers to the READDATA.EXE program (p. 6,14) erroneously as DATA.EXE. Also, references to the global variable .deltaAPL2STAT_FILE on pages 13,16 should be replaced by .deltaPATH. Installing and Customizing APL2STAT ----------------------------------- APL2STAT is designed to be used with either TryAPL2 or APL2/PC. If your computer has a hard disk, then it will be most convenient to copy the extracted APL2STAT files to the hard disk. The distribution files assume that you will be installing these files in the \TRYAPL2 or \APL2 directory on drive C: (for use with TryAPL2 or APL2/PC, respectively). You should adjust the path specifications below if you are installing the files in another directory.  Installation for use with TryAPL2: (1) Create the \TRYAPL2 directory if it does not already exist: C:\> md tryapl2 (2) Make the \TRYAPL2 directory the current directory: C:\> cd tryapl2 (3) Insert the APL2STAT 'TRY' diskette in a drive (say, drive A:), and copy the files to your hard disk: C:\TRYAPL2> copy a:*.try C:\TRYAPL2> copy a:*.exe C:\TRYAPL2> copy a:apl2stat.200 C:\TRYAPL2> copy a:ps.drv  Installation for use with APL2/PC: These instructions assume that you have already installed APL2/PC in a directory named \APL2 on your hard disk, drive C:. To install APL2STAT on your hard disk: (1) Make the \APL2 directory the current directory: C:\> cd apl2 (2) Insert the APL2STAT 'TRY' diskette in a drive (say, drive A:), and copy the files to your hard disk: C:\APL2> copy a:*.* (3) Insert the APL2STAT 'ATF' diskette in a drive (say, drive A:), and copy the files to your hard disk: C:\APL2> copy a:*.* Alternatively, you may wish to keep the APL2STAT files in a separate subdirectory, say \APL2\STAT. In this case, you should modify your APL2 profile so that the APL2STAT subdirectory may be referenced by a library number.  Customizing APL2STAT APL2STAT searches for functions, operators, and data in one or more component files whose DOS path names are contained in the variable .deltaPATH. Saving APL2STAT graphics in Postscript files depends on the Postscript driver, which resides in the file PS.DRV, the location of which is recorded in the variable .deltaPS_DRIVER_FILE. The default path and driver file specifications are as follows: .deltaPATH 'C:\TRYAPL2\APL2STAT.200' 'C:\TRYAPL2\DATA.TRY' .deltaPS_DRIVER_FILE 'C:\TRYAPL2\PS.DRV' or (for SHELL.ATF) .deltaPATH 'C:\APL2\APL2STAT.200' 'C:\APL2\DATA.TRY' .deltaPS_DRIVER_FILE 'C:\APL2\PS.DRV' To change the default path and Postscript driver-file location under the TryAPL2 version of APL2STAT: Starting with a CLEAR workspace, )COPY the SHELL workspace into TryAPL2. Change the values of .deltaPATH and/or .deltaPS_DRIVER_FILE. (Note that the .deltaPATH must be a nested vector or scalar. If there is just one file on the path, then the character string specifying its path should be enclosed as a nested scalar.) Then re-)SAVE the SHELL workspace. When you next )LOAD SHELL, it should automatically execute the SHELL function. To change the default path and Postscript driver-file location under the APL2 version of APL2STAT: Using the )IN SHELL command, input the SHELL.ATF file. Change the values of .deltaPATH and .deltaPS_DRIVER_FILE as appropriate. Then )SAVE SHELL. When SHELL is subsequently )LOADed, the SHELL function will automatically be executed. Several other aspects of APL2STAT may also be customized, by specifying the values of variables beginning with the character .delta in the SHELL workspace. These include colour specifications for graphs (.deltaLINE_COLOUR, .deltaSYMBOL_COLOUR, etc.), plotting symbols (.deltaSYMBOL, .deltaSYMBOLS), the memory threshold that triggers the memory-management mechanism (.deltaMEMORY_THRESHOLD) and some other characteristics. DO NOT change the values of variables with names starting with .delta-underscore. Other sources ------------- TryAPL2 is distributed free of charge by IBM and may be obtained by writing to: TryAPL2 for free APL Products IBM Santa Teresa Dept M46/D12T PO Box 49023 San Jose, CA 95161-9023 TryAPL2 is also available for ftp transfer from: watserv1.waterloo.edu in /languages/apl/tryapl2 The full IBM APL2/PC product may be ordered from your local IBM representative; ask for 5799-PGG. Alternatively, it may be ordered from IBM DIRECT at the toll-free North America number 800/IBM-2468, asking for Part Number 6242936 (don't mention APL2 or software; let them think you want to order a disk drive or mainframe.) We use the free Ghostscript program for printing the Postscript graphics files generated by PS.DRV on non-Postscript printers. Ghostscript is available for ftp transfer from (among others): prep.ai.mit.edu in /pub/gnu No warrantee ------------ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License (see the file COPYING) along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. In particular, note Term 1 of the GNU General Public License: 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. Bug reports and Suggestions --------------------------- Send your comments, suggestions, and reports of problems with APL2STAT to: John Fox or Michael Friendly