home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / math / ksprob21.zip / KSDOCS.EXE / KSSTAT.DOC < prev   
Text File  |  1993-05-23  |  33KB  |  643 lines

  1.  
  2.  
  3.                                ksstat 2.10
  4.  
  5.                              Joseph C. Hudson
  6.                               4903 Algonquin
  7.                             Clarkston, MI 48348
  8.  
  9.  
  10.         Introduction
  11.  
  12.         ksstat performs exploratory regression, crosstabs, Lilliefor's
  13.         test for normality and produces summary statistics, histograms
  14.         and multiple scatter plots.
  15.  
  16.         ksstat uses the 80x87 chip if it is present, and emulates it if
  17.         it is not present. All computation is done with 64 bit reals.
  18.  
  19.         I do not offer a warranty or guarantee of any kind for this
  20.         program. I've tried hard to make the output correct, but using
  21.         it with new data sets and different machines may reveal errors
  22.         I'm not aware of. Follow the advice of Gerard E. Dallal
  23.         (Statistical Microcomputing - Like It Is, American Statistician,
  24.         V42 N3 Aug 1988): assume that this program does everything wrong
  25.         until you put it through its paces with difficult input and
  26.         conclude otherwise. Above all, enjoy. If you care to send me a
  27.         brief report about what you like and don't like about this
  28.         program, it would be very much appreciated.
  29.  
  30.         ksstat is copyright (C) 1990-93 Joseph C. Hudson 4903 Algonquin
  31.         Clarkston MI 48348. All rights are reserved.
  32.  
  33.  
  34.  
  35.         Files
  36.  
  37.         Before running ksstat, you need to have a data file and,
  38.         optionally, a codebook file. See descriptions below. When
  39.         running ksstat, the first thing you should do is to select
  40.         <get files> from the main menu and give data, codebook and output
  41.         file names. The extensions .dat, .cod and .out will be added if
  42.         you type in names without extensions. If you want no extension,
  43.         follow the name with a period.
  44.         
  45.  
  46.         ksstat                                                  page 2
  47.  
  48.         Most output is sent to the output file. You can specify the
  49.         printer as the output file, but it is really a good idea to use
  50.         a disk file for output. You can view the output file from within
  51.         the program.
  52.  
  53.         A couple of the modules use special output files in addition to
  54.         the general one. Lilfor uses separate files for graphs, since
  55.         they may have ^z's imbedded. Cfit uses a separate file to store
  56.         its regressions.
  57.  
  58.         In the line of the menu beginning "graphics output to", you can
  59.         toggle between a number of choices. Initially, graphics output
  60.         is to screen only. You may select screen, text and/or hpgl
  61.         graphics output. Text graphics is crude, but works. The best
  62.         option for permanent graphics output is to use hpgl files. If
  63.         you select this option, a separate .Hxx file will be created
  64.         for each graph you request. These files contain hpgl language
  65.         commands. The files can be printed by PRINTGL, WordPerfect,
  66.         DrawPerfect and many other programs. This is the highest
  67.         resolution output ks programs offer.
  68.  
  69.         The data file
  70.  
  71.         The data file is an ascii file with the data in rows (cases) and
  72.         columns (variables). When you create a data file, use blanks or
  73.         tabs to separate numbers. Each row should have the same number of
  74.         entries as all other rows. Use nothing but numbers; no alpha
  75.         stuff. The numbers don't need to be lined up in columns.
  76.  
  77.         If you have missing values, use whatever numeric missing value
  78.         code is convenient to represent them in the data. The codebook
  79.         file, described below, will tell ksstat about missing values.
  80.         Missing values are excluded from analysis by all routines,
  81.         listwise for kscfit, kstplot and kslilfor, pairwise for ksxtab,
  82.         kshist and kssumst.
  83.  
  84.         Each row of data should end in a cr-lf sequence. This is what the
  85.         majority of text editors automatically append to a line when you
  86.         hit the return or enter key. If you create a data file with a
  87.         word processor, make sure the file is a plain ascii file, without
  88.         any strange word-processor stuff floating around. A small editor,
  89.         like sled or E!, is perfectly adequate to use.
  90.  
  91.         You can have as much data as your computer memory can handle. I
  92.         have run ksstat using a data set with 811 rows and 30 columns
  93.         with no problem on an 8088 machine with 640k and an 8087. 811
  94.         columns and 30 rows would also work fine. Out of programming
  95.         laziness, a couple of minor routines will not work with columns
  96.         numbered above 1000. Without an 8087, the program will run
  97.         slower, but no less precisely.
  98.         
  99.  
  100.         ksstat                                                  page 3
  101.  
  102.  
  103.         The codebook file
  104.  
  105.         A codebook file consists of as many lines as you need with the
  106.         following three pieces of information in each line:
  107.  
  108.             column number     column name      missing value code.
  109.  
  110.         The column number identifies which data column is being referred
  111.         to. Column 1 is the leftmost column. The column name is used by
  112.         all ksstat routines. ksstat makes up a name for any columns not
  113.         named in the codebook file. The missing value code identifies
  114.         missing data. Data in the column referenced with the value of the
  115.         missing value code is treated as missing be all ksstat routines.
  116.         Lines in the codebook file need not be in any particular order,
  117.         and column numbers can be repeated, so you can have more than one
  118.         missing value code for a column. See kssample.cod for an example.
  119.         In this file, column 1 has a name but no missing value code. Col-
  120.         umn 2 has 3 missing value codes.
  121.  
  122.         There is one restriction: if a missing value code is given, a
  123.         name must be given also. Otherwise, ksstat will interpret the
  124.         missing value code as a name. Names can be up to 9 characters
  125.         long. Anything longer is truncated.
  126.  
  127.         In .cod files, everything on a line after a semicolon is ignored,
  128.         so you can add comment lines or comments on data lines after the
  129.         data by prefacing the comment with a semicolon.
  130.  
  131.         Printer codes output by ksstat are for Epson compatible 9 pin
  132.         printers. If your printer is incompatible with these commands,
  133.         you could send output to a file and then edit the file to change
  134.         the imbedded commands. This is not easily done.
  135.  
  136.         If you are really desparate, I'll be glad to change the printer
  137.         commands for you as long as I don't have to spend any money to do
  138.         it. Send me a disk, stamped mailer and a list of the changes you
  139.         need. Be very specific, since I have access to very few printer
  140.         manuals, and I don't consider the ones I do have good bedtime
  141.         reading. The printer codes currently used are:
  142.  
  143.         resetPrinter := #27#64;
  144.         formFeed     := #12;
  145.         elite        := #27#77;
  146.         lpi6         := #27#51#36;    {set linefeed to 12/72 in}
  147.         lpi9         := #27#51#24;    {set linefeed to  8/72 in}
  148.         lpi12        := #27#51#18;    {set linefeed to  6/72 in}
  149.         setCondensed := #27#15;       {set to 17 chars/in}
  150.         canCondensed := #18;          {cancel 17 chars/in}
  151.         setOneWay    := #27#85#01;    {set unidirectional}
  152.         graphLine    := #27#76#208#2  {set for 8 lines of 720
  153.                                        dots @ 120 dots per in.}
  154.         
  155.  
  156.         ksstat                                                  page 4
  157.  
  158.         Notes on Individual Modules
  159.  
  160.  
  161.         kscfit - exploratory regression
  162.  
  163.         kscfit tries to fit 726 different curves to paired data. The
  164.         curves used are of the form
  165.  
  166.                        f(y) = b0 + b1 * x1 + b2 * x2
  167.  
  168.         where x1 and x2 are transformations of the original predictor
  169.         variable and f(y) is a transformation of the original dependent
  170.         variable.
  171.  
  172.         The index of a regression indicates which transformations were
  173.         used in that regression. The index is a 3 character string: the
  174.         first character indicates the form used for y, the second char-
  175.         acter the form used for x1 and the third character the form used
  176.         for x2. the forms and their character codes are
  177.  
  178.         0 - the variable does not            6 - v * ln(v)
  179.               appear in the equation         7 - ln(v) / v
  180.         1 - v  the variable itself           8 - ln(v / (1 - v))
  181.         2 - v²                               9 - ln(-ln(1 - v))
  182.         3 - 1 / v                            A - √v
  183.         4 - 1 / v²                           B = 1 / √v
  184.         5 - ln(v)
  185.  
  186.         Legal values for the three characters are 1 to B for y, 1 to B
  187.         for x1  and anything prior to x1 for x2, including 0. This gives
  188.         726 possible equations, not all of which can actually be fit for
  189.         a given data set. (Homework: what is the maximum number that can
  190.         be fit to any xcolumn - ycolumn pair?)
  191.  
  192.  
  193.         Examples:
  194.  
  195.         the index 662 indicates that the regression is
  196.  
  197.                 y * ln(y) = b0 + b1 * [x * ln(x)] + b2 * x²
  198.  
  199.         110 is the index of the simple linear regression of y on x.
  200.  
  201.         950 is the index of a two parameter Weibull fit to the data,
  202.         presuming x is failure time and y is cumulative percent failed.
  203.  
  204.         If y is cumulative probability and x is any random variable, 9nn
  205.         will be a legitimate fit of a probability model. 8nn is a
  206.         logistic fit. Suggestions for additional forms would be
  207.         appreciated. The program can handle any number of them.
  208.         
  209.  
  210.         ksstat                                                  page 5
  211.  
  212.  
  213.         Running kscfit
  214.  
  215.         When move the cursor to <exploratory regression> in the main menu
  216.         and hit return, the kscfit screen appears:
  217.  
  218.         ┌──────────────────────────────────────────────────────────────┐
  219.         │  kscfit exploratory regr                                     │
  220.         │                                                              │
  221.         │  data     file:                                        rows  │
  222.         │  codebook file:                                        cols  │
  223.         │  output   file:                                     of data  │
  224.         │  regr     file:                                              │
  225.         │                                                              │
  226.         │  ind var (x):                  dep var (y):                  │
  227.         │  data column:                  data column:                  │
  228.         │                                                              │
  229.         │  run regs       brief summary  expanded sumry  get  reg file │
  230.         │  view forms     view output    disk directory  save reg file │
  231.         │                                                              │
  232.         │  crindex:       ntosave:       forr:           oort:         │
  233.         │                                                              │
  234.         │  detail stats   hist resid     comp orig y     conf int y    │
  235.         │  plot regr      add  resid     add fit y       add conf lim  │
  236.         │  plot resid     tabl resid     view data       plot conf lim │
  237.         └──────────────────────────────────────────────────────────────┘
  238.  
  239.         The cursor will be at the data column: prompt for the independent
  240.         variable. Enter a column number. The cursor will move to the
  241.         dependent variable data colunm: prompt. Enter another column
  242.         number. the cursor will then move to the <run regs> prompt. Hit
  243.         the enter key and as many of the 405 possible regressions that
  244.         can be run will be. The number of regressions actually run will
  245.         appear after the ntosave: prompt. 110 will be the current
  246.         regression index.
  247.  
  248.         If the number run is large, move the cursor to <brief summary>
  249.         and hit enter. The regression indices and their adjusted
  250.         coefficients of determination will be sent to the output file.
  251.         Move to <view output> and hit enter to see the results. To see
  252.         more information use <expanded summary>. This option outputs one
  253.         line per regression, so output can be voluminous. You can cut
  254.         this down by changing ntosave to a smaller number. Only the best
  255.         ntosave regressions will be included in the summary.
  256.  
  257.         If you want a more complete report on a single regression, put
  258.         that regression's index in crindex and then move to the <detail
  259.         stats> prompt. Hit enter. To see the results, use <view output>.
  260.         
  261.  
  262.         ksstat                                                  page 6
  263.  
  264.  
  265.         All of the menu choices in the last three rows except <view
  266.         data> are for a specific regression, and are always performed
  267.         for the regression whose index is crindex. <plot regr> plots
  268.         the regression line along with the original data. <plot resid>
  269.         plots the residuals. <tabl resid> shows the residuals in a
  270.         table. <hist resid> shows them in a histogram. <add resid> adds
  271.         the residuals to the data matrix, not to the data on disk. To get
  272.         the residuals or anything else added to the data on disk, select
  273.         the SD option from the main ksstat menu.
  274.  
  275.         <add fit y> adds the predicted y values to the data, and <add
  276.         conf lim> adds upper and lower confidence limits for either y or
  277.         the mean of y to the data. You can choose the percent confidence
  278.         in a submenu that will appear when you select <add conf lim>. By
  279.         adding the fitted y values and confidence limits to the data, you
  280.         can plot y, fitted y, and both confidence limit columns on the
  281.         same graph to get a nice graphical summary of the fit. The PL
  282.         option on the main ksstat menu can be used to do this. So can
  283.         the <plot conf lim> option on this menu.
  284.  
  285.         The <conf int y> option allows you to compute confidence
  286.         intervals for y or the mean of y for any value of x, whether or
  287.         not the x is part of the data set.
  288.  
  289.         When you start kscfit, you will see <oort: o> on the lower right.
  290.         oort stands for o or t which stands for original units or
  291.         transformed units. These refer to the units y is reported in
  292.  
  293.         under any option that computes either y values or residual
  294.         values. Any regression with an index starting with anything but 1
  295.         has y transformed. The transformed units are probably not
  296.         physicaly meaningful, so if you are doing computations for use in
  297.         your application, original unit results will be most useful. If,
  298.         however, you are diagnosing regression results, looking at
  299.         residuals, possible outliers, etc, the transformed units are
  300.         appropriate, since the usual statistical properties of residuals
  301.         (0 mean, asymptotic normality, etc) apply to the residuals in
  302.         transformed units and <<not>> to the residuals in original units.
  303.         So select o or t as needed.
  304.  
  305.         <forr: r> of the original menu allows you to toggle between
  306.         adjusted coefficient of determination (r) and the f statistic as
  307.         the measure used to rank the regressions from best to worst. This
  308.         affects the two summary options and the <save reg file> option.
  309.  
  310.         With <save reg file>, you can save the results of the best
  311.         ntosave regressions in a special file called the reg file. The
  312.         program can later read this file, allowing you to continue
  313.         investigating the regression results without first regenerating
  314.         them from the original data.
  315.         
  316.  
  317.         ksstat                                                  page 7
  318.  
  319.  
  320.         Be sure to name the reg file on the top of the menu before trying
  321.         to save the regressions. The reg file is an ascii file, but don't
  322.         fool with it: kscfit might barf trying to read a messed up file
  323.         later. Regression coefficients, standard errors etc. are saved in
  324.         the reg file to umpteen significant figures, so if you need more
  325.         sig figs than kscfit normally prints out, you can find them there.
  326.  
  327.         As you've probably guessed, the <get reg file> option does just
  328.         that. If you retrieve regressions from a reg file and the data
  329.         file name saved in the reg file is the same as the current data
  330.         file name, the data is not read. If the data on disk and the data
  331.         in memory are the same, as kscfit assumes, no problem. If the two
  332.         data sets are different, however, then strange things could
  333.         happen. The column names may not match, missing values will be
  334.         messed up and so on. The best bet is to use different file names
  335.         for different data sets, avoiding this problem.
  336.  
  337.         One statistics note: you may observe high correlations between x1
  338.         and x2 for some models. The natural inclination here is to remove
  339.         either x1 or x2. Often, this is a mistake. The high correlation
  340.         in this situation is neither troublesome nor particularly
  341.         undesirable, since x1 and x2 are just two components of a
  342.         transformation of the (single) predictor variable.
  343.  
  344.  
  345.         kslilfor - Lilliefors' normality test
  346.  
  347.         kslilfor performs the Lilliefors test for normality. Typing li at
  348.         the main menu brings up the Lillifor menu:
  349.  
  350.         ┌──────────────────────────────────────────────────────────────┐
  351.         │  ksstat Lilliefors test    2/4/91     1:50    247K free mem  │
  352.         │                                                              │
  353.         │  data     file: kssample.dat                       811 rows  │
  354.         │  codebook file: kssample.cod                         7 cols  │
  355.         │  output   file: kssample.out                        of data  │
  356.         │  lilgraph file: kssample.L01                                 │
  357.         │                                                              │
  358.         │  variable : 5   Q11               sig level: 0.050           │
  359.         │                                                              │
  360.         │  There are 301 nonmissing values and 510 missing values.     │
  361.         │  The maximum distance between the sample and normal cdfs of  │
  362.         │  0.2442 occurs at z = -0.3840, data =  2.0000000.            │
  363.         │  The critical distance is 0.0518. Normality is rejected.     │
  364.         │                                                              │
  365.         │  sample skewness is  1.70342.                                │
  366.         │  z for skewness test is  6.300, one tailed p value 0.0000    │
  367.         │  sample kurtosis is  6.51401.                                │
  368.         │  z for kurtosis test is  5.415, one tailed p value 0.0000    │
  369.         └──────────────────────────────────────────────────────────────┘
  370.         
  371.  
  372.         ksstat                                                  page 8
  373.  
  374.  
  375.         Entering the variable, significance level, and, if not previously
  376.         done, the lilgraph file name, the test is performed. The program
  377.         displays the "Working..." message, possibly for what seems to be
  378.         a long time, and then displays a message asking if the above
  379.         information is ok. At this point, hit return to actually perform
  380.         the test. The work done by the program prior to this message is
  381.         preliminary set up, not the test itself. During the actual
  382.         performance of the test, the bottom of the menu will be filled
  383.         with the information shown in the sample above. The skewness and
  384.         kurtosis tests are those discussed by  d'Agostino, Belanger and
  385.         d'Agostino in the American Statistician, November 1990.
  386.  
  387.         If screen and/or hpgl graphics output is selected, graphs are
  388.         produced as usual, either on screen or as a hpgl file or both. If
  389.         text graphics output is selected, the results are not sent to the
  390.         output file. Instead, a special lilliefors graph file is used.
  391.         This is because text based output is too crude to be useful in
  392.         this application. If the printer is selected as the lilliefors
  393.         graph file, output is sent there. If a disk file is selected,
  394.         graphics information is sent to the file. One disk file is used
  395.         for each graph. The files have the name you supply and exten-
  396.         sions numbered sequentially starting with .L01. The files are
  397.         set up so that copying them to the printer with a dos command
  398.         of the form
  399.  
  400.                          copy kssample.L01 prn /b
  401.  
  402.         will produce the graph, with a copy of the menu as a header.
  403.         The printer commands used are for an Epson, so the graphs may not
  404.         print properly on non-Epson compatible printers. You will still
  405.         have a record of the results, though, since the menu with the
  406.         summary information is written to the output file.
  407.  
  408.         The screen and/or hpgl options are probably the easiest ways to
  409.         get output.
  410.  
  411.         The file kssample.L01 is included with this document for you to
  412.         practice with.
  413.  
  414.         There must be at least 4 nonmissing data values to do the test.
  415.  
  416.         The Lilliefors test is an attractive alternative to the
  417.         Chi-Square test usually used to test for normality. The test is
  418.         simple to use. If the sample CDF falls outside the Lilliefors
  419.         bounds for the selected significance level, the hypothesis that
  420.         the data is normally distributed is rejected. Try the program
  421.         with a few sample data sets to get the idea. A number of recent
  422.         statistics books discuss this test, e.g. Iman and Conover, "A
  423.         Modern Approach to Statistics", Wiley; Conover, "Practical
  424.         Nonparametric Statistics", Wiley; and Milton and Arnold,
  425.         "Probability and Statistics in the Engineering and Computing
  426.         Sciences", McGraw Hill. Conover gives the table of quantiles
  427.         
  428.  
  429.         ksstat                                                  page 9
  430.  
  431.         originally used in this program. The quantiles used this version
  432.         come from Dallal and Wilkinson, "An analytic approximation to the
  433.         Distribution of Lilliefor's test statistic for normality" in The
  434.         November 1986 American Statistician (Vol 40 No 4).
  435.  
  436.  
  437.         ksxtab - crosstabs
  438.  
  439.         ksxtab does crosstabulations of up to 7 columns of data. the
  440.         first two columns form the rows and columns of a table. any
  441.         additional columns are used as breakdown variables to create
  442.         multiple tables.
  443.  
  444.         ksxtab, as all ksstat routines, considers each row of data as a
  445.         single case. It does not accept summary tables as input.  It
  446.         does produce summary tables as output.
  447.  
  448.         The data used to form the tables is usually integer valued,
  449.         though ksxtab is perfectly happy with any data at all. You may
  450.         not be happy, though, with the voluminous, nearly empty tables
  451.         that could appear as output if, say, a breakdown variable is
  452.         continuous with many distinct values.
  453.  
  454.         Statistics are reported for individual two dimensional tables. I
  455.         haven't really given these much thought, since I use ksxtab to
  456.         get information for summary reports and to just take a look at
  457.         data. For hypothesis testing, I tend to use logistic models
  458.         and/or bootstrapping. Bootstrapping may eventually appear in
  459.         ksstat. Right now its experimental.
  460.  
  461.         If you specify just one column, either as the row variable or as
  462.         the column variable, ksxtab will produce a frequency table for
  463.         that variable.
  464.  
  465.  
  466.         ksmplot - scatter plots
  467.  
  468.         ksmplot produces scatter plots in any or all of the three
  469.         graphics output options. Up to six variables can be plotted on
  470.         the vertical axis against one on the horizontal axis. Different
  471.         plot symbols are used for each dependent variable. The symbols
  472.         are shown in the ksmplot menu.
  473.  
  474.         To use ksmplot, you must specify the variable on the horizontal
  475.         axis and as many vertical axis variables you wish, up to 6. You
  476.         may use points, lines or points and lines for any plot. The
  477.         symbols used to plot each variable  are fixed, but you can use
  478.         any of those available. Just skip down the menu on the left side
  479.         until you are in the line with the plot symbol you want to use,
  480.         then specify the variable in that line.
  481.         
  482.  
  483.         ksstat                                                  page 10
  484.  
  485.  
  486.         If more than one but fewer than 10 points appear at the same plot
  487.         position, the number of points plotted there is shown instead of
  488.         a plot symbol. if 10 or more points appear at a plot position, a
  489.         type of grid is printed.
  490.  
  491.         You can specify the plotting limits if you wish, or you can leave
  492.         them as missing and the program will figure them out.
  493.  
  494.         If you supply a title, it will be printed at the top of the
  495.         graph.
  496.  
  497.  
  498.         kshist - histograms
  499.  
  500.         kshist produces histograms in two different ways, with fixed
  501.         width cells or with variable width cells in screen or hpgl
  502.         output. Text output histograms are still another variety that
  503.         uses a few ideas from stem and leaf plots. In text plot histo-
  504.         grams, the histogram is plotted using the first two digits of
  505.         the standardized data values. A histogram of column 3 of
  506.         kssample.dat looks like this:
  507.  
  508.         histogram of Q9a.  each digit represents 4 observations.
  509.         mean: 2.99566474 st dev: 1.48946469 missing: 119 nonmissing: 692
  510.  
  511.           midpoint freq stem
  512.             -2.590    0  -3|
  513.             -1.845    0  -3|
  514.             -1.100    0  -2|
  515.             -0.356    0  -2|
  516.              0.389    0  -1|
  517.              1.134   63  -1|333333333333333c
  518.              1.879  204  -0|66666666666666666666666...6666666666666
  519.              2.623    0  -0|
  520.              3.368  283   0|00000000000000000000000...000000000000000000c
  521.              4.113   81   0|66666666666666666666a
  522.              4.857    0   1|
  523.              5.602    0   1|
  524.              6.347    0   2|
  525.              7.092   60   2|666666666666666
  526.              7.836    0   3|
  527.              8.581    0   3|
  528.                             4.0
  529.  
  530.         The ... above do not appear in the actual histogram. I just put
  531.         them in and eliminated some digits so the histogram would fit
  532.         here. The histogram is designed to print in condensed mode on
  533.         Epson printers, so that 120 columns can be used.
  534.         
  535.  
  536.         ksstat                                                  page 11
  537.  
  538.  
  539.         The stem is the first digit of the studentized sample value,
  540.         (sample value - mean) / sample std dev, and the digits that make
  541.         up the histogram are the first digits after the decimal point of
  542.         the studentized values truncated, not rounded. An entry in the
  543.         histogram with a stem of 2 and a digit of 6 represents one or
  544.         more sample values at or above 2.60 and below 2.70 standard
  545.         deviations above the mean. The number of values represented by
  546.         each digit, the mean and standard deviation are shown in the
  547.         header.
  548.  
  549.         Each stem appears twice, once for the digits 0 to 4 and once for
  550.         the digits 5 through 9. If any studentized values are 4.0 or
  551.         larger in absolute value, they are printed individually above
  552.         (<= -4.0) or below (>= 4.0) the histogram itself. In the example
  553.         above, there is one value at 4.0.
  554.  
  555.         The cell midpoints are shown in the histogram. Each cell is half
  556.         a standard deviation wide, so the cell boundaries are always the
  557.         midpoint ± (std dev) / 4.
  558.  
  559.         The letters a, b, c,... that may appear at the right end of a
  560.         histogram element represent data values not numerous enough to
  561.         merit a digit of their own, a = 1, b = 2 etc. In the sample, the
  562.         cell with a count of 81 has 20 6's and an a. Since each 6
  563.         represent 4 data values, 20 * 4 + 1 = 81. The data graphed here
  564.         is multiple choice survey data, and so is pretty homogeneous.
  565.         With more diverse data, there could be left over values with
  566.         different individual digits. These are collected and represented
  567.         with asterisks at the right, before the letters. For example, if
  568.         there were a cell in the histogram above whose data to be plotted
  569.         had the digits
  570.  
  571.                       2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4
  572.                       \       / \                 / \   /
  573.                         5 2s          10 3s          3 4s
  574.  
  575.         the histogram cell would appear as      |233*b
  576.  
  577.         each 2 and 3 representing 4 data values, and the 6 odd data
  578.         values, a 2, two 3s and the three 4s collected into the *b at the
  579.         end.
  580.  
  581.         If you specify one or more breakdown variables in the histogram
  582.         menu, you will get one histogram for each combination of values
  583.         of the breakdown variables. I'll be waiting for the first irate
  584.         letter telling me that the user didn't know that 4 breakdown
  585.         variables with 6, 8, 4 and 7 levels respectively would produce
  586.         1344 histograms and lock his computer up for 3 hours. They will,
  587.         but control - C is activated in the program and can be used to
  588.         break out of such situations. (I hope - I've never tried to
  589.         produce 1344 histograms of one data column and don't plan to.)
  590.         
  591.  
  592.         ksstat                                                  page 12
  593.  
  594.  
  595.         Fixed width histograms are pretty much standard histograms. You
  596.         may specify the number of cells to use, or let the program pick a
  597.         reasonable number. To let the program do it, specify 0 as the
  598.         number of cells (the default).
  599.  
  600.         Variable width histograms take a long time to compute, sometimes
  601.         a really long time. The total area of all rectangles is 1, and
  602.         the widths are chosen to maximize the interval covered along the
  603.         x axis. The algorithm to determine widths is very complicated,
  604.         which is why it takes so long to compute. The results are often
  605.         not satisfactory visually, since there can be very tall, very
  606.         skinny rectangles generated. These tend to be overwhelmed by the
  607.         limited resolution and size of the display. If you are interested
  608.         in mare information about these, write.
  609.  
  610.         summary statistics
  611.  
  612.         This module produces the usual summary statistics for the data
  613.         columns you choose to include, or for all data columns except
  614.         those you choose to exclude. This is the point of the <incl or
  615.         excl?> part of the menu. To get a summary of all variables,
  616.         simply type i after <incl or excl?> and then ALL in the next
  617.         line. To get a summary of all columns except columns 2, 3 and 4,
  618.         respond with  e  and  2 3 4 in these places. The output looks
  619.         like this:
  620.  
  621.         Summary Statistics
  622.  
  623.         variable:        id          Q11         Q12        Q37a
  624.         data col:         1           5           6           7
  625.         mean          406.00000   2.55482     1.77409     2.48089
  626.         std dev       234.25983   1.44493     0.41888     0.74075
  627.         skewness      0.00000     1.70342    -1.31085     1.07777
  628.         kurtosis      1.80000     6.51401     2.71832     14.13046
  629.         coef of var   57.70%      56.56%      23.61%      29.86%
  630.         min           1.00000     1.00000     1.00000     1.00000
  631.         max           811.00000   9.00000     2.00000     9.00000
  632.         range         810.00000   8.00000     1.00000     8.00000
  633.         missing           0          510         510          0
  634.         nonmissing       811         301         301         811
  635.  
  636.  
  637.         As with kshist and ksxtab, you can specify breakdown variables to
  638.         get summaries of subsets of the data.
  639.  
  640.         For references, see ks.doc.
  641.  
  642.         Have fun.
  643.