166300.      (VERSION 2020.05)  total number of lines in file (including this line)
2 4.                          number of     sections below
3  100.    P                  first line number of P section
422400.    Q                  first line number of Q section
525500.    R                  first line number of R section
642500.    S                  first line number of S section
7
8----------------------------------------------------------
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100-------------------------  *P*  ZZZZZ--------------------
101
102-----PAGE TEST-----------------------------------------
103
104PAGE TEST
105
106Name:
107    PAGE TEST
108
109Type:
110    Analysis Command
111
112Purpose:
113    Perform a Page test that k treatments have identical effects
114    against the alternative of ordered treatment effects.
115
116Description:
117    The Page test is a non-parametric test for analyzing randomized
118    complete block designs.  It is derived from a Spearman's rho
119    rank correlation of the Friedman within block rankings and the
120    specified ordering of the treatments.  The Page test statistic
121    is actually a monotonic function of Spearman's rho when there is
122    no ties in the data.
123
124    The distinction between the Friedman test and the Page test
125    is that the Page test is used when you want to test for ordered
126    effects.   By ordered effects, we mean that treatment 1 is
127    less than or equal to treatment 2 which is less than or equal to
128    treatment 3 and so on (and at least one of these should be
129    strictly less than).
130
131    As with the Friedman test, assumes that there are k experimental
132    treatments (k >= 2).  The observations are arranged in p blocks,
133    that is
134
135                     Treatment
136    Block  1    2      ...      k
137      1   X11  X12     ...     X1k
138      2   X21  X22     ...     X2k
139      3   X31  X32     ...     X3k
140     ...  ...  ...     ...     ...
141      b   Xb1  Xb2     ...     Xbk
142
143    Let R(Xij) be the rank assigned to Xij within block i (i.e.,
144    ranks within a given row).  Average ranks are used in the case
145    of ties.  The ranks are summed to obtain
146
147         R(j) = SUM[i=1 to b]R(X(ij))
148
149    Then the Page test is
150
151        H0: The treatment effects have identical effects
152        Ha: mu1 <= mu2 <= .... <= mu3  or
153            mu1 >= mu2 >= .... >= mu3
154        Test Statistic:
155            The Page test statistic is
156
157                T4 = SUM[j=1 to k][j*R(j)]
158
159            In order to compare this to a standard normal distribution,
160            this statistic is transformed to
161
162                T5 = {T4 - b*k*(k+1)**2/4}/SQRT{b*(k**3 - k)**2/(144*(k-1))}
163        Significance Level: ALPHA
164        Critical Region:
165            T5 > NORPPF(ALPHA) where NORPPF is the normal percent point
166            function
167        Conclusion: Reject the null hypothesis if the test
168                    statistic is in the critical region.
169
170Syntax:
171    PAGE TEST  <y>  <block> <treat>
172                        <SUBSET/EXCEPT/FOR qualification>
173    where <y> is the response variable;
174          <block> is a variable that identifies the block;
175          <treat> is a variable that identifies the treatment;
176    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
177
178Examples:
179    PAGE TEST Y BLOCK TREATMENT
180    PAGE TEST Y X1 X2
181    PAGE TEST Y BLOCK TREATMENT  SUBSET BLOCK > 2
182
183Note:
184    Dataplot formulates the test as a "less than or equal to"
185    test.  That is, the treatment that is hypothesized to be
186    the smallest should be coded as 1, the treatment that is
187    hypothesized to be the second smallest should be coded as 2,
188    and so on.  If your treatments are coded in the opposite order,
189    you can reverse them with the command
190
191        LET TREAT2 = FLIP TREAT
192
193Note:
194    In Dataplot, the variables should be given as:
195
196        Y   BLOCK   TREAT
197       X11    1      1
198       X12    1      2
199       ...    1     ...
200       X1k    1      k
201       X21    2      1
202       X22    2      2
203       ...    2     ...
204       X2k    2      k
205
206       ...   ...    ...
207
208
209       Xb1    b      1
210       Xb2    b      2
211       ...    b     ...
212       Xb3    b      k
213
214    If your data are in a format similar to that given in the
215    DESCRIPTION section (i.e., you have colums Y1 to Yk, each
216    with b rows), you can convert it to the format required by
217    Dataplot with the commands:
218
219       LET NBLOCK = SIZE Y1
220       LET BLOCKID = SEQUENCE 1 1 NBLOCK
221       LET Y BLOCK TREAT = REPLICATED STACK Y1 Y2 Y3 Y4 Y5 BLOCKID
222       PAGE TEST Y BLOCK TREAT
223
224Note:
225    The response, ranked response, block, and treatment are
226    written to the file dpst1f.dat in the current directory.
227
228Note:
229    The Page test is based on the following assumptions:
230
231       1) The b rows are mutually independent.  That means that
232          the results within one block (row) do not affect
233          the results within other blocks.
234
235       2) The data can be meaningfully ranked.
236
237Note:
238    The following statistics are also supported:
239
240        LET A = PAGE TEST            Y X1 X2
241        LET A = PAGE TEST NORMALIZED Y X1 X2
242        LET A = PAGE TEST CDF        Y X1 X2
243        LET A = PAGE TEST PVALUE     Y X1 X2
244
245    The PAGE TEST returns the T4 value described above and the
246    PAGE TEST NORMALIZED returns the T5 value described above.
247
248    Enter HELP STATISTICS to see what commands can use these
249    statistics.
250
251Default:
252    None
253
254Synonyms:
255    None
256
257Related Commands:
258    FRIEDMAN TEST         = Perform a Friedman test.
259    QUADE TEST            = Perform a Quade test.
260    ANOVA                 = Perform an analysis of variance.
261    DURBIN TEST           = Perform a Durbin test for two-way
262                            incomplete balanced block designs.
263    COCHRAN TEST          = Perform a Cochran test for two-way
264                            complete block designs (binary data).
265    KRUSKAL WALLIS        = Perform a Kruskall Wallis test.
266    BLOCK PLOT            = Generate a block plot.
267    DEX SCATTER PLOT      = Generates a dex scatter plot.
268    DEX ... PLOT          = Generates a dex plot for a statistic.
269
270Reference:
271    Conover, "Practical Nonparametric Statistics", Third Edition, Wiley,
272    1999, pp. 380-383.
273
274
275Applications:
276    Analysis of Variance
277
278Implementation Date:
279    2013/2
280
281Program:
282    .  Test Page test as given in
283    .  Conover (1999), "Practical Non-Parametric Statistics"
284    .  Third Edition, pp. 380-381.
285    .
286    read y treat block
287    79   1    1
288    78   1    2
289    72   1    3
290    66   1    4
291    75   1    5
292    64   1    6
293    68   1    7
294    70   1    8
295    76   2    1
296    76   2    2
297    74   2    3
298    65   2    4
299    75   2    5
300    66   2    6
301    70   2    7
302    72   2    8
303    77   3    1
304    76   3    2
305    77   3    3
306    68   3    4
307    72   3    5
308    65   3    6
309    68   3    7
310    78   3    8
311    84   4    1
312    80   4    2
313    78   4    3
314    72   4    4
315    74   4    5
316    69   4    6
317    74   4    7
318    76   4    8
319    82   5    1
320    80   5    2
321    75   5    3
322    65   5    4
323    77   5    5
324    68   5    6
325    70   5    7
326    77   5    8
327    end of data
328    .
329    let statval = page test             y block treat
330    let statva2 = page test normalized  y block treat
331    let cdf     = page test cdf         y block treat
332    let pval    = page test pvalue      y block treat
333    .
334    set write decimals 4
335    page test y block treat
336
337-----P CHART-----------------------------------------------------
338
339P CHART
340
341Name:
342    P CHART
343
344Type:
345    Graphics Command
346
347Purpose:
348    Generates a (binomial) proportion control chart.
349
350Description:
351    A P chart is a data analysis analysis technique for determining if
352    a measurement process has gone out of statistical control.  The p
353    chart is sensitive to changes in the proportion of defective items
354    in the measurement process.  The "p" in P CHART stands for the p
355    (the proportion of successes) of a binomial distribution.  The p
356    control chart consists of:
357       Vertical   axis = the proportion defectives for each sub-group;
358       Horizontal axis = the sub-group designation.
359    A sub-group is typically a time sequence (e.g., the number of
360    defectives in a daily production run where each day is considered a
361    sub-group).  If the times are equally spaced, the horizontal axis
362    variable can be generated as a sequence (e.g.,
363    LET X = SEQUENCE 1 1 N where N is the number of sub-groups).
364
365    In addition, horizontal lines are drawn at the mean number of
366    defectives and at the upper and lower control limits.  The control
367    limits are calculated as:
368         UCL = pbar + 3*sqrt(pbar(1-pbar)/N)
369         LCL = pbar - 3*sqrt(pbar(1-pbar)/N)
370    where pbar is the total number of defectives divided by the total
371    number of items and N is the number of items in a given sub-group.
372    Also, zero serves as a lower bound on the LCL value.
373
374Syntax:
375    P CHART   <y1>   <y2>   <x>  <SUBSET/EXCEPT/FOR qualification>
376    where <y1> is a variable containing the number of defective
377               items in each sub-group;
378          <y2> is a variable containing the total number of items
379               in each sub-group; and
380          <x>  is a variable containing the sub-group identifier
381               (usually 1, 2, 3, ...);
382    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
383
384Examples:
385    P CHART Y1 Y2 X
386    P CHART D T X
387
388Note:
389    The distribution of defective items is assumed to be Binomial.
390    This assumption is the basis for calculating the upper and lower
391    control limits.
392
393Note:
394    The P chart and NP chart are related to one another. The
395    distinction is that the P chart is used when sub-groups have equal
396    size (so the number of defectives is plotted) while the NP chart is
397    used when the sub-groups have unequal sample sizes (so the
398    percentage of defectives is plotted).
399
400Note:
401    The attributes of the 4 traces that make up the NP control chart
402    are controlled by the standard LINES, CHARACTERS, SPIKES, and BAR
403    commands.  Trace 1 is the response variable, trace 2 is the mean
404    line, and traces 3 and 4 are the upper and lower control limits.
405    Some analysts prefer to draw the response variable as a character
406    or spike rather than a connected line.
407
408Default:
409    None
410
411Synonyms:
412    PROPORTION CHART for P CHART
413
414Related Commands:
415    NP CHART            = Generates a Np control chart.
416    U CHART             = Generates a U control chart.
417    C CHART             = Generates an C control chart.
418    XBAR CHART          = Generates an xbar control chart.
419    R CHART             = Generates a range control chart.
420    S CHART             = Generates a standard deviation control chart.
421
422    CHARACTERS          = Sets the types for plot characters.
423    LINES               = Sets the types for plot lines.
424    SPIKES              = Sets the on/off switches for plot spikes.
425    BARS                = Sets the on/off switches for plot bars.
426    PLOT                = Generates a data or function plot.
427    LAG PLOT            = Generates a lag plot.
428    4-PLOT              = Generates a 4-plot for univariate analysis.
429    ANOP PLOT           = Generates an ANOP plot.
430
431Applications:
432    Quality Control
433
434Implementation Date:
435    88/2
436
437Program:
438    . DEFECTIVE MOTORS
439    .  1. X = SUBGROUP ID (1 TO 25)
440    .  2. NUMDEF = NUMBER OF DEFECTIVE ITEMS IN SUB-GROUP
441    .  3. SIZE = TOTAL NUMBER OF ITEMS IN SUB-GROUP
442    .
443    SERIAL READ NUMDEF
444    14 19 19 24 15 16 38 40 21 32 40 25 39 36 17 19 4 9 12 26
445    END OF DATA
446    SERIAL READ SIZE
447    125 200 188 200 200 250 390 360 250 250 395 300 310 200 300 185 55
448    90 130 300
449    END OF DATA
450    LET X = SEQUENCE 1 1 20
451    .
452    LINES SOLID SOLID DOT DOT
453    XLIMITS 0 20
454    XTIC OFFSET 0 1
455    . YLIMITS 0 15
456    . YTIC OFFSET 2 0
457    .
458    P CONTROL CHART NUMDEF  SIZE X
459
460-----PAPCDF (LET)--------------------------------
461
462PAPCDF
463
464Name:
465    PAPCDF (LET)
466
467Type:
468    Library Function
469
470Purpose:
471    Compute the Polya-Aeppli cumulative distribution function.
472
473Description:
474    The formula for the Polya-Aeppli probability mass function is
475
476    p(x;theta,p) = EXP(-theta)        x = 0
477                 = EXP(-theta)*p**x*SUM[j=1 to x]
478                   [(x-1  j-1)*(theta*(1-p)/p)**j/j!]
479                   x = 1, ...;
480                   0 < p < 1; theta > 0
481
482    with theta and <i>p</i> denoting the shape parameters.
483
484    The cumulative distribution function is computed using the
485    following recurrence relation (from page 379 of Johnson,
486    Kemp, and Kotz)
487
488        p(X+1) = (THETA*(1-P)/(X+1))*SUM[J=0 TO X]
489                 [(X+1-J)*P**(X-J)*p(X)]
490
491Syntax:
492    LET <y> = PAPCDF(<x>,<theta>,<p>)
493                         <SUBSET/EXCEPT/FOR qualification>
494    where <x> is a non-negative integer variable, number, or
495               parameter;
496          <theta> is a positive number or parameter that specifies
497               the first shape parameter;
498          <p> is a positive number or parameter that specifies
499               the second shape parameter;
500          <y> is a variable or a parameter where the computed
501               Polya-Aeppli cdf value is stored;
502    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
503
504Examples:
505    LET A = PAPCDF(3,3,0.5)
506    LET Y = PAPCDF(X1,2,0.3)
507    PLOT PAPCDF(X,2,0.3) FOR X = 0  1  20
508
509Note:
510    Library functions are distinguished from let subcommands
511    in the following ways.
512    1) Functions enclose the input value in parenthesis.  Let
513       subcommands use spaces.
514    2) Functions can accept (and return) either parameters
515       (i.e., single values) or variables (i.e., an array of
516       values) while let subcommands are specific in which they
517       accept as input and what they return as output.
518    3) Functions can accept expressions while let subcommands
519       do not.  For example, the following is legal:
520           LET Y2 = ABS(Y1-INT(Y1))
521       For let subcommands, you typically have to do something
522       like the following:
523           LET YTEMP = Y**2 + 8
524           LET A = SUM YTEMP
525
526Default:
527    None
528
529Synonyms:
530    None
531
532Related Commands:
533    PAPCDF                   = Compute the Polya-Aeppli cumulative
534                               distribution function.
535    PAPPDF                   = Compute the Polya-Aeppli probability
536                               mass function.
537    LPOPDF                   = Compute the Lagrange-Poisson
538                               percent point function.
539    BTAPDF                   = Compute the Borel-Tanner probability
540                               mass function.
541    LOSPDF                   = Compute the lost games probability
542                               mass function.
543    POIPDF                   = Compute the Poisson probability
544                               density function.
545    HERPDF                   = Compute the Hermite probability
546                               density function.
547    BINPDF                   = Compute the binomial probability
548                               density function.
549    NBPDF                    = Compute the negative binomial
550                               probability density function.
551    GEOPDF                   = Compute the geometric probability
552                               density function.
553
554References:
555    Douglas (1980), "Analysis with Standard Contagious
556    Distributions", International Co-operative Publishing House,
557    Fairland, MD.
558
559    Evans (1953), "Experimental Evidence Concerning Contagious
560    Distributions in Ecology", Biometrika, 40, pp. 186-211.
561
562    Johnson, Kotz, and Kemp (1992),  "Univariate Discrete
563    Distributions", Second Edition, Wiley, pp. 378-382.
564
565Applications:
566    Distributional Modeling
567
568Implementation Date:
569    2006/6
570
571Program:
572    title size 3
573    tic label size 3
574    label size 3
575    legend size 3
576    height 3
577    multiplot scale factor 1.5
578    x1label displacement 12
579    y1label displacement 17
580    .
581    multiplot corner coordinates 0 0 100 95
582    multiplot scale factor 2
583    label case asis
584    title case asis
585    case asis
586    tic offset units screen
587    tic offset 3 3
588    title displacement 2
589    y1label Probability
590    x1label X
591    .
592    ylimits 0 1
593    major ytic mark number 6
594    minor ytic mark number 3
595    xlimits 0 20
596    line blank
597    spike on
598    .
599    multiplot 2 2
600    .
601    title Theta = 0.5, P = 0.5
602    plot papcdf(x,0.5,0.5) for x = 1 1 20
603    .
604    title Theta = 1, P = 0.5
605    plot papcdf(x,1,0.5) for x = 1 1 20
606    .
607    title Theta = 2.5, P = 0.5
608    plot papcdf(x,2.5,0.5) for x = 1 1 20
609    .
610    title Theta = 5, P = 0.5
611    plot papcdf(x,5,0.5) for x = 1 1 20
612    .
613    end of multiplot
614    .
615    justification center
616    move 50 97
617    text Cumulative Distribution for Polya-Aeppli
618
619-----PAPPDF (LET)--------------------------------
620
621PAPPDF
622
623Name:
624    PAPPDF (LET)
625
626Type:
627    Library Function
628
629Purpose:
630    Compute the Polya-Aeppli probability mass function.
631
632Description:
633    The formula for the Polya-Aeppli probability mass function is
634
635    p(x;theta,p) = EXP(-theta)        x = 0
636                 = EXP(-theta)*p**x*SUM[j=1 to x]
637                   [(x-1  j-1)*(theta*(1-p)/p)**j/j!]
638                   x = 1, ...;
639                   0 < p < 1; theta > 0
640
641    with theta and <i>p</i> denoting the shape parameters.
642
643    The Polya-Aeppli distribution can be derived as a model for
644    the number of objects where the objects occur in clusters,
645    the clusters follow a Poisson distribution with shape
646    parameter theta, and the number of objects within a cluster
647    follows a geometric distribution with shape parameter p.
648    For this reason, this distribution is sometimes referred to
649    as a geometric Poisson distribution
650
651    Note that there are a number of alternative parameterizations
652    of this distribution in the literature.  The parameterization
653    used above is the one given in Johnson, Kotz, and Kemp.
654
655    The moments of this distribution are:
656
657        mean      = theta/(1-p)
658        variance  = theta*(1+p)/(1-p)**2
659        skewess   = (1+4*p+p**2)**2/((1+p)**3*theta)">
660        kurtosis  = 3 + (1+11*p+11*p**2+p**3)/((1+p)**2*theta)
661
662Syntax:
663    LET <y> = PAPPDF(<x>,<theta>,<p>)
664                         <SUBSET/EXCEPT/FOR qualification>
665    where <x> is a non-negative integer variable, number, or
666               parameter;
667          <theta> is a positive number or parameter that specifies
668               the first shape parameter;
669          <p> is a positive number or parameter that specifies
670               the second shape parameter;
671          <y> is a variable or a parameter where the computed
672               Polya-Aeppli pdf value is stored;
673    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
674
675Examples:
676    LET A = PAPPDF(3,3,0.5)
677    LET Y = PAPPDF(X1,2,0.3)
678    PLOT PAPPDF(X,2,0.3) FOR X = 0  1  20
679
680Note:
681    Library functions are distinguished from let subcommands
682    in the following ways.
683    1) Functions enclose the input value in parenthesis.  Let
684       subcommands use spaces.
685    2) Functions can accept (and return) either parameters
686       (i.e., single values) or variables (i.e., an array of
687       values) while let subcommands are specific in which they
688       accept as input and what they return as output.
689    3) Functions can accept expressions while let subcommands
690       do not.  For example, the following is legal:
691           LET Y2 = ABS(Y1-INT(Y1))
692       For let subcommands, you typically have to do something
693       like the following:
694           LET YTEMP = Y**2 + 8
695           LET A = SUM YTEMP
696
697Note:
698    For a number of commands utilizing the Polya-Aeppli
699    distribution, it is convenient to bin the data.  There
700    are two basic ways of binning the data.
701
702      1) For some commands (histograms, maximum likelihood
703         estimation), bins with equal size widths are
704         required.  This can be accomplished with the
705         following commands:
706
707            LET AMIN = MINIMUM Y
708            LET AMAX = MAXIMUM Y
709            LET AMIN2 = AMIN - 0.5
710            LET AMAX2 = AMAX + 0.5
711            CLASS MINIMUM AMIN2
712            CLASS MAXIMUM AMAX2
713            CLASS WIDTH 1
714            LET Y2 X2 = BINNED
715
716      2) For some commands, unequal width bins may be
717         helpful.  In particular, for the chi-square goodness
718         of fit, it is typically recommended that the minimum
719         class frequency be at least 5.  In this case, it may
720         be helpful to combine small frequencies in the tails.
721         Unequal class width bins can be created with the
722         commands
723
724            LET MINSIZE = <value>
725            LET Y3 XLOW XHIGH = INTEGER FREQUENCY TABLE Y
726
727         If you already have equal width bins data, you can
728         use the commands
729
730            LET MINSIZE = <value>
731            LET Y3 XLOW XHIGH = COMBINE FREQUENCY TABLE Y2 X2
732
733         The MINSIZE parameter defines the minimum class
734         frequency.  The default value is 5.
735
736Note:
737    You can generate Polya-Aeppli random numbers, probability
738    plots, and chi-square goodness of fit tests with the
739    following commands:
740
741       LET N = VALUE
742       LET THETA = <value>
743       LET LAMBDA = <value>
744       LET Y = POLYA AEPPLI RANDOM NUMBERS FOR I = 1 1 N
745
746       POLYA AEPPLI PROBABILITY PLOT Y
747       POLYA AEPPLI PROBABILITY PLOT Y2 X2
748       POLYA AEPPLI PROBABILITY PLOT Y3 XLOW XHIGH
749
750       POLYA AEPPLI CHI-SQUARE GOODNESS OF FIT Y2 X2
751       POLYA AEPPLI CHI-SQUARE GOODNESS OF FIT Y3 XLOW XHIGH
752
753    To obtain the method of moments, the method of zero frequency
754    and the mean, and the weighted discrepancies estimates of
755    lambda and theta, enter the command
756
757        POLYA AEPPLI MAXIMUM LIKELIHOOD Y
758        POLYA AEPPLI MAXIMUM LIKELIHOOD Y2 X2
759
760    The method of moments estimates are
761
762        thetahat  = 2*xbar**2/(s**2 + xbar)
763        phat = (s**2 - xbar)/(s^2 + xbar)
764
765    with xbar and s**2 denoting the sample mean and sample
766    variance, respectively.
767
768    The mean and zero frequency estimates are
769
770        thetahat = -LOG(f0/N))
771        phat = 1 - thetahat/xbar
772
773    with f0 denoting the sample frequency at x = 0.
774
775    The method of the first two sample frequencies estimates
776    are
777
778        thetahat = -LOG(f0/N))
779        phat = -f1/(f0LOG(f0/N))
780
781    with f0 and f1 denoting the sample frequencies at
782    x = 0 and x = 1, respectively.
783
784    The maximum likelihood estimates are the solution to the
785    following equations
786
787        xbar - thetahat/(1-phat) = 0
788
789        xbar - SUM[i=1 to N][(f(j)*(j-1)*Phat(j-1)/(N*Phat(j)) = 0
790
791    with f(x) and Phat(x) denoting the frequency at x and the
792    Polya-Aeppli probaility mass function value at x, respectively.
793
794    You can generate estimates of theta and p based on the
795    maximum ppcc value or the minimum chi-square goodness of fit
796    with the commands
797
798        LET THETA1 = <value>
799        LET THETA2 = <value>
800        LET P1 = <value>
801        LET P2 = <value>
802        POLYA AEPPLI KS PLOT Y
803        POLYA AEPPLI KS PLOT Y2 X2
804        POLYA AEPPLI KS PLOT Y3 XLOW XHIGH
805        POLYA AEPPLI PPCC PLOT Y
806        POLYA AEPPLI PPCC PLOT Y2 X2
807        POLYA AEPPLI PPCC PLOT Y3 XLOW XHIGH
808
809    The default values of p1 and p2 are 0.05 and 0.95,
810    respectively.  The default values of theta1 and theta2
811    are 1 and 25, respectively.  Due to the discrete nature of
812    the percent point function for discrete distributions, the
813    ppcc plot will not be smooth.  For that reason, if there is
814    sufficient sample size the KS PLOT (i.e., the minimum
815    chi-square value) is typically preferred.  However, it may
816    sometimes be useful to perform one iteration of the PPCC PLOT
817    to obtain a rough idea of an appropriate neighborhood for the
818    shape parameters since the minimum chi-square statistic can
819    generate extremely large values for non-optimal values of the
820    shape parameter.  Also, since the data is integer values, one
821    of the binned forms is preferred for these commands.
822
823Default:
824    None
825
826Synonyms:
827    None
828
829Related Commands:
830    PAPCDF                   = Compute the Polya-Aeppli cumulative
831                               distribution function.
832    PAPPPF                   = Compute the Polya-Aeppli percent point
833                               function.
834    LPOPDF                   = Compute the Lagrange-Poisson
835                               probability mass function.
836    BTAPDF                   = Compute the Borel-Tanner probability
837                               mass function.
838    LOSPDF                   = Compute the lost games probability
839                               mass function.
840    POIPDF                   = Compute the Poisson probability
841                               mass function.
842    HERPDF                   = Compute the Hermite probability
843                               mass function.
844    BINPDF                   = Compute the binomial probability
845                               mass function.
846    NBPDF                    = Compute the negative binomial
847                               probability mass function.
848    GEOPDF                   = Compute the geometric probability
849                               mass function.
850    INTEGER FREQUENCY TABLE  = Generate a frequency table at
851                               integer values with unequal bins.
852    COMBINE FREQUENCY TABLE  = Convert an equal width frequency
853                               table to an unequal width frequency
854                               table.
855    KS PLOT                  = Generate a minimum chi-square plot.
856    MAXIMUM LIKELIHOOD       = Perform maximum likelihood
857                               estimation for a distribution.
858
859References:
860    Douglas (1980), "Analysis with Standard Contagious
861    Distributions", International Co-operative Publishing House,
862    Fairland, MD.
863
864    Evans (1953), "Experimental Evidence Concerning Contagious
865    Distributions in Ecology", Biometrika, 40, pp. 186-211.
866
867    Johnson, Kotz, and Kemp (1992),  "Univariate Discrete
868    Distributions", Second Edition, Wiley, pp. 378-382.
869
870Applications:
871    Distributional Modeling
872
873Implementation Date:
874    2006/6
875
876Program:
877    let theta = 1.7
878    let p = 0.7
879    let y = polya aeppli random numbers for i = 1 1 500
880    .
881    let y3 xlow xhigh = integer frequency table y
882    class lower 0.5
883    class width 1
884    let amax = maximum y
885    let amax2 = amax + 0.5
886    class upper amax2
887    let y2 x2 = binned y
888    .
889    set write decimals 5
890    polya aeppli mle y
891    relative histogram y2 x2
892    limits freeze
893    pre-erase off
894    line color blue
895    plot pappdf(x,thetaml,pml) for x = 0 1 amax
896    limits
897    pre-erase on
898    line color black
899    let p = pml
900    let theta = thetaml
901    polya aeppli chi-square goodness of fit y3 xlow xhigh
902    case asis
903    justification center
904    move 50 97
905    text Theta = ^thetaml, P = ^pml
906    move 50 93
907    text Minimum Chi-Square = ^minks, 95% CV = ^cutupp95
908    .
909    label case asis
910    x1label P
911    x2label Curves Represent Values of Theta
912    y1label Minimum Chi-Square
913    let theta1 = 0.5
914    let theta2 = 5
915    let p1 = 0.3
916    let p2 = 0.9
917    polya aeppli chi-square plot y3 xlow xhigh
918    let theta = shape1
919    let p = shape2
920    polya aeppli chi-square goodness of fit y3 xlow xhigh
921    case asis
922    justification center
923    move 50 97
924    text Theta = ^theta, P = ^p
925    move 50 93
926    text Minimum Chi-Square = ^minks, 95% CV = ^cutupp95
927
928-----PAPPPF (LET)--------------------------------
929
930PAPPPF
931
932Name:
933    PAPPPF (LET)
934
935Type:
936    Library Function
937
938Purpose:
939    Compute the Polya-Aeppli percent point function.
940
941Description:
942    The formula for the Polya-Aeppli probability mass function is
943
944    p(x;theta,p) = EXP(-theta)        x = 0
945                 = EXP(-theta)*p**x*SUM[j=1 to x]
946                   [(x-1  j-1)*(theta*(1-p)/p)**j/j!]
947                   x = 1, ...;
948                   0 < p < 1; theta > 0
949
950    with theta and <i>p</i> denoting the shape parameters.
951
952    The cumulative distribution function is computed using the
953    following recurrence relation (from page 379 of Johnson,
954    Kemp, and Kotz)
955
956        p(X+1) = (THETA*(1-P)/(X+1))*SUM[J=1 TO X]
957                 [(X+1-J)*P**(X-J)*p(X)]
958
959    The percent point function is computed by computing the
960    cumulative distribution function until the appropriate
961    probability is obtained.
962
963Syntax:
964    LET <y> = PAPPPF(<x>,<theta>,<p>)
965                         <SUBSET/EXCEPT/FOR qualification>
966    where <x> is a integer variable, number, or parameter in the
967               interval (0,1);
968          <theta> is a positive number or parameter that specifies
969               the first shape parameter;
970          <p> is a positive number or parameter that specifies
971               the second shape parameter;
972          <y> is a variable or a parameter where the computed
973               Polya-Aeppli ppf value is stored;
974    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
975
976Examples:
977    LET A = PAPPPF(0.95,3,0.5)
978    LET Y = PAPPPF(P,2,0.3)
979    PLOT PAPPPF(P,2,0.3) FOR P = 0  0.01  0.99
980
981Note:
982    Library functions are distinguished from let subcommands
983    in the following ways.
984    1) Functions enclose the input value in parenthesis.  Let
985       subcommands use spaces.
986    2) Functions can accept (and return) either parameters
987       (i.e., single values) or variables (i.e., an array of
988       values) while let subcommands are specific in which they
989       accept as input and what they return as output.
990    3) Functions can accept expressions while let subcommands
991       do not.  For example, the following is legal:
992           LET Y2 = ABS(Y1-INT(Y1))
993       For let subcommands, you typically have to do something
994       like the following:
995           LET YTEMP = Y**2 + 8
996           LET A = SUM YTEMP
997
998Default:
999    None
1000
1001Synonyms:
1002    None
1003
1004Related Commands:
1005    PAPCDF                   = Compute the Polya-Aeppli cumulative
1006                               distribution function.
1007    PAPPDF                   = Compute the Polya-Aeppli probability
1008                               mass function.
1009    LPOPDF                   = Compute the Lagrange-Poisson
1010                               percent point function.
1011    BTAPDF                   = Compute the Borel-Tanner probability
1012                               mass function.
1013    LOSPDF                   = Compute the lost games probability
1014                               mass function.
1015    POIPDF                   = Compute the Poisson probability
1016                               density function.
1017    HERPDF                   = Compute the Hermite probability
1018                               density function.
1019    BINPDF                   = Compute the binomial probability
1020                               density function.
1021    NBPDF                    = Compute the negative binomial
1022                               probability density function.
1023    GEOPDF                   = Compute the geometric probability
1024                               density function.
1025
1026References:
1027    Douglas (1980), "Analysis with Standard Contagious
1028    Distributions", International Co-operative Publishing House,
1029    Fairland, MD.
1030
1031    Evans (1953), "Experimental Evidence Concerning Contagious
1032    Distributions in Ecology", Biometrika, 40, pp. 186-211.
1033
1034    Johnson, Kotz, and Kemp (1992),  "Univariate Discrete
1035    Distributions", Second Edition, Wiley, pp. 378-382.
1036
1037Applications:
1038    Distributional Modeling
1039
1040Implementation Date:
1041    2006/6
1042
1043Program:
1044    title size 3
1045    tic label size 3
1046    label size 3
1047    legend size 3
1048    height 3
1049    multiplot scale factor 1.5
1050    x1label displacement 12
1051    y1label displacement 17
1052    .
1053    multiplot corner coordinates 0 0 100 95
1054    multiplot scale factor 2
1055    label case asis
1056    title case asis
1057    case asis
1058    tic offset units screen
1059    tic offset 3 3
1060    title displacement 2
1061    x1label Probability
1062    y1label X
1063    .
1064    xlimits 0 1
1065    major xtic mark number 6
1066    minor xtic mark number 3
1067    .
1068    multiplot 2 2
1069    .
1070    title Theta = 0.5, P = 0.5
1071    plot papppf(x,0.5,0.5) for x = 0  0.01  0.99
1072    .
1073    title Theta = 1, P = 0.5
1074    plot papppf(x,1,0.5) for x = 0  0.01  0.99
1075    .
1076    title Theta = 2.5, P = 0.5
1077    plot papppf(x,2.5,0.5) for x = 0  0.01  0.99
1078    .
1079    title Theta = 5, P = 0.5
1080    plot papppf(x,5,0.5) for x = 0  0.01  0.99
1081    .
1082    end of multiplot
1083    .
1084    justification center
1085    move 50 97
1086    text Percent Point for Polya-Aeppli
1087
1088-----PARALLEL LINES--------------------------------------------------
1089
1090PARALLEL LINES
1091
1092Name:
1093    PARALLEL LINES
1094
1095Type:
1096    LET Subcommand
1097
1098Purpose:
1099    Given a line defined by two points and a third point, find the line
1100    parallel to the first line and containing the third point.
1101
1102Syntax:
1103    LET <yout> <xout>= PARALLEL LINES <x1> <y1> <x2> <y2> <x3> <y3>
1104                       <SUBSET/EXPCEPT/FOR qualification>
1105    where <x1> is a variable or parameter containing the x-coordinates for the
1106               first point of line one;
1107          <y1> is a variable or parameter containing the y-coordinates for the
1108               first point of line one;
1109          <x2> is a variable or parameter containing the x-coordinates for the
1110               second point of line one;
1111          <y2> is a variable or parameter containing the y-coordinates for the
1112               second point of line one;
1113          <x3> is a variable or parameter containing the x-coordinates for the
1114               third point;
1115          <y3> is a variable or parameter containing the y-coordinates for the
1116               third point;
1117          <yout> is a variable containing the y-coordinates of the
1118               second point of the parallel line;
1119          <xout> is a variable containing the x-coordinates of the
1120               second point of the parallel line;
1121    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
1122
1123Examples:
1124    LET YOUT XOUT = PARALLEL LINES X1 Y1 X2 Y2 X3 Y3 X4 Y4
1125
1126Default:
1127    None
1128
1129Synonyms:
1130    None
1131
1132Related Commands:
1133    POINTS IN POLYGON  = Determine whether points are in the interior
1134                         of a convex polygon.
1135    CONVEX HULL        = Determine the convex hull of a set of points.
1136    TRANSFORM POINTS   = Perform location, scale, and rotation
1137                         transformation for a set of points.
1138    EXTREME POINTS     = Determine the extreme points of a set of points.
1139    LINE INTERSECTIONS = Determine the intersection points for a set of
1140                         lines.
1141    PERPINDICULAR LINE = Determine the coordinates for a point that defines
1142                         a perpindicular line determined by a point and a line
1143                         defined by two points.
1144
1145Applications:
1146    Computational Geometry
1147
1148Implementation Date:
1149    2012/10
1150
1151Program:
1152    dimension 40 columns
1153    skip 25
1154    read convhull.dat x y
1155    .
1156    let y2 x2 = 2d convex hull y x
1157    let xtemp = x2(1)
1158    let ytemp = y2(1)
1159    let y2 = combine y2 ytemp
1160    let x2 = combine x2 xtemp
1161    let x3 = x2
1162    let y3 = y2
1163    let n = size y2
1164    let nm1 = n - 1
1165    retain x2 y2 for i = 1 1 nm1
1166    retain x3 y3 for i = 2 1 n
1167    let slope = slope(x2,y2,x3,y3)
1168    let pdist = dpntline(xtemp,ytemp,x3,y3,slope)
1169    let xtempv = xtemp for i = 1 1 nm1
1170    let ytempv = ytemp for i = 1 1 nm1
1171    let y5 x5 = parallel line x2 y2 x3 y3 xtempv ytempv
1172    .
1173    set write decimals 4
1174    print "Anchor Point: (^xtemp,^ytemp)"
1175    print " "
1176    print " "
1177    print x2 y2 x3 y3 x5 y5
1178
1179-----PARALLEL COORDINATES PLOT--------------------------------------
1180
1181PARALLEL COORDINATES PLOT
1182
1183Name:
1184    PARALLEL COORDINATES PLOT
1185
1186Type:
1187    Graphics Command
1188
1189Purpose:
1190    Generates an parallel coordinates plot.
1191
1192Description:
1193    A parallel coordinates plot is a graphical data analysis
1194    technique for plotting multivariate data.
1195
1196    In the parallel coordinates plot, a set of parallel axes
1197    are drawn for each variable.  Then a given row of data
1198    is represented by drawing a line that connects the value
1199    of that row on each corresponding axis.  For example,
1200    given the row of data (0, 1, 0) for variables X1, X2, and
1201    X3:
1202
1203      X3  +----------------------
1204
1205      X2  ----------------------+
1206
1207      X1  +----------------------
1208
1209          0                     1
1210
1211    The "+" positions identify plot coordinates (these would be
1212    connected on a graphics device).
1213
1214    Paralled coordinate plots were first recoginized as a
1215    data analysis tool by Ed Wegman (see the Reference section
1216    below).
1217
1218    There have been a number of variants of the parallel
1219    coordinate plots recommended in the literature.
1220
1221Syntax 1:
1222    PARALLEL COORDINATES PLOT  <y1> <y2> ... <yk>
1223                               <SUBSET/EXCEPT/FOR qualification>
1224    where <y1> through <yk> are the response variables;
1225    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
1226
1227Syntax 2:
1228    GROUP PARALLEL COORDINATES PLOT  <y1> <y2> ... <yk> <tag>
1229                               <SUBSET/EXCEPT/FOR qualification>
1230    where <y1> through <yk> are the response variables;
1231          <tag> is a group-id variable;
1232    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
1233
1234    With this syntax, the last variable listed is interpreted as
1235    a group-id variable.  All rows of the response variable
1236    with the same group-id are plotted with the same line and
1237    character attributes.  See the Note section below for
1238    additional clarification.
1239
1240Examples:
1241    PARALLEL COORDINATES PLOT Y1 Y2 Y3 Y4 Y5
1242    PARALLEL COORDINATES PLOT Y1 TO Y5
1243    PARALLEL COORDINATES PLOT Y1 Y2 Y3 Y4 Y5 SUBSET TAG > 2
1244
1245Note:
1246    For the GROUP PARALLEL COORDINATES PLOT case, you can use
1247    whatever numerical grouping scheme you find convenient.
1248    For example, you can use a categorical response variable
1249    that already provides grouping or you can define your own
1250    groups based on whatever criterion you find relevant.
1251
1252    However you define the original grouping, Dataplot automatically
1253    recodes the group id's as the integers from 1 to NG where NG is
1254    the number of groups.  The coding is from smallest value of
1255    the original group id's to the largest value of the original
1256    group id's.
1257
1258    When the parallel coordinates plot is generated, observations
1259    with a group value of 1 use the first settings of the
1260    line and character settings, observations with a group value
1261    of 2 use the second settings of the line and character settings,
1262    and so on.
1263
1264Note:
1265    The data are typically scaled for a parallel coordinates
1266    plot.  In Dataplot, you can use the following command:
1267
1268        SET PARALLEL COORDINATES PLOT STANDARDIZE <NONE/USCORE/ZSCORE>
1269
1270    where
1271
1272        NONE    - means no scaling is applied
1273        USCORE  - scales the data between 0 and 1 (specifically
1274                  xscale = (x - xmin)/(xmax - xmin)
1275        ZSCORE  - scales the data by subtracting the mean and
1276                  dividing by the standard deviation
1277
1278    The default is USCORE.  The NONE option is useful if you
1279    want to apply your own scaling.  For example, you may
1280    want to scale the data based on the full data set, but only
1281    generate the parallel coordinates plot for a subset of the
1282    data.
1283
1284Note:
1285    By default, Dataplot draws the parallel axes on the
1286    vertical axis and the data scale on the horizontal axis.
1287    To reverse this, enter the command
1288
1289        HORIZONTAL SWITCH ON
1290
1291Note:
1292    The order of the variables on the plot can affect the
1293    appearance of the parallel coordinates plot.  At the
1294    current time, Dataplot simply draws the axes
1295    in the order they are given on PARALLEL COORDINATES PLOT
1296    command.
1297
1298Note:
1299    Dataplot currently allows up to 30 variables to be plotted.
1300
1301Note:
1302    The TO syntax is allowed on this command.  For example
1303
1304          PARALLEL COORDINATES PLOT Y1 TO Y10
1305
1306Default:
1307    None
1308
1309Synonyms:
1310    None
1311
1312Related Commands:
1313    LINES              = Sets the types for plot lines.
1314    PLOT               = Generates a data or function plot.
1315    ANDREWS PLOT       = generate an Andrews plot.
1316    STAR PLOT          = Generate a star plot.
1317    PROFILE PLOT       = Generate a profile plot.
1318
1319Reference:
1320    "Hyperdimensional Data Analysis Using Parallel Coordinates",
1321    Edward Wegman, Journal of the American Statistical Association,
1322    85, 664-675.
1323
1324Applications:
1325    Multivariate Analysis
1326
1327Implementation Date:
1328    2003/3
1329    2003/5: Added the GROUP PARALLEL COORDINATE PLOT case.
1330
1331Program:
1332    ROW LIMITS 26 50
1333    COLUMN LIMITS 20 132
1334    READ AUTO79.DAT Y1 TO Y9
1335    .
1336    YLIMITS 0 8
1337    MAJOR YTIC MARK NUMBER 9
1338    MINOR YTIC MARK NUMBER 0
1339    Y1TIC MARK LABEL FORMAT ALPHA
1340    Y1TIC MARK LABEL CONTENT PRICE MPG 1978SP()REPAIR 1977SP()REPAIR ...
1341    HEADSP()ROOM REARSP()SEATCR()ROOM TRUNKSP()SPACE WEIGHT LENGTH
1342    YGRID ON
1343    TIC OFFSET UNITS SCREEN
1344    TIC OFFSET 3 3
1345    .
1346    PRE-SORT OFF
1347    FRAME CORNER COORDINATES 20 20 90 90
1348    PARALLEL COORDINATES PLOT Y1 TO Y9
1349
1350-----PARAMETER EXPANSION (SET)---------------------------------------
1351
1352PARAMETER EXPANSION
1353
1354Name:
1355    PARAMETER EXPANSION (SET)
1356
1357Type:
1358    Set Subcommand
1359
1360Purpose:
1361    Specify whether parameters substituted for by the "^"
1362    character are expanded into a numeric or exponential format.
1363
1364Description:
1365    The "^" is normally used to substitute parameters into text
1366    strings for various types of labels.  For this reason, a
1367    limited amount of precision is maintained.
1368
1369    The "^" can also be used to define a constant in a fit.  In
1370    this case, more precision may be necessary.  Setting
1371    PARAMETER EXPANSION to EXPONENTIAL will substitute the
1372    number as
1373         (0.number*10**(exp))
1374    where number and exp are the values for the number in
1375    scientific notation.
1376
1377    In brief, setting this parameter to EXPONENTIAL is
1378    sometimes needed for fits.  For all other purposes, you
1379    typically want this parameter set to NUMERIC.
1380
1381Syntax:
1382    SET PARAMETER EXPANSION <value>
1383    where <value> is NUMERIC or EXPONENTIAL.
1384
1385Examples:
1386    SET PARAMETER EXPANSION EXPONENTIAL
1387    SET PARAMETER EXPANSION NUMERIC
1388
1389Default:
1390    The default is NUMERIC.
1391
1392Synonyms:
1393    None
1394
1395Related Commands:
1396    ^        = Substitution character.
1397    FIT      = Perform linear and non-linear fits.
1398
1399Applications:
1400    Fitting
1401
1402Implementation Date:
1403    2000/1
1404
1405Program:
1406    read richter.nice1 x y
1407    .
1408    set parameter expansion exponential
1409    let pii = 3.141592654
1410    let ee = 1.602177*(10**(-19))
1411    let h = 6.6260755*(10**(-34))
1412    let hb = h/(2*pii)
1413    let sn = (ee*ee)/(pii*h)
1414    .
1415    .
1416    let me = 9.10939*(10**(-31))
1417    let mstar = 0.067*me
1418    .
1419    let minsig = 0.0028308966
1420    let ns = 3.342*(10**(15))
1421    let mobility = minsig/(ee*ns)
1422    let taue = mstar*mobility/ee
1423    let kfermi = sqrt(2*pii*ns)
1424    let vfermi = kfermi*(hb/mstar)
1425    let d = (vfermi*vfermi*taue)/2.0
1426    .
1427    .
1428    let taup = 5
1429    let x0 = 9.36*(10**(-6))
1430    .
1431    let function arg1 = (^hb)/(4*(^d)*(^ee)*(taup*(10**(-11)))*abs(x-x0))
1432    let function arg2 = (^hb)/(4*(^d)*(^ee)*(^taue)*abs(x-x0))
1433    let function arg3 = (taup*(10**(-11)))/(^taue)
1434    .
1435    let function f0 = (digamma(0.5+arg1)-digamma(0.5+arg2)+log(arg3))
1436    let function f = (^sn)*(f0)+(^minsig)
1437    .
1438    fit y=f
1439
1440-----PARAMETER EXPAND DIGITS (SET)---------------------------------------
1441
1442PARAMETER EXPAND DIGITS
1443
1444Name:
1445    PARAMETER EXPAND DIGITS (SET)
1446
1447Type:
1448    Set Subcommand
1449
1450Purpose:
1451    Specify the number of digits to the right of the decimal point
1452    when parameters are substituted by the "^" keyword.
1453
1454Description:
1455    The "^" is normally used to substitute parameters into text strings
1456    for various types of labels.  For this reason, a limited amount of
1457    precision is maintained.  The "^" can also be used to define a
1458    constant in a fit.  In this case, more precision may be necessary.
1459
1460    The SET PARAMETER EXPAND DIGITS command can be used to specify
1461    exactly how many digits to use after the decimal point.  Note that
1462    trailing digits will be included.
1463
1464Syntax:
1465    SET PARAMETER EXPAND DIGITS <value>
1466    where <value> is a numeric value.
1467
1468    If <value> is -1, then Dataplot will automatically determine the
1469    number of digits to use.  If <value> is 0, the parameter will be
1470    expanded to an integer value.  If <value> is a positive integer
1471    value, then the parameter will be expanded with <value> digits to
1472    the right of the decimal point.
1473
1474Examples:
1475    SET PARAMETER EXPAND DIGITS 8
1476    SET PARAMETER EXPAND DIGITS -1
1477
1478Note:
1479    The command SET PARAMETER EXPANSION EXPONENTIAL can be used to expand
1480    the parameter in exponential format.  This can be useful when
1481    expanding the parameter in numerical computations (e.g., fitting).
1482
1483Note:
1484    The 2016/05 version of Dataplot expanded the default parameter
1485    expansion to handle up to 9 digits (prior to this, the limit was
1486    6 digits).
1487
1488    The 2016/05 version also increased the number of digits that can be
1489    used by the SET PARAMETER EXPAND DIGITS command from 9 to 15.
1490
1491    One distinction is that the default expansion does not include
1492    trailing zeros.  If the SET PARAMETER EXPAND DIGITS command is used,
1493    trailing zeros will be included.
1494
1495Default:
1496    The default is -1 (i.e., Dataplot automatically determines the
1497    number of digits to use).
1498
1499Synonyms:
1500    None
1501
1502Related Commands:
1503    ^                            = Substitution character.
1504    PARAMETER EXPANDSION (SET)   = Specify whether parameter expansions
1505                                   are generated in real format or
1506                                   exponential format.
1507
1508Applications:
1509    Plot Labeling
1510
1511Implementation Date:
1512    2005/02<BR>
1513    2016/05: Increase maximum number of digits from 9 to 15.<BR>
1514
1515
1516Program:
1517    let a = .0001
1518    print "a = ^a"
1519    .
1520    let a = .00001
1521    print "a = ^a"
1522    .
1523    let a = .000001
1524    print "a = ^a"
1525    .
1526    let a = .0000001
1527    print "a = ^a"
1528    .
1529    let a = .00000001
1530    print "a = ^a"
1531    .
1532    let a = .000000001
1533    print "a = ^a"
1534    .
1535    let a = .0000000001
1536    print "a = ^a"
1537    .
1538    set parameter expand digits 9
1539    let a = .000000001
1540    print "a = ^a"
1541    .
1542    set parameter expand digits 10
1543    let a = .0000000001
1544    print "a = ^a"
1545    .
1546    set parameter expand digits 12
1547    let a = .000000000001
1548    print "a = ^a"
1549
1550-----PARCDF (LET)--------------------------------
1551
1552PARCDF
1553
1554Name:
1555    PARCDF (LET)
1556
1557Type:
1558    Library Function
1559
1560Purpose:
1561    Compute the Pareto cumulative distribution function with
1562    shape parameters gamma and a.
1563
1564Description:
1565    The standard form of the Pareto cumulative distrubution
1566    function is:
1567
1568       F(x;gamma,a) = 1 - (a/x)**gamma     x >= a;   a, gamma > 0
1569
1570    with gamma and a denoting the tail length shape parameter
1571    and the lower bound parameter, respectively.
1572
1573    Note that although the a parameter is typically called a
1574    location parameter (and it is in the sense that it defines
1575    the lower bound), it is not a location parameter in the
1576    technical sense that the following relation does not hold:
1577
1578       f(x;gamma,a) = f((x-a);gamma,0)
1579
1580    with f denoting the probability density function.
1581
1582    For this reason, Dataplot treats a as a shape parameter.
1583    In Dataplot, the a shape parameter is optional with a
1584    default value of 1.
1585
1586Syntax:
1587    LET <y> = PARCDF(<x>,<gamma>,<a>,<loc>,<scale>)
1588                         <SUBSET/EXCEPT/FOR qualification>
1589    where <x> is a variable, a number, or a parameter;
1590          <gamma> is a number or parameter that specifies the
1591               tail length shape parameter;
1592          <a> is a number or parameter that specifies the
1593               optional lower bound shape parameter;
1594          <loc> is a number or parameter that specifies the
1595               optional location parameter;
1596          <scale> is a number or parameter that specifies the
1597               optional scale parameter;
1598          <y> is a variable or a parameter (depending on what <x> is)
1599               where the computed Pareto cdf value is saved;
1600    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
1601
1602    The a, loc, and scale parameters are all optional.
1603
1604Examples:
1605    LET A = PARCDF(3,1.5)
1606    LET A = PARCDF(3,1.5,2)
1607    LET Y = PARCDF(X,GAMMA,A,LOC,SCALE)
1608
1609Note:
1610    The Pareto cumulative distribution can be extended with
1611    location and scale parameters by using the relationship
1612
1613       F(x;gamma,a,loc,scale) = F((x-loc)/scale;gamma,a,0,1)
1614
1615    Since a defines the lower bound, the location parameter is
1616    typically set to zero.
1617
1618Note:
1619    Library functions are distinguished from let subcommands
1620    in the following ways.
1621    1) Functions enclose the input value in parenthesis.  Let
1622       subcommands use spaces.
1623    2) Functions can accept (and return) either parameters
1624       (i.e., single values) or variables (i.e., an array of
1625       values) while let subcommands are specific in which they
1626       accept as input and what they return as output.
1627    3) Functions can accept expressions while let subcommands
1628       do not.  For example, the following is legal:
1629           LET Y2 = ABS(Y1-INT(Y1))
1630       For let subcommands, you typically have to do something
1631       like the following:
1632           LET YTEMP = Y**2 + 8
1633           LET A = SUM YTEMP
1634
1635Default:
1636    None
1637
1638Synonyms:
1639    None
1640
1641Related Commands:
1642    PARPDF = Compute the Pareto probability density function.
1643    PARPPF = Compute the Pareto percent point function.
1644    GEPPDF = Compute the generalized Pareto probability density
1645             function.
1646    EV1PDF = Compute the extreme value type I probability density
1647             function.
1648    WEIPDF = Compute the Weibull probability density function.
1649    EXPPDF = Compute the exponential probability density function.
1650
1651Reference:
1652    "Continuous Univariate Distributions: Volume 1", Second Edition,
1653    Johnson, Kotz, and Balakrishnan, Wiley, 1994, chapter 19.
1654
1655Applications:
1656    Distributional Modeling
1657
1658Implementation Date:
1659    1994/4
1660
1661Program:
1662    MULTIPLOT 2 2
1663    MULTIPLOT CORNER COORDINATES 0 0 100 95
1664    MULTIPLOT SCALE FACTOR 2
1665    .
1666    CASE ASIS
1667    TITLE CASE ASIS
1668    LABEL CASE ASIS
1669    TITLE DISPLACEMENT 2
1670    Y1LABEL DISPLACEMENT 15
1671    X1LABEL DISPLACEMENT 12
1672    Y1LABEL Probability
1673    X1LABEL X
1674    .
1675    TITLE Gamma = 1
1676    PLOT PARCDF(X,1) FOR X = 1 0.1 10
1677    TITLE Gamma = 2
1678    PLOT PARCDF(X,2) FOR X = 1 0.1 10
1679    TITLE Gamma = 5
1680    PLOT PARCDF(X,5) FOR X = 1 0.1 10
1681    TITLE Gamma = 0.5
1682    PLOT PARCDF(X,0.5) FOR X = 1 0.1 10
1683    END OF MULTIPLOT
1684    MOVE 50 97
1685    JUSTIFICATION CENTER
1686    TEXT Pareto CDF Functions
1687
1688-----PARCHAZ (LET)--------------------------------
1689
1690PARCHAZ
1691
1692Name:
1693    PARCHAZ (LET)
1694
1695Type:
1696    Library Function
1697
1698Purpose:
1699    Compute the Pareto cumulative hazard function with shape
1700    parameters gamma and a.
1701
1702Description:
1703    The standard form of the Pareto cumulative hazard function
1704    is:
1705
1706       H(x;gamma,a) = gamma*LOG(x/a)     x >= a;   a, gamma > 0
1707
1708    with gamma and a denoting the tail length shape parameter
1709    and the lower bound parameter, respectively.
1710
1711    Note that although the a parameter is typically called a
1712    location parameter (and it is in the sense that it defines
1713    the lower bound), it is not a location parameter in the
1714    technical sense that the following relation does not hold:
1715
1716       H(x;gamma,a) = H((x-a);gamma,0)
1717
1718    with H denoting the cumulative hazard function.
1719
1720    For this reason, Dataplot treats a as a shape parameter.
1721    In Dataplot, the a shape parameter is optional with a
1722    default value of 1.
1723
1724Syntax:
1725    LET <y> = PARCHAZ(<x>,<gamma>,<a>,<loc>,<scale>)
1726                         <SUBSET/EXCEPT/FOR qualification>
1727    where <x> is a variable, a number, or a parameter;
1728          <gamma> is a number or parameter that specifies the
1729               tail length shape parameter;
1730          <a> is a number or parameter that specifies the
1731               optional lower bound shape parameter;
1732          <loc> is a number or parameter that specifies the
1733               optional location parameter;
1734          <scale> is a number or parameter that specifies the
1735               optional scale parameter;
1736          <y> is a variable or a parameter (depending on what <x> is)
1737               where the computed Pareto cumulative hazard value
1738               is saved;
1739    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
1740
1741   The a, loc, and scale parameters are all optional.
1742
1743Examples:
1744    LET A = PARCHAZ(3,1.5)
1745    LET A = PARCHAZ(3,1.5,2)
1746    LET Y = PARCHAZ,GAMMA,A,LOC,SCALE)
1747    PLOT PARCHAZ(X,GAMMA,A,LOC,SCALE) FOR X = XSTART  0.01  XSTOP
1748
1749Note:
1750    The Pareto cumulative hazard function can be extended with
1751    location and scale parameters by using the relationship
1752
1753        H(x;gamma,a,loc,scale) = H((x-loc)/scale;gamma,a,0,1)
1754
1755    Since a defines the lower bound, the location parameter is
1756    typically set to zero.
1757
1758Note:
1759    Library functions are distinguished from let subcommands
1760    in the following ways.
1761    1) Functions enclose the input value in parenthesis.  Let
1762       subcommands use spaces.
1763    2) Functions can accept (and return) either parameters
1764       (i.e., single values) or variables (i.e., an array of
1765       values) while let subcommands are specific in which they
1766       accept as input and what they return as output.
1767    3) Functions can accept expressions while let subcommands
1768       do not.  For example, the following is legal:
1769           LET Y2 = ABS(Y1-INT(Y1))
1770       For let subcommands, you typically have to do something
1771       like the following:
1772           LET YTEMP = Y**2 + 8
1773           LET A = SUM YTEMP
1774
1775Default:
1776    None
1777
1778Synonyms:
1779    None
1780
1781Related Commands:
1782    PARCDF = Compute the Pareto cumulative distribution function.
1783    PARHAZ = Compute the Pareto hazard function.
1784    PARPDF = Compute the Pareto probability density function.
1785    PARPPF = Compute the Pareto percent point function.
1786    GEPPDF = Compute the generalized Pareto probability density
1787             function.
1788    EV1PDF = Compute the extreme value type I probability density
1789             function.
1790    WEIPDF = Compute the Weibull probability density function.
1791    EXPPDF = Compute the exponential probability density function.
1792
1793Reference:
1794    "Continuous Univariate Distributions: Volume 1", Second Edition,
1795    Johnson, Kotz, and Balakrishnan, Wiley, 1994, chapter 19.
1796
1797Applications:
1798    Distributional Modeling
1799
1800Implementation Date:
1801    1998/4
1802
1803Program:
1804    MULTIPLOT 2 2
1805    MULTIPLOT CORNER COORDINATES 0 0 100 95
1806    MULTIPLOT SCALE FACTOR 2
1807    .
1808    CASE ASIS
1809    TITLE CASE ASIS
1810    LABEL CASE ASIS
1811    TITLE DISPLACEMENT 2
1812    Y1LABEL DISPLACEMENT 15
1813    X1LABEL DISPLACEMENT 12
1814    Y1LABEL Cumulative Hazard
1815    X1LABEL X
1816    .
1817    TITLE Gamma = 1
1818    PLOT PARCHAZ(X,1) FOR X = 1 0.1 10
1819    TITLE Gamma = 2
1820    PLOT PARCHAZ(X,2) FOR X = 1 0.1 10
1821    TITLE Gamma = 5
1822    PLOT PARCHAZ(X,5) FOR X = 1 0.1 10
1823    TITLE Gamma = 0.5
1824    PLOT PARCHAZ(X,0.5) FOR X = 1 0.1 10
1825    END OF MULTIPLOT
1826    MOVE 50 97
1827    JUSTIFICATION CENTER
1828    TEXT Pareto Cumulative Hazard Functions
1829
1830-----PARETO PLOT---------------------------------------------------
1831
1832PARETO PLOT
1833
1834Name:
1835    PARETO PLOT
1836
1837Type:
1838    Graphics Command
1839
1840Purpose:
1841    Generates a Pareto plot.
1842
1843Description:
1844    A Pareto plot is an ordered (largest to smallest) histogram with
1845    carry-along tags.  The Pareto plot is used to answer the question--
1846    "Which data values are most important, and which are least
1847    important?".  The Pareto plot consists of:
1848       Vertical   axis = ordered response value;
1849       Horizontal axis = dummy index (1 to n) where n is the number of
1850                         response values.
1851    Like usual, the appearance of the trace is controlled by the first
1852    setting of the LINES, CHARACTERS, SPIKES, BARS, and similar
1853    attributes.
1854
1855Syntax:
1856    PARETO PLOT   <y>    <SUBSET/EXCEPT/FOR/qualification>
1857    where <y> is the response variable;
1858    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
1859
1860Examples:
1861    PARETO PLOT Y
1862    PARETO PLOT Y1
1863    PARETO PLOT Y SUBSET LAB 2
1864
1865Default:
1866    None
1867
1868Synonyms:
1869    None
1870
1871Related Commands:
1872    CHARACTERS         = Sets the type for plot characters.
1873    CHARACTER FILL     = Sets the fill switch (on/off) for characters.
1874    CHARACTER OFFSET   = Sets the horizontal and vertical offset for
1875                         characters.
1876    CHARACTER ANGLE    = Sets the angle for characters
1877    LINES              = Sets the type for plot lines.
1878    SPIKES             = Sets the on/off switches for plot spikes.
1879    BARS               = Sets the on/off switches for plot bars.
1880    BAR FILL           = Sets the on/off switches for plot bar fills.
1881    BAR DIMENSION      = Sets the dimension (2 or 3) for bars.
1882    BAR WIDTH          = Sets the widths for plot bars.
1883    FONT               = Sets the font.
1884
1885Applications:
1886    Quality Management
1887
1888Implementation Date:
1889    88/9
1890
1891Program:
1892    LET Y = DATA 9 4 13 11 19 8 11 10
1893    CHARACTERS CA FL IL MA NE NY OR TX
1894    CHARACTERS OFFSET 2 2 ALL
1895    CHARACTER ANGLE 45 ALL
1896    SPIKE ON ALL
1897    TITLE 1986 AUTO GAS TAX
1898    PARETO PLOT Y
1899
1900-----PARHAZ (LET)--------------------------------
1901
1902PARHAZ
1903
1904Name:
1905    PARHAZ (LET)
1906
1907Type:
1908    Library Function
1909
1910Purpose:
1911    Compute the Pareto hazard function with shape parameters
1912    gamma and a.
1913
1914Description:
1915    The standard form of the Pareto hazard function is:
1916
1917       h(x;gamma,a) = gamma/x          x >= a;   a, gamma > 0
1918
1919    with gamma and a denoting the tail length shape parameter
1920    and the lower bound parameter, respectively.
1921
1922    Note that although the a parameter is typically called a
1923    location parameter (and it is in the sense that it defines
1924    the lower bound), it is not a location parameter in the
1925    technical sense that the following relation does not hold:
1926
1927       h(x;gamma,a) = h((x-a);gamma,0)
1928
1929    with h denoting the hazard function.
1930
1931    For this reason, Dataplot treats a as a shape parameter.
1932    In Dataplot, the a shape parameter is optional with a
1933    default value of 1.
1934
1935Syntax:
1936    LET <y> = PARHAZ(<x>,<gamma>,<a>,<loc>,<scale>)
1937                         <SUBSET/EXCEPT/FOR qualification>
1938    where <x> is a variable, a number, or a parameter;
1939          <gamma> is a number or parameter that specifies the
1940               tail length shape parameter;
1941          <a> is a number or parameter that specifies the
1942               optional lower bound shape parameter;
1943          <loc> is a number or parameter that specifies the
1944               optional location parameter;
1945          <scale> is a number or parameter that specifies the
1946               optional scale parameter;
1947          <y> is a variable or a parameter (depending on what <x> is)
1948               where the computed Pareto hazard value is saved;
1949    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
1950
1951    The a, loc, and scale parameters are all optional.
1952
1953Examples:
1954    LET A = PARHAZ(3,1.5)
1955    LET A = PARHAZ(3,1.5,2)
1956    LET Y = PARHAZ,GAMMA,A,LOC,SCALE)
1957    PLOT PARHAZ(X,GAMMA,A,LOC,SCALE) FOR X = XSTART  0.01  XSTOP
1958
1959Note:
1960    The Pareto hazard function can be extended with location and
1961    scale parameters by using the relationship
1962
1963       h(x;gamma,a,loc,scale) = (1/scale)*
1964                                h((x-loc)/scale;gamma,a,0,1)
1965
1966    Since a defines the lower bound, the location parameter is
1967    typically set to zero.
1968
1969Note:
1970    Library functions are distinguished from let subcommands
1971    in the following ways.
1972    1) Functions enclose the input value in parenthesis.  Let
1973       subcommands use spaces.
1974    2) Functions can accept (and return) either parameters
1975       (i.e., single values) or variables (i.e., an array of
1976       values) while let subcommands are specific in which they
1977       accept as input and what they return as output.
1978    3) Functions can accept expressions while let subcommands
1979       do not.  For example, the following is legal:
1980           LET Y2 = ABS(Y1-INT(Y1))
1981       For let subcommands, you typically have to do something
1982       like the following:
1983           LET YTEMP = Y**2 + 8
1984           LET A = SUM YTEMP
1985
1986Default:
1987    None
1988
1989Synonyms:
1990    None
1991
1992Related Commands:
1993    PARCDF = Compute the Pareto cumulative distribution function.
1994    PARPDF = Compute the Pareto probability density function.
1995    PARPPF = Compute the Pareto percent point function.
1996    GEPPDF = Compute the generalized Pareto probability density
1997             function.
1998    EV1PDF = Compute the extreme value type I probability density
1999             function.
2000    WEIPDF = Compute the Weibull probability density function.
2001    EXPPDF = Compute the exponential probability density function.
2002
2003Reference:
2004    "Continuous Univariate Distributions: Volume 1", Second Edition,
2005    Johnson, Kotz, and Balakrishnan, Wiley, 1994, chapter 19.
2006
2007Applications:
2008    Distributional Modeling
2009
2010Implementation Date:
2011    1998/4
2012
2013Program:
2014    MULTIPLOT 2 2
2015    MULTIPLOT CORNER COORDINATES 0 0 100 95
2016    MULTIPLOT SCALE FACTOR 2
2017    .
2018    CASE ASIS
2019    TITLE CASE ASIS
2020    LABEL CASE ASIS
2021    TITLE DISPLACEMENT 2
2022    Y1LABEL DISPLACEMENT 15
2023    X1LABEL DISPLACEMENT 12
2024    Y1LABEL Hazard
2025    X1LABEL X
2026    .
2027    TITLE Gamma = 1
2028    PLOT PARHAZ(X,1) FOR X = 1 0.1 10
2029    TITLE Gamma = 2
2030    PLOT PARHAZ(X,2) FOR X = 1 0.1 10
2031    TITLE Gamma = 5
2032    PLOT PARHAZ(X,5) FOR X = 1 0.1 10
2033    TITLE Gamma = 0.5
2034    PLOT PARHAZ(X,0.5) FOR X = 1 0.1 10
2035    END OF MULTIPLOT
2036    MOVE 50 97
2037    JUSTIFICATION CENTER
2038    TEXT Pareto Hazard Functions
2039
2040-----PARPDF (LET)--------------------------------
2041
2042PARPDF
2043
2044Name:
2045    PARPDF (LET)
2046
2047Type:
2048    Library Function
2049
2050Purpose:
2051    Compute the Pareto probability density function with
2052    shape parameters gamma and a.
2053
2054Description:
2055    The standard form of the Pareto probability density
2056    function is:
2057
2058       f(x;gamma,a) = gammaa*a**gamma/(x**(gamma+1))
2059                      x >= a, a, gamma > 0
2060
2061    with gamma and a denoting the tail length shape parameter
2062    and the lower bound parameter, respectively.  The default
2063    value of a is 1.
2064
2065    Note that although the a parameter is typically called a
2066    location parameter (and it is in the sense that it defines
2067    the lower bound), it is not a location parameter in the
2068    technical sense that the following relation does not hold:
2069
2070       f(x;gamma,a) = f((x-a);gamma,0)
2071
2072    For this reason, Dataplot treats a as a shape parameter.
2073    In Dataplot, the a shape parameter is optional with a
2074    default value of 1.
2075
2076Syntax:
2077    LET <y> = PARPDF(<x>,<gamma>,<a>,<loc>,<scale>)
2078                         <SUBSET/EXCEPT/FOR qualification>
2079    where <x> is a variable, a number, or a parameter;
2080          <gamma> is a number or parameter that specifies the
2081               tail length shape parameter;
2082          <a> is a number or parameter that specifies the
2083               optional lower bound shape parameter;
2084          <loc> is a number or parameter that specifies the
2085               optional location parameter;
2086          <scale> is a number or parameter that specifies the
2087               optional scale parameter;
2088          <y> is a variable or a parameter (depending on what <x> is)
2089               where the computed Pareto pdf value is saved;
2090    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
2091
2092    The a, loc, and scale parameters are all optional.
2093
2094Examples:
2095    LET A = PARPDF(3,1.5)
2096    LET A = PARPDF(3,1.5,2)
2097    LET Y = PARPDF(X,GAMMA,A,LOC,SCALE)
2098    PLOT PARPDF(X,GAMMA,A,LOC,SCALE) FOR X = XSTART  0.01  XSTOP
2099
2100Note:
2101    The Pareto distribution can be extended with location and
2102    scale parameters by using the relationship
2103
2104       f(x;gamma,a,loc,scale) = (1/scale)*f(x;gamma,a,0,1)
2105
2106    Since a defines the lower bound, the location parameter is
2107    typically set to zero.
2108
2109Note:
2110    Pareto random numbers, probability plots, and goodness
2111    of fit tests can be generated with the commands:
2112
2113       LET GAMMA = <value>
2114       LET A = <value>
2115       LET Y = PARETO RANDOM NUMBERS FOR I = 1 1 N
2116       PARETO PROBABILITY PLOT Y
2117       PARETO PROBABILITY PLOT Y X
2118       PARETO PROBABILITY PLOT Y XLOW XHIGH
2119       PARETO KOLMOGOROV SMIRNOV GOODNESS OF FIT Y
2120       PARETO CHI-SQUARE GOODNESS OF FIT Y X
2121       PARETO CHI-SQUARE GOODNESS OF FIT Y XLOW XHIGH
2122
2123    The following commands can be used to estimate the shape
2124    parameters for the Pareto distribution:
2125
2126       LET GAMMA1 = <value>
2127       LET GAMMA2 = <value>
2128       LET A = <value>
2129       PARETO PPCC PLOT Y
2130       PARETO PPCC PLOT Y X
2131       PARETO PPCC PLOT Y XLOW XHIGH
2132       PARETO KS PLOT Y
2133       PARETO KS PLOT Y X
2134       PARETO KS PLOT Y XLOW XHIGH
2135
2136    The default values for gamma1 and gamma2 are 0.2 and 10,
2137    respectively.  Note that only the gamma parameter is
2138    estimated for these plots.  The default value of A is 1.
2139    If the value of A is greater than the data minimum, then
2140    it is automatically set to the data minimum.
2141
2142    You can generate maximum likelihood estimates for the Pareto
2143    distribution with the command
2144
2145        PARETO MAXIMUM LIKELIHOOD Y
2146
2147Note:
2148    Library functions are distinguished from let subcommands
2149    in the following ways.
2150    1) Functions enclose the input value in parenthesis.  Let
2151       subcommands use spaces.
2152    2) Functions can accept (and return) either parameters
2153       (i.e., single values) or variables (i.e., an array of
2154       values) while let subcommands are specific in which they
2155       accept as input and what they return as output.
2156    3) Functions can accept expressions while let subcommands
2157       do not.  For example, the following is legal:
2158           LET Y2 = ABS(Y1-INT(Y1))
2159       For let subcommands, you typically have to do something
2160       like the following:
2161           LET YTEMP = Y**2 + 8
2162           LET A = SUM YTEMP
2163
2164Default:
2165    None
2166
2167Synonyms:
2168    None
2169
2170Related Commands:
2171    PARCDF = Compute the Pareto cumulative distribution function.
2172    PARPPF = Compute the Pareto percent point function.
2173    GEPPDF = Compute the generalized Pareto probability density
2174             function.
2175    EV1PDF = Compute the extreme value type I probability density
2176             function.
2177    WEIPDF = Compute the Weibull probability density function.
2178    EXPPDF = Compute the exponential probability density function.
2179
2180Reference:
2181    "Continuous Univariate Distributions: Volume 1", Second Edition,
2182    Johnson, Kotz, and Balakrishnan, Wiley, 1994, chapter 19.
2183
2184Applications:
2185    Distributional Modeling
2186
2187Implementation Date:
2188    1994/4
2189
2190Program:
2191    MULTIPLOT 2 2
2192    MULTIPLOT CORNER COORDINATES 0 0 100 95
2193    MULTIPLOT SCALE FACTOR 2
2194    .
2195    CASE ASIS
2196    TITLE CASE ASIS
2197    LABEL CASE ASIS
2198    TITLE DISPLACEMENT 2
2199    Y1LABEL DISPLACEMENT 15
2200    X1LABEL DISPLACEMENT 12
2201    Y1LABEL Probability Density
2202    X1LABEL X
2203    .
2204    TITLE Gamma = 1
2205    PLOT PARPDF(X,1) FOR X = 1 0.1 10
2206    TITLE Gamma = 2
2207    PLOT PARPDF(X,2) FOR X = 1 0.1 10
2208    TITLE Gamma = 5
2209    PLOT PARPDF(X,5) FOR X = 1 0.1 10
2210    TITLE Gamma = 0.5
2211    PLOT PARPDF(X,0.5) FOR X = 1 0.1 10
2212    END OF MULTIPLOT
2213    .
2214    MOVE 50 97
2215    JUSTIFICATION CENTER
2216    TEXT Pareto PDF Functions
2217
2218-----PARPPF (LET)--------------------------------
2219
2220PARPPF
2221
2222Name:
2223    PARPPF (LET)
2224
2225Type:
2226    Library Function
2227
2228Purpose:
2229    Compute the Pareto percent point function with shape
2230    parameters gamma and a.
2231
2232Description:
2233    The standard form of the Pareto percent point function is:
2234
2235       G(p;gamma,a) = a*(1-p)**(-1/gamma)    0 <= p < 1;
2236                                             a, gamma > 0
2237
2238    with gamma and a denoting the tail length shape parameter
2239    and the lower bound parameter, respectively.  The default
2240    value of a is 1.
2241
2242    Note that although the a parameter is typically called a
2243    location parameter (and it is in the sense that it defines
2244    the lower bound), it is not a location parameter in the
2245    technical sense that the following relation does not hold:
2246
2247       G(p;gamma,a) = a + G(p;gamma,0)
2248
2249    For this reason, Dataplot treats a as a shape parameter.
2250    In Dataplot, the a shape parameter is optional with a
2251    default value of 1.
2252
2253Syntax:
2254    LET <y> = PARPPF(<p>,<gamma>,<a>,<loc>,<scale>)
2255                         <SUBSET/EXCEPT/FOR qualification>
2256    where <p> is a variable, a number, or a parameter in the
2257               interval (0,1);
2258          <gamma> is a number or parameter that specifies the
2259               tail length shape parameter;
2260          <a> is a number or parameter that specifies the
2261               optional lower bound shape parameter;
2262          <loc> is a number or parameter that specifies the
2263               optional location parameter;
2264          <scale> is a number or parameter that specifies the
2265               optional scale parameter;
2266          <y> is a variable or a parameter (depending on what <p>
2267               is) where the computed Pareto ppf value is saved;
2268    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
2269
2270Examples:
2271    LET A = PARPPF(0.95,1.5)
2272    LET A = PARPPF(0.95,1.5,2)
2273    LET Y = PARPPF(P,GAMMA,A,LOC,SCALE)
2274    PLOT PARPPF(P,GAMMA,A,LOC,SCALE) FOR P = 0  0.01  0.99
2275
2276Note:
2277    The Pareto percent point function can be extended with
2278    location and scale parameters by using the relationship
2279
2280       G(p;gamma,a,loc,scale) = loc + scale*G(p;gamma,a,0,1)
2281
2282    Since a defines the lower bound, the location parameter is
2283    typically set to zero.
2284
2285Note:
2286    Library functions are distinguished from let subcommands
2287    in the following ways.
2288    1) Functions enclose the input value in parenthesis.  Let
2289       subcommands use spaces.
2290    2) Functions can accept (and return) either parameters
2291       (i.e., single values) or variables (i.e., an array of
2292       values) while let subcommands are specific in which they
2293       accept as input and what they return as output.
2294    3) Functions can accept expressions while let subcommands
2295       do not.  For example, the following is legal:
2296           LET Y2 = ABS(Y1-INT(Y1))
2297       For let subcommands, you typically have to do something
2298       like the following:
2299           LET YTEMP = Y**2 + 8
2300           LET A = SUM YTEMP
2301
2302Default:
2303    None
2304
2305Synonyms:
2306    None
2307
2308Related Commands:
2309    PARCDF = Compute the Pareto cumulative distribution function.
2310    PARPDF = Compute the Pareto probability density function.
2311    GEPPDF = Compute the generalized Pareto probability density
2312             function.
2313    EV1PDF = Compute the extreme value type I probability density
2314             function.
2315    WEIPDF = Compute the Weibull probability density function.
2316    EXPPDF = Compute the exponential probability density function.
2317
2318Reference:
2319    "Continuous Univariate Distributions: Volume 1", Second Edition,
2320    Johnson, Kotz, and Balakrishnan, Wiley, 1994, chapter 19.
2321
2322Applications:
2323    Distributional Modeling
2324
2325Implementation Date:
2326    1994/4
2327
2328Program:
2329    MULTIPLOT 2 2
2330    MULTIPLOT CORNER COORDINATES 0 0 100 95
2331    MULTIPLOT SCALE FACTOR 2
2332    .
2333    CASE ASIS
2334    TITLE CASE ASIS
2335    LABEL CASE ASIS
2336    TITLE DISPLACEMENT 2
2337    Y1LABEL DISPLACEMENT 15
2338    X1LABEL DISPLACEMENT 12
2339    X1LABEL Probability
2340    Y1LABEL X
2341    .
2342    TITLE Gamma = 1
2343    PLOT PARPPF(P,1) FOR P = 0  0.01  0.99
2344    TITLE Gamma = 2
2345    PLOT PARPPF(P,2) FOR P = 0  0.01  0.99
2346    TITLE Gamma = 5
2347    PLOT PARPPF(P,5) FOR P = 0  0.01  0.99
2348    TITLE Gamma = 0.5
2349    PLOT PARPPF(P,0.5) FOR P = 0  0.01  0.99
2350    END OF MULTIPLOT
2351    MOVE 50 97
2352    JUSTIFICATION CENTER
2353    TEXT Pareto PPF Functions
2354
2355-----PA2CDF (LET)--------------------------------
2356
2357PA2CDF
2358
2359Name:
2360    PA2CDF (LET)
2361
2362Type:
2363    Library Function
2364
2365Purpose:
2366    Compute the Pareto cumulative distribution of the second
2367    kind with shape parameters gamma and a.
2368
2369Description:
2370    The standard form of the Pareto cumulative distribution
2371    function of the second kind is:
2372
2373       F(x;gamma,a) = 1 - a**gamma/(x+a)**gamma
2374                      x, gamma, a > 0
2375
2376    with gamma and a denoting the shape parameters.  The a
2377    parameter is optional and has a default value of 1.
2378
2379    The Pareto distribution of the second kind is sometimes
2380    referred to as the Lomax distribution.
2381
2382Syntax:
2383    LET <y> = PA2CDF(<x>,<gamma>,<a>,<loc>,<scale>)
2384                         <SUBSET/EXCEPT/FOR qualification>
2385    where <x> is a variable, a number, or a parameter;
2386          <gamma> is a number or parameter that specifies the
2387               tail length shape parameter;
2388          <a> is a number or parameter that specifies the
2389               optional lower bound shape parameter;
2390          <loc> is a number or parameter that specifies the
2391               optional location parameter;
2392          <scale> is a number or parameter that specifies the
2393               optional scale parameter;
2394          <y> is a variable or a parameter (depending on what <x> is)
2395               where the computed Pareto cdf value is saved;
2396    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
2397
2398    The a, loc, and scale parameters are all optional.
2399
2400Examples:
2401    LET A = PA2CDF(3,1.5)
2402    LET X2 = PA2CDF(X1,GAMMA)
2403
2404Note:
2405    The Pareto cumulative distribution of the second kind can
2406    be extended with location and scale parameters by using the
2407    relationship
2408
2409       F(x;gamma,a,loc,scale) = F((x-loc)/scale;gamma,a,0,1)
2410
2411Note:
2412    Johnson, Kotz, and Balakrishnan (see Reference section below)
2413    define Pareto distributions of the first, second, third, and
2414    fourth kinds.  Dataplot supports Pareto distributions of the
2415    first and second kinds.
2416
2417Note:
2418    Library functions are distinguished from let subcommands
2419    in the following ways.
2420    1) Functions enclose the input value in parenthesis.  Let
2421       subcommands use spaces.
2422    2) Functions can accept (and return) either parameters
2423       (i.e., single values) or variables (i.e., an array of
2424       values) while let subcommands are specific in which they
2425       accept as input and what they return as output.
2426    3) Functions can accept expressions while let subcommands
2427       do not.  For example, the following is legal:
2428           LET Y2 = ABS(Y1-INT(Y1))
2429       For let subcommands, you typically have to do something
2430       like the following:
2431           LET YTEMP = Y**2 + 8
2432           LET A = SUM YTEMP
2433
2434Default:
2435    None
2436
2437Synonyms:
2438    None
2439
2440Related Commands:
2441    PA2PDF = Compute the Pareto second kind probability density
2442             function.
2443    PA2PPF = Compute the Pareto second kind percent point function.
2444    PARPDF = Compute the Pareto probability density function.
2445    GEPPDF = Compute the generalized Pareto probability density
2446             function.
2447    EV1PDF = Compute the extreme value type I probability density
2448             function.
2449    WEIPDF = Compute the Weibull probability density function.
2450    NORPDF = Compute the normal probability density function.
2451    LGNPDF = Compute the lognormal probability density function.
2452    EXPPDF = Compute the exponential probability density function.
2453
2454Reference:
2455    "Continuous Univariate Distributions: Volume 1", 2nd. Ed.,
2456    Johnson, Kotz, and Balakrishnan, John Wiley, 1994, (chapter 20).
2457
2458Applications:
2459    Distributional Modeling, Income Distributions
2460
2461Implementation Date:
2462    1995/10
2463
2464Program:
2465    MULTIPLOT 2 2
2466    MULTIPLOT CORNER COORDINATES 0 0 100 95
2467    MULTIPLOT SCALE FACTOR 2
2468    .
2469    CASE ASIS
2470    TITLE CASE ASIS
2471    LABEL CASE ASIS
2472    TITLE DISPLACEMENT 2
2473    Y1LABEL DISPLACEMENT 15
2474    X1LABEL DISPLACEMENT 12
2475    Y1LABEL Probability
2476    X1LABEL X
2477    .
2478    LET A = 1
2479    TITLE Gamma = 0.1
2480    PLOT PA2CDF(X,0.1,A) FOR X = 0.01  0.01  5
2481    TITLE Gamma = 1
2482    PLOT PA2CDF(X,1,A) FOR X = 0.01  0.01  5
2483    TITLE Gamma = 2
2484    PLOT PA2CDF(X,2,A) FOR X = 0.01  0.01  5
2485    TITLE Gamma = 5
2486    PLOT PA2CDF(X,5,A) FOR X = 0.01  0.01  5
2487    END OF MULTIPLOT
2488    .
2489    MOVE 50 97
2490    JUSTIFICATION CENTER
2491    TEXT Pareto Second Kind CDF Functions
2492
2493-----PA2PDF (LET)--------------------------------
2494
2495PA2PDF
2496
2497Name:
2498    PA2PDF (LET)
2499
2500Type:
2501    Library Function
2502
2503Purpose:
2504    Compute the Pareto probability density function of the second
2505    kind with shape parameters gamma and a.
2506
2507Description:
2508    The standard form of the Pareto probability density function
2509    of the second kind is:
2510
2511       f(x;gamma,a) = gamma*a**gamma/((a+x)**(gamma+1))
2512                      x, gamma > 0
2513
2514    with gamma and a denoting the shape parameters.  The a
2515    parameter is optional and has a default value of 1.
2516
2517    The Pareto distribution of the second kind is sometimes
2518    referred to as the Lomax distribution.
2519
2520Syntax:
2521    LET <y> = PA2PDF(<x>,<gamma>,<a>,<loc>,<scale>)
2522                         <SUBSET/EXCEPT/FOR qualification>
2523    where <x> is a variable, a number, or a parameter;
2524          <gamma> is a number or parameter that specifies the
2525               tail length shape parameter;
2526          <a> is a number or parameter that specifies the
2527               optional second shape parameter;
2528          <loc> is a number or parameter that specifies the
2529               optional location parameter;
2530          <scale> is a number or parameter that specifies the
2531               optional scale parameter;
2532          <y> is a variable or a parameter (depending on what <x> is)
2533               where the computed Pareto pdf value is saved;
2534    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
2535
2536    The a, loc, and scale parameters are all optional.
2537
2538Examples:
2539    LET A = PA2PDF(3,1.5)
2540    LET A = PA2PDF(3,1.5,0.5)
2541    LET X2 = PA2PDF(X1,GAMMA,A)
2542    PLOT PA2PDF(X,GAMMA,A) FOR X = 0  0.01  10
2543
2544Note:
2545    The Pareto distribution of the second kind can be extended with
2546    location and scale parameters by using the relationship
2547
2548       f(x;gamma,a,loc,scale) = (1/scale)*f(x;gamma,a,0,1)
2549
2550Note:
2551    Pareto second kind random numbers, probability plots, and
2552    goodness of fit tests can be generated with the commands:
2553
2554       LET GAMMA = <value>
2555       LET A = <value>
2556       LET Y = PARETO SECOND KIND RANDOM NUMBERS FOR I = 1 1 N
2557       PARETO SECOND KIND PROBABILITY PLOT Y
2558       PARETO SECOND KIND PROBABILITY PLOT Y X
2559       PARETO SECOND KIND PROBABILITY PLOT Y XLOW XHIGH
2560       PARETO SECOND KIND KOLMOGOROV SMIRNOV GOODNESS OF FIT Y
2561       PARETO SECOND KIND CHI-SQUARE GOODNESS OF FIT Y X
2562       PARETO SECOND KIND CHI-SQUARE GOODNESS OF FIT Y XLOW XHIGH
2563
2564    The following commands can be used to estimate the shape
2565    parameters for the Pareto distribution of the second kind:
2566
2567       LET GAMMA1 = <value>
2568       LET GAMMA2 = <value>
2569       LET A = <value>
2570       PARETO SECOND KIND PPCC PLOT Y
2571       PARETO SECOND KIND PPCC PLOT Y X
2572       PARETO SECOND KIND PPCC PLOT Y XLOW XHIGH
2573       PARETO SECOND KIND KS PLOT Y
2574       PARETO SECOND KIND KS PLOT Y X
2575       PARETO SECOND KIND KS PLOT Y XLOW XHIGH
2576
2577    The default values for gamma1 and gamma2 are 0.2 and 10,
2578    respectively.  Note that only the gamma parameter is
2579    estimated for these plots.  The default value of A is 1.
2580
2581Note:
2582    Johnson, Kotz, and Balakrishnan (see Reference section below)
2583    define Pareto distributions of the first, second, third, and
2584    fourth kinds.  Dataplot supports Pareto distributions of the
2585    first and second kinds.
2586
2587Note:
2588    Library functions are distinguished from let subcommands
2589    in the following ways.
2590    1) Functions enclose the input value in parenthesis.  Let
2591       subcommands use spaces.
2592    2) Functions can accept (and return) either parameters
2593       (i.e., single values) or variables (i.e., an array of
2594       values) while let subcommands are specific in which they
2595       accept as input and what they return as output.
2596    3) Functions can accept expressions while let subcommands
2597       do not.  For example, the following is legal:
2598           LET Y2 = ABS(Y1-INT(Y1))
2599       For let subcommands, you typically have to do something
2600       like the following:
2601           LET YTEMP = Y**2 + 8
2602           LET A = SUM YTEMP
2603
2604Default:
2605    None
2606
2607Synonyms:
2608    None
2609
2610Related Commands:
2611    PA2CDF = Compute the Pareto second kind cumulative
2612             distribution function.
2613    PA2PPF = Compute the Pareto second kind percent point function.
2614    PARPDF = Compute the Pareto probability density function.
2615    GEPPDF = Compute the generalized Pareto probability density
2616             function.
2617    EV1PDF = Compute the extreme value type I probability density
2618             function.
2619    WEIPDF = Compute the Weibull probability density function.
2620    NORPDF = Compute the normal probability density function.
2621    LGNPDF = Compute the lognormal probability density function.
2622    EXPPDF = Compute the exponential probability density function.
2623
2624Reference:
2625    "Continuous Univariate Distributions: Volume 1", 2nd. Ed.,
2626    Johnson, Kotz, and Balakrishnan, John Wiley, 1994, (chapter 20).
2627
2628Applications:
2629    Distributional Modeling, Income Distributions
2630
2631Implementation Date:
2632    1995/10
2633
2634Program:
2635    MULTIPLOT 2 2
2636    MULTIPLOT CORNER COORDINATES 0 0 100 95
2637    MULTIPLOT SCALE FACTOR 2
2638    .
2639    CASE ASIS
2640    TITLE CASE ASIS
2641    LABEL CASE ASIS
2642    TITLE DISPLACEMENT 2
2643    Y1LABEL DISPLACEMENT 15
2644    X1LABEL DISPLACEMENT 12
2645    Y1LABEL Probability Density
2646    X1LABEL X
2647    .
2648    LET A = 1
2649    TITLE Gamma = 0.1
2650    PLOT PA2PDF(X,0.1,A) FOR X = 0.01  0.01  5
2651    TITLE Gamma = 1
2652    PLOT PA2PDF(X,1,A) FOR X = 0.01  0.01  5
2653    TITLE Gamma = 2
2654    PLOT PA2PDF(X,2,A) FOR X = 0.01  0.01  5
2655    TITLE Gamma = 5
2656    PLOT PA2PDF(X,5,A) FOR X = 0.01  0.01  5
2657    END OF MULTIPLOT
2658    .
2659    MOVE 50 97
2660    JUSTIFICATION CENTER
2661    TEXT Pareto Second Kind PDF Functions
2662
2663-----PA2PPF (LET)--------------------------------
2664
2665PA2PPF
2666
2667Name:
2668    PA2PPF (LET)
2669
2670Type:
2671    Library Function
2672
2673Purpose:
2674    Compute the Pareto percent point function of the second
2675    kind with shape parameters gamma and a.
2676
2677Description:
2678    The standard form of the Pareto percent point function of
2679    the second kind is:
2680
2681       G(p;gamma,a) = (a**gamma/(1-p))**(1/gamma) - a
2682                      0 < p < 1; gamma, a > 0
2683
2684    with gamma and a denoting the shape parameters.  The a
2685    parameter is optional and has a default value of 1.
2686
2687    The Pareto distribution of the second kind is sometimes
2688    referred to as the Lomax distribution.
2689
2690Syntax:
2691    LET <y> = PA2PPF(<p>,<gamma>,<a>,<loc>,<scale>)
2692                         <SUBSET/EXCEPT/FOR qualification>
2693    where <p> is a variable, a number, or a parameter in the
2694               interval (0,1);
2695          <gamma> is a number or parameter that specifies the
2696               tail length shape parameter;
2697          <a> is a number or parameter that specifies the
2698               optional lower bound shape parameter;
2699          <loc> is a number or parameter that specifies the
2700               optional location parameter;
2701          <scale> is a number or parameter that specifies the
2702               optional scale parameter;
2703          <y> is a variable or a parameter (depending on what <p> is)
2704               where the computed Pareto ppf value is saved;
2705    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
2706
2707    The a, loc, and scale parameters are all optional.
2708
2709Examples:
2710    LET A = PA2PPF(0.95,1.5)
2711    LET X2 = PA2PPF(X1,GAMMA)
2712    LET X2 = PA2PPF(X1,GAMMA,A)
2713    PLOT PA2PPF(X,GAMMA,A) FOR P = 0.01  0.01  0.99
2714
2715Note:
2716    The Pareto percent point of the second kind can be extended
2717    with location and scale parameters by using the relationship
2718
2719       G(p;gamma,a,loc,scale) = loc + scale*G(p;gamma,a,0,1)
2720
2721Note:
2722    Johnson, Kotz, and Balakrishnan (see Reference section below)
2723    define Pareto distributions of the first, second, third, and
2724    fourth kinds.  Dataplot supports Pareto distributions of the
2725    first and second kinds.
2726
2727Note:
2728    Library functions are distinguished from let subcommands
2729    in the following ways.
2730    1) Functions enclose the input value in parenthesis.  Let
2731       subcommands use spaces.
2732    2) Functions can accept (and return) either parameters
2733       (i.e., single values) or variables (i.e., an array of
2734       values) while let subcommands are specific in which they
2735       accept as input and what they return as output.
2736    3) Functions can accept expressions while let subcommands
2737       do not.  For example, the following is legal:
2738           LET Y2 = ABS(Y1-INT(Y1))
2739       For let subcommands, you typically have to do something
2740       like the following:
2741           LET YTEMP = Y**2 + 8
2742           LET A = SUM YTEMP
2743
2744Default:
2745    None
2746
2747Synonyms:
2748    None
2749
2750Related Commands:
2751    PA2CDF = Compute the Pareto second kind cumulative
2752             distribution function.
2753    PA2PDF = Compute the Pareto second kind probability density
2754             function.
2755    PARPDF = Compute the Pareto probability density function.
2756    GEPPDF = Compute the generalized Pareto probability density
2757             function.
2758    EV1PDF = Compute the extreme value type I probability density
2759             function.
2760    WEIPDF = Compute the Weibull probability density function.
2761    NORPDF = Compute the normal probability density function.
2762    LGNPDF = Compute the lognormal probability density function.
2763    EXPPDF = Compute the exponential probability density function.
2764
2765Reference:
2766    "Continuous Univariate Distributions: Volume 1", 2nd. Ed.,
2767    Johnson, Kotz, and Balakrishnan, John Wiley, 1994, (chapter 20).
2768
2769Applications:
2770    Distributional Modeling, Income Distributions
2771
2772Implementation Date:
2773    1995/10
2774
2775Program:
2776    MULTIPLOT 2 2
2777    MULTIPLOT CORNER COORDINATES 0 0 100 95
2778    MULTIPLOT SCALE FACTOR 2
2779    .
2780    CASE ASIS
2781    TITLE CASE ASIS
2782    LABEL CASE ASIS
2783    TITLE DISPLACEMENT 2
2784    Y1LABEL DISPLACEMENT 15
2785    X1LABEL DISPLACEMENT 12
2786    X1LABEL Probability
2787    Y1LABEL X
2788    .
2789    LET A = 1
2790    TITLE Gamma = 0.1
2791    PLOT PA2PPF(P,0.1,A) FOR P = 0.01  0.01  0.99
2792    TITLE Gamma = 1
2793    PLOT PA2PPF(P,1,A) FOR P = 0.01  0.01  0.99
2794    TITLE Gamma = 2
2795    PLOT PA2PPF(P,2,A) FOR P = 0.01  0.01  0.99
2796    TITLE Gamma = 5
2797    PLOT PA2PPF(P,5,A) FOR P = 0.01  0.01  0.99
2798    END OF MULTIPLOT
2799    .
2800    MOVE 50 97
2801    JUSTIFICATION CENTER
2802    TEXT Pareto Second Kind PPF Functions
2803
2804-----PARTIAL CORRELATION (LET)--------------------------------
2805
2806PARTIAL CORRELATION
2807
2808Name:
2809    PARTIAL CORRELATION (LET)
2810
2811Type:
2812    Let Subcommand
2813
2814Purpose:
2815    Compute the partial correlation coefficient between two variables
2816    given the effect of a third variable.
2817
2818Description:
2819    The standard correlation coefficient is a measure of the linear
2820    relationship between two variables.  It is computed as:
2821
2822         r = Sxy/SQRT(Sxx*Syy)
2823
2824    where
2825
2826         Sxx = SUM[i=1 to N][(X(i)-XMEAN)**2]
2827         Syy = SUM[i=1 to N][(Y(i)-YMEAN)**2]
2828         Sxy = SUM[i=1 to N][(X(i)-XMEAN)*(Y(i)-YMEAN)]
2829
2830    A perfect linear relationship yields a correlation coefficient of
2831    +1 (or -1 for a negative relationship) and no linear relationship
2832    yields a correlation coefficient of 0.
2833
2834    Partial correlation is the correlation between two variables
2835    after removing the effect of one or more additional variables.  This
2836    command is specifcally for the the case of one additional variable.
2837    In this case, the partial correlation can be computed based on
2838    standard correlations between the three variables as follows:
2839
2840        r12.3 = (r12 - r13*r23)/SQRT((1 - r13**2)*(1 - r23**2))
2841
2842    with rxy denoting the correlation between x and y.
2843
2844    As with the standard correlation coefficient, a value of +1 indicates
2845    a perfect positive linear relationship, a value of -1 indicates a
2846    perfect negative linear relationship, and a value of 0 indicates no
2847    linear relationship.
2848
2849    It may be of interest to determine if the partial correlation
2850    is significantly different than 0.  The CDF value for this
2851    test is
2852
2853         CDF = FCDF(VAL,1,N-3)
2854
2855    where FCDF is the F cumulative distribution function with
2856    1 and N - 3 degrees of freedom (N is the number of observations)
2857    and VAL = ABS((N-3)*R**2/(1 - R**2)) with R denoting the
2858    computed partial correlation.  The pvalue is 1 - CDF.
2859
2860Syntax 1:
2861    LET <par> = PARTIAL CORRELATION <y1> <y2> <y3>
2862                <SUBSET/EXCEPT/FOR qualification>
2863    where <y1> is the first  response variable;
2864          <y2> is the second response variable;
2865          <y3> is the third response variable;
2866          <par> is a parameter where the computed partial correlation is
2867               saved;
2868    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
2869
2870Syntax 2:
2871    LET <par> = PARTIAL CORRELATION ABSOLUTE VALUE <y1> <y2> <y3>
2872                <SUBSET/EXCEPT/FOR qualification>
2873    where <y1> is the first  response variable;
2874          <y2> is the second response variable;
2875          <y3> is the third response variable;
2876          <par> is a parameter where the absolute value of the computed
2877               partial correlation is saved;
2878    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
2879
2880    This syntax computes the absolute value of the partial correlation
2881    coefficient.  This is typically used in screening applications where
2882    there is an interest in identifying high magnitude correlations
2883    regardless of the direction of the correlation.
2884
2885Syntax 3:
2886    LET <par> = PARTIAL CORRELATION PVALUE <y1> <y2> <y3>
2887                <SUBSET/EXCEPT/FOR qualification>
2888    where <y1> is the first  response variable;
2889          <y2> is the second response variable;
2890          <y3> is the third response variable;
2891          <par> is a parameter where the computed partial correlation
2892               pvalue is saved;
2893    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
2894
2895    This syntax computes the pvalue (described above) of the partial
2896    correlation.
2897
2898Syntax 4:
2899    LET <par> = PARTIAL CORRELATION CDF <y1> <y2> <y3>
2900                <SUBSET/EXCEPT/FOR qualification>
2901    where <y1> is the first  response variable;
2902          <y2> is the second response variable;
2903          <y3> is the third response variable;
2904          <par> is a parameter where the computed partial correlation
2905               cdf is saved;
2906    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
2907
2908    This syntax computes the cdf (described above) of the partial
2909    correlation.
2910
2911Examples:
2912    LET A = PARTIAL CORRELATION Y1 Y2 Z
2913    LET A = PARTIAL CORRELATION Y1 Y2 Z  SUBSET TAG > 2
2914    LET A = PARTIAL CORRELATION ABSOLUTE VALUE Y1 Y2 Z
2915    LET A = PARTIAL CORRELATION PVALUE Y1 Y2 Z
2916    LET A = PARTIAL CORRELATION CDF Y1 Y2 Z
2917
2918Note:
2919    The three variables must have the same number of elements.
2920
2921Note:
2922    Dataplot statistics can be used in a number of commands.  For
2923    details, enter
2924
2925         HELP STATISTICS
2926
2927Default:
2928    None
2929
2930Synonyms:
2931    None
2932
2933Related Commands:
2934    PARTIAL CORRELATION MATRIX       = Compute the matrix of partial
2935                                       correlations.
2936    PARTIAL RANK CORRELATION         = Compute the partial rank
2937                                       correlation.
2938    PARTIAL KENDALL TAU CORRELATION  = Compute the partial Kendall tau
2939                                       correlation.
2940    CORRELATION MATRIX               = Compute the matrix of correlations.
2941    CORRELATION                      = Compute the correlation.
2942    RANK CORRELATION                 = Compute the rank correlation.
2943    KENDALL TAU CORRELATION          = Compute the Kendall tau correlation.
2944
2945Reference:
2946    Conover (1999), "Practical Nonparametric Statistics", Third Edition,
2947    Wiley, p. 327.
2948
2949    Peavy, Bremer, Varner, Hogben (1986), "OMNITAB 80:
2950    An Interpretive System for Statistical and Numerical
2951    Data Analysis," NBS Special Publication 701.
2952
2953Applications:
2954    Linear Regression
2955
2956Implementation Date:
2957    2012/06
2958
2959Program:
2960    .  This data is from page 202 of
2961    .
2962    .  Peavy, Bremer, Varner, Hogben (1986), "OMNITAB 80:
2963    .  An Interpretive System for Statistical and Numerical
2964    .  Data Analysis," NBS Special Publication 701.
2965    .
2966    .  Original source of the data is from
2967    .  Draper and Smith (1981), "Applied Regression Analysis",
2968    .  Wiley, p. 373.
2969    .
2970    dimension 40 columns
2971    .
2972    read matrix m
2973    42.2  11.2  31.9  167.1
2974    48.6  10.6  13.2  174.4
2975    42.6  10.6  28.7  160.8
2976    39.0  10.4  26.1  162.0
2977    34.7   9.3  30.1  140.8
2978    44.5  10.8   8.5  174.6
2979    39.1  10.7  24.3  163.7
2980    40.1  10.0  18.6  174.5
2981    45.9  12.0  20.4  185.7
2982    end of data
2983    .
2984    set write decimals 4
2985    let c1 = partial correlation m1 m2 m3
2986    let c2 = partial correlation absolute value m1 m2 m3
2987    let c3 = partial correlation cdf m1 m2 m3
2988    let c4 = partial correlation pvalue m1 m2 m3
2989    print c1 c2 c3 c4
2990
2991-----PARTIAL CORRELATION MATRIX (LET)--------------------------------
2992
2993PARTIAL CORRELATION MATRIX
2994
2995Name:
2996    PARTIAL CORRELATION MATRIX (LET)
2997
2998Type:
2999    Let Subcommand
3000
3001Purpose:
3002    Compute the partial correlation matrix of a matrix.
3003
3004Description:
3005    The partial correlation matrix computes the partial correlation
3006    coefficients of the columns of a matrix.  That is, row i and column j
3007    of the partial correlation matrix is the partial correlation between
3008    column i and column j of the original matrix.  This partial
3009    correlation between column i and column j is the correlation
3010    between these two columns after removing the effects of the
3011    remaining columns.  Note that the diagonal elements of the
3012    partial correlation matrix will be 1 (since they are the partial
3013    correlation of a column with itself).  The partial correlation matrix
3014    is also symmetric (since the partial correlation of column i with
3015    column j is the same as the partial correlation of column j with
3016    column i).
3017
3018    The algorithm for computing the partial correlations is:
3019
3020        1) Compute the standard correlation matrix.
3021
3022        2) Invert this correlation matrix.
3023
3024        3) Compute
3025
3026              r(ij.) = -r(ij)/SQRT(r(ii)*r(jj))
3027
3028           where r(ij) is the (i,j)-th element of the inverted
3029           correlation matrix.
3030
3031    Alternatively, you can compute the CDF or the p-value for the
3032    partial correlation coefficients (i.e., to see if the partial
3033    correlation coefficient is significantly different than zero).
3034    The CDF value is
3035
3036        CDF = FCDF(VAL,1,N-NC)
3037
3038    where FCDF is the F cumulative distribution function with
3039    1 and N - NC degrees of freedom (N is the number of observations
3040    and NC is the number of columns in the input matrix), and
3041
3042        VAL = ABS((N-NC)*R**2/(1 - R**2))
3043
3044    with R denoting the computed partial correlation.  The pvalue is
3045    1 - CDF.
3046
3047Syntax 1:
3048    LET <mat2> = PARTIAL CORRELATION MATRIX <mat1>
3049                 <SUBSET/EXCEPT/FOR qualification>
3050    where <mat1> is a matrix for which the partial correlations are to be
3051                 computed;
3052          <mat2> is a matrix where the resulting partial correlations are
3053                 saved;
3054    and where the <SUBSET/EXCEPT/FOR qualification> is optional and
3055    rarely used in this context.
3056
3057Syntax 2:
3058    LET <mat2> = PARTIAL CORRELATION CDF MATRIX <mat1>
3059                 <SUBSET/EXCEPT/FOR qualification>
3060    where <mat1> is a matrix for which the partial correlation CDF's are
3061                 to be computed;
3062          <mat2> is a matrix where the resulting partial correlation CDF's
3063                 are saved;
3064    and where the <SUBSET/EXCEPT/FOR qualification> is optional and
3065    rarely used in this context.
3066
3067    This syntax computes the CDF's of the partial correlation
3068    coefficients.
3069
3070Syntax 3:
3071    LET <mat2> = PARTIAL CORRELATION PVALUE MATRIX <mat1>
3072                 <SUBSET/EXCEPT/FOR qualification>
3073    where <mat1> is a matrix for which the partial correlation p-value's
3074                 are to be computed;
3075          <mat2> is a matrix where the resulting partial correlation
3076                 p-values's are saved;
3077    and where the <SUBSET/EXCEPT/FOR qualification> is optional and
3078    rarely used in this context.
3079
3080    This syntax computes the p-values of the partial correlation
3081    coefficients.
3082
3083Examples:
3084    LET C = PARTIAL CORRELATION MATRIX A
3085
3086Note:
3087    By default, the partial correlation matrices are computed on the
3088    columns.  That is, element (i,j) of the partial correlation matrix
3089    is the partial correlation between column i and column j of the
3090    input matrix.
3091
3092    To specify a partial correlation matrix based on rows rather than
3093    columns, enter the command
3094
3095         SET MATRIX CORRELATION DIRECTION ROW
3096
3097    To reset column based partial correlations, enter
3098
3099         SET MATRIX CORRELATION DIRECTION COLUMN
3100
3101Note:
3102    By default the Pearson correlation coefficient is computed.
3103    To specify a different type of correlation, enter the command
3104
3105        SET CORRELATION TYPE <DEFAULT/RANK/WINSORIZED/
3106            BIWEIGHT MIDCORRELATION/PERCENTAGE BEND/KENDALL TAU>
3107
3108    To see the definitions for these, enter
3109
3110        HELP RANK CORRELATION
3111        HELP KENDALLS TAU
3112        HELP BIWEIGHT MIDCORRELATION
3113        HELP PERCENTAGE BEND
3114
3115Note:
3116    Matrices are created with either the READ MATRIX command or the
3117    MATRIX DEFINITION command.  Enter HELP MATRIX DEFINITION and HELP
3118    READ MATRIX for details.
3119
3120Note:
3121    The columns of a matrix are accessible as variables by appending an
3122    index to the matrix name.  For example, the 4x4 matrix C has
3123    columns C1, C2, C3, and C4.  These columns can be operated on like
3124    any other DATAPLOT variable.
3125
3126Note:
3127    The maximum size matrix that DATAPLOT can handle is set when
3128    DATAPLOT is built on a particular site.  The default maximums are
3129    100 columns and 100 rows.
3130
3131Default:
3132    None
3133
3134Synonyms:
3135    None
3136
3137Related Commands:
3138    PARTIAL CORRELATION         = Compute the partial correlation of three
3139                                  variables.
3140    CORRELATION MATRIX          = Generate the correlation matrix.
3141    CORRELATION                 = Compute the correlation of two variables.
3142    RANK CORRELATION            = Compute the rank correlation of two
3143                                  variables.
3144    KENDALLS TAU                = Compute the Kendall tau correlation of two
3145                                  variables.
3146    WINSORIZED CORRELATION      = Compute the Winsorized correlation of two
3147                                  variables.
3148    BIWEIGHT MIDCORRELATION     = Compute the biweight mid-correlation of
3149                                  two variables.
3150    PERCENTAGE BEND CORRELATION = Compute the percentage bend correlation of
3151                                  two variables.
3152    COVARIANCE                  = Compute the covariance of two variables.
3153
3154Applications:
3155    Linear Fitting
3156
3157Implementation Date:
3158    2012/06
3159
3160Program:
3161    .  This data is from page 202 of
3162    .
3163    .  Peavy, Bremer, Varner, Hogben (1986), "OMNITAB 80:
3164    .  An Interpretive System for Statistical and Numerical
3165    .  Data Analysis," NBS Special Publication 701.
3166    .
3167    .  Original source of the data is from
3168    .  Draper and Smith (1981), "Applied Regression Analysis",
3169    .  Wiley, p. 373.
3170    .
3171    dimension 40 columns
3172    .
3173    read matrix m
3174    42.2  11.2  31.9  167.1
3175    48.6  10.6  13.2  174.4
3176    42.6  10.6  28.7  160.8
3177    39.0  10.4  26.1  162.0
3178    34.7   9.3  30.1  140.8
3179    44.5  10.8   8.5  174.6
3180    39.1  10.7  24.3  163.7
3181    40.1  10.0  18.6  174.5
3182    45.9  12.0  20.4  185.7
3183    end of data
3184    .
3185    set write decimals 4
3186    let pcorr = partial correlation matrix m
3187    print pcorr
3188
3189-----PARTIAL KENDALLS TAU CORRELATION (LET)------------------------------
3190
3191PARTIAL KENDALLS TAU CORRELATION
3192
3193Name:
3194    PARTIAL KENDALLS TAU (LET)
3195
3196Type:
3197    Let Subcommand
3198
3199Purpose:
3200    Compute the partial Kendall's tau correlation coefficient between
3201    two variables given the effect of a third variable.
3202
3203Description:
3204    Kendall's tau coefficient is a measure of concordance
3205    between two paired variables.  Given the pairs (X(i),Y(i)) and
3206    (X(j),Y(j)), then
3207
3208       (Y(j) - Y(i))/(X(j) - X(i)) > 0   - pair is concordant
3209       (Y(j) - Y(i))/(X(j) - X(i)) < 0   - pair is discordant
3210       (Y(j) - Y(i))/(X(j) - X(i)) = 0   - pair is considered a tie
3211       X(i) = X(j)                       - pair is not compared
3212
3213    Kendall's tau is computed as
3214
3215        tau = (Nc - Nd)/(Nc + Nd)
3216
3217    with Nc and Nd denoting the number of concordant pairs and
3218    the number of discordant pairs, respectively, in the sample.
3219    Ties add 0.5 to both the concordant and discordant counts.
3220    There are (n 2) possible pairs in the bivariate sample.
3221
3222    A perfect linear relationship between the ranks yields a
3223    Kendall's tau correlation coefficient of +1 (or -1 for a negative
3224    relationship) and no linear relationship between the ranks
3225    yields a rank correlation coefficient of 0.
3226
3227    Partial Kendall's tau correlation is the Kendall's tau correlation
3228    between two variables after removing the effect of one or more
3229    additional variables.  This command is specifcally for the the case
3230    of one additional variable.  In this case, the partial Kendall's tau
3231    correlation can be computed based on standard Kendall's tau
3232    correlations between the three variables as follows:
3233
3234        r12.3 = (r12 - r13*r23)/SQRT((1 - r13**2)*(1 - r23**2))
3235
3236    with rxy denoting the Kendall's tau correlation between x and y.
3237
3238    As with the standard Kendall's tau correlation coefficient, a value
3239    of +1 indicates a perfect positive linear relationship, a value of -1
3240    indicates a perfect negative linear relationship, and a value of 0
3241    indicates no linear relationship.
3242
3243Syntax 1:
3244    LET <par> = PARTIAL KENDALLS TAU CORRELATION <y1> <y2> <y3>
3245                <SUBSET/EXCEPT/FOR qualification>
3246    where <y1> is the first  response variable;
3247          <y2> is the second response variable;
3248          <y3> is the third response variable;
3249          <par> is a parameter where the computed partial Kendall's
3250               tau correlation is saved;
3251    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
3252
3253Syntax 2:
3254    LET <par> = PARTIAL KENDALLS TAU CORRELATION ABSOLUTE VALUE
3255                <y1> <y2> <y3>
3256                <SUBSET/EXCEPT/FOR qualification>
3257    where <y1> is the first  response variable;
3258          <y2> is the second response variable;
3259          <y3> is the third response variable;
3260          <par> is a parameter where the absolute value of the computed
3261               partial Kendall's tau correlation absolute value is saved;
3262    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
3263
3264    This syntax computes the absolute value of the partial Kendall's
3265    tau correlation coefficient.  This is typically used in screening
3266    applications where there is an interest in identifying high magnitude
3267    correlations regardless of the direction of the correlation.
3268
3269Examples:
3270    LET A = PARTIAL KENDALLS TAU CORRELATION Y1 Y2 Z
3271    LET A = PARTIAL KENDALLS TAU CORRELATION Y1 Y2 Z  SUBSET TAG > 2
3272    LET A = PARTIAL KENDALLS TAU CORRELATION ABSOLUTE VALUE Y1 Y2 Z
3273
3274Note:
3275    The three variables must have the same number of elements.
3276
3277Note:
3278    The command PARTIAL CORRELATION MATRIX can be used to compute
3279    the matrix of partial correlations.  This command has options
3280    to compute several robust forms of the partial correlation
3281    including the Kendall's tau correlation discussed here.
3282
3283Note:
3284    Dataplot statistics can be used in a number of commands.  For
3285    details, enter
3286
3287         HELP STATISTICS
3288
3289Default:
3290    None
3291
3292Synonyms:
3293    None
3294
3295Related Commands:
3296    KENDALL TAU CORRELATION          = Compute the Kendall tau correlation.
3297    RANK CORRELATION                 = Compute the rank correlation.
3298    PARTIAL CORRELATION              = Compute the partial correlation.
3299    PARTIAL RANK CORRELATION         = Compute the partial rank
3300                                       correlation.
3301    PARTIAL CORRELATION MATRIX       = Compute the matrix of partial
3302                                       correlations.
3303    CORRELATION MATRIX               = Compute the matrix of correlations.
3304    CORRELATION                      = Compute the correlation.
3305
3306Reference:
3307    Conover (1999), "Practical Nonparametric Statistics", Third Edition,
3308    Wiley, p. 327.
3309
3310    Peavy, Bremer, Varner, Hogben (1986), "OMNITAB 80:
3311    An Interpretive System for Statistical and Numerical
3312    Data Analysis," NBS Special Publication 701.
3313
3314Applications:
3315    Linear Regression
3316
3317Implementation Date:
3318    2012/06
3319
3320Program:
3321    .  This data is from page 202 of
3322    .
3323    .  Peavy, Bremer, Varner, Hogben (1986), "OMNITAB 80:
3324    .  An Interpretive System for Statistical and Numerical
3325    .  Data Analysis," NBS Special Publication 701.
3326    .
3327    .  Original source of the data is from
3328    .  Draper and Smith (1981), "Applied Regression Analysis",
3329    .  Wiley, p. 373.
3330    .
3331    dimension 40 columns
3332    .
3333    read matrix m
3334    42.2  11.2  31.9  167.1
3335    48.6  10.6  13.2  174.4
3336    42.6  10.6  28.7  160.8
3337    39.0  10.4  26.1  162.0
3338    34.7   9.3  30.1  140.8
3339    44.5  10.8   8.5  174.6
3340    39.1  10.7  24.3  163.7
3341    40.1  10.0  18.6  174.5
3342    45.9  12.0  20.4  185.7
3343    end of data
3344    .
3345    set write decimals 4
3346    let c1 = partial kendall tau correlation m1 m2 m3
3347    let c2 = partial kendall tau correlation absolute value m1 m2 m3
3348    print c1 c2
3349
3350-----PARTIAL RANK CORRELATION (LET)--------------------------------
3351
3352PARTIAL RANK CORRELATION
3353
3354Name:
3355    PARTIAL RANK CORRELATION (LET)
3356
3357Type:
3358    Let Subcommand
3359
3360Purpose:
3361    Compute the partial rank correlation coefficient between two
3362    variables given the effect of a third variable.
3363
3364Description:
3365    The Spearman rank correlation coefficient is computed as
3366
3367        R = 1 - 6*SUM[i=1 to N][D(i)]/(N*(N**2-1))
3368
3369    where D(i) is the difference between the ranks assigned to the
3370    corresponding pairs and N is the sample size.  Ties are assigned
3371    average ranks.
3372
3373    A perfect linear relationship between the ranks yields a
3374    rank correlation coefficient of +1 (or -1 for a negative
3375    relationship) and no linear relationship between the ranks
3376    yields a rank correlation coefficient of 0.
3377
3378    Partial rank correlation is the correlation between two variables
3379    after removing the effect of one or more additional variables.  This
3380    command is specifcally for the the case of one additional variable.
3381    In this case, the partial rank correlation can be computed based on
3382    standard rank correlations between the three variables as follows:
3383
3384        r12.3 = (r12 - r13*r23)/SQRT((1 - r13**2)*(1 - r23**2))
3385
3386    with rxy denoting the correlation between x and y.
3387
3388    As with the standard rank correlation coefficient, a value of +1
3389    indicates a perfect positive linear relationship, a value of -1
3390    indicates a perfect negative linear relationship, and a value of 0
3391    indicates no linear relationship.
3392
3393Syntax 1:
3394    LET <par> = PARTIAL RANK CORRELATION <y1> <y2> <y3>
3395                <SUBSET/EXCEPT/FOR qualification>
3396    where <y1> is the first  response variable;
3397          <y2> is the second response variable;
3398          <y3> is the third response variable;
3399          <par> is a parameter where the computed partial rank
3400               correlation is saved;
3401    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
3402
3403Syntax 2:
3404    LET <par> = PARTIAL RANK CORRELATION ABSOLUTE VALUE <y1> <y2> <y3>
3405                <SUBSET/EXCEPT/FOR qualification>
3406    where <y1> is the first  response variable;
3407          <y2> is the second response variable;
3408          <y3> is the third response variable;
3409          <par> is a parameter where the absolute value of the computed
3410               partial rank correlation absolute value is saved;
3411    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
3412
3413    This syntax computes the absolute value of the partial rank
3414    correlation coefficient.  This is typically used in screening
3415    applications where there is an interest in identifying high magnitude
3416    correlations regardless of the direction of the correlation.
3417
3418Examples:
3419    LET A = PARTIAL RANK CORRELATION Y1 Y2 Z
3420    LET A = PARTIAL RANK CORRELATION Y1 Y2 Z  SUBSET TAG > 2
3421    LET A = PARTIAL RANK CORRELATION ABSOLUTE VALUE Y1 Y2 Z
3422
3423Note:
3424    The three variables must have the same number of elements.
3425
3426Note:
3427    The command PARTIAL CORRELATION MATRIX can be used to compute
3428    the matrix of partial correlations.  This command has options
3429    to compute several robust forms of the partial correlation
3430    including the Spearman rank correlation discussed here.
3431
3432Note:
3433    Dataplot statistics can be used in a number of commands.  For
3434    details, enter
3435
3436         HELP STATISTICS
3437
3438Default:
3439    None
3440
3441Synonyms:
3442    None
3443
3444Related Commands:
3445    RANK CORRELATION                 = Compute the rank correlation.
3446    PARTIAL CORRELATION              = Compute the partial correlation.
3447    PARTIAL KENDALL TAU CORRELATION  = Compute the Kendall tau partial
3448                                       correlation.
3449    PARTIAL CORRELATION MATRIX       = Compute the matrix of partial
3450                                       correlations.
3451    CORRELATION MATRIX               = Compute the matrix of correlations.
3452    CORRELATION                      = Compute the correlation.
3453    KENDALL TAU CORRELATION          = Compute the Kendall tau correlation.
3454
3455Reference:
3456    Conover (1999), "Practical Nonparametric Statistics", Third Edition,
3457    Wiley, p. 327.
3458
3459    Peavy, Bremer, Varner, Hogben (1986), "OMNITAB 80:
3460    An Interpretive System for Statistical and Numerical
3461    Data Analysis," NBS Special Publication 701.
3462
3463Applications:
3464    Linear Regression
3465
3466Implementation Date:
3467    2012/06
3468
3469Program:
3470    .  This data is from page 202 of
3471    .
3472    .  Peavy, Bremer, Varner, Hogben (1986), "OMNITAB 80:
3473    .  An Interpretive System for Statistical and Numerical
3474    .  Data Analysis," NBS Special Publication 701.
3475    .
3476    .  Original source of the data is from
3477    .  Draper and Smith (1981), "Applied Regression Analysis",
3478    .  Wiley, p. 373.
3479    .
3480    dimension 40 columns
3481    .
3482    read matrix m
3483    42.2  11.2  31.9  167.1
3484    48.6  10.6  13.2  174.4
3485    42.6  10.6  28.7  160.8
3486    39.0  10.4  26.1  162.0
3487    34.7   9.3  30.1  140.8
3488    44.5  10.8   8.5  174.6
3489    39.1  10.7  24.3  163.7
3490    40.1  10.0  18.6  174.5
3491    45.9  12.0  20.4  185.7
3492    end of data
3493    .
3494    set write decimals 4
3495    let c1 = partial rank correlation m1 m2 m3
3496    let c2 = partial rank correlation absolute value m1 m2 m3
3497    print c1 c2
3498
3499-----PARTIAL LEVERAGE PLOT--------------------------------------
3500
3501PARTIAL LEVERAGE PLOT
3502
3503Name:
3504    PARTIAL LEVERAGE PLOT
3505
3506Type:
3507    Graphics Command
3508
3509Purpose:
3510    Generate a partial leverage plot.
3511
3512Description:
3513    In multi-linear regression, high leverage points are those
3514    that are outliers with respect to the independent variables.
3515    Influential points are those that cause large changes in the
3516    parameter estimates when they are deleted.  Although an
3517    influential point will typically have high leverage, a
3518    high leverage point is not necessarily an influential
3519    point.  The leverage is typically defined as the diagonal of the
3520    hat matrix (hat matrix = H = X(X'X)**(-1)X').  Dataplot
3521    currently writes a number of measure of influence and leverage
3522    to the file DPST3F.DAT (e.g., the diagonal of the hat matrix,
3523    Cook's distance, DFFITS).
3524
3525    Partial leverage is used to measure the contribution of the
3526    individual independent variables to the leverage of each
3527    observation.  That is, if h(i) is the ith row of the
3528    diagonal of the hat matrix, how does h(i) change as we add
3529    a variable to the regression model.
3530
3531    The partial leverage is computed as:
3532
3533       PL(j)(i) = (X(j.[j])(i))**2/[SUM[k=1 to n][(X(j.[j])k)**2]
3534
3535    where
3536
3537       j       = jth independent variable
3538       i       = the ith observation
3539       X(j.[j]) = residuals from regressing X(j) against the
3540                  remaining indpependent variables.
3541
3542    Note that the partial leverage is the leverage of the ith
3543    point in the partial regression plot for the jth variable
3544    (enter HELP PARTIAL REGRESSION PLOT for details on the
3545    partial regression plot).
3546
3547    The interpretation of the partial leverage plot is that
3548    data points with large partial leverage for an independent
3549    variable can exert undue influence on the selection of that
3550    variable in automatic regression model building procedures
3551    (e.g., the BEST CP command in Dataplot).
3552
3553    Dataplot provides two forms for the partial leverage
3554    plot.  You can generate either a single partial leverage
3555    plot or you can generate a matrix of partial leverage plots
3556    (one plot for each independent variable in the model).
3557
3558    For the matrix form of the command, a number of SET FACTOR PLOT
3559    options can be used to control the appearance of the plot
3560    (not all of the SET FACTOR PLOT options apply).  These are
3561    discussed in the Notes section below.
3562
3563Syntax 1:
3564    PARTIAL LEVERAGE PLOT  <y> <x1> ... <xk>  <xi>
3565                           <SUBSET/EXCEPT/FOR qualification>
3566    where <y> is the response variable;
3567          <x1> ... <xk> are the independent variables;
3568          <xi> is the independent variable for which the
3569              partial leverage plot is being generated (note that
3570              <xi> must be one of the variables listed in
3571              <x1> ... <xk>;
3572    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
3573
3574    This is the syntax for generating a single partial leverage
3575    plot.
3576
3577Syntax 2:
3578    MATRIX PARTIAL LEVERAGE PLOT  <y> <x1> ... <xk>
3579                           <SUBSET/EXCEPT/FOR qualification>
3580    where <y> is the response variable;
3581          <x1> ... <xk> are the independent variables;
3582    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
3583
3584    This syntax is used to generate a matrix of partial leverage
3585    plots.
3586
3587Examples:
3588    PARTIAL LEVERAGE PLOT Y X1 X2 X3 X4 X2
3589
3590    MATRIX PARTIAL LEVERAGE PLOT Y X1 X2 X3 X4
3591
3592    PARTIAL LEVERAGE PLOT Y X1 X2 X3 X4 X2 SUBSET TAG > 2
3593    MATRIX PARTIAL LEVERAGE PLOT Y X1 X2 X3 X4 SUBSET TAG > 2
3594
3595Note:
3596    The following option controls which axis tic marks, tic mark
3597    labels, and axis labels are plotted.
3598
3599        SET FACTOR PLOT LABELS <ON/OFF/XON/YON/BOX>
3600
3601    OFF means that all axis labels are suppressed (this can be
3602    useful if a large number of variables are being plotted).  ON
3603    means that both X and Y axis labels are printed.  XON only
3604    plots the x axis labels and YON only plots the y axis labels.
3605
3606    BOX is a special option that creates an extra column on the
3607    left and an extra row on the bottom.  The axis label is
3608    printed in this box.  BOX is typically reserved for the plot
3609    types that plot the variable names in the axes labels.
3610
3611    The default is ON (both x and y axis labels are printed).
3612
3613Note:
3614    The following option controls where the x axis tic marks,
3615    tic mark labels, and axis label are printed.
3616
3617        SET FACTOR PLOT X AXIS <BOTTOM/TOP/ALTERNATE>
3618
3619    BOTTOM specifies that the x axis labels are printed on the
3620    bottom axis (on the last row only).  TOP specifies that
3621    the x axis labels are printed on the top axis (first row
3622    only).  ALTERNATE specifies that the x axis labels alternate
3623    between the top (first row) and bottom axis (last row).
3624    We recommend using the TIC OFFSET command to avoid overlap
3625    of axis labels and tic marks.
3626
3627    The default is ALTERNATE.
3628
3629Note:
3630    The following option controls where the y axis tic marks,
3631    tic mark labels, and axis label are printed.
3632
3633        SET FACTOR PLOT Y AXIS <LEFT/RIGHT/ALTERNATE>
3634
3635    LEFT specifies that the y axis labels are printed on the
3636    left axis (on the first column only).  RIGHT specifies that
3637    the y axis labels are printed on the right axis (last column
3638    only).  ALTERNATE specifies that the y axis labels alternate
3639    between the left (first column) and right axis (last column).
3640    We recommend using the TIC OFFSET command to avoid overlap
3641    of axis labels and tic marks.
3642
3643    The default is ALTERNATE.
3644
3645Note:
3646    Users have different preferences in terms of whether the
3647    plot frames for neighboring plots are connected or not.
3648    This is controlled with the following option.
3649
3650        SET FACTOR PLOT FRAME <DEFAULT/CONNECTED/USER>
3651
3652    DEFAULT connects neighboring frames (i.e., the FRAME CORNER
3653    COORDINATES are set to 0 0 100 100).  USER uses whatever
3654    frame coordinates are currently set (15 20 85 90 by default)
3655    and makes no special provisions for axis labels and tic marks
3656    (i.e., you set them as you normally would, each plot uses
3657    whatever you have set).  CONNECTED uses whatever frame
3658    coordinates have been set by the user, but it draws the axis
3659    labels and tic marks as if DEFAULT were being used (that is, as
3660    determined by the SET FACTOR PLOT <LABELS/X AXIS/Y AXIS>
3661    commands described above).  Typically, CONNECTED is used to
3662    put a small bit of space between plots.  For example, you
3663    might use FRAME CORNER COORDINATES  3 3 97 97 before the
3664    PARTIAL RESIDUAL PLOT command.
3665
3666    Since the plots can often have different limits for the axes,
3667    the default is USER.
3668
3669Note:
3670    When the tic marks and tic mark labels are all plotted on the
3671    same side (i.e., SET FACTOR PLOT Y AXIS is
3672    set to LEFT or RIGHT or SET PARTIAL RESIDUAL PLOT X AXIS is
3673    set to BOTTOM or TOP), then overlap between plots is possible.
3674    The TIC OFFSET command can be used to avoid this.  In addition,
3675    you can stagger the tic labels with the following command:
3676
3677        SET FACTOR PLOT LABEL DISPLACEMENT <NORMAL/STAGGERED/VALUE>
3678
3679    NORMAL means that all tic labels are plotted at a distance
3680    determined by the TIC LABEL DISPLACEMENT command.  STAGGERED
3681    means that alternating plots will be staggered.  That is, one
3682    will use the standard displacement while the next uses a
3683    staggered value.  Entering this command with a numeric value
3684    specifies the amount of the displacement for the staggered
3685    tic labels.  For example,
3686
3687        TIC MARK LABEL DISPLACEMENT 10
3688        SET FACTOR PLOT LABEL DISPLACEMENT STAGGERED
3689        SET FACTOR PLOT LABEL DISPLACEMENT 25
3690
3691    These commands specify that the default tic label displacement
3692    is 10 and the staggered tic mark label displacement is 25.
3693
3694Note:
3695    It is often helpful on scatter plot matrices to overlay a
3696    fitted line on the plots.  The following command is used
3697    to specify the type of fit.
3698
3699        SET FACTOR PLOT FIT <NONE/LOWESS/LINE/QUAD/SMOOTH>
3700
3701    NONE means that no fitted line is plotted.  LOWESS means
3702    that a locally weighted least squares line will be overlaid.
3703    LINE means that a linear fit (Y = A0 + A1*X) will be overlaid.
3704    QUAD means that a quadratic fit (Y = A0 + A1*X + A2*X**2) will
3705    be overlaid.  SMOOTH means that a least squares smoothing will
3706    be overlaid.
3707
3708    For LOWESS, it is recommended that the lowess fraction be set
3709    fairly high (e.g., LOWESS FRACTION 0.6).
3710
3711    The fitted line is currently only generated if the factor plot
3712    type is PLOT.
3713
3714    The default is for no fitted line to be overlaid on the plot.
3715    If a overlaid fit is desired, the most common choice is to use
3716    LOWESS.
3717
3718Note:
3719    Dataplot allows you to set axis limits with the LIMITS command.
3720    For the factor plot, it is often desirable to set
3721    the axis limits for each plot.  This can be done with the
3722    command
3723
3724        SET FACTOR PLOT YLIMITS <LOW1> <UPP1> <LOW2> <UPP2> ...
3725        SET FACTOR PLOT XLIMITS <LOW1> <UPP1> <LOW2> <UPP2> ...
3726
3727    The default is to allow the axis limits to float with the data.
3728
3729Note:
3730    You can use standard plot control commands to control the
3731    appearance of the factor plot.
3732
3733    For example,
3734
3735       MULTIPLOT CORNER COORDINATES 5 5 95 95
3736       MULTIPLOT SCALE FACTOR 3
3737       TIC OFFSET UNITS SCREEN
3738       TIC OFFSET 5 5
3739
3740Default:
3741    None
3742
3743Synonyms:
3744    None
3745
3746Related Commands:
3747    FIT                      = Perform a multi-linear fit.
3748    CCPR PLOT                = Generates a component and component
3749                               plus residual plot.
3750    PARTIAL RESIDUAL PLOT    = Generates a partial residual plot.
3751    PARTIAL REGRESSION PLOT   = Generates a partial regression plot.
3752    VIF                      = Compute variance inflation factors
3753                               for a multi-linear fit.
3754    CONDITION INDICES        = Compute condition indices for a design
3755                               matrix.
3756    SCATTER PLOT MATIRX      = Generate a factor plot.
3757    FACTOR PLOT              = Generate a plot for a response
3758                               against a number of different
3759                               independent variables.
3760    CONDITIONAL PLOT         = Generate a conditional (subset) plot.
3761
3762Reference:
3763    "Modern Regression Methods", Tom Ryan, John Wiley, 1997.
3764
3765    "Applied Linear Statistical Models", 3rd ed., Neter, Wasserman,
3766    and Kunter, 1990, Irwin.
3767
3768    "Applied Regression Analysis", 3rd. ed., Draper and Smith, John
3769    Wiley, 1998.
3770
3771    "Residuals and Influence in Regression", Cook and Weisberg,
3772    Chapman and Hall, 1982.
3773
3774    "Regression Diagnostics", Belsley, Kuh, and Welsch, John Wiley,
3775    1980.
3776
3777    "Efficient Computing of Regression Diagnostiocs",
3778    Paul Velleman and Roy Welsch, The American Statistician,
3779    November, 1981, Vol. 35, No. 4, pp. 234-242.
3780
3781Applications:
3782    Multi-linear Regression
3783
3784Implementation Date:
3785    2002/6
3786
3787Program:
3788    SKIP 25
3789    READ HALD647.DAT Y X1 X2 X3 X4
3790    .
3791    MULTIPLOT CORNER COORDINATES 5 5 95 95
3792    MULTIPLOT SCALE FACTOR 2
3793    LINE BLANK
3794    CHARACTER X
3795    .
3796    MATRIX PARTIAL LEVERAGE PLOT Y X1 X2 X3 X4
3797
3798-----PARTIAL REGRESSION PLOT--------------------------------------
3799
3800PARTIAL REGRESSION PLOT
3801
3802Name:
3803    PARTIAL REGRESSION PLOT
3804
3805Type:
3806    Graphics Command
3807
3808Purpose:
3809    Generate a partial regression plot.  Note that partial
3810    regression plots are also referred to as added variable
3811    plots, adjusted variable plots, and individual coefficient
3812    plots.
3813
3814Description:
3815    When performing a linear regression with a single independent
3816    variable, a scatter plot of the response variable against
3817    the independent variable provides a good indication of
3818    the nature of the relationship.  If there is more than one
3819    independent variable, things become more complicated.
3820    Although it can still be useful to generate scatter plots
3821    of the response variable against each of the independent
3822    variables, this does not take into account the effect of the
3823    other independent variables in the model.
3824
3825    Partial regression plots attempt to show the effect of
3826    adding an additional variable to the model (given that
3827    one or more indpendent variables are already in the model).
3828
3829    Partial regression plots are formed by:
3830
3831       1) Compute the residuals of regressing the response
3832          variable against the indpendent variables but omitting
3833          X(i).
3834
3835       2) Compute the residuals from regressing X(i) against
3836          the remaining indpendent variables.
3837
3838       3) Plot the residuals from (1) against the residuals
3839          from (2).
3840
3841    Velleman and Welsch (see References below) express this
3842    mathematically as:
3843
3844       Y(.[i]) versus X(i.[i])
3845
3846    where
3847
3848       Y(.[i])  = residuals from regressing Y (the response
3849                  variable) against all the indpendent variables
3850                  except X(i).
3851       X(i.[i]) = residuals from regressing X(i) against the
3852                  remaining indpependent variables.
3853
3854    Velleman and Welsch list the following useful properties
3855    for this plot:
3856
3857       1) The least squares linear fit to this plot has the
3858          slope Beta(i) and intercept zero.
3859
3860       2) The residuals from the least squares linear fit to
3861          this plot are identical to the residuals from the
3862          least squares fit of the original model (Y against
3863          all the independent variables including X(i)).
3864
3865       3) The influences of individual data values on the
3866          estimation of a coefficient are easy to see in this
3867          plot.
3868
3869       4) It is easy to see many kinds of failures of the
3870          model or violations of the underlying assumptions
3871          (nonlinearity, heteroscedasticity, unusual patterns).
3872
3873    Partial regression plots are widely discussed in the regression
3874    diagnostics literature (e.g., see the References section below).
3875    Since the strengths and weaknesses of partial regression
3876    plots are widely discussed in the literature, we will not
3877    discuss that in any detail here.
3878
3879    Partial regression plots are related to, but distinct from,
3880    partial residual plots.  Partial regression plots are most
3881    commonly used to identify leverage points and influential
3882    data points that might not be leverage points.  Partial residual
3883    plots are most commonly used to identify the nature of the
3884    relationship between Y and X(i) (given the effect of the
3885    other indpendent variables in the model).  Note that since
3886    the simple correlation betweeen the two sets of residuals
3887    plotted is equal to the partial correlation between the
3888    response variable and X(i), partial regression plots will show
3889    the correct strength of the linear relationship between the
3890    response variable and X(i).  This is not true for partial
3891    residual plots.  On the other hand, for the partial
3892    regression plot, the x axis is not X(i).  This limits its
3893    usefulness in determining the need for a transformation
3894    (which is the primary purpose of the partial residual plot).
3895
3896    Dataplot provides two forms for the partial regression
3897    plot.  You can generate either a single partial regression
3898    plot or you can generate a matrix of partial regression plots
3899    (one plot for each independent variable in the model).
3900
3901    For the matrix form of the command, a number of SET FACTOR PLOT
3902    options can be used to control the appearance of the plot
3903    (not all of the SET FACTOR PLOT options apply).  These are
3904    discussed in the Notes section below.
3905
3906Syntax 1:
3907    PARTIAL REGRESSION PLOT  <y> <x1> ... <xk>  <xi>
3908                           <SUBSET/EXCEPT/FOR qualification>
3909    where <y> is the response variable;
3910          <x1> ... <xk> are the independent variables;
3911          <xi> is the independent variable for which the
3912              partial regression plot is being generated (note that
3913              <xi> must be one of the variables listed in
3914              <x1> ... <xk>;
3915    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
3916
3917    This is the syntax for generating a single partial regression
3918    plot.
3919
3920Syntax 2:
3921    MATRIX PARTIAL REGRESSION PLOT  <y> <x1> ... <xk>
3922                           <SUBSET/EXCEPT/FOR qualification>
3923    where <y> is the response variable;
3924          <x1> ... <xk> are the independent variables;
3925    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
3926
3927    This syntax is used to generate a matrix of partial regression
3928    plots.
3929
3930Examples:
3931    PARTIAL REGRESSION PLOT Y X1 X2 X3 X4 X2
3932
3933    MATRIX PARTIAL REGRESSION PLOT Y X1 X2 X3 X4
3934
3935    PARTIAL REGRESSION PLOT Y X1 X2 X3 X4 X2 SUBSET TAG > 2
3936    MATRIX PARTIAL REGRESSION PLOT Y X1 X2 X3 X4 SUBSET TAG > 2
3937
3938Note:
3939    The following option controls which axis tic marks, tic mark
3940    labels, and axis labels are plotted.
3941
3942        SET FACTOR PLOT LABELS <ON/OFF/XON/YON/BOX>
3943
3944    OFF means that all axis labels are suppressed (this can be
3945    useful if a large number of variables are being plotted).  ON
3946    means that both X and Y axis labels are printed.  XON only
3947    plots the x axis labels and YON only plots the y axis labels.
3948
3949    BOX is a special option that creates an extra column on the
3950    left and an extra row on the bottom.  The axis label is
3951    printed in this box.  BOX is typically reserved for the plot
3952    types that plot the variable names in the axes labels.
3953
3954    The default is ON (both x and y axis labels are printed).
3955
3956Note:
3957    The following option controls where the x axis tic marks,
3958    tic mark labels, and axis label are printed.
3959
3960        SET FACTOR PLOT X AXIS <BOTTOM/TOP/ALTERNATE>
3961
3962    BOTTOM specifies that the x axis labels are printed on the
3963    bottom axis (on the last row only).  TOP specifies that
3964    the x axis labels are printed on the top axis (first row
3965    only).  ALTERNATE specifies that the x axis labels alternate
3966    between the top (first row) and bottom axis (last row).
3967    We recommend using the TIC OFFSET command to avoid overlap
3968    of axis labels and tic marks.
3969
3970    The default is ALTERNATE.
3971
3972Note:
3973    The following option controls where the y axis tic marks,
3974    tic mark labels, and axis label are printed.
3975
3976        SET FACTOR PLOT Y AXIS <LEFT/RIGHT/ALTERNATE>
3977
3978    LEFT specifies that the y axis labels are printed on the
3979    left axis (on the first column only).  RIGHT specifies that
3980    the y axis labels are printed on the right axis (last column
3981    only).  ALTERNATE specifies that the y axis labels alternate
3982    between the left (first column) and right axis (last column).
3983    We recommend using the TIC OFFSET command to avoid overlap
3984    of axis labels and tic marks.
3985
3986    The default is ALTERNATE.
3987
3988Note:
3989    Users have different preferences in terms of whether the
3990    plot frames for neighboring plots are connected or not.
3991    This is controlled with the following option.
3992
3993        SET FACTOR PLOT FRAME <DEFAULT/CONNECTED/USER>
3994
3995    DEFAULT connects neighboring frames (i.e., the FRAME CORNER
3996    COORDINATES are set to 0 0 100 100).  USER uses whatever
3997    frame coordinates are currently set (15 20 85 90 by default)
3998    and makes no special provisions for axis labels and tic marks
3999    (i.e., you set them as you normally would, each plot uses
4000    whatever you have set).  CONNECTED uses whatever frame
4001    coordinates have been set by the user, but it draws the axis
4002    labels and tic marks as if DEFAULT were being used (that is, as
4003    determined by the SET FACTOR PLOT <LABELS/X AXIS/Y AXIS>
4004    commands described above).  Typically, CONNECTED is used to
4005    put a small bit of space between plots.  For example, you
4006    might use FRAME CORNER COORDINATES  3 3 97 97 before the
4007    PARTIAL RESIDUAL PLOT command.
4008
4009    Since the plots can often have different limits for the axes,
4010    the default is USER.
4011
4012Note:
4013    When the tic marks and tic mark labels are all plotted on the
4014    same side (i.e., SET FACTOR PLOT Y AXIS is
4015    set to LEFT or RIGHT or SET PARTIAL RESIDUAL PLOT X AXIS is
4016    set to BOTTOM or TOP), then overlap between plots is possible.
4017    The TIC OFFSET command can be used to avoid this.  In addition,
4018    you can stagger the tic labels with the following command:
4019
4020        SET FACTOR PLOT LABEL DISPLACEMENT <NORMAL/STAGGERED/VALUE>
4021
4022    NORMAL means that all tic labels are plotted at a distance
4023    determined by the TIC LABEL DISPLACEMENT command.  STAGGERED
4024    means that alternating plots will be staggered.  That is, one
4025    will use the standard displacement while the next uses a
4026    staggered value.  Entering this command with a numeric value
4027    specifies the amount of the displacement for the staggered
4028    tic labels.  For example,
4029
4030        TIC MARK LABEL DISPLACEMENT 10
4031        SET FACTOR PLOT LABEL DISPLACEMENT STAGGERED
4032        SET FACTOR PLOT LABEL DISPLACEMENT 25
4033
4034    These commands specify that the default tic label displacement
4035    is 10 and the staggered tic mark label displacement is 25.
4036
4037Note:
4038    It is often helpful on scatter plot matrices to overlay a
4039    fitted line on the plots.  The following command is used
4040    to specify the type of fit.
4041
4042        SET FACTOR PLOT FIT <NONE/LOWESS/LINE/QUAD/SMOOTH>
4043
4044    NONE means that no fitted line is plotted.  LOWESS means
4045    that a locally weighted least squares line will be overlaid.
4046    LINE means that a linear fit (Y = A0 + A1*X) will be overlaid.
4047    QUAD means that a quadratic fit (Y = A0 + A1*X + A2*X**2) will
4048    be overlaid.  SMOOTH means that a least squares smoothing will
4049    be overlaid.
4050
4051    For LOWESS, it is recommended that the lowess fraction be set
4052    fairly high (e.g., LOWESS FRACTION 0.6).
4053
4054    The fitted line is currently only generated if the factor plot
4055    type is PLOT.
4056
4057    The default is for no fitted line to be overlaid on the plot.
4058    If a overlaid fit is desired, the most common choice is to use
4059    LOWESS.
4060
4061Note:
4062    Dataplot allows you to set axis limits with the LIMITS command.
4063    For the factor plot, it is often desirable to set
4064    the axis limits for each plot.  This can be done with the
4065    command
4066
4067        SET FACTOR PLOT YLIMITS <LOW1> <UPP1> <LOW2> <UPP2> ...
4068        SET FACTOR PLOT XLIMITS <LOW1> <UPP1> <LOW2> <UPP2> ...
4069
4070    The default is to allow the axis limits to float with the data.
4071
4072Note:
4073    You can use standard plot control commands to control the
4074    appearance of the factor plot.
4075
4076    For example,
4077
4078       MULTIPLOT CORNER COORDINATES 5 5 95 95
4079       MULTIPLOT SCALE FACTOR 3
4080       TIC OFFSET UNITS SCREEN
4081       TIC OFFSET 5 5
4082
4083Default:
4084    None
4085
4086Synonyms:
4087    None
4088
4089Related Commands:
4090    FIT                      = Perform a multi-linear fit.
4091    CCPR PLOT                = Generates a component and component
4092                               plus residual plot.
4093    PARTIAL RESIDUAL PLOT    = Generates a partial residual plot.
4094    PARTIAL LEVERAGE PLOT    = Generates a partial leverage plot.
4095    VIF                      = Compute variance inflation factors
4096                               for a multi-linear fit.
4097    CONDITION INDICES        = Compute condition indices for a design
4098                               matrix.
4099    SCATTER PLOT MATIRX      = Generate a factor plot.
4100    FACTOR PLOT              = Generate a plot for a response
4101                               against a number of different
4102                               independent variables.
4103    CONDITIONAL PLOT         = Generate a conditional (subset) plot.
4104
4105Reference:
4106    "Modern Regression Methods", Tom Ryan, John Wiley, 1997.
4107
4108    "Applied Linear Statistical Models", 3rd ed., Neter, Wasserman,
4109    and Kunter, 1990, Irwin.
4110
4111    "Applied Regression Analysis", 3rd. ed., Draper and Smith, John
4112    Wiley, 1998.
4113
4114    "Residuals and Influence in Regression", Cook and Weisberg,
4115    Chapman and Hall, 1982.
4116
4117    "Regression Diagnostics", Belsley, Kuh, and Welsch, John Wiley,
4118    1980.
4119
4120    "Efficient Computing of Regression Diagnostiocs",
4121    Paul Velleman and Roy Welsch, The American Statistician,
4122    November, 1981, Vol. 35, No. 4, pp. 234-242.
4123
4124Applications:
4125    Multi-linear Regression
4126
4127Implementation Date:
4128    2002/6
4129
4130Program:
4131    SKIP 25
4132    READ HALD647.DAT Y X1 X2 X3 X4
4133    .
4134    MULTIPLOT CORNER COORDINATES 5 5 95 95
4135    MULTIPLOT SCALE FACTOR 2
4136    LINE BLANK
4137    CHARACTER X
4138    .
4139    MATRIX PARTIAL REGRESSION PLOT Y X1 X2 X3 X4
4140
4141-----PARTIAL RESIDUAL PLOT--------------------------------------
4142
4143PARTIAL RESIDUAL PLOT
4144
4145Name:
4146    PARTIAL RESIDUAL PLOT
4147
4148Type:
4149    Graphics Command
4150
4151Purpose:
4152    Generate a partial residual plot.
4153
4154Description:
4155    When performing a linear regression with a single independent
4156    variable, a scatter plot of the response variable against
4157    the independent variable provides a good indication of
4158    the nature of the relationship.  If there is more than one
4159    independent variable, things become more complicated.
4160    Although it can still be useful to generate scatter plots
4161    of the response variable against each of the independent
4162    variables, this does not take into account the effect of the
4163    other independent variables in the model.
4164
4165    Partial residual plots attempt to show the relationship between
4166    a given independent variable and the response variable given
4167    that other independent variables are also in the model.
4168
4169    Partial residual plots are formed as:
4170
4171       Res + Betahat(i)*X(i) versus X(i)
4172
4173    where
4174
4175       Res = residuals from the full model
4176       Betahat(i) = regression coefficient from the ith
4177                    independent variable in the full model
4178       X(i) = the ith independent variable
4179
4180    Partial residual plots are widely discussed in the regression
4181    diagnostics literature (e.g., see the References section below).
4182    Although they can often be useful, be aware that they can
4183    also fail to indicate the proper relationship.  In
4184    particular, if X(i) is highly correlated with any of the
4185    other independent variables, the variance indicated by the
4186    partial residual plot can be much less than the actual
4187    variance.  These issues are discussed in more detail in the
4188    references given below.
4189
4190    Dataplot provides two forms for the partial residual
4191    plot.  You can generate either a single partial residual
4192    plot or you can generate a matrix of partial residual plots
4193    (one plot for each independent variable in the model).
4194
4195    For the matrix form of the command, a number of SET FACTOR PLOT
4196    options can be used to control the appearance of the plot
4197    (not all of the SET FACTOR PLOT options apply).  These are
4198    discussed in the Notes section below.
4199
4200    The CCPR plot is a variation of the PARTIAL RESIDUAL PLOT.
4201    Enter HELP CCPR PLOT for details.
4202
4203Syntax 1:
4204    PARTIAL RESIDUAL PLOT  <y> <x1> ... <xk>  <xi>
4205                           <SUBSET/EXCEPT/FOR qualification>
4206    where <y> is the response variable;
4207          <x1> ... <xk> are the independent variables;
4208          <xi> is the independent variable for which the
4209              partial residual plot is being generated (note that
4210              <xi> must be one of the variables listed in
4211              <x1> ... <xk>;
4212    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
4213
4214    This is the syntax for generating a single partial residual
4215    plot.
4216
4217Syntax 2:
4218    MATRIX PARTIAL RESIDUAL PLOT  <y> <x1> ... <xk>
4219                           <SUBSET/EXCEPT/FOR qualification>
4220    where <y> is the response variable;
4221          <x1> ... <xk> are the independent variables;
4222    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
4223
4224    This syntax is used to generate a matrix of partial residual
4225    plots.
4226
4227Examples:
4228    PARTIAL RESIDUAL PLOT Y X1 X2 X3 X4 X2
4229
4230    MATRIX PARTIAL RESIDUAL PLOT Y X1 X2 X3 X4
4231
4232    PARTIAL RESIDUAL PLOT Y X1 X2 X3 X4 X2 SUBSET TAG > 2
4233    MATRIX PARTIAL RESIDUAL PLOT Y X1 X2 X3 X4 SUBSET TAG > 2
4234
4235Note:
4236    The following option controls which axis tic marks, tic mark
4237    labels, and axis labels are plotted.
4238
4239        SET FACTOR PLOT LABELS <ON/OFF/XON/YON/BOX>
4240
4241    OFF means that all axis labels are suppressed (this can be
4242    useful if a large number of variables are being plotted).  ON
4243    means that both X and Y axis labels are printed.  XON only
4244    plots the x axis labels and YON only plots the y axis labels.
4245
4246    BOX is a special option that creates an extra column on the
4247    left and an extra row on the bottom.  The axis label is
4248    printed in this box.  BOX is typically reserved for the plot
4249    types that plot the variable names in the axes labels.
4250
4251    The default is ON (both x and y axis labels are printed).
4252
4253Note:
4254    The following option controls where the x axis tic marks,
4255    tic mark labels, and axis label are printed.
4256
4257        SET FACTOR PLOT X AXIS <BOTTOM/TOP/ALTERNATE>
4258
4259    BOTTOM specifies that the x axis labels are printed on the
4260    bottom axis (on the last row only).  TOP specifies that
4261    the x axis labels are printed on the top axis (first row
4262    only).  ALTERNATE specifies that the x axis labels alternate
4263    between the top (first row) and bottom axis (last row).
4264    We recommend using the TIC OFFSET command to avoid overlap
4265    of axis labels and tic marks.
4266
4267    The default is ALTERNATE.
4268
4269Note:
4270    The following option controls where the y axis tic marks,
4271    tic mark labels, and axis label are printed.
4272
4273        SET FACTOR PLOT Y AXIS <LEFT/RIGHT/ALTERNATE>
4274
4275    LEFT specifies that the y axis labels are printed on the
4276    left axis (on the first column only).  RIGHT specifies that
4277    the y axis labels are printed on the right axis (last column
4278    only).  ALTERNATE specifies that the y axis labels alternate
4279    between the left (first column) and right axis (last column).
4280    We recommend using the TIC OFFSET command to avoid overlap
4281    of axis labels and tic marks.
4282
4283    The default is ALTERNATE.
4284
4285Note:
4286    Users have different preferences in terms of whether the
4287    plot frames for neighboring plots are connected or not.
4288    This is controlled with the following option.
4289
4290        SET FACTOR PLOT FRAME <DEFAULT/CONNECTED/USER>
4291
4292    DEFAULT connects neighboring frames (i.e., the FRAME CORNER
4293    COORDINATES are set to 0 0 100 100).  USER uses whatever
4294    frame coordinates are currently set (15 20 85 90 by default)
4295    and makes no special provisions for axis labels and tic marks
4296    (i.e., you set them as you normally would, each plot uses
4297    whatever you have set).  CONNECTED uses whatever frame
4298    coordinates have been set by the user, but it draws the axis
4299    labels and tic marks as if DEFAULT were being used (that is, as
4300    determined by the SET FACTOR PLOT <LABELS/X AXIS/Y AXIS>
4301    commands described above).  Typically, CONNECTED is used to
4302    put a small bit of space between plots.  For example, you
4303    might use FRAME CORNER COORDINATES  3 3 97 97 before the
4304    PARTIAL RESIDUAL PLOT command.
4305
4306    Since the plots can often have different limits for the axes,
4307    the default is USER.
4308
4309Note:
4310    When the tic marks and tic mark labels are all plotted on the
4311    same side (i.e., SET FACTOR PLOT Y AXIS is
4312    set to LEFT or RIGHT or SET PARTIAL RESIDUAL PLOT X AXIS is
4313    set to BOTTOM or TOP), then overlap between plots is possible.
4314    The TIC OFFSET command can be used to avoid this.  In addition,
4315    you can stagger the tic labels with the following command:
4316
4317        SET FACTOR PLOT LABEL DISPLACEMENT <NORMAL/STAGGERED/VALUE>
4318
4319    NORMAL means that all tic labels are plotted at a distance
4320    determined by the TIC LABEL DISPLACEMENT command.  STAGGERED
4321    means that alternating plots will be staggered.  That is, one
4322    will use the standard displacement while the next uses a
4323    staggered value.  Entering this command with a numeric value
4324    specifies the amount of the displacement for the staggered
4325    tic labels.  For example,
4326
4327        TIC MARK LABEL DISPLACEMENT 10
4328        SET FACTOR PLOT LABEL DISPLACEMENT STAGGERED
4329        SET FACTOR PLOT LABEL DISPLACEMENT 25
4330
4331    These commands specify that the default tic label displacement
4332    is 10 and the staggered tic mark label displacement is 25.
4333
4334Note:
4335    It is often helpful on scatter plot matrices to overlay a
4336    fitted line on the plots.  The following command is used
4337    to specify the type of fit.
4338
4339        SET FACTOR PLOT FIT <NONE/LOWESS/LINE/QUAD/SMOOTH>
4340
4341    NONE means that no fitted line is plotted.  LOWESS means
4342    that a locally weighted least squares line will be overlaid.
4343    LINE means that a linear fit (Y = A0 + A1*X) will be overlaid.
4344    QUAD means that a quadratic fit (Y = A0 + A1*X + A2*X**2) will
4345    be overlaid.  SMOOTH means that a least squares smoothing will
4346    be overlaid.
4347
4348    For LOWESS, it is recommended that the lowess fraction be set
4349    fairly high (e.g., LOWESS FRACTION 0.6).
4350
4351    The fitted line is currently only generated if the factor plot
4352    type is PLOT.
4353
4354    The default is for no fitted line to be overlaid on the plot.
4355    If a overlaid fit is desired, the most common choice is to use
4356    LOWESS.
4357
4358Note:
4359    Dataplot allows you to set axis limits with the LIMITS command.
4360    For the factor plot, it is often desirable to set
4361    the axis limits for each plot.  This can be done with the
4362    command
4363
4364        SET FACTOR PLOT YLIMITS <LOW1> <UPP1> <LOW2> <UPP2> ...
4365        SET FACTOR PLOT XLIMITS <LOW1> <UPP1> <LOW2> <UPP2> ...
4366
4367    The default is to allow the axis limits to float with the data.
4368
4369Note:
4370    You can use standard plot control commands to control the
4371    appearance of the factor plot.
4372
4373    For example,
4374
4375       MULTIPLOT CORNER COORDINATES 5 5 95 95
4376       MULTIPLOT SCALE FACTOR 3
4377       TIC OFFSET UNITS SCREEN
4378       TIC OFFSET 5 5
4379
4380Default:
4381    None
4382
4383Synonyms:
4384    None
4385
4386Related Commands:
4387    FIT                      = Perform a multi-linear fit.
4388    CCPR PLOT                = Generates a component and component
4389                               plus residual plot.
4390    PARTIAL REGRESSION PLOT  = Generates a partial regression plot.
4391    PARTIAL LEVERAGE PLOT    = Generates a partial leverage plot.
4392    VIF                      = Compute variance inflation factors
4393                               for a multi-linear fit.
4394    CONDITION INDICES        = Compute condition indices for a design
4395                               matrix.
4396    SCATTER PLOT MATIRX      = Generate a factor plot.
4397    FACTOR PLOT              = Generate a plot for a response
4398                               against a number of different
4399                               independent variables.
4400    CONDITIONAL PLOT         = Generate a conditional (subset) plot.
4401
4402Reference:
4403    "Modern Regression Methods", Tom Ryan, John Wiley, 1997.
4404
4405    "Applied Linear Statistical Models", 3rd ed., Neter, Wasserman,
4406    and Kunter, 1990, Irwin.
4407
4408    "Applied Regression Analysis", 3rd. ed., Draper and Smith, John
4409    Wiley, 1998.
4410
4411    "Residuals and Influence in Regression", Cook and Weisberg,
4412    Chapman and Hall, 1982.
4413
4414    "Regression Diagnostics", Belsley, Kuh, and Welsch, John Wiley,
4415    1980.
4416
4417    "Efficient Computing of Regression Diagnostiocs",
4418    Paul Velleman and Roy Welsch, The American Statistician,
4419    November, 1981, Vol. 35, No. 4, pp. 234-242.
4420
4421Applications:
4422    Multi-linear Regression
4423
4424Implementation Date:
4425    2002/6
4426
4427Program:
4428    SKIP 25
4429    READ HALD647.DAT Y X1 X2 X3 X4
4430    .
4431    MULTIPLOT CORNER COORDINATES 5 5 95 95
4432    MULTIPLOT SCALE FACTOR 2
4433    LINE BLANK
4434    CHARACTER X
4435    .
4436    MATRIX PARTIAL RESIDUAL PLOT Y X1 X2 X3 X4
4437
4438-----PATH (SET)--------------------------------------------
4439
4440PATH
4441
4442Name:
4443    PATH (SET)
4444
4445Type:
4446    Set Subcommand
4447
4448Purpose:
4449    Specify the name of the directory where Dataplot's auxiliary files
4450    are stored.
4451
4452Description:
4453    The Dataplot distribution comes with a large number of sample data
4454    files, macro and program files, and experiment design files.
4455    Typically, these files can be accessed in the READ, CALL, and LIST
4456    commands without specifying a path name.  However, if the local
4457    implementor has not specified this path correctly in the Dataplot
4458    source code, the SET PATH command can be used to tell Dataplot where
4459    to locate them.  Check with your local implementor for the correct
4460    path.
4461
4462    On Microsoft Windows platforms, the Install Shield installation sets
4463    the DATAPLO$ environment variable in the Windows registry that defines
4464    the default location.
4465
4466    For Unix/Linux and Mac OS X installations, you will typically add a
4467    line in your .cshrc file (for c-shell or t-shell users) or your
4468    .bashrc (for Bourne-shell users) that defines the DATAPLOT_FILES
4469    environment variable.
4470
4471    So for those systems where an appropriate environment variable has
4472    been properly defined, there is no need to enter a SET PATH command.
4473
4474    The SET PATH command is most typically used by developers who would
4475    like to set the default Dataplot directory to a test directory
4476    rather than the default installation directory.
4477
4478Syntax:
4479    SET PATH <string>
4480    where <string> specifies the desired path name.
4481
4482    This string is currently limited to a maxium of 80 characters.
4483
4484Examples:
4485    SET PATH D:\DATAPLOT
4486    SET PATH /usr/local/lib/dataplot
4487    PROBE PATH
4488
4489Note:
4490    Starting with the 2019/04 version, Linux and MacOS systems allow
4491    the default path to be set in the Makefile.  So it is no longer
4492    neccessary to create a DATAPLOT_FILES environment variable on
4493    these systems.
4494
4495    The order of determining the default path for Linux/MacOS
4496    platforms is:
4497
4498        1. First check for the DATAPLOT_FILES environment variable.
4499
4500        2. If DATAPLOT_FILES has not been defined, use the path
4501           specified in the Makefile (this will be called DPLIBDIR).
4502
4503        3. If DATAPLOT_FILES has not been defined and DPLIBDIR has
4504           not been defined in the Makefile, then default to
4505           /usr/local/lib/dataplot.
4506
4507Note:
4508    When Dataplot attempts to open a file, it will first do so in the
4509    current directory.  If Dataplot is unable to locate the file in the
4510    current directory, it will look in the directory containing the
4511    Dataplot auxillary files.
4512
4513    You can use the SET SEARCH DIRECTORY command to define an additional
4514    directory where Dataplot will look for the file.
4515
4516Default:
4517    On Microsoft Windows platforms, the default path is determined by the
4518    Install Shield installation and the DATAPLO$ environment variable is
4519    set to this directory.  For English-based platforms, this is either
4520    "C:\Program Files\NIST\DATAPLOT" (for 32-bit systems) or
4521    "C:\Program Files (x86)\NIST\DATAPLOT".  Non-English platforms will
4522    typically have a different name for "Program Files".
4523
4524    On Linux/Unix and MacOS systems, the default path is determined by
4525    the DATAPLOT_FILES environment variable.  If the this environment
4526    variable is not defined, then check to see if DPLIBDIR was defined
4527    in the Makefile.  If neither of these has been set, the default path is
4528    "/usr/local/lib/dataplot".
4529
4530Synonyms:
4531    None
4532
4533Related Commands:
4534    LIST              = List the contents of a file.
4535    READ              = Read data from a file.
4536    CALL              = Execute commands stored in a file.
4537    SEARCH DIRECTORY  = Define an additional directory that will be
4538                        searched.
4539
4540Applications:
4541    File Usage
4542
4543Implementation Date:
4544    1994/01
4545    2019/08: Use of DPLIBDIR in Makefile for Linux/MacOS systems
4546
4547Program:
4548    SET PATH /home/heckert/lib/dataplot/
4549    LIST BERGER1.DAT
4550
4551-----PATTERN (LET)---------------------------------------------------
4552
4553PATTERN
4554
4555Name:
4556    PATTERN (LET)
4557
4558Type:
4559    Let Subcommand
4560
4561Purpose:
4562    Generate numbers with a specific pattern.
4563
4564Description:
4565    The SEQUENCE command is used to generate sequences with a constant
4566    increment.  The PATTERN command can be used for those cases where
4567    there is a non-constant increment.
4568
4569Syntax 1:
4570    LET <resp> = PATTERN <list>
4571    where <list> is a list of numbers or parameters;
4572    and   <resp> is a variable where the given numbers are saved.
4573
4574    With this syntax, only one iteration of the pattern is saved.
4575
4576Syntax 2:
4577    LET <resp> = PATTERN <list>  FOR I = <start>  <inc>  <stop>
4578    where <list> is a list of numbers or parameters;
4579          <resp> is a variable where the given numbers are saved;
4580          <start> is the first row in <resp> where the pattern is saved
4581              (typically has a value of 1);
4582          <inc> is the row increment for saving values in <resp>
4583              (typically has a value of 1);
4584    and   <stop> is the last row in <resp> for saving values.
4585
4586    With this syntax, the pattern is repeated in <resp> until all the
4587    rows specified by the FOR are filled.
4588
4589Examples:
4590    LET X = PATTERN 1 3 4 1 1 1 0 0 2
4591    LET X = PATTERN 1 3 4 1 1 1 0 0 2 FOR I = 1 1 100
4592
4593Default:
4594    None
4595
4596Synonyms:
4597    The DATA command is equivalent to SYNTAX 1.
4598
4599Related Commands:
4600    SEQUENCE            = Generate a sequence of numbers.
4601    FIBONNACCI NUMBERS  = Generate Fibonnacci numbers.
4602    PRIME NUMBERS       = Generate prime numbers.
4603    DATA                = Place numbers in a variable.
4604    LOGISTIC NUMBERS    = Generate numbers from a logistic sequence.
4605    CANTOR NUMBERS      = Generate numbers from a Cantor set.
4606
4607Applications:
4608    Data Input
4609
4610Implementation Date:
4611    Pre-1987
4612
4613Program:
4614    XX
4615
4616-----PAUSE LINES (SET)-------------------------------------------
4617
4618PAUSE LINES (SET)
4619
4620Name:
4621    SET PAUSE LINES
4622
4623Type:
4624    Support Command
4625
4626Purpose:
4627    Specify the number of lines that will be printed to the screen
4628    before pausing and prompting for a carriage return.
4629
4630Description:
4631    For some implementations (e.g., Windows) with a limited number
4632    of scroll lines or for cases where a large amount of output is
4633    printed to the screen, it can be useful to pause after a given
4634    number of lines have been printed in order to view the output.
4635
4636    This command allows  you to specify a given number of lines.
4637    When this number of lines has been printed to the terminal
4638    screen, a "?" is printed and execution is halted until a carriage
4639    return is entered.
4640
4641    This is similar to a PAUSE command.  However, a PAUSE command
4642    only pauses the output when a PAUSE is explicitly entered.
4643    In contrast, a SET PAUSE LINES needs to be entered only once
4644    and the pause will be activated automatically when the specified
4645    number of lines has been printed.
4646
4647    If the number of pause lines is set to zero or a negative value,
4648    no pause will be generated.
4649
4650    If you have activated the pause and wish to de-activate it later
4651    in the session, you can do this by entering a "0" at the "?"
4652    prompt.  You can also enter a SET PAUSE LINES 0 command.
4653
4654Syntax:
4655    SET PAUSE LINES <value>
4656    where <value> specifies the number of lines to output to the
4657              screen before pausing and prompting for a carriage return.
4658
4659Examples:
4660    PAUSE
4661
4662Note:
4663    This command will not be active if you are running the
4664    graphical user interface (GUI).
4665
4666Default:
4667    No pauses are generated
4668
4669Synonyms:
4670    None
4671
4672Related Commands:
4673    PAUSE         = Initiate an explicit pause.
4674
4675Applications:
4676    Interactive Usage
4677
4678Implementation Date:
4679    2010/09
4680
4681Program:
4682    XX
4683
4684-----PAUSE-------------------------------------------------------
4685
4686PAUSE
4687
4688Name:
4689    PAUSE
4690
4691Type:
4692    Support Command
4693
4694Purpose:
4695    A "?" is printed to the screen and execution is halted until
4696    a carriage return is entered.
4697
4698Description:
4699    This command is typically used in macros to allow the analyst to
4700    look at the current plot (or terminal output) before the next plot
4701    is generated.
4702
4703Syntax:
4704    PAUSE
4705
4706Examples:
4707    PAUSE
4708
4709Default:
4710    None
4711
4712Synonyms:
4713    None
4714
4715Related Commands:
4716    PLOT          = Generate a data or function plot.
4717
4718Applications:
4719    Interactive Usage
4720
4721Implementation Date:
4722    Pre-1987
4723
4724Program:
4725    XX
4726
4727-----PB (LET)--------------------------------
4728
4729PB
4730
4731Name:
4732    PB (LET)
4733
4734Type:
4735    Library Function
4736
4737Purpose:
4738    Compute the parabolic cylinder functions or the derivatives
4739   of the parabolic cylinder functions.
4740
4741Description:
4742    The parabolic cylinder functions are defined as:
4743
4744       1) D(x,v) = COS(PI*v/2)*w1(x) + SIN(PI*v/2)*w2(x)
4745
4746          where
4747
4748          w1(x) = (1/SQRT(PI))*GAMMA(0.5 + 0.5*v)*y1(x)/(2**(-v/2))
4749          w2(x) = (1/SQRT(PI))*GAMMA(1 + 0.5*v)*y2(x)/(2**(-v/2 - 0.5))
4750
4751          where
4752
4753          y1(x) = SUM(a(2*m))*x**(2*m)/(2*m)!
4754          y2(x) = SUM(a(2*m+1))*x**(2*m+1)/(2*m+1)!
4755
4756          where the summation is from m = 0 to infinity and
4757
4758          a(0) = a(1) = 1
4759          a(2) = a(3) = a = -v - 0.5
4760          a(n) = a*a(n-2) + (1/4)*(n-2)(n-3)*a(n-4)   (n >= 4)
4761
4762       2) V(x,v) =[1/(GAMMA(1+v)]*[-SIN(PI*v/2)w1(x) + COS(PI*v/2)w2(x)]
4763
4764          where w1 and w2 are defined as for the D(x,v) function
4765          and GAMMA is the gamma function.
4766
4767       3) W(+/-x,a) =[(COSH(PI*a)**(1/4)]*[G1y1(x) -/+ SQRT(2)*G2y2(x)]
4768
4769          where y1 and y2 are defined as for the D(x,v) function,
4770          COSH is the hyperbolic cosine function, and
4771
4772          G1 = ABS(GAMMA(0.25 + 0.5ia))
4773          G2 = ABS(GAMMA(0.75 + 0.5ia))
4774
4775    Note that there are alternative formulations for the above
4776    functions.  More details are provided in the sources listed
4777    in the References section.
4778
4779    In addition, Dataplot provides functions for computing the
4780    derivatives of each of these functions.
4781
4782    Dataplot computes these function using the PDBV, PBVV, and
4783    PBWA routines from "Computation of Special Functions" (see
4784    the References section below).
4785
4786Syntax 1:
4787    LET <y> = PBDV(<x>,<v>)  <SUBSET/EXCEPT/FOR qualification>
4788    where <x> is a variable, number, or parameter containing
4789              positive values;
4790          <v> is a variable, number, or parameter that defines
4791              the order of the parabolic function;
4792          <y> is a variable or a parameter (depending on what
4793              <x> and <v> are) where the computed parabolic
4794              cylinder  values are stored;
4795    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
4796
4797    This syntax computes the first form of the parabolic
4798    cylinder functions (D(x,v)).
4799
4800Syntax 2:
4801    LET <y> = PBDV1(<x>,<v>)  <SUBSET/EXCEPT/FOR qualification>
4802    where <x> is a variable, number, or parameter containing
4803              positive values;
4804          <v> is a variable, number, or parameter that defines
4805              the order of the parabolic cylinder function;
4806          <y> is a variable or a parameter (depending on what
4807              <x> and <v> are) where the computed parabolic
4808              cylinder  values are stored;
4809    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
4810
4811    This syntax computes the derivative of the first form of the
4812    parabolic cylinder functions (D(x,v)).
4813
4814Syntax 3:
4815    LET <y> = PBVV(<x>,<v>)  <SUBSET/EXCEPT/FOR qualification>
4816    where <x> is a variable, number, or parameter containing
4817              positive values;
4818          <v> is a variable, number, or parameter that defines
4819              the order of the parabolic function;
4820          <y> is a variable or a parameter (depending on what
4821              <x> and <v> are) where the computed parabolic
4822              cylinder  values are stored;
4823    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
4824
4825    This syntax computes the second form of the parabolic
4826    cylinder functions (V(x,v)).
4827
4828Syntax 4:
4829    LET <y> = PBVV1(<x>,<v>)  <SUBSET/EXCEPT/FOR qualification>
4830    where <x> is a variable, number, or parameter containing
4831              positive values;
4832          <v> is a variable, number, or parameter that defines
4833              the order of the parabolic function;
4834          <y> is a variable or a parameter (depending on what
4835              <x> and <v> are) where the computed parabolic
4836              cylinder  values are stored;
4837    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
4838
4839    This syntax computes the derivative of the second form of
4840    the parabolic cylinder functions (V(x,v)).
4841
4842Syntax 5:
4843    LET <y> = PBWA(<x>,<a>)  <SUBSET/EXCEPT/FOR qualification>
4844    where <x> is a variable, number, or parameter containing
4845              positive values;
4846          <a> is a variable, number, or parameter that defines
4847              the order of the parabolic function;
4848          <y> is a variable or a parameter (depending on what
4849              <x> and <v> are) where the computed parabolic
4850              cylinder  values are stored;
4851    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
4852
4853    This syntax computes the third form of the parabolic
4854    cylinder functions (W(x,a)).
4855
4856    This function is limited to the case when the absolute
4857    value of <x> is less than 5.
4858
4859Syntax 6:
4860    LET <y> = PBWA1(<x>,<a>)  <SUBSET/EXCEPT/FOR qualification>
4861    where <x> is a variable, number, or parameter containing
4862              positive values;
4863          <a> is a variable, number, or parameter that defines
4864              the order of the parabolic function;
4865          <y> is a variable or a parameter (depending on what
4866              <x> and <v> are) where the computed parabolic
4867              cylinder  values are stored;
4868    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
4869
4870    This syntax computes the derivative of the third form of
4871    the parabolic cylinder functions (W(x,a)).
4872
4873    This function is limited to the case when the absolute
4874    value of <x> is less than 5.
4875
4876Examples:
4877    LET A = PBDV(1.5,2)
4878    LET A = PBDV1(1.5,2)
4879
4880    LET Y = PBVV(X,2)
4881    LET YPRIME = PBVV1(X,2)
4882
4883    LET Y = PBWA(X,1)  FOR X = -3 0.1 3
4884    LET YPRIME = PBWA1(X,1)  FOR X = -3 0.1 3
4885
4886Note:
4887    Library functions are distinguished from let subcommands
4888    in the following ways.
4889    1) Functions enclose the input value in parenthesis.  Let
4890       subcommands use spaces.
4891    2) Functions can accept (and return) either parameters
4892       (i.e., single values) or variables (i.e., an array of
4893       values) while let subcommands are specific in which they
4894       accept as input and what they return as output.
4895    3) Functions can accept expressions while let subcommands
4896       do not.  For example, the following is legal:
4897           LET Y2 = ABS(Y1-INT(Y1))
4898       For let subcommands, you typically have to do something
4899       like the following:
4900           LET YTEMP = Y**2 + 8
4901           LET A = SUM YTEMP
4902
4903Default:
4904    None
4905
4906Synonyms:
4907    None
4908
4909Related Commands:
4910    CLNGAM     = Compute the complex log gamma function.
4911    CBETA      = Compute the complex beta function.
4912    CLNBETA    = Compute the complex log beta function.
4913    GAMMA      = Compute the Gamma function.
4914    GAMMAI     = Compute the incomplete Gamma function.
4915    DIGAMMA    = Compute the digamma function.
4916
4917Reference:
4918    "Computation of Special Functions", Shanjie Zhang and Jianming
4919    Jin, John Wiley and Sons, 1996, chapter 13.
4920
4921    "Handbook of Mathematical Functions, Applied Mathematics Series,
4922    Vol. 55", Abramowitz and Stegun, National Bureau of Standards,
4923    1964, pp. 685-720.
4924
4925Applications:
4926    Special Functions
4927
4928Implementation Date:
4929    1997/12
4930
4931Program 1:
4932    LINE SOLID DASH
4933    MULTIPLOT 2 2
4934    MULTIPLOT CORNER COORDINATES 5 5 95 95
4935    TITLE V = 1
4936    PLOT PBDV(X,1) FOR X = 0.1 0.1 5 AND
4937    PLOT PBDV1(X,1) FOR X = 0.1 0.1 5
4938    TITLE V = 2
4939    PLOT PBDV(X,2) FOR X = 0.1 0.1 5 AND
4940    PLOT PBDV1(X,2) FOR X = 0.1 0.1 5
4941    TITLE V = 3
4942    PLOT PBDV(X,3) FOR X = 0.1 0.1 5 AND
4943    PLOT PBDV1(X,3) FOR X = 0.1 0.1 5
4944    TITLE V = 4
4945    PLOT PBDV(X,4) FOR X = 0.1 0.1 5 AND
4946    PLOT PBDV1(X,4) FOR X = 0.1 0.1 5
4947    END OF MULTIPLOT
4948    MOVE 50 95
4949    JUSTIFICATION CENTER
4950    TEXT PBDV (AND DERIVATIVE) FUNCTIONS
4951
4952Program 2:
4953    LINE SOLID DASH
4954    MULTIPLOT 2 2
4955    MULTIPLOT CORNER COORDINATES 5 5 95 95
4956    TITLE V = 1
4957    PLOT PBVV(X,1) FOR X = 0.1 0.1 5 AND
4958    PLOT PBVV1(X,1) FOR X = 0.1 0.1 5
4959    TITLE V = 2
4960    PLOT PBVV(X,2) FOR X = 0.1 0.1 5 AND
4961    PLOT PBVV1(X,2) FOR X = 0.1 0.1 5
4962    TITLE V = 3
4963    PLOT PBVV(X,3) FOR X = 0.1 0.1 5 AND
4964    PLOT PBVV1(X,3) FOR X = 0.1 0.1 5
4965    TITLE V = 4
4966    PLOT PBVV(X,4) FOR X = 0.1 0.1 5 AND
4967    PLOT PBVV1(X,4) FOR X = 0.1 0.1 5
4968    END OF MULTIPLOT
4969    MOVE 50 95
4970    JUSTIFICATION CENTER
4971    TEXT PBVV (AND DERIVATIVE) FUNCTIONS
4972
4973Program 3:
4974    LINE SOLID DASH
4975    MULTIPLOT 2 2
4976    MULTIPLOT CORNER COORDINATES 5 5 95 95
4977    TITLE V = 1
4978    PLOT PBWA(X,1) FOR X = 0.1 0.1 5 AND
4979    PLOT PBWA1(X,1) FOR X = 0.1 0.1 5
4980    TITLE V = 2
4981    PLOT PBWA(X,2) FOR X = 0.1 0.1 5 AND
4982    PLOT PBWA1(X,2) FOR X = 0.1 0.1 5
4983    TITLE V = 3
4984    PLOT PBWA(X,3) FOR X = 0.1 0.1 5 AND
4985    PLOT PBWA1(X,3) FOR X = 0.1 0.1 5
4986    TITLE V = 4
4987    PLOT PBWA(X,4) FOR X = 0.1 0.1 5 AND
4988    PLOT PBWA1(X,4) FOR X = 0.1 0.1 5
4989    END OF MULTIPLOT
4990    MOVE 50 95
4991    JUSTIFICATION CENTER
4992    TEXT PBWA (AND DERIVATIVE) FUNCTIONS
4993
4994-----PEAKS OF FREQUENCY TABLE (LET)----------------------------------
4995
4996PEAKS OF FREQUENCY TABLE
4997
4998Name:
4999    PEAKS OF FREQUENCY TABLE (LET)
5000
5001Type:
5002    Let Subcommand
5003
5004Purpose:
5005    Bin (i.e., create a frequency table) a response variable and
5006    then thin the frequency table by extracting the peaks.
5007
5008Description:
5009    Binning a data variable means to divide it into classes
5010    and compute the frequency for each class.  This is the
5011    numerical equivalent of a histogram.
5012
5013    Peaks are determined as follows:
5014
5015       1) Compute the difference of the frequency counts.
5016
5017       2) Where the differences change sign indicates a peak.
5018
5019    Also, you can specify that relative frequencies rather than
5020    counts be computed.   The command
5021
5022        SET RELATIVE HISTOGRAM <AREA/PERCENT>
5023
5024    can be used to specify whether relative frequencies are
5025    computed so that the area sums to 1 or so that frequencies
5026    sum to 1.  The first option, which is the default, is useful
5027    for when using the relative binning as an estimate of a
5028    probability distribution.  The second option is useful when
5029    you want to see what percentage of the data falls in a given
5030    class.
5031
5032Syntax 1:
5033    LET <y2> <x2> = PEAKS OF FREQUENCY TABLE <y>
5034                    <SUBSET/EXCEPT/FOR qualification>
5035    where <y> is the response variable;
5036          <y2> is a variable where the computed counts (or
5037              frequencies) are stored;
5038          <x2> is a variable where the computed bin mid-points
5039              are stored;
5040    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
5041
5042    This syntax is used for the case where the frequencies are
5043    expressed as raw counts.
5044
5045Syntax 2:
5046    LET <y2> <x2> = RELATIVE PEAKS OF FREQUENCY TABLE <y>
5047                    <SUBSET/EXCEPT/FOR qualification>
5048    where <y> is the response variable;
5049          <y2> is a variable where the computed counts (or
5050              frequencies) are stored;
5051          <x2> is a variable where the computed bin mid-points
5052              are stored;
5053    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
5054
5055    This syntax is used for the case where the frequencies are
5056    expressed as relative frequencies.
5057
5058Examples:
5059    LET Y2 X2 = PEAKS OF FREQUENCY TABLE Y
5060    LET Y2 X2 = PEAKS OF FREQUENCY TABLE Y SUBSET TAG > 2
5061    LET Y2 X2 = RELATIVE PEAKS OF FREQUENCY TABLE Y
5062
5063Note:
5064    As with the histogram, you can use the CLASS WIDTH, CLASS
5065    LOWER, and CLASS UPPER commands to override these defaults.
5066
5067    By default, DATAPLOT uses a class width of 0.3 times the standard
5068    deviation of the variable.  A number of alternative choices for
5069    class width can be set with the command
5070
5071        SET HISTOGRAM CLASS WIDTH
5072
5073    Enter HELP HISTOGRAM CLASS WIDTH for details.
5074
5075Default:
5076    None
5077
5078Synonyms:
5079    None
5080
5081Related Commands:
5082    BINNED                   = Compute a frequency table.
5083    COMBINE FREQUENCY TABLE  = Combine low frequency classes in a
5084                               frequency table.
5085    HISTOGRAM                = Generate a histogram.
5086    CLASS WIDTH              = Set class widths for histograms and
5087                               other related commands.
5088    HISTOGRAM CLASS WIDTH    = Specify the algorithm used to
5089                               determine the class width.
5090
5091Applications:
5092    Data Analysis
5093
5094Implementation Date:
5095    2008/4
5096
5097Program:
5098    let u1 = 0
5099    let sd1 = 1
5100    let u2 = 5
5101    let sd2 = 3
5102    let p = 0.6
5103    let y = normal mixture rand numb for i = 1 1 500
5104    .
5105    set write decimals 4
5106    let y2 x2 = binned y
5107    print x2 y2
5108    .
5109    let y3 x3 = peaks of frequency table y
5110    print x3 y3
5111    .
5112    xlimits -5 15
5113    histogram y
5114    .
5115    line color blue
5116    line dash
5117    line thickness 0.2
5118    let ycoor1 = 0
5119    let npeak = size x3
5120    .
5121    loop for k = 1 1 npeak
5122        let xtemp = x3(k)
5123        let ytemp = y3(k)
5124        drawdata xtemp ycoor1 xtemp ytemp
5125    end of loop
5126
5127-----PEAKS OVER THRESHOLD PLOT--------------------------------------
5128
5129PEAKS OVER THRESHOLD PLOT
5130
5131Name:
5132    PEAKS OVER THRESHOLD PLOT
5133
5134Type:
5135    Graphics Command
5136
5137Purpose:
5138    Generates a peaks over threshold plot.
5139
5140Description:
5141    In univariate extreme value analysis, there are two basic
5142    approaches for extracting the extreme data.
5143
5144       1) We find the maximum (or minimum) value in equal
5145          length intervals.  For example, we could extract the
5146          maximum wind speed for each year and then develop a
5147          distributional model for these yearly maximums.
5148
5149          This is commonly referred to as the "epochal"  method.
5150
5151       2) An alternative is to define an overall threshold.
5152          We then extract all points above that threshold and
5153          develop a distributional model for these points.  Note
5154          that in this case, the number of points extracted in
5155          each interval is not necessarily equal.
5156
5157    The generalized Pareto distribution provides a useful
5158    distributional model for univariate extreme value data since
5159    it indicates what type of extreme value model is appropriate:
5160
5161       1) gamma = 0   - this is equivalent to an extreme value
5162                        type I (Gumbel) distribution.
5163       2) gamma > 0   - this is equivalent to an extreme value
5164                        type II (Frechet) distribution.
5165       3) gamma < 0   - this is equivalent to a reverse Weibull
5166                        distribution (in Dataplot, this is a
5167                        Weibull with SET MINMAX MAXIMUM).  The
5168                        shape parameter for the reverse Weibull
5169                        is -1/gamma.
5170
5171    The purpose of the PEAKS OVER THRESHOLD PLOT is to see
5172    how the estimated value of gamma changes as the threshold
5173    is changed.  Specifically, the plot is generated as follows:
5174
5175       1) Define an initial threshold.  In Dataplot, you can
5176          specify either the starting number of points above the
5177          threshold or a particular value for the threshold.
5178
5179          To specify the intial number of points above the
5180          threshold, enter the command
5181
5182              SET PEAKS OVER THRESHOLD INITIAL POINTS <value>
5183
5184          To specify a starting value for the threshold, enter
5185          the command
5186
5187              SET PEAKS OVER THRESHOLD INITIAL THRESHOLD <value>
5188
5189          If neither command is given, Dataplot will start
5190          with a threshold that gives 2.5% of the data set.
5191          If both are specified, the INITIAL THRESHOLD takes
5192          precedence over the INITIAL POINTS.
5193
5194       2) For the points above the threshold, estimate the
5195          parameters for the generalized Pareto distribution
5196          (see the Note section below for details on how this
5197          is done).
5198
5199          In addition, calculate a confidence interval for
5200          the shape parameter.  For the de Haan and CME methods
5201          (see the Note section below), we compute the standard
5202          deviation of the estimate of gamma.  We then use
5203          gamma +/- 2*sd(gamma) as an estimate of the confidence
5204          interval.  For the PPCC plot method, the confidence
5205          interval is computed using bootstrapping.
5206
5207       3) Decrement the threshold.  To specify how much to
5208          decrement the threshold at each interval, enter the
5209          command
5210
5211              SET PEAKS OVER THRESHOLD INCREMENT <value>
5212
5213          The default increment is -1.
5214
5215       4) This is repeated for a pre-specified number of
5216          iterations.  The default number of iterations is 30.
5217          To change the number of iterations, enter the command
5218
5219              SET PEAKS OVER THRESHOLDS ITERATIONS <value>
5220
5221    The plot then consists of three curves:
5222
5223       1) The point estimates of gamma.
5224       2) The lower confidence limit for gamma.
5225       3) The upper confidence limit for gamma.
5226
5227    Each of these is plotted against the number of points above
5228    the threshold.  To have the actual threshold plotted on the
5229    horizontal axis, enter the command
5230
5231       SET PEAKS OVER THRESHOLD X AXIS THRESHOLD
5232
5233    To restore the default of the number of points above the
5234    threshold, enter the command
5235
5236       SET PEAKS OVER THRESHOLD X AXIS POINTS
5237
5238    The basic interpretation of this plot is:
5239
5240        When the threshold is high, few points are included so
5241        the variance of gamma is also high (and so the resulting
5242        confidence intervals are wide).  As the threshold
5243        decreases (and more points are included), the variance
5244        of gamma decreases with resulting narrower confidence
5245        intervals.  However, as the number of points increases,
5246        the bias of the estimate of gamma increases.  This will
5247        often be indicated by a downward slope of the graph.
5248        Over intervals where the bias error is small, the
5249        graph will be nearly horizontal.  When choosing a
5250        reasonable value of gamma from the graph, it should
5251        be noted that larger estimates of gamma imply a
5252        longer tail and are therefore conservative from a
5253        structural engineering point of view.
5254
5255    In addition to the plot, this command will also generate
5256    the following tables at each iteration.
5257
5258        1) The first table contains the threshold, the number
5259           of points above the threshold, and the parameter
5260           estimates.
5261
5262        2) In engineering applications, the mean recurrence
5263           interval (this is also referred to as the return
5264           interval or recurrence interval) is of interest.
5265
5266           The return interval of a given wind speed, in years, is
5267           defined as the inverse of the probability that the wind
5268           speed will be exceeded in any one year.  It is defined as
5269
5270              1/(1 - F(x))
5271
5272           with F(x) denoting the cumulative distribution function.
5273           Mean recurrence intervals are discussed in more detail
5274           in Simiu and Scanlon (see References section below).
5275
5276           More often, we would like to compute the wind speed
5277           that corresponds to a given return interval.  The
5278           solution to this is given by solving the above
5279           equation for x.
5280
5281              X(R) = G(1 - (1/R))
5282
5283           with G and R denoting the percent point function and
5284           the desired mean recurrence interval, respectively.
5285
5286           The above formula is for the case of a single yearly
5287           maximum.  If lambda is the mean number of threshold
5288           crossings per year, the formula is
5289
5290              X(R) = G(1 - (1/(lambda*R)))
5291
5292           In the Dataplot PEAKS OVER THRESHOLD PLOT command, you
5293           can optionally give a second variable that specifies the
5294           desired mean recurrence intervals.  If you specify mean
5295           return intervals, Dataplot will print a table showing
5296           the mean return interval along with the corresponding
5297           wind speed (called XR).
5298
5299        3) In wind engineering applications, the load factor is
5300           also of interest.  This is commonly computed as
5301
5302               (XMAX/XR(50))**2
5303
5304           with XMAX denoting the maximum value of the fitted
5305           generalized Pareto distribution (the generalized
5306           Pareto is bounded above if the shape parameter is
5307           negative) and XR(50) denoting the wind speed
5308           corresponding to a mean recurrence interval of 50
5309           years.
5310
5311           To print the value of the maximum wind speed and the
5312           load factor, enter the command
5313
5314               SET PEAKS OVER THRESHOLD LOAD FACTOR OFF
5315
5316           Since this is specific to extreme wind applications,
5317           it is OFF by default.
5318
5319Syntax 1:
5320    PEAKS OVER THRESHOLD PLOT <y>  <SUBSET/EXCEPT/FOR qualification>
5321    where <y> is a response variable;
5322    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
5323
5324Syntax 2:
5325    PEAKS OVER THRESHOLD PLOT <y> <r>
5326                              <SUBSET/EXCEPT/FOR qualification>
5327    where <y> is a response variable;
5328          <r> is a variable containing mean recurrence intervals;
5329    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
5330
5331Examples:
5332    PEAKS OVER THRESHOLD PLOT Y
5333    PEAKS OVER THRESHOLD PLOT Y R
5334    PEAKS OVER THRESHOLD PLOT Y SUBSET TAG > 1
5335
5336Note:
5337    There are a number of methods for estimating the parameters
5338    for the generalized Pareto distribution.  To specify the
5339    method, enter the command
5340
5341         SET PEAKS OVER THRESHOLD METHOD <value>
5342
5343    where <value> is one of the following:
5344
5345         DEHAAN  - use the de Haan method (enter HELP DEHAAN
5346                   for the details of this method)
5347         CME     - use the conditional mean exceedance method
5348                   (enter HELP CME for the details of this method)
5349         PPCC    - use the PPCC (probability plot correlation
5350                   coefficient plot) to estimate gamma and a
5351                   probability plot to estimate the location and
5352                   scale parameters.  A 95% confidence interval
5353                   for the gamma parameter is obtained via the
5354                   bootstrap.  For details of these methods, enter
5355                   HELP PPCC PLOT, HELP PROBABILITY PLOT, and
5356                   HELP DISTRIBUTIONAL BOOTSTRAP).
5357
5358                   You can obtain more accurate estimates for
5359                   gamma by restricting the range for the PPCC
5360                   plot.  Enter the commands
5361
5362                      LET GAMMA1 = <lower limit>
5363                      LET GAMMA2 = <upper limit>
5364
5365                   One recommendation is to run the plot with the
5366                   default limits and then rerun it with tighter
5367                   limits based on the first plot (be sure to keep
5368                   them wide enough to accomodate the bootstrap
5369                   estimates).
5370
5371    Additional methods will be added in future releases of
5372    Dataplot.  The default is DEHAAN.
5373
5374Note:
5375    Since this command generates a large number of tables, it
5376    is typically desired to save them to file.  To do this,
5377    enter the commands
5378
5379       CAPTURE  POT.OUT
5380       PEAKS OVER THRESHOLD PLOT Y R
5381       END OF CAPTURE
5382
5383    You can alternatively choose to save the output in HTML,
5384    Latek, or RTF (Rich Text Format) formats.  For example,
5385
5386       CAPTURE  HTML POT.HTM
5387       PEAKS OVER THRESHOLD PLOT Y R
5388       END OF CAPTURE
5389
5390       CAPTURE  LATEX POT.TEK
5391       PEAKS OVER THRESHOLD PLOT Y R
5392       END OF CAPTURE
5393
5394       CAPTURE  RTF POT.RTF
5395       PEAKS OVER THRESHOLD PLOT Y R
5396       END OF CAPTURE
5397
5398    The HTML and Latex formats can incorporate the plot as
5399    well. For details, enter
5400
5401        HELP CAPTURE HTML
5402        HELP CAPTURE LATEX
5403
5404Note:
5405    Dataplot automatically writes the following values to the
5406    file dpst1f.dat (there is one row for each distinct value
5407    of the threshold, the following correspond to the columns
5408    in dpst1f.dat):
5409
5410        1. Number of points above the threshold
5411        2. The threshold
5412        3. The estimate of the shape parameter, gamma
5413        4. The estimate of the location parameter
5414        5. The estimate of the scale parameter
5415
5416    If mean recurrence intervals have been specified (see
5417    Syntax 2), Dataplot additionally writes the following values
5418    to the
5419    file dpst2f.dat:
5420
5421        1. Iteration
5422        2. Number of points above the threshold
5423        3. The threshold
5424        4. The requested mean recurrence interval
5425        5. The XR corresponding to the requested mean
5426           recurrence interval
5427        6. The load factor corresponding to the mean recurrence
5428           interval
5429
5430     Note that the last column, the load factor, is only printed
5431     if the SET LOAD FACTOR ON command is entered.  This load
5432     factor is
5433
5434           (XR/XR50)**2
5435
5436     A -99.0 is printed for mean recurrence intervals less than
5437     or equal to 50.
5438
5439     The purpose of writing these values to files is to allow
5440     you to perform additional analyses.  For example, you may
5441     want to plot the XR corresponding to the various return
5442     intervals.  This is demonstrated in the program example
5443     below.
5444
5445Note:
5446     Some sources reverse the sign in the definition of the
5447     generalized Pareto distribution.  For details, enter
5448     the command
5449
5450          HELP GEPPDF
5451
5452     If you use the reversed sign definition, then adjust the
5453     role of positive and negative values of gamma in the
5454     discussion above.
5455
5456Default:
5457    None
5458
5459Synonyms:
5460    POT is a synonym for PEAKS OVER THRESHOLD
5461
5462Related Commands:
5463    DEHAAN            = Compute the estimates for the parameters
5464                        of the generalized Pareto distribution
5465                        using the de Haan method.
5466    CME               = Compute the estimates for the parameters
5467                        of the generalized Pareto distribution
5468                        using the CME method.
5469    GEPPPF            = Computes the percent point function of
5470                        the generalized Pareto distribution.
5471    PPCC PLOT         = Generates a ppcc plot.
5472    PROBABILITY PLOT  = Generates a probability plot.
5473    DISTRIBUTIONAL    = Perform a bootstrap analysis for a
5474        BOOTSTRAP       univariate distribution.
5475    CME PLOT          = Generates a conditional mean exceedance plot.
5476
5477Reference:
5478    E. Simiu, N. A. Heckert, and T. Whalen (April, 1996). "Estimates
5479    of Hurricane Wind Speeds by the 'Peaks Over Threshold' Method",
5480    NIST Technical Note 1416.
5481
5482    E. Simiu and N. A. Heckert (March 1995). "Extreme Wind
5483    Distribution Tails: A 'Peak Over Threshold' Approach",
5484    NIST Building Science Series 174.
5485
5486    Alan Heckert, Emil Simiu, and Tim Whalen (April,1998).
5487    "Estimates of Hurricane Wind Speeds by the 'Peaks Over
5488    Threshold' Approach", Journal of Structural Engineering,
5489    pp. 445-449.
5490
5491    J. A. Lechner, E. Simiu, N. A. Heckert (1993). "Assessment of
5492    'peak over threshold' Methods for Estimating Extreme Value
5493    Distribution Tails", Structural Safety, 12, pp. 305-314.
5494
5495    E. Simiu and N. A. Heckert (1996). "Extreme Wind Distribution
5496    Tails: A 'Peaks Over Threshold' Approach", Journal of Structural
5497    Engineering, Vol. 122, No. 5, 1996.
5498
5499Applications:
5500    Extreme Value Analysis
5501
5502Implementation Date:
5503    2005/5
5504
5505Program:
5506    DIMENSION 40 COLUMNS
5507    SKIP 2
5508    READ PARAMETER MPOST550.DAT URATE
5509    SKIP 3
5510    READ MPOST550.DAT Y1 TO Y17
5511    .
5512    TITLE Peaks Over Threshold Plot (Milepost 550)CR()de Haan Method
5513    TITLE DISPLACEMENT 5
5514    Y1LABEL Gamma
5515    X1LABEL Number of Points Above Threshold
5516    TITLE CASE ASIS
5517    LABEL CASE ASIS
5518    LINE SOLID DOT DOT
5519    LINE THICKNESS 0.2 0.1 0.1
5520    .
5521    SET PEAKS OVER THRESHOLD ITERATIONS 50
5522    SET PEAKS OVER THRESHOLD PERIOD URATE
5523    SET PEAKS OVER THRESHOLD METHOD DEHAAN
5524    .
5525    LET R = DATA 25 50 100 200 500 1000
5526    .
5527    CAPTURE POT.OUT
5528    PEAKS OVER THRESHOLD PLOT Y17 R
5529    END OF CAPTURE
5530    .
5531    SKIP 0
5532    READ DPST2F.DAT ITER NPOINTS THRESH R2 XR
5533    .
5534    TITLE Mean Recurrence Intervals (Milepost 550)
5535    TITLE DISPLACEMENT 2
5536    Y1LABEL XR
5537    LINE SOLID ALL
5538    LINE THICKNESS 0.1 ALL
5539    .
5540    PLOT XR NPOINTS R2
5541    .
5542    CRLF ON
5543    MARGIN 87
5544    MOVE 87 88
5545    TEXT 1,000 - yr
5546    TEXT 500
5547    TEXT 200
5548    TEXT 100
5549    TEXT 50
5550    TEXT 25
5551
5552-----PEARSON CONTINGENCY COEFICIENT (LET)--------------------------------
5553
5554PEARSON CONTINGENCY COEFICIENT
5555
5556Name:
5557    PEARSON CONTINGENCY COEFICIENT (LET)
5558
5559Type:
5560    Let Subcommand
5561
5562Purpose:
5563    Compute Pearson's contingency coefficient for an RxC contingency
5564    table.
5565
5566Description:
5567    If we have N observations with two variables where each
5568    observation can be classified into one of R mutually exclusive
5569    categories for variable one and one of C mutually exclusive
5570    categories for variable two, then a cross-tabulation of the
5571    data results in a two-way contingency table (also referred to
5572    as an RxC contingency table).  The resulting contingency table
5573    has R rows and C columns.
5574
5575    A common question with regards to a two-way contingency
5576    table is whether we have independence.  By independence, we
5577    mean that the row and column variables are unassociated
5578    (i.e., knowing the value of the row variable will not
5579    help us predict the value of column variable and likewise
5580    knowing the value of the column variable will not help us
5581    predict the value of the row variable).
5582
5583    A more technical definition for independence is that
5584
5585        P(row i, column j) = P(row i)*P(column j)   for all i,j
5586
5587    The standard test statistic for determing independence is
5588    the chi-square test statistic:
5589
5590        T = SUM[i=1 to r][j=1 to c][(O(ij) - E(ij)**2/E(ij)]
5591
5592    where
5593
5594       r     = the number of rows in the contingency table
5595       c     = the number of columns in the contingency table
5596       O(ij) = the observed frequency of the ith row and
5597               jth column
5598       E(ij) = the expected frequency of the ith row and
5599               jth column
5600             = R(i)*C(j)/N
5601       R(i)  = the sum of the observed frequencies for row i
5602       C(j)  = the sum of the observed frequencies for column j
5603       N     = the total sample size
5604
5605    One criticism of this statistic is that it does not give a
5606    meaningful description of the degree of dependence (or strength of
5607    association).   That is, it is useful for determining whether there
5608    is dependence. However, since the strength of that association also
5609    depends on the degrees of freedom as well as the value of the test
5610    statistic, it is not easy to interpert the strength of association.
5611
5612    The Pearson's contingency coefficient is one method to provide an
5613    easier to interpret measure of strength of association.  Specifically,
5614    it is:
5615
5616       Pearson's Coefficient = SQRT(T/(N+T))
5617
5618    where
5619
5620       T   = the chi-square test statistic given above
5621       N   = the total sample size
5622
5623    So this statistic basically scales the chi-square statistic to
5624    a value between 0 (no association) and 1 (maximum association).
5625    It has the desirable property of scale invariance.  That is,
5626    if the sample size increases, the value of Pearson's contingency
5627    coefficient does not change as long as values in the table change
5628    the same relative to each other.
5629
5630    The data for the contingency table can be specified in either of
5631    the following two ways:
5632
5633        1) raw data
5634
5635           In this case, you will have two variables.  The first
5636           will contain r distinct values and the second will contain
5637           c distinct values.  Dataplot will automatically perform the
5638           cross-tabulation to obtain the counts for each cell.  Although
5639           the distinct values will typically be integers, this is not
5640           strictly required.
5641
5642        2) table data
5643
5644           If you only have the resulting contingency table (i.e., the
5645           counts for each cell), then you can use the READ MATRIX (or
5646           CREATE MATRIX) command to create a matrix with the data.  This
5647           is demonstrated in the example program below.
5648
5649           In this case, your data should contain non-negative integers
5650           since they represent the counts for each cell.
5651
5652Syntax 1:
5653    LET <par> = PEARSON CONTINGENCY COEFICIENT <y1> <y2>
5654                              <SUBSET/EXCEPT/FOR qualification>
5655    where <y1> is the first  response variable;
5656          <y2> is the second response variable;
5657          <par> is a parameter where the computed Pearson contingency
5658               coefficient is stored;
5659    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
5660
5661    Use this syntax for raw data.
5662
5663Syntax 2:
5664    LET <par> = MATRIX GRAND PEARSON CONTINGENCY COEFICIENT <y1> <y2>
5665                              <SUBSET/EXCEPT/FOR qualification>
5666    where <m> is a matrix containing the contingency table;
5667          <par> is a parameter where the computed Pearson contingency
5668               coefficient is stored;
5669    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
5670
5671    Use this syntax if your data is a contingency table.
5672
5673Examples:
5674    LET A = PEARSON CONTINGENCY COEFICIENT Y1 Y2
5675    LET A = MATRIX GRAND PEARSON CONTINGENCY COEFICIENT M
5676
5677Note:
5678    The Cramer contingency coefficient is more commonly used
5679    than the Pearson contingency coefficient.
5680
5681Note:
5682    For the raw data case, the two variables should have the same
5683    number of elements.
5684
5685Note:
5686    The following additional commands are supported
5687
5688        TABULATE PEARSON CONTINGENCY COEFICIENT  Y1 Y2 X
5689        CROSS TABULATE PEARSON CONTINGENCY COEFICIENT Y1 Y2 X1 X2
5690
5691        PEARSON CONTINGENCY COEFICIENT PLOT Y1 Y2 X
5692        CROSS TABULATE PEARSON CONTINGENCY COEFICIENT PLOT Y1 Y2 X1 X2
5693
5694        BOOTSTRAP PEARSON CONTINGENCY COEFICIENT PLOT Y1 Y2
5695        JACKNIFE  PEARSON CONTINGENCY COEFICIENT PLOT Y1 Y2
5696
5697    Note that the above commands expect the variables to have
5698    the same number of observations.
5699
5700    Note that the above commands are only available if you have
5701    raw data.
5702
5703Default:
5704    None
5705
5706Synonyms:
5707    None
5708
5709Related Commands:
5710    CHI-SQUARE INDEPENDENCE TEST     = Perform a chi-square test for
5711                                       independence.
5712    CRAMER CONTINGENCY COEFFICIENT   = Compute Cramer's contingency
5713                                       coefficient.
5714    ASSOCIATION PLOT                 = Generate an association plot.
5715    SIEVE PLOT                       = Generate a sieve plot.
5716    ODDS RATIO INDEPENDENCE TEST     = Perform a log(odds ratio) test for
5717                                       independence.
5718    FISHER EXACT TEST                = Perform Fisher's exact test.
5719    ROSE PLOT                        = Generate a Rose plot.
5720    BINARY TABULATION PLOT           = Generate a binary tabulation plot.
5721    ROC CURVE                        = Generate a ROC curve.
5722    ODDS RATIO                       = Compute the bias corrected odds
5723                                       ratio.
5724    LOG ODDS RATIO                   = Compute the bias corrected
5725                                       log(odds ratio).
5726
5727Reference:
5728    Conover (1999), "Practical Nonparametric Statistics",
5729    Third Edition, Wiley, pp. 229-230.
5730
5731    Friendly (2000), "Visualizing Categorical Data", SAS Institute
5732    Inc., p. 61.
5733
5734Applications:
5735    Categorical Data Analysis
5736
5737Implementation Date:
5738    2007/5
5739
5740Program:
5741    . Sample data from page 61 of Friendly
5742    read matrix m
5743     5  29 14 16
5744    15  54 14 10
5745    20  84 17 94
5746    68 119 26 7
5747    end of data
5748    .
5749    let a = matrix pearson contingency coefficient m
5750
5751-----PEARSON DISSIMILARITY (LET)--------------------------------
5752
5753PEARSON DISSIMILARITY
5754
5755Name:
5756    PEARSON DISSIMILARITY (LET)
5757    PEARSON SIMILARITY (LET)
5758
5759Type:
5760    Let Subcommand
5761
5762Purpose:
5763    Compute the Pearson correlation coefficient transformed to a
5764    dissimilarity measure between two variables.
5765
5766Description:
5767    The correlation coefficient is a measure of the linear relationship
5768    between two variables.  It is computed as:
5769
5770         Sxx = SUM[i=1 to N][(X(i)-XMEAN)**2]
5771         Syy = SUM[i=1 to N]([Y(i)-YMEAN)**2]
5772         Sxy = SUM[i=1 to N][(X(i)-XMEAN)*(Y(i)-YMEAN)]
5773         r = Sxy/SQRT(Sxx*Syy)
5774
5775    A perfect linear relationship yields a correlation coefficient of
5776    +1 (or -1 for a negative relationship) and no linear relationship
5777    yields a correlation coefficient of 0.
5778
5779    In some applications, such as clustering, it can be useful to
5780    transform the correlation coefficient to a dissimilarity measure.
5781    The transformation used here is
5782
5783        d = (1 - r)/2
5784
5785    This converts the correlation coefficient with values between -1 and
5786    1 to a score between 0 and 1.  High positive correlation (i.e., very
5787    similar) results in a dissimilarity near 0 and high negative
5788    correlation (i.e., very dissimilar) results in a dissimilarity near 1.
5789
5790    If a similarity score is preferred, you can use
5791
5792        s = 1 - d
5793
5794    where d is defined as above.
5795
5796Syntax 1:
5797    LET <par> = PEARSON DISSIMILARITY <y1> <y2>
5798                <SUBSET/EXCEPT/FOR qualification>
5799    where <y1> is the first  response variable;
5800          <y2> is the second response variable;
5801          <par> is a parameter where the computed Pearson dissimilarity
5802               is stored;
5803    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
5804
5805Syntax 2:
5806    LET <par> = PEARSON SIMILARITY <y1> <y2>
5807                <SUBSET/EXCEPT/FOR qualification>
5808    where <y1> is the first  response variable;
5809          <y2> is the second response variable;
5810          <par> is a parameter where the computed Pearson similarity
5811               is stored;
5812    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
5813
5814Examples:
5815    LET A = PEARSON DISSIMILARITY Y1 Y2
5816    LET A = PEARSON DISSIMILARITY Y1 Y2 SUBSET TAG > 2
5817    LET A = PEARSON SIMILARITY Y1 Y2
5818
5819Note:
5820    The two variables must have the same number of elements.
5821
5822Default:
5823    None
5824
5825Synonyms:
5826    PEARSON DISTANCE is a synonym for PEARSON DISSIMILARITY
5827
5828Related Commands:
5829    CORRELATION               = Compute the Pearson correlation of two
5830                                variables.
5831    SPEARMAN DISSIMILARITY    = Compute the dissimilarity of two variables
5832                                based on Spearman's rank correlation.
5833    KENDALL TAU DISSIMILARITY = Compute the dissimilarity of two variables
5834                                based on Kendall's tau correlation.
5835    COSINE DISTANCE           = Compute the cosine distance.
5836    MANHATTAN DISTANCE        = Compute the Euclidean distance.
5837    EUCLIDEAN DISTANCE        = Compute the Euclidean distance.
5838    MATRIX DISTANCE           = Compute various distance metrics for a
5839                                matrix.
5840    GENERATE MATRIX <stat>    = Compute a matrix of pairwise statistic
5841                                values.
5842    CLUSTER                   = Perform a cluster analysis.
5843
5844Reference:
5845    Kaufman and Rousseeuw (1990), "Finding Groups in Data: An
5846    Introduction To Cluster Analysis", Wiley.
5847
5848Applications:
5849    Clustering
5850
5851Implementation Date:
5852    2017/08:
5853    2018/10: Added PEARSON SIMILARITY
5854
5855Program 1:
5856    SKIP 25
5857    READ BERGER1.DAT Y X
5858    LET CORR = CORRELATION Y X
5859    LET D    = PEARSON DISSIMILARITY Y X
5860    SET WRITE DECIMALS 3
5861    PRINT CORR D
5862
5863Program 2:
5864    SKIP 25
5865    READ IRIS.DAT Y1 Y2 Y3 Y4
5866    SET WRITE DECIMALS 3
5867    .
5868    LET M = GENERATE MATRIX PEARSON DISSIMILARITY Y1 Y2 Y3 Y4
5869    PRINT M
5870
5871Program 3:
5872    SKIP 25
5873    READ IRIS.DAT Y1 Y2 Y3 Y4 TAG
5874    .
5875    CASE ASIS
5876    TITLE CASE ASIS
5877    TITLE OFFSET 2
5878    LABEL CASE ASIS
5879    TIC MARK OFFSET UNITS DATA
5880    YLIMITS 0 1
5881    MAJOR YTIC MARK NUMBER 6
5882    MINOR YTIC MARK NUMBER 1
5883    Y1TIC MARK LABEL DECIMAL 1
5884    Y1LABEL DISPLACEMENT 20
5885    X1LABEL Species
5886    XLIMITS 1 3
5887    MAJOR XTIC MARK NUMBER 3
5888    MINOR XTIC MARK NUMBER 0
5889    XTIC MARK OFFSET 0.3 0.3
5890    X1LABEL DISPLACEMENT 14
5891    CHARACTER X BLANK
5892    LINES BLANK SOLID
5893    .
5894    MULTIPLOT CORNER COORDINATES 5 5 95 95
5895    MULTIPLOT SCALE FACTOR 2
5896    MULTIPLOT 2 3
5897    .
5898    TITLE Sepal Length vs Sepal Width
5899    CORRELATION PLOT Y1 Y2 TAG
5900    .
5901    TITLE Sepal Length vs Petal Length
5902    CORRELATION PLOT Y1 Y3 TAG
5903    .
5904    TITLE Sepal Length vs Petal Width
5905    CORRELATION PLOT Y1 Y4 TAG
5906    .
5907    TITLE Sepal Width vs Petal Length
5908    CORRELATION PLOT Y2 Y3 TAG
5909    .
5910    TITLE Sepal Width vs Petal Width
5911    CORRELATION PLOT Y2 Y4 TAG
5912    .
5913    TITLE Petal Length vs Petal Width
5914    CORRELATION PLOT Y3 Y4 TAG
5915    .
5916    END OF MULTIPLOT
5917    .
5918    JUSTIFICATION CENTER
5919    MOVE 50 97
5920    TEXT Pearson Dissimilarity Coefficient
5921
5922-----PEDESTAL-------------------------------------------------------
5923
5924PEDESTAL
5925
5926Note:
5927    THIS COMMAND IS NOT CURRENTLY OPERATIONAL!!!!
5928
5929Name:
5930    PEDESTAL
5931
5932Type:
5933    Plot Control Command
5934
5935Purpose:
5936    Specifies whether or not a pedestal will appear on subsequent
5937    3-d plots (as generated via the 3D-PLOT command).
5938
5939Description:
5940    A pedestal is a base upon which 3-dimensional surfaces may rest.
5941    It is the preferred representation of 3-d surfaces by some
5942    analysts.
5943
5944Syntax:
5945    PEDESTAL   <ON or OFF>
5946    where ON specifies that the pedestal will be generated while OFF
5947             specifies that it will not.
5948
5949Examples:
5950    PEDESTAL ON
5951    PEDESTAL OFF
5952    PEDESTAL
5953
5954Default:
5955    Off
5956
5957Synonyms:
5958    None
5959
5960Related Commands:
5961    3D-PLOT            = Generates a 3-d data or function plot.
5962    EYE COORDINATES    = Sets the location of the eye for 3-d plots.
5963    PEDESTAL COLOR     = Sets the pedestal color for 3-d plots.
5964    PEDESTAL SIZE      = Sets the pedestal height for 3-d plots.
5965    VISIBLE            = Allows/suppress hidden lines in 3-d plots.
5966
5967Applications:
5968    3D plots
5969
5970Implementation Date:
5971    XX
5972
5973Program:
5974    XX
5975
5976-----PEDESTAL COLOR----------------------------------------------------
5977
5978PEDESTAL COLOR
5979
5980Note:
5981    The PEDESTAL command is not currently operational, so this command
5982    has no effect.
5983
5984Name:
5985    PEDESTAL COLOR
5986
5987Type:
5988    Plot Control Command
5989
5990Purpose:
5991    Specifies the color of the lines which constitute the pedestal in
5992    subsequent 3-d plots.
5993
5994Syntax:
5995    PEDESTAL COLOR  <color>
5996    where <color> specifies the desired color.
5997
5998Examples:
5999    PEDESTAL COLOR GREEN
6000    PEDESTAL COLOR YELLOW
6001    PEDESTAL COLOR
6002
6003Note:
6004    The PEDESTAL COLOR command with no arguments reverts the pedestal
6005    color to default.
6006
6007Default:
6008    The default is black (but the default is for the pedestal lines
6009    themselves to be off.)
6010
6011Synonyms:
6012    None
6013
6014Related Commands:
6015    PEDESTAL           = Allows/suppresses the pedestal for 3-d plots.
6016    PEDESTAL SIZE      = Sets the pedestal height for 3-d plots.
6017    3D-PLOT            = Generates a 3-d data or function plot.
6018    EYE COORDINATES    = Sets the location of eye for 3-d plots.
6019
6020Applications:
6021    XX
6022
6023Implementation Date:
6024    XX
6025
6026Program:
6027    XX
6028
6029-----PEDESTAL SIZE----------------------------------------------------
6030
6031PEDESTAL SIZE
6032
6033Note:
6034    The PEDESTAL command is not currently operational, so this command
6035    has no effect.
6036
6037Name:
6038    PEDESTAL SIZE
6039
6040Type:
6041    Plot Control Command
6042
6043Purpose:
6044    Specifies the vertical height of the pedestal in subsequent 3-d
6045    plots.
6046
6047Description:
6048    The size is in units of the vertical axis variable on the 3-d plot.
6049
6050Syntax:
6051    PEDESTAL SIZE   <size>
6052    where <size> is a number or parameter in units of the 3-d vertical
6053             axis variable that specifies the size.
6054
6055Examples:
6056    PEDESTAL SIZE 2000
6057    PEDESTAL SIZE 4500
6058    PEDESTAL SIZE 0.0025
6059
6060Default:
6061    The default size is (zmax - zmin) where
6062       zmax = the data maximum for the vertical axis variable;
6063       zmin = the data minimum for the vertical axis variable.
6064
6065Synonyms:
6066    None
6067
6068Related Commands:
6069    PEDESTAL           = Allows/suppresses the pedestal for 3-d plots.
6070    PEDESTAL COLOR     = Sets the pedestal color for 3-d plots.
6071    3D-PLOT            = Generates a 3-d data or function plot.
6072    EYE COORDINATES    = Sets the location of the eye for 3-d plots.
6073
6074Applications:
6075    XX
6076
6077Implementation Date:
6078    XX
6079
6080Program:
6081    XX
6082
6083-----PEN MAP-------------------------------------------------------
6084
6085PEN MAP
6086
6087Name:
6088    PEN MAP
6089
6090Type:
6091    Output Devices Command
6092
6093Purpose:
6094    Allows the mapping of colors to pen slots to be defined by
6095    the user for selected pen plotters.
6096
6097Description:
6098    Pen plotters allow different color pens to be loaded into each pen
6099    slot.  Previously, the color to pen slot mapping was hard coded in
6100    DATAPLOT.  The PEN MAP allows the user to re-define the default
6101    mapping for the HP-GL, ZETA, and CALCOMP devices.
6102
6103    For each of the supported devices, up to 16 pens can be defined.
6104    Also, specifying "LIST/SHOW/PRINT" for the color will print the
6105    current mapping and "DEFAULT" will reset the default mapping.
6106
6107    DATAPLOT also supports the Tektronix 4662 and HP 7221 plotters.
6108    However, these are now essentially obsolete, so they are not
6109    supported with this command.
6110
6111Syntax 1:
6112    <device> PEN MAP <color> <index>
6113    where <device> is one of the following:
6114             HPGL     - for HPGL plotters
6115             CALCOMP  - for CALCOMP plotters
6116             ZETA     - for Zeta plotters;
6117         <color> is a character string that specifies one of the
6118             colors available on the plotter;
6119    and  <index> is an integer number or parameter between 1 and 16.
6120
6121Syntax 2:
6122    <device> PEN MAP <keyword>
6123    where <device> is one of the following:
6124             HPGL     - for HPGL plotters
6125             CALCOMP  - for CALCOMP plotters
6126             ZETA     - for Zeta plotters;
6127    and  <keyword> is one of the following:
6128             LIST     - print the current mapping
6129             SHOW     - print the current mapping
6130             PRINT    - print the current mapping
6131             DEFAULT  - reset the default mapping.
6132
6133Examples:
6134    HPGL PEN MAP DEFAULT
6135    HPGL PEN MAP SHOW
6136    HPGL PEN MAP RED 4
6137    CALCOMP PEN MAP BLUE 2
6138    ZETA PEN MAP GREEN 4
6139
6140Note:
6141    If a color is defined more than once, it is mapped to lowest pen
6142    slot.
6143
6144Note:
6145    In earlier versions of DATAPLOT, specifying a color by index
6146    would cause penplotters to use the slot corresponding to the index
6147    number (i.e., color 1 would go to slot 1).  However, to make the
6148    use of color names and color indices consistent across devices,
6149    an index now maps to a specific color (e.g., color 1 maps to
6150    black).  This color is then mapped to a particular slot number
6151    (which is not necessarily the same as the index number).  To see
6152    the default color to slot mapping, enter one of the following
6153    DATAPLOT commands:
6154        SHOW COLORS CALCOMP
6155        SHOW COLORS ZETA
6156        SHOW COLORS HPGL
6157    The PEN MAP command can be used to override the default color to
6158    slot mapping.
6159
6160Note:
6161    If your plotter always has the same color pens in the same slots
6162    with an order different than the default DATAPLOT order, then a
6163    series of PEN MAP commands can be placed in the start-up file
6164    DPLOGF.DAT.
6165
6166Default:
6167    The following is the default color to slot mapping for an eight
6168    slot penplotter:
6169        BLACK       1
6170        RED         2
6171        BLUE        3
6172        GREEN       4
6173        MAGENTA     5
6174        ORANGE      6
6175        CYAN        7
6176        YELLOW      8
6177
6178Synonyms:
6179    None
6180
6181Related Commands:
6182    SHOW COLORS    = Print the available colors.
6183
6184Applications:
6185    XX
6186
6187Implementation Date:
6188    90/6
6189
6190Program:
6191    HPGL PEN MAP BLACK 1
6192    HPGL PEN MAP BLUE   2
6193    HPGL PEN MAP GREEN  3
6194    HPGL PEN MAP RED 4
6195
6196-----PEQ (LET)----------------------------------------------
6197
6198PEQ
6199
6200Name:
6201    PEQ (LET)
6202
6203Type:
6204    Library Function
6205
6206Purpose:
6207    Compute the real component of the Weierstrass P elliptic function
6208    of a complex number (equianharmonic case with unit period
6209    parallelogram).
6210
6211Description:
6212    The Weierstrass elliptic function is described in detail in the
6213    Handbook of Mathematical Functions (see REFERENCE section below).
6214
6215Syntax:
6216    LET <a> = PEQ(<xr>,<xc>)  <SUBSET/EXCEPT/FOR qualification>
6217    where <xr> is a number, parameter, or variable that specifies the
6218              the real component of the input;
6219          <xc> is a number, parameter, or variable that specifies the
6220              the complex component of the input;
6221          <a> is a variable or a parameter (depending on what <xr> and
6222               <xc> are) where the computed values are stored;
6223    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
6224
6225Examples:
6226    LET A = PEQ(2,1)
6227    LET A = PEQ(X,4)
6228    LET X2 = PEQ(1,Y)
6229
6230Note:
6231    The Weierstrass elliptic functions are computed using algorithm
6232    549 from the ACM Transactions on Mathematical Software (see the
6233    REFERENCE section below).
6234
6235Note:
6236    If the input value corresponds to a lattice point, an error
6237    message is printed and the output value is set to the largest
6238    real number on the machine.
6239
6240Note:
6241    Library functions are distinguished from let subcommands
6242    in the following ways.
6243    1) Functions enclose the input value in parenthesis.  Let
6244       subcommands use spaces.
6245    2) Functions can accept (and return) either parameters
6246       (i.e., single values) or variables (i.e., an array of
6247       values) while let subcommands are specific in which they
6248       accept as input and what they return as output.
6249    3) Functions can accept expressions while let subcommands
6250       do not.  For example, the following is legal:
6251           LET Y2 = ABS(Y1-INT(Y1))
6252       For let subcommands, you typically have to do something
6253       like the following:
6254           LET YTEMP = Y**2 + 8
6255           LET A = SUM YTEMP
6256
6257Default:
6258    None
6259
6260Synonyms:
6261    None
6262
6263Related Commands:
6264    PEQI    = Compute the complex component of the Weierstrass elliptic
6265              function (equianharmonic case).
6266    PEQ1    = Compute the real component of the first derivative of
6267              the Weierstrass elliptic function (equianharmonic case).
6268    PEQ1I   = Compute the complex component of the first derivative of
6269              the Weierstrass elliptic function (equianharmonic case).
6270    PLEM    = Compute the real component of the Weierstrass elliptic
6271              function (lemniscatic case).
6272    PLEMI   = Compute the complex component of the Weierstrass elliptic
6273              function (lemniscatic case).
6274    PLEM1   = Compute the real component of the first derivative of
6275              the Weierstrass elliptic function (lemniscatic case).
6276    PLEM1I  = Compute the complex component of the first derivative of
6277              the Weierstrass elliptic function (lemniscatic case).
6278    SN      = Compute the Jacobi elliptic function sn.
6279    CN      = Compute the Jacobi elliptic function cn.
6280    DN      = Compute the Jacobi elliptic function dn.
6281    RF      = Compute the Carlson elliptic integral of the first kind.
6282    RD      = Compute the Carlson elliptic integral of the second kind.
6283    RJ      = Compute the Carlson elliptic integral of the third kind.
6284    ELLIPC1 = Compute the Legendre complete elliptic integral of the
6285              first kind.
6286    ELLIPC2 = Compute the Legendre complete elliptic integral of the
6287              second kind.
6288    ELLIP1  = Compute the Legendre elliptic integral of the first
6289              kind.
6290    ELLIP2  = Compute the Legendre elliptic integral of the second
6291              kind.
6292    ELLIP3  = Compute the Legendre's elliptic integral of the third
6293              kind.
6294
6295Reference:
6296    "Algorithm 549: Weierstrass' Elliptic Functions", Eckhardt, ACM
6297    Transactions on Mathematical Software, vol. 6 (pp. 112-120).
6298
6299    "Handbook of Mathematical Functions, Applied Mathematics Series,
6300    Vol. 55", Abramowitz and Stegun, National Bureau of Standards,
6301    1964 (chapter 18).
6302
6303Applications:
6304    Special Functions
6305
6306Implementation Date:
6307    94/11
6308
6309Program:
6310    TITLE WEIERSTRASS ELLIPTIC FUNCTIONS
6311    LINE SOLID DASH
6312    PLOT PEQ(X,0.5) FOR X = 0 0.01 5 AND
6313    PLOT PEQI(X,0.5) FOR X = 0 0.01 5
6314
6315-----PEQI (LET)----------------------------------------------
6316
6317PEQI
6318
6319Name:
6320    PEQI (LET)
6321
6322Type:
6323    Library Function
6324
6325Purpose:
6326    Compute the complex component of the Weierstrass P elliptic
6327    function of a complex number (equianharmonic case with unit period
6328    parallelogram).
6329
6330Description:
6331    The Weierstrass elliptic function is described in detail in the
6332    Handbook of Mathematical Functions (see REFERENCE section below).
6333
6334Syntax:
6335    LET <a> = PEQI(<xr>,<xc>)  <SUBSET/EXCEPT/FOR qualification>
6336    where <xr> is a number, parameter, or variable that specifies the
6337              the real component of the input;
6338          <xc> is a number, parameter, or variable that specifies the
6339              the complex component of the input;
6340          <a> is a variable or a parameter (depending on what <xr> and
6341               <xc> are) where the computed values are stored;
6342    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
6343
6344Examples:
6345    LET A = PEQI(2,1)
6346    LET A = PEQI(X,4)
6347    LET X2 = PEQI(1,Y)
6348
6349Note:
6350    The Weierstrass elliptic functions are computed using algorithm
6351    549 from the ACM Transactions on Mathematical Software (see the
6352    REFERENCE section below).
6353
6354Note:
6355    If the input value corresponds to a lattice point, an error
6356    message is printed and the output value is set to the largest
6357    real number on the machine.
6358
6359Note:
6360    Library functions are distinguished from let subcommands
6361    in the following ways.
6362    1) Functions enclose the input value in parenthesis.  Let
6363       subcommands use spaces.
6364    2) Functions can accept (and return) either parameters
6365       (i.e., single values) or variables (i.e., an array of
6366       values) while let subcommands are specific in which they
6367       accept as input and what they return as output.
6368    3) Functions can accept expressions while let subcommands
6369       do not.  For example, the following is legal:
6370           LET Y2 = ABS(Y1-INT(Y1))
6371       For let subcommands, you typically have to do something
6372       like the following:
6373           LET YTEMP = Y**2 + 8
6374           LET A = SUM YTEMP
6375
6376Default:
6377    None
6378
6379Synonyms:
6380    None
6381
6382Related Commands:
6383    PEQ     = Compute the real component of the Weierstrass elliptic
6384              function (equianharmonic case).
6385    PEQ1    = Compute the real component of the first derivative of
6386              the Weierstrass elliptic function (equianharmonic case).
6387    PEQ1I   = Compute the complex component of the first derivative of
6388              the Weierstrass elliptic function (equianharmonic case).
6389    PLEM    = Compute the real component of the Weierstrass elliptic
6390              function (lemniscatic case).
6391    PLEMI   = Compute the complex component of the Weierstrass elliptic
6392              function (lemniscatic case).
6393    PLEM1   = Compute the real component of the first derivative of
6394              the Weierstrass elliptic function (lemniscatic case).
6395    PLEM1I  = Compute the complex component of the first derivative of
6396              the Weierstrass elliptic function (lemniscatic case).
6397    SN      = Compute the Jacobi elliptic function sn.
6398    CN      = Compute the Jacobi elliptic function cn.
6399    DN      = Compute the Jacobi elliptic function dn.
6400    RF      = Compute the Carlson elliptic integral of the first kind.
6401    RD      = Compute the Carlson elliptic integral of the second kind.
6402    RJ      = Compute the Carlson elliptic integral of the third kind.
6403    ELLIPC1 = Compute the Legendre complete elliptic integral of the
6404              first kind.
6405    ELLIPC2 = Compute the Legendre complete elliptic integral of the
6406              second kind.
6407    ELLIP1  = Compute the Legendre elliptic integral of the first
6408              kind.
6409    ELLIP2  = Compute the Legendre elliptic integral of the second
6410              kind.
6411    ELLIP3  = Compute the Legendre's elliptic integral of the third
6412              kind.
6413
6414Reference:
6415    "Algorithm 549: Weierstrass' Elliptic Functions", Eckhardt, ACM
6416    Transactions on Mathematical Software, vol. 6 (pp. 112-120).
6417
6418    "Handbook of Mathematical Functions, Applied Mathematics Series,
6419    Vol. 55", Abramowitz and Stegun, National Bureau of Standards,
6420    1964 (chapter 18).
6421
6422Applications:
6423    Special Functions
6424
6425Implementation Date:
6426    94/11
6427
6428Program:
6429    TITLE WEIERSTRASS ELLIPTIC FUNCTIONS
6430    LINE SOLID DASH
6431    PLOT PEQI(X,0.5) FOR X = 0 0.01 5 AND
6432    PLOT PEQ(X,0.5) FOR X = 0 0.01 5
6433
6434-----PEQ1 (LET)----------------------------------------------
6435
6436PEQ1
6437
6438Name:
6439    PEQ1 (LET)
6440
6441Type:
6442    Library Function
6443
6444Purpose:
6445    Compute the real component of the first derivative of the
6446    Weierstrass P elliptic function of a complex number (equianharmonic
6447    case with unit period parallelogram).
6448
6449Description:
6450    The Weierstrass elliptic function is described in detail in the
6451    Handbook of Mathematical Functions (see REFERENCE section below).
6452
6453Syntax:
6454    LET <a> = PEQ1(<xr>,<xc>)  <SUBSET/EXCEPT/FOR qualification>
6455    where <xr> is a number, parameter, or variable that specifies the
6456              the real component of the input;
6457          <xc> is a number, parameter, or variable that specifies the
6458              the complex component of the input;
6459          <a> is a variable or a parameter (depending on what <xr> and
6460               <xc> are) where the computed values are stored;
6461    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
6462
6463Examples:
6464    LET A = PEQ1(2,1)
6465    LET A = PEQ1(X,4)
6466    LET X2 = PEQ1(1,Y)
6467
6468Note:
6469    The Weierstrass elliptic functions are computed using algorithm
6470    549 from the ACM Transactions on Mathematical Software (see the
6471    REFERENCE section below).
6472
6473Note:
6474    If the input value corresponds to a lattice point, an error
6475    message is printed and the output value is set to the largest
6476    real number on the machine.
6477
6478Note:
6479    Library functions are distinguished from let subcommands
6480    in the following ways.
6481    1) Functions enclose the input value in parenthesis.  Let
6482       subcommands use spaces.
6483    2) Functions can accept (and return) either parameters
6484       (i.e., single values) or variables (i.e., an array of
6485       values) while let subcommands are specific in which they
6486       accept as input and what they return as output.
6487    3) Functions can accept expressions while let subcommands
6488       do not.  For example, the following is legal:
6489           LET Y2 = ABS(Y1-INT(Y1))
6490       For let subcommands, you typically have to do something
6491       like the following:
6492           LET YTEMP = Y**2 + 8
6493           LET A = SUM YTEMP
6494
6495Default:
6496    None
6497
6498Synonyms:
6499    None
6500
6501Related Commands:
6502    PEQ     = Compute the real component of the Weierstrass elliptic
6503              function (equianharmonic case).
6504    PEQI    = Compute the complex component of the Weierstrass elliptic
6505              function (equianharmonic case).
6506    PEQ1I   = Compute the complex component of the first derivative of
6507              the Weierstrass elliptic function (equianharmonic case).
6508    PLEM    = Compute the real component of the Weierstrass elliptic
6509              function (lemniscatic case).
6510    PLEMI   = Compute the complex component of the Weierstrass elliptic
6511              function (lemniscatic case).
6512    PLEM1   = Compute the real component of the first derivative of
6513              the Weierstrass elliptic function (lemniscatic case).
6514    PLEM1I  = Compute the complex component of the first derivative of
6515              the Weierstrass elliptic function (lemniscatic case).
6516    SN      = Compute the Jacobi elliptic function sn.
6517    CN      = Compute the Jacobi elliptic function cn.
6518    DN      = Compute the Jacobi elliptic function dn.
6519    RF      = Compute the Carlson elliptic integral of the first kind.
6520    RD      = Compute the Carlson elliptic integral of the second kind.
6521    RJ      = Compute the Carlson elliptic integral of the third kind.
6522    ELLIPC1 = Compute the Legendre complete elliptic integral of the
6523              first kind.
6524    ELLIPC2 = Compute the Legendre complete elliptic integral of the
6525              second kind.
6526    ELLIP1  = Compute the Legendre elliptic integral of the first
6527              kind.
6528    ELLIP2  = Compute the Legendre elliptic integral of the second
6529              kind.
6530    ELLIP3  = Compute the Legendre's elliptic integral of the third
6531              kind.
6532
6533Reference:
6534    "Algorithm 549: Weierstrass' Elliptic Functions", Eckhardt, ACM
6535    Transactions on Mathematical Software, vol. 6 (pp. 112-120).
6536
6537    "Handbook of Mathematical Functions, Applied Mathematics Series,
6538    Vol. 55", Abramowitz and Stegun, National Bureau of Standards,
6539    1964 (chapter 18).
6540
6541Applications:
6542    Special Functions
6543
6544Implementation Date:
6545    94/11
6546
6547Program:
6548    TITLE WEIERSTRASS ELLIPTIC FUNCTIONS
6549    LINE SOLID DASH
6550    PLOT PEQ1(X,0.5) FOR X = 0 0.01 5 AND
6551    PLOT PEQ1I(X,0.5) FOR X = 0 0.01 5
6552
6553-----PEQ1I (LET)----------------------------------------------
6554
6555PEQ1I
6556
6557Name:
6558    PEQ1I (LET)
6559
6560Type:
6561    Library Function
6562
6563Purpose:
6564    Compute the complex component of the first derivative of the
6565    Weierstrass P elliptic function of a complex number (equianharmonic
6566    case with unit period parallelogram).
6567
6568Description:
6569    The Weierstrass elliptic function is described in detail in the
6570    Handbook of Mathematical Functions (see REFERENCE section below).
6571
6572Syntax:
6573    LET <a> = PEQ1I(<xr>,<xc>)  <SUBSET/EXCEPT/FOR qualification>
6574    where <xr> is a number, parameter, or variable that specifies the
6575              the real component of the input;
6576          <xc> is a number, parameter, or variable that specifies the
6577              the complex component of the input;
6578          <a> is a variable or a parameter (depending on what <xr> and
6579               <xc> are) where the computed values are stored;
6580    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
6581
6582Examples:
6583    LET A = PEQ1I(2,1)
6584    LET A = PEQ1I(X,4)
6585    LET X2 = PEQ1I(1,Y)
6586
6587Note:
6588    The Weierstrass elliptic functions are computed using algorithm
6589    549 from the ACM Transactions on Mathematical Software (see the
6590    REFERENCE section below).
6591
6592Note:
6593    If the input value corresponds to a lattice point, an error
6594    message is printed and the output value is set to the largest
6595    real number on the machine.
6596
6597Note:
6598    Library functions are distinguished from let subcommands
6599    in the following ways.
6600    1) Functions enclose the input value in parenthesis.  Let
6601       subcommands use spaces.
6602    2) Functions can accept (and return) either parameters
6603       (i.e., single values) or variables (i.e., an array of
6604       values) while let subcommands are specific in which they
6605       accept as input and what they return as output.
6606    3) Functions can accept expressions while let subcommands
6607       do not.  For example, the following is legal:
6608           LET Y2 = ABS(Y1-INT(Y1))
6609       For let subcommands, you typically have to do something
6610       like the following:
6611           LET YTEMP = Y**2 + 8
6612           LET A = SUM YTEMP
6613
6614Default:
6615    None
6616
6617Synonyms:
6618    None
6619
6620Related Commands:
6621    PEQ     = Compute the real component of the Weierstrass elliptic
6622              function (equianharmonic case).
6623    PEQI    = Compute the complex component of the Weierstrass elliptic
6624              function (equianharmonic case).
6625    PEQ1    = Compute the real component of the first derivative of
6626              the Weierstrass elliptic function (equianharmonic case).
6627    PLEM    = Compute the real component of the Weierstrass elliptic
6628              function (lemniscatic case).
6629    PLEMI   = Compute the complex component of the Weierstrass elliptic
6630              function (lemniscatic case).
6631    PLEM1   = Compute the real component of the first derivative of
6632              the Weierstrass elliptic function (lemniscatic case).
6633    PLEM1I  = Compute the complex component of the first derivative of
6634              the Weierstrass elliptic function (lemniscatic case).
6635    SN      = Compute the Jacobi elliptic function sn.
6636    CN      = Compute the Jacobi elliptic function cn.
6637    DN      = Compute the Jacobi elliptic function dn.
6638    RF      = Compute the Carlson elliptic integral of the first kind.
6639    RD      = Compute the Carlson elliptic integral of the second kind.
6640    RJ      = Compute the Carlson elliptic integral of the third kind.
6641    ELLIPC1 = Compute the Legendre complete elliptic integral of the
6642              first kind.
6643    ELLIPC2 = Compute the Legendre complete elliptic integral of the
6644              second kind.
6645    ELLIP1  = Compute the Legendre elliptic integral of the first
6646              kind.
6647    ELLIP2  = Compute the Legendre elliptic integral of the second
6648              kind.
6649    ELLIP3  = Compute the Legendre's elliptic integral of the third
6650              kind.
6651
6652Reference:
6653    "Algorithm 549: Weierstrass' Elliptic Functions", Eckhardt, ACM
6654    Transactions on Mathematical Software, vol. 6 (pp. 112-120).
6655
6656    "Handbook of Mathematical Functions, Applied Mathematics Series,
6657    Vol. 55", Abramowitz and Stegun, National Bureau of Standards,
6658    1964 (chapter 18).
6659
6660Applications:
6661    Special Functions
6662
6663Implementation Date:
6664    94/11
6665
6666Program:
6667    TITLE WEIERSTRASS ELLIPTIC FUNCTIONS
6668    LINE SOLID DASH
6669    PLOT PEQ1(X,0.5) FOR X = 0 0.01 5 AND
6670    PLOT PEQ1I(X,0.5) FOR X = 0 0.01 5
6671
6672-----PERCDIF (LET)--------------------------------
6673
6674PERCDIF
6675
6676Name:
6677    PERCDIF (LET)
6678
6679Type:
6680    Library Function
6681
6682Purpose:
6683    Return the percent difference of two numbers.
6684
6685Description:
6686    The definition of the percent difference between X1 and X2 used
6687    by Dataplot is:
6688
6689         Percent Difference = 100*ABS(X1 - X2)/MAX(ABS(X1),ABS(X2))
6690
6691    Dataplot also supports the alternative formula
6692
6693         Percent Difference = 100*ABS((X1 - X2)/((X1 + X2)/2))
6694
6695Syntax 1:
6696    LET <y> = PERCDIF(<y1>,<y2>)      <SUBSET/EXCEPT/FOR qualification>
6697    where <y1> is a variable or a parameter;
6698          <y2> is a variable or a parameter;
6699          <y>  is a variable or a parameter (depending on what <y1> and
6700               <y2> are) where the computed percent difference values
6701               are stored;
6702    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
6703
6704    This syntax implements the first formula given above (the
6705    denominator is the maximum of the two values).
6706
6707Syntax 2:
6708    LET <y> = PERCDIF2(<y1>,<y2>)      <SUBSET/EXCEPT/FOR qualification>
6709    where <y1> is a variable or a parameter;
6710          <y2> is a variable or a parameter;
6711          <y>  is a variable or a parameter (depending on what <y1> and
6712               <y2> are) where the computed percent difference values
6713               are stored;
6714    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
6715
6716    This syntax implements the second formula given above (the
6717    denominator is the average of the two values).
6718
6719Examples:
6720    LET A = PERCDIF(14,10)
6721    LET A = PERCDIF(A1,A2)
6722    LET X2 = PERCDIF(X1,X4)
6723    LET X2 = PERCDIF(X1-4,X2+6)
6724
6725Note:
6726    Library functions are distinguished from let subcommands
6727    in the following ways.
6728    1) Functions enclose the input value in parenthesis.  Let
6729       subcommands use spaces.
6730    2) Functions can accept (and return) either parameters
6731       (i.e., single values) or variables (i.e., an array of
6732       values) while let subcommands are specific in which they
6733       accept as input and what they return as output.
6734    3) Functions can accept expressions while let subcommands
6735       do not.  For example, the following is legal:
6736           LET Y2 = ABS(Y1-INT(Y1))
6737       For let subcommands, you typically have to do something
6738       like the following:
6739           LET YTEMP = Y**2 + 8
6740           LET A = SUM YTEMP
6741
6742Default:
6743    None
6744
6745Synonyms:
6746    None
6747
6748Related Commands:
6749    PERCERR  = Compute the percent error of two numbers.
6750    RELDIF   = Compute the relative difference of two numbers.
6751    RELERR   = Compute the relative error of two numbers.
6752    MIN      = Compute the minimum of two numbers.
6753    MAX      = Compute the maximum of two numbers.
6754    ABS      = Compute the absolute value of a number.
6755
6756Applications:
6757    Data Management
6758
6759Implementation Date:
6760    2010/12
6761
6762Program:
6763    LET X = SEQUENCE 0.1  0.1  3
6764    LET Y1 = X**2
6765    LET Y2 = X**(1/2)
6766    LET Y3 = PERCDIF(Y1,Y2)
6767    SET WRITE DECIMALS 5
6768    PRINT Y1 Y2 Y3
6769
6770-----PERCENT AGREE (LET)------------------------------------------------
6771
6772PERCENT AGREE
6773
6774Name:
6775    PERCENT AGREE (LET)
6776
6777Type:
6778    Let Subcommand
6779
6780Purpose:
6781    Compute the percentage of values that agree in two response
6782    variables.  This is pairwise agreement (i.e., how often does
6783    Y1(I) = Y2(I) for I = 1, ..., N).
6784
6785Description:
6786    Given two methods (or two labortories), it may sometimes be useful
6787    to know how often they reach the same conclusion.
6788
6789    For example, if we have two sensors that either detect or do not
6790    detect the presence of some quantity of interest, how often do
6791    the two detectors agree?
6792
6793    This command is typically used when there a discrete number of
6794    values for the variable.  Often this will be two (e.g., Yes/No
6795    type data), but it is not restricted to two.
6796
6797    If you want to compare values for two response variables when
6798    the data is continuous, the YOUDEN PLOT is recommended.
6799
6800Syntax:
6801    LET <par> = PERCENT AGREE <y1> <y2>  <SUBSET/EXCEPT/FOR qualification>
6802    where <y1> is the first response variable;
6803          <y2> is the second response variable;
6804          <par> is a parameter where the percent agree is saved;
6805    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
6806
6807Examples:
6808    LET A = PERCENT AGREE Y1 Y2
6809    LET A = PERCENT AGREE Y1 Y2  SUBSET TAG > 1
6810
6811Note:
6812    Dataplot statistics can be used in a number of commands.  For
6813    details, enter
6814
6815         HELP STATISTICS
6816
6817Default:
6818    None
6819
6820Synonyms:
6821    None
6822
6823Related Commands:
6824    PERCENT DISAGREE   = Compute the percentage of values that disagree
6825                         in two response variables.
6826    FALSE NEGATIVES    = Compute the proportion of false negatives.
6827    FALSE POSITIVES    = Compute the proportion of false positives.
6828    TRUE NEGATIVES     = Compute the proportion of true negatives.
6829    TRUE POSITIVES     = Compute the proportion of true positives.
6830    TEST SENSITIVITY   = Compute the test sensitivity.
6831    TEST SPECIFICITY   = Compute the test specificity.
6832    ODDS RATIO         = Compute the bias corrected log(odds ratio).
6833    YOUDEN PLOT        = Generate a Youden plot.
6834
6835Applications:
6836    Categorical Data Analysis
6837
6838Implementation Date:
6839    2011/7
6840
6841Program:
6842    .  Step 1: Read the Data
6843    .
6844    .          Column 1: Method 1 (low  => live cell, high => dead cell)
6845    .          Column 2: Method 2 (high => live cell, low  => dead cell)
6846    .
6847    dimension 40 columns
6848    read percmat  intensity
6849      7.1             39.8
6850      8.5             29.6
6851     72.7              4.2
6852     32.3             12.3
6853      5.4             21.5
6854     71.1              4.4
6855    100.0             13.5
6856     55.0             22.4
6857     15.0             25.9
6858      8.7             38.5
6859      0.9             16.6
6860     19.0             48.5
6861    100.0              4.3
6862    100.0              7.9
6863      5.2             42.6
6864     21.8             47.2
6865     90.0              1.0
6866      2.0             23.5
6867     98.0              2.2
6868    100.0              6.2
6869    100.0              2.0
6870    100.0              5.6
6871    100.0              3.0
6872     30.0             14.3
6873    100.0              1.0
6874    end of data
6875    .
6876    .  Step 3: Generate fluctuation plot based on different levels of
6877    .          the 2 methods
6878    .
6879    .          Use intensity levels of 5%, 10%, 15%, 20%, 25%
6880    .          Use percent matching levels of 80%, 90%, 95%, 99.5%
6881    .
6882    let n = size intensity
6883    let intcut = data 5 10 15 20 25
6884    let nint = size intcut
6885    let matcut = data 80 90 95 99.5
6886    let nmat = size matcut
6887    .
6888    let int2 = intensity
6889    let mat2 = percmat
6890    let xgroup = 1 for i = 1 1 n
6891    let ygroup = 1 for i = 1 1 n
6892    let icnt = 0
6893    .
6894    loop for k = 1 1 nint
6895        let acut = intcut(k)
6896        loop for l = 1 1 nmat
6897            let bcut = matcut(l)
6898            let icnt = icnt + 1
6899            if icnt = 1
6900               let xgroupal = xgroup
6901               let ygroupal = ygroup
6902               let intcor = 0 for i = 1 1 n
6903               let intcor = 1 subset int2 >  acut
6904               let intall = intcor
6905               let matcor = 0 for i = 1 1 n
6906               let matcor = 1 subset mat2 < bcut
6907               let matall = matcor
6908            else
6909               let xgroup2 = k for i = 1 1 n
6910               extend xgroupal xgroup2
6911               let ygroup2 = l for i = 1 1 n
6912               extend ygroupal ygroup2
6913               let intcor = 0 for i = 1 1 n
6914               let intcor = 1 subset int2 >  acut
6915               extend intall intcor
6916               let matcor = 0 for i = 1 1 n
6917               let matcor = 1 subset mat2 < bcut
6918               extend matall matcor
6919            end of if
6920        end of loop
6921    end of loop
6922    .
6923    label case asis
6924    tic mark label case asis
6925    title case asis
6926    title offset 2
6927    .
6928    title Percent Agreement Between Method 1 and Method 2
6929    y1label Method 1
6930    x1label Method 2
6931    tic offset units data
6932    xlimits 1 nmat
6933    major xtic mark number nmat
6934    minor xtic mark number 0
6935    xtic mark offset 0.7 0.7
6936    x1tic mark label format alpha
6937    x1tic mark label content 80% 90% 95% 99.5%
6938    ylimits 1 nint
6939    major ytic mark number nint
6940    minor ytic mark number 0
6941    ytic mark offset 0.7 0.7
6942    y1tic mark label format alpha
6943    y1tic mark label content 5% 10% 15% 20% 25%
6944    .
6945    let ylevel = data 60 70 80 85 90 101
6946    .
6947    let string color = g90 g20 green cyan blue orange red
6948    line color ^color
6949    region fill color ^color
6950    region border color ^color
6951    .
6952    set fluctuation plot floor 0
6953    set fluctuation plot ceiling  100
6954    fluctuation percent agreement contour plot ...
6955                intall matall xgroupal ygroupal ylevel
6956    .
6957    box fill pattern solid
6958    box shadow hw 0 0
6959    .
6960    box fill color g20
6961    box 86 90 90 86
6962    move 91 87; text <= 60
6963    .
6964    box fill color green
6965    box 86 86 90 82
6966    move 91 83; text 60 - 70
6967    .
6968    box fill color cyan
6969    box 86 82 90 78
6970    move 91 79; text 70 - 80
6971    .
6972    box fill color blue
6973    box 86 78 90 74
6974    move 91 75; text 80 - 85
6975    .
6976    box fill color orange
6977    box 86 74 90 70
6978    move 91 71; text 85 - 90
6979    .
6980    box fill color red
6981    box 86 70 90 66
6982    move 91 67; text > 90
6983
6984-----PERCENTAGE BEND CORRELATION (LET)-------------------------------
6985
6986PERCENTAGE BEND CORRELATION
6987
6988Name:
6989    PERCENTAGE BEND CORRELATION (LET)
6990
6991Type:
6992    Let Subcommand
6993
6994Purpose:
6995    Compute the percentage bend correlation for a variable.
6996
6997Description:
6998    Mosteller and Tukey (see Reference section below) define
6999    two types of robustness:
7000
7001      1) resistance means that changing a small part, even by a
7002         large amount, of the data does not cause a large change
7003         in the estimate
7004
7005      2) robustness of efficiency means that the statistic has
7006         high efficiency in a variety of situations rather than
7007         in any one situation.  Efficiency means that the estimate
7008         is close to optimal estimate given that we know what
7009         distribution that the data comes from.  A useful measure
7010         of efficiency is:
7011
7012              Efficiency = (lowest variance feasible)/
7013                           (actual variance)
7014
7015    Many statistics have one of these properties.  However,
7016    it can be difficult to find statistics that are both
7017    resistant and have robustness of efficiency.
7018
7019    The Pearson correlation coefficient is an optimal estimator for
7020    Gaussian data.  However, it is not resistant and it does not
7021    have robustness of efficiency.
7022
7023    The percentage bend correlation estimator, discussed in
7024    Shoemaker and Hettmansperger and also by Wilcox, is both
7025    resistant and robust of efficiency.  The rationale and
7026    derivation for this estimate is given in these references.
7027
7028    The percentage bend correlation between two variables X and
7029    Y is computed as follows:
7030
7031       1. Set m = [(1-beta)*n + 0.5].  This is the value of
7032          (1-beta)*m + 0.5 rounded down to the nearest integer.
7033
7034       2. Let W(i) = |X(i) - M(x)| for i = 1, ..., n where M(x)
7035          is the median of X.
7036
7037       3. Sort the W(i) in ascending order.
7038
7039       4. what(x) = W(m) (i. e., the mth order statistic).
7040           W(m) is the estimate of the (1-beta) quantile of W.
7041
7042       5. Sort the X values.  Compute the number of values
7043          of (X(i) - M(x))/whatx(beta) that are less than -1
7044          and the number that are greater than +1 and store in
7045          i1 and i2 respectively.  Then compute
7046
7047             S(x) = SUM[i=i1+1 to n-i2][X(i)]
7048             phihat(x) = (what(x)*(i2-i1) + S(x))/(n - i1 - i2)
7049             U(i) = (X(i) - phihat(x)/what(x)
7050
7051       6. Repeat the above calculations on the Y variable.
7052          Store corresponding quantities in what(y), phihat(y),
7053          and V(i).
7054
7055       7. Define the function
7056
7057              PSI(x) = MAX[-1, MIN(1,x)]
7058
7059       8. Compute
7060
7061              A(i) = PSI(U(i))
7062              B(i) = PSI(V(i))
7063
7064       8. rho(pb) = SUM[i=1 to n][A(i)*B(i)]/
7065                    SQRT(SUM[i=1 to n][A(i)**2]*SUM[i=1 o n][B(i)**2])
7066
7067    The value of beta is selected between 0 and 0.5.  Higher
7068    values of beta result in a higher breakdown point at the
7069    expense of lower efficiency.
7070
7071Syntax:
7072    LET <par> = PERCENTAGE BEND CORRELATION <y1> <y2>
7073                      <SUBSET/EXCEPT/FOR qualification>
7074    where <y1> is the first response variable;
7075          <y2> is the second response variable;
7076          <par> is a parameter where the computed percentage bend
7077               correlation is stored;
7078    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
7079
7080Examples:
7081    LET A = PERCENTAGE BEND CORRELATION Y1 Y2
7082    LET A = PERCENTAGE BEND CORRELATION Y1 Y2 SUBSET TAG > 2
7083
7084Note:
7085    To set the value of beta, enter the command
7086
7087       LET BETA = <value>
7088
7089    where <value> is greater than 0 and less than or equal to
7090    0.5.  The default value for beta is 0.1.
7091
7092Note:
7093    Dataplot statistics can be used in a number of commands.  For
7094    details, enter
7095
7096         HELP STATISTICS
7097
7098Default:
7099    None
7100
7101Synonyms:
7102    None
7103
7104Related Commands:
7105    PERCENTAGE BEND MIDVARI    = Compute the percentage bend
7106                                 midvariance of a variable.
7107    BIWEIGHT CORRELATION       = Compute a biweight correlation
7108                                 estimate of a variable.
7109    WINSORIZED CORRELATION     = Compute a Winsorized correlation
7110                                 estimate of a variable.
7111    CORRELATION                = Compute the correlation between
7112                                 two variables.
7113    RANK CORRELATION           = Compute the rank correlation between
7114                                 two variables.
7115    VARIANCE                   = Compute the variance of a variable.
7116    STATISTIC PLOT             = Generate a statistic versus group
7117                                 plot for a given statistic.
7118    CROSS TABULATE PLOT        = Generate a statistic versus group
7119                                 plot for a given statistic and two
7120                                 group variables.
7121    BOOTSTRAP PLOT             = Generate a bootstrap plot for a
7122                                 given statistic.
7123    DEX PLOT                   = Generate various types of design
7124                                 of experiment plots.
7125    INFLUENCE CURVE            = Generate an influence curve for a
7126                                 given statistic.
7127    INTERACTION STATISTIC PLOT = Generate an interaction plot for a
7128                                 given statistic.
7129
7130Reference:
7131    "Robust Estimates of and Tests for the One- and Two-Sample
7132    Scale Models", Shoemaker and Hettmansperger, Biometrika 69,
7133    1982, pp. 47-54.
7134
7135    "Introduction to Robust Estimation and Hypothesis Testing",
7136    Rand Wilcox, Academic Press, 1997.
7137
7138    "Data Analysis and Regression: A Second Course in Statistics",
7139    Mosteller and Tukey, Addison-Wesley, 1977, pp. 203-209.
7140
7141Applications:
7142    Robust Data Analysis
7143
7144Implementation Date:
7145    2002/7
7146
7147Program 1:
7148    SKIP 25
7149    READ MATRIX IRIS.DAT Y1 Y2 Y3 Y4 X
7150    LET M = CREATE MATRIX Y1 Y2 Y3 Y4
7151    SET CORRELATION TYPE PERCENTAGE BEND
7152    LET B = CORRELATION MATRIX Y1 Y2 Y3 Y4
7153
7154Program 2:
7155    SKIP 25
7156    READ IRIS.DAT Y1 Y2 Y3 Y4 X
7157    .
7158    MULTIPLOT CORNER COORDINATES 0 0 100 95
7159    MULTIPLOT 2 1
7160    BOOTSTRAP SAMPLES 500
7161    BOOTSTRAP PERCENTAGE BEND CORRELATION PLOT Y1 Y2
7162    X1LABEL B025 = ^B025, B975=^B975
7163    HISTOGRAM YPLOT
7164    END OF MULTIPLOT
7165    MOVE 50 96
7166    JUSTIFICATION CENTER
7167    TEXT PERCENTAGE BEND CORRELATION BOOTSTRAP: IRIS DATA
7168
7169-----PERCENTAGE BEND MIDVARIANCE (LET)-------------------------------
7170
7171PERCENTAGE BEND MIDVARIANCE
7172
7173Name:
7174    PERCENTAGE BEND MIDVARIANCE (LET)
7175
7176Type:
7177    Let Subcommand
7178
7179Purpose:
7180    Compute the percentage bend midvariance for a variable.
7181
7182Description:
7183    Mosteller and Tukey (see Reference section below) define
7184    two types of robustness:
7185
7186      1) resistance means that changing a small part, even by a
7187         large amount, of the data does not cause a large change
7188         in the estimate
7189
7190      2) robustness of efficiency means that the statistic has
7191         high efficiency in a variety of situations rather than
7192         in any one situation.  Efficiency means that the estimate
7193         is close to optimal estimate given that we know what
7194         distribution that the data comes from.  A useful measure
7195         of efficiency is:
7196
7197              Efficiency = (lowest variance feasible)/
7198                           (actual variance)
7199
7200    Many statistics have one of these properties.  However,
7201    it can be difficult to find statistics that are both
7202    resistant and have robustness of efficiency.
7203
7204    For scale estimators, the variance is an optimal estimator for
7205    Gaussian data.  However, it is not resistant and it does not
7206    have robustness of efficiency.
7207
7208    The percentage bend midvariance estimator, discussed in
7209    Shoemaker and Hettmansperger and also by Wilcox, is both
7210    resistant and robust of efficiency.  The rationale and
7211    derivation for this estimate is given in these references.
7212
7213    The percentage bend midvariance of a a variable X is computed
7214    as follows:
7215
7216       1. Set m = [(1-beta)*n + 0.5].  This is the value of
7217          (1-beta)*m + 0.5 rounded down to the nearest integer.
7218
7219       2. Let W(i) = |X(i) - M| for i = 1, ..., n where M is
7220          the median of X.
7221
7222       3. Sort the W(i) in ascending order.
7223
7224       4. what(beta) = W(m) (i. e., the mth order statistic).
7225           W(m) is the estimate of the (1-beta) quantile of W.
7226
7227
7228       5. Y(i) = (X(i) - M)/what(beta)
7229
7230       6. a(i) = 1    if |Y(i)| < 1
7231               = 0    if |Y(i)| >= 1
7232
7233       7. phi(x) = max[-1, min(1,x)]
7234
7235       8. PBV = n*what(beta)**2*SUM[{phi(Y(i))}**2]/
7236                (SUM[a(i)])**2
7237
7238    The value of beta is selected between 0 and 0.5.  Higher
7239    values of beta result in a higher breakdown point at the
7240    expense of lower efficiency.
7241
7242Syntax:
7243    LET <par> = PERCENTAGE BEND MIDVARIANCE <y>
7244                      <SUBSET/EXCEPT/FOR qualification>
7245    where <y> is the response variable;
7246          <par> is a parameter where the computed percentage bend
7247               midvariance is stored;
7248    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
7249
7250Examples:
7251    LET A = PERCENTAGE BEND MIDVARIANCE Y1
7252    LET A = PERCENTAGE BEND MIDVARIANCE Y1 SUBSET TAG > 2
7253
7254Note:
7255    To set the value of beta, enter the command
7256
7257       LET BETA = <value>
7258
7259    where <value> is greater than 0 and less than or equal to
7260    0.5.  The default value for beta is 0.1.
7261
7262Note:
7263    Dataplot statistics can be used in a number of commands.  For
7264    details, enter
7265
7266         HELP STATISTICS
7267
7268Default:
7269    None
7270
7271Synonyms:
7272    None
7273
7274Related Commands:
7275    BIWEIGHT MIDVARIANCE       = Compute a biweight midvariance
7276                                 estimate of a variable.
7277    BIWEIGHT SCALE             = Compute a biweight scale estimate
7278                                 of a variable.
7279    BIWEIGHT LOCATION          = Compute a biweight location estimate
7280                                 of a variable.
7281    BIWEIGHT CONFIDENCE LIMITS = Compute a biweight based confidence
7282                                 interval.
7283    WINSORIZED VARIANCE        = Compute the Winsorized variance of a
7284                                 variable.
7285    MEDIAN ABSOLUTE DEVIATION  = Compute the median absolute
7286                                 deviation of a variable.
7287    VARIANCE                   = Compute the variance of a variable.
7288    STATISTIC PLOT             = Generate a statistic versus group
7289                                 plot for a given statistic.
7290    CROSS TABULATE PLOT        = Generate a statistic versus group
7291                                 plot for a given statistic and two
7292                                 group variables.
7293    BOOTSTRAP PLOT             = Generate a bootstrap plot for a
7294                                 given statistic.
7295    DEX PLOT                   = Generate various types of design
7296                                 of experiment plots.
7297    INFLUENCE CURVE            = Generate an influence curve for a
7298                                 given statistic.
7299    INTERACTION STATISTIC PLOT = Generate an interaction plot for a
7300                                 given statistic.
7301
7302Reference:
7303    "Robust Estimates of and Tests for the One- and Two-Sample
7304    Scale Models", Shoemaker and Hettmansperger, Biometrika 69,
7305    1982, pp. 47-54.
7306
7307    "Introduction to Robust Estimation and Hypothesis Testing",
7308    Rand Wilcox, Academic Press, 1997.
7309
7310    "Data Analysis and Regression: A Second Course in Statistics",
7311    Mosteller and Tukey, Addison-Wesley, 1977, pp. 203-209.
7312
7313Applications:
7314    Robust Data Analysis
7315
7316Implementation Date:
7317    2002/7
7318
7319Program 1:
7320    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
7321    LET Y2 = LOGISTIC RANDOM NUMBERS FOR I = 1 1 100
7322    LET Y3 = CAUCHY RANDOM NUMBERS FOR I = 1 1 100
7323    LET Y4 = DOUBLE EXPONENTIAL RANDOM NUMBERS FOR I = 1 1 100
7324    LET A1 = PERCENTAGE BEND MIDVARIANCE Y1
7325    LET A2 = PERCENTAGE BEND MIDVARIANCE Y2
7326    LET A3 = PERCENTAGE BEND MIDVARIANCE Y3
7327    LET A4 = PERCENTAGE BEND MIDVARIANCE Y4
7328
7329Program 2:
7330    MULTIPLOT 2 2
7331    MULTIPLOT CORNER COORDINATES 0 0 100 100
7332    MULTIPLOT SCALE FACTOR 2
7333    X1LABEL DISPLACEMENT 12
7334    .
7335    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 200
7336    LET Y2 = CAUCHY RANDOM NUMBERS FOR I = 1 1 200
7337    .
7338    BOOTSTRAP SAMPLES 500
7339    BOOTSTRAP PERCENTAGE BEND MIDVARIANCE PLOT Y1
7340    X1LABEL B025 = ^B025, B975=^B975
7341    HISTOGRAM YPLOT
7342    X1LABEL
7343    .
7344    BOOTSTRAP PERCENTAGE BEND MIDVARIANCE PLOT Y1
7345    X1LABEL B025 = ^B025, B975=^B975
7346    HISTOGRAM YPLOT
7347    .
7348    END OF MULTIPLOT
7349    JUSTIFICATION CENTER
7350    MOVE 50 96
7351    TEXT PERCENTAGE BEND MIDVARIANCE BOOTSTRAP: NORMAL
7352    MOVE 50 46
7353    TEXT PERCENTAGE BEND MIDVARIANCE BOOTSTRAP: CAUCHY
7354
7355-----PERCENT DEFECTIVE (LET)------------------------------------------
7356
7357PERCENT DEFECTIVE
7358
7359Name:
7360    PERCENT DEFECTIVE (LET)
7361
7362Type:
7363    Let Subcommand
7364
7365Purpose:
7366    Compute the percentage of defectives for a variable.
7367
7368Description:
7369    The percent defective is the number of values of a variable
7370    (expressed as a percentage) that fall outside some user specified
7371    tolerance limits.
7372
7373Syntax:
7374    LET <par> = PERCENT DEFECTIVE <x> <SUBSET/EXCEPT/FOR qualification>
7375    where <x> is the variable for which the percent defectives is
7376              computed;
7377          <par> is a parameter where the computed percentage of
7378              defectives is saved;
7379    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
7380
7381Examples:
7382    LET A = PERCENT DEFECTIVE Y1
7383    LET A = PERCENT DEFECTIVE Y1  SUBSET TAG > 2
7384
7385Note:
7386    The upper and lower specification limits must be specified by the
7387    user as follows:
7388        LET LSL = <value>
7389        LET USL = <value>
7390
7391Default:
7392    None
7393
7394Synonyms:
7395    None
7396
7397Related Commands:
7398    CONTROL CHART        = Generate a control chart.
7399    CP (LET)             = Compute the CP index.
7400    CPK (LET)            = Compute the CPK index.
7401    EXPECTED LOSS (LET)  = Compute the expected loss of a sample.
7402
7403Applications:
7404    Quality Control
7405
7406Implementation Date:
7407    XX
7408
7409Program:
7410    LET Y = NORMAL RANDOM NUMBERS FOR I = 1 1 100
7411    LET LSL = -2
7412    LET USL = 2
7413    LET A = PERCENT DEFECTIVE Y
7414
7415-----PERCENT DEFECTIVE PLOT-----------------------------------------
7416
7417PERCENT DEFECTIVE PLOT
7418
7419Name:
7420    PERCENT DEFECTIVE PLOT
7421
7422Type:
7423    Graphics Command
7424
7425Purpose:
7426    Generates a percent defective plot.
7427
7428Description:
7429    A percent defective plot consists of subsample percent defective
7430    versus subsample index.  The subsample percent defective index is
7431    the percent defective of the data in the subsample.  The percent
7432    defective plot is used to answer the question--"Does the subsample
7433    percent defective index change over different subsamples?"  The
7434    plot consists of:
7435       Vertical   axis = subsample percent defective index;
7436       Horizontal axis = subsample index.
7437    The percent defective plot yields 2 traces:
7438       1. a subsample percent defective trace; and
7439       2. a full-sample percent defective reference line.
7440    Like usual, the appearance of these 2 traces is controlled by
7441    the first 2 settings of the LINES, CHARACTERS, SPIKES, BARS,
7442    and similar attributes.
7443
7444Syntax:
7445    PERCENT DEFECTIVE PLOT <y> <x>  <SUBSET/EXCEPT/FOR qualification>
7446    where <y> is the response (= dependent) variable;
7447          <x> is the subsample identifier variable (this variable
7448              appears on the horizontal axis);
7449    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
7450
7451Examples:
7452    PERCENT DEFECTIVE PLOT Y X
7453    PERCENT DEFECTIVE PLOT Y X SUBSET X > 6
7454
7455Note:
7456    The percent defective computes the number of defectives for a
7457    variable (i.e., the number of values that fall outside of some user
7458    specified tolerance limits) and expresses it as a percentage.
7459    specified cost.
7460
7461Note:
7462    The upper and lower specification limits must be specified by the
7463    user as follows:
7464        LET USL = <value>
7465        LET LSL = <value>
7466
7467Default:
7468    None
7469
7470Synonyms:
7471    None
7472
7473Related Commands:
7474    CHARACTERS              = Sets the type for plot characters.
7475    LINES                   = Sets the type for plot lines.
7476    CP PLOT                 = Generates a Cp plot.
7477    CPK PLOT                = Generates a Cpk plot.
7478    EXPECTED LOSS PLOT      = Generates an expected loss plot.
7479    BOX PLOT                = Generates a box plot.
7480    XBAR CHART              = Generates an xbar control chart.
7481    PLOT                    = Generates a data or function plot.
7482
7483Applications:
7484    Quality Control
7485
7486Implementation Date:
7487    93/10
7488
7489Program:
7490    SKIP 25
7491    READ GEAR.DAT DIAMETER BATCH
7492    .
7493    TITLE CASE ASIS; LABEL CASE ASIS
7494    TITLE  Gear Diameter Analysis
7495    Y1LABEL PERCENT DEFECTIVE
7496    X1LABEL Batch
7497    LEGEND 1 Process Capability
7498    LEGEND 2 PERCENT DEFECTIVE Plot
7499    XTIC OFFSET 0.5 0.5
7500    YTIC OFFSET 2.0 2.0
7501    CHARACTER CIRCLE BLANK
7502    CHARACTER FILL ON
7503    CHARACTER SIZE 1.2
7504    SPIKE ON
7505    SPIKE DOTTED
7506    LINE BLANK SOLID
7507    .
7508    LET LSL = 0.99
7509    LET USL = 1.01
7510    .
7511    PERCENT DEFECTIVE PLOT DIAMETER BATCH
7512
7513-----PERCENT DISAGREE (LET)--------------------------------------------
7514
7515PERCENT DISAGREE
7516
7517Name:
7518    PERCENT DISAGREE (LET)
7519
7520Type:
7521    Let Subcommand
7522
7523Purpose:
7524    Compute the percentage of values that disagree in two response
7525    variables.  This is pairwise disagreement (i.e., how often does
7526    Y1(I) not equal Y2(I) for I = 1, ..., N).
7527
7528Description:
7529    Given two methods (or two labortories), it may sometimes be useful
7530    to know how often they reach a different conclusion.
7531
7532    For example, if we have two sensors that either detect or do not
7533    detect the presence of some quantity of interest, how often do
7534    the two detectors disagree?
7535
7536    This command is typically used when there a discrete number of
7537    values for the variable.  Often this will be two (e.g., Yes/No
7538    type data), but it is not restricted to two.
7539
7540    If you want to compare values for two response variables when
7541    the data is continuous, the YOUDEN PLOT is recommended.
7542
7543Syntax:
7544    LET <par> = PERCENT DISAGREE <y1> <y2>
7545                <SUBSET/EXCEPT/FOR qualification>
7546    where <y1> is the first response variable;
7547          <y2> is the second response variable;
7548          <par> is a parameter where the percent agree is saved;
7549    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
7550
7551Examples:
7552    LET A = PERCENT DISAGREE Y1 Y2
7553    LET A = PERCENT DISAGREE Y1 Y2  SUBSET TAG > 1
7554
7555Note:
7556    Dataplot statistics can be used in a number of commands.  For
7557    details, enter
7558
7559         HELP STATISTICS
7560
7561Default:
7562    None
7563
7564Synonyms:
7565    None
7566
7567Related Commands:
7568    PERCENT AGREE      = Compute the percentage of values that agree
7569                         in two response variables.
7570    FALSE NEGATIVES    = Compute the proportion of false negatives.
7571    FALSE POSITIVES    = Compute the proportion of false positives.
7572    TRUE NEGATIVES     = Compute the proportion of true negatives.
7573    TRUE POSITIVES     = Compute the proportion of true positives.
7574    TEST SENSITIVITY   = Compute the test sensitivity.
7575    TEST SPECIFICITY   = Compute the test specificity.
7576    ODDS RATIO         = Compute the bias corrected log(odds ratio).
7577    YOUDEN PLOT        = Generate a Youden plot.
7578
7579Applications:
7580    Categorical Data Analysis
7581
7582Implementation Date:
7583    2011/7
7584
7585Program:
7586    .  Step 1: Read the Data
7587    .
7588    .          Column 1: Method 1 (low  => live cell, high => dead cell)
7589    .          Column 2: Method 2 (high => live cell, low  => dead cell)
7590    dimension 40 columns
7591    read percmat  intensity
7592      7.1             39.8
7593      8.5             29.6
7594     72.7              4.2
7595     32.3             12.3
7596      5.4             21.5
7597     71.1              4.4
7598    100.0             13.5
7599     55.0             22.4
7600     15.0             25.9
7601      8.7             38.5
7602      0.9             16.6
7603     19.0             48.5
7604    100.0              4.3
7605    100.0              7.9
7606      5.2             42.6
7607     21.8             47.2
7608     90.0              1.0
7609      2.0             23.5
7610     98.0              2.2
7611    100.0              6.2
7612    100.0              2.0
7613    100.0              5.6
7614    100.0              3.0
7615     30.0             14.3
7616    100.0              1.0
7617    end of data
7618    .
7619    .  Step 3: Generate fluctuation plot based on different levels of
7620    .          the 2 methods
7621    .
7622    .          Use intensity levels of 5%, 10%, 15%, 20%, 25%
7623    .          Use percent matching levels of 80%, 90%, 95%, 99.5%
7624    .
7625    let n = size intensity
7626    let intcut = data 5 10 15 20 25
7627    let nint = size intcut
7628    let matcut = data 80 90 95 99.5
7629    let nmat = size matcut
7630    .
7631    let int2 = intensity
7632    let mat2 = percmat
7633    let xgroup = 1 for i = 1 1 n
7634    let ygroup = 1 for i = 1 1 n
7635    let icnt = 0
7636    .
7637    loop for k = 1 1 nint
7638        let acut = intcut(k)
7639        loop for l = 1 1 nmat
7640            let bcut = matcut(l)
7641            let icnt = icnt + 1
7642            if icnt = 1
7643               let xgroupal = xgroup
7644               let ygroupal = ygroup
7645               let intcor = 0 for i = 1 1 n
7646               let intcor = 1 subset int2 >  acut
7647               let intall = intcor
7648               let matcor = 0 for i = 1 1 n
7649               let matcor = 1 subset mat2 < bcut
7650               let matall = matcor
7651            else
7652               let xgroup2 = k for i = 1 1 n
7653               extend xgroupal xgroup2
7654               let ygroup2 = l for i = 1 1 n
7655               extend ygroupal ygroup2
7656               let intcor = 0 for i = 1 1 n
7657               let intcor = 1 subset int2 >  acut
7658               extend intall intcor
7659               let matcor = 0 for i = 1 1 n
7660               let matcor = 1 subset mat2 < bcut
7661               extend matall matcor
7662            end of if
7663        end of loop
7664    end of loop
7665    .
7666    label case asis
7667    tic mark label case asis
7668    title case asis
7669    title offset 2
7670    .
7671    title Percent Disagreement Between Method 1 and Method 2
7672    y1label Method 1
7673    x1label Method 2
7674    tic offset units data
7675    xlimits 1 nmat
7676    major xtic mark number nmat
7677    minor xtic mark number 0
7678    xtic mark offset 0.7 0.7
7679    x1tic mark label format alpha
7680    x1tic mark label content 80% 90% 95% 99.5%
7681    ylimits 1 nint
7682    major ytic mark number nint
7683    minor ytic mark number 0
7684    ytic mark offset 0.7 0.7
7685    y1tic mark label format alpha
7686    y1tic mark label content 5% 10% 15% 20% 25%
7687    .
7688    let ylevel = data 60 70 80 85 90 101
7689    let ylevel = data 10 15 20 30 41
7690    .
7691    let string color = g90 green cyan blue orange red
7692    line color ^color
7693    region fill color ^color
7694    region border color ^color
7695    .
7696    set fluctuation plot floor 0
7697    set fluctuation plot ceiling  40
7698    fluctuation percent disagreement contour plot ...
7699                intall matall xgroupal ygroupal ylevel
7700    .
7701    box fill pattern solid
7702    box shadow hw 0 0
7703    .
7704    box fill color green
7705    box 86 90 90 86
7706    move 91 87; text <= 10
7707    .
7708    box fill color cyan
7709    box 86 86 90 82
7710    move 91 83; text 10 - 15
7711    .
7712    box fill color blue
7713    box 86 82 90 78
7714    move 91 79; text 15 - 20
7715    .
7716    box fill color orange
7717    box 86 78 90 74
7718    move 91 75; text 20 - 30
7719    .
7720    box fill color red
7721    box 86 74 90 70
7722    move 91 71; text > 30
7723
7724-----PERCENTAGE RANK (LET)---------------------------------------------------
7725
7726PERCENTAGE RANK
7727
7728Name:
7729    PERCENTAGE RANK (LET)
7730
7731Type:
7732    Let Subcommand
7733
7734Purpose:
7735    Compute the percentage ranks of a variable.
7736
7737Description:
7738    The percentage rank is computed as
7739
7740       PR(i) = 100*(RANK(i) - 0.5)/N
7741
7742    with RANK(i) and N denoting the rank of the i-th element and the
7743    number of observations, respectively.
7744
7745    Ranks are frequently used in nonparametric statistical analysis.  Some
7746    analysts like to the think of the ranks in terms of percentages.
7747
7748Syntax:
7749    LET <y2> = PERCENTAGE RANK <y1>   <SUBSET/EXCEPT/FOR qualification>
7750    where <y1> is a response variable;
7751          <y2> is a variable where the percentage ranks are saved;
7752    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
7753
7754Examples:
7755    LET PERCRANK = PERCENTAGE RANK Y1
7756
7757Note:
7758    Ties are assigned an average rank.  For example, if the 2nd and 3rd
7759    highest values are equal, each is assigned a rank of 2.5.
7760
7761Default:
7762    None
7763
7764Synonyms:
7765    None
7766
7767Related Commands:
7768    RANK         = Rank the elements in a variable.
7769    RANK2        = Rank the elements in a variable when there are one,
7770                   two, or three group-id variables.
7771    RANK INDEX   = Rank the elements in a variable where each rank will
7772                   be assigned a unique integer value.
7773    SORT         = Sort the elements in a variable.
7774    SORTC        = Sort the elements in a variable and carry one or
7775                   more variables along.
7776
7777Reference:
7778    ISO 13528, First Edition, Statistical Methods for Use
7779    in Proficiency Testing by Interlaboratory Comparisons,
7780    2005, p. 24.
7781
7782Applications:
7783    Nonparametric statistics
7784
7785Implementation Date:
7786    2012/1
7787
7788Program:
7789    let y1 = norm rand numb for i = 1 1 20
7790    let y2 = rank y1
7791    let y3 = percentage rank y1
7792    .
7793    set write decimals 3
7794    print y1 y2 y3
7795
7796-----PERCENTILE (LET)-----------------------------------------
7797
7798PERCENTILE
7799
7800Name:
7801    PERCENTILE (LET)
7802
7803Type:
7804    Let Subcommand
7805
7806Purpose:
7807    Compute a user specified percentile for a variable.
7808
7809Description:
7810    The p-th percentile of a data set is defined as that value
7811    where p percent of the data is below that value and (1-p)
7812    percent of the data is above that value.  For example, the
7813    50th percentile is the median.
7814
7815    The default method for computing percentiles in Dataplot is
7816    based on the order statistic.  The formula is:
7817
7818       X(p) = (1 - r)*X(NI1) + r*X(NI2)
7819
7820   where
7821
7822       X are the observations sorted in ascending order
7823       NI1 = INT(p*(N+1))
7824       NI2 = NI1 + 1
7825       r = p*(N+1) - INT(p*(N+1))
7826
7827   If p is < 1/(N+1), then X(1) is returned.  If p > N/(N+1), then X(N)
7828   is returned.
7829
7830Syntax 1:
7831    LET <par> = <value> PERCENTILE <y>
7832                <SUBSET/EXCEPT/FOR qualification>
7833    where <y> is the response variable;
7834          <par> is a parameter where the computed percentile
7835              is stored;
7836          <value> is a parameter in the range 0 to 100 that specifies
7837              which percentile to compute;
7838    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
7839
7840Syntax 2:
7841    LET <par> = PERCENTILE <y>
7842                <SUBSET/EXCEPT/FOR qualification>
7843    where <y> is the response variable;
7844          <par> is a parameter where the computed percentile is stored;
7845    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
7846
7847    With this syntax, the desired percentile is specified by entering the
7848    command
7849
7850        LET P100 = <value>
7851
7852    before entering the PERCENTILE command.
7853
7854Examples:
7855    LET A = 20 PERCENTILE Y
7856    LET A = 50 PERCENTILE Y SUBSET TAG > 2
7857
7858    LET P100 = 90
7859    LET A = PERCENTILE Y
7860
7861Note:
7862    The QUANTILE command is equivalent to the PERCENTILE command.  The
7863    only difference is that the requested percentile is given as a
7864    percentage between 0 and 100% while the requested quantile is
7865    specified as a fraction between 0 and 1.
7866
7867Note:
7868    Note that there are a number of other ways of calculating percentiles
7869    in common use.  Hyndman and Fan (1996) in an American Statistician
7870    article evaluated nine different methods (we will refer to these as R1
7871    through R9) for computing percentiles relative to six desirable
7872    properties. Their goal was to advocate a "standard" definition for
7873    percentiles that would be implemented in statistical software. Although
7874    this has not in fact happened, the article does provide a useful
7875    summary and evaluation of various methods for computing percentiles.
7876    Most statistical and spreadsheet software use one of the methods
7877    described in Hyndman and Fan.
7878
7879    The default method used by Dataplot described above corresponds to
7880    method R6 of Hyndman and Fan.  The description of the methods
7881    here will be in terms of the quantile q = p/100 (where p is
7882    the desired percentile).
7883
7884    The method advocated by Hyndman and Fan is R8. For the R8 method,
7885
7886       X(q) = X(NI1) + r*(X(NI2) - X(NI1))
7887
7888    where
7889
7890       X are the observations sorted in ascending order
7891       NI1 = INT(q*(N+(1/3)) + (1/3))
7892       NI2 = NI1 + 1
7893       r = q*(N+1) - INT(q*(N+1))
7894
7895    If q <= (2/3)/(N+(1/3)) the minimum value will be returned and
7896    if q >= (N-(1/3))/(N+(1/3)) the maximum value will be returned.
7897
7898    Method R7 (this is the default method in R and Excel) is calculated by
7899
7900       X(q) = X(NI1) + r*(X(NI2) - X(NI1))
7901
7902    where
7903
7904       X are the observations sorted in ascending order
7905       NI1 = INT(q*(N-1) + 1)
7906       NI2 = NI1 + 1
7907       r = q*(N+1) - INT(q*(N+1))
7908
7909    If q = 1, then X(N) is returned.
7910
7911    The R6, R7, and R8 methods give fairly similar, but not exactly the
7912    same (particularly for small samples), results.  For most purposes,
7913    any of these three methods should be acceptable.
7914
7915Note:
7916    The following command is used to determine which method
7917    is used to compute the percentile:
7918
7919         SET QUANTILE METHOD <ORDER/R6/R7/R8>
7920
7921    R6 is equivalent to ORDER.
7922
7923Note:
7924    Dataplot statistics can be used in 20+ commands.  For details, enter
7925
7926         HELP STATISTICS
7927
7928    When using these commands, the specific quantile to compute is
7929    specified by entering the following command (before the statistic
7930    command):
7931
7932       LET P100 = <value>
7933
7934    where <value> is a number in the interval (0,100) that specifies
7935    the desired quantile.
7936
7937
7938Default:
7939    The ORDER STATISTIC (R6) method is the default method for calculating
7940    percentiles.
7941
7942Synonyms:
7943    None
7944
7945Related Commands:
7946    QUANTILE            = Compute a specified quantile.
7947    MEDIAN              = Compute the median.
7948    LOWER QUARTILE      = Compute the lower quartile.
7949    UPPER QUARTILE      = Compute the upper quartile.
7950    FIRST DECILE        = Compute the first decile (the 10th percentile).
7951    ... STATISTIC PLOT  = Generate a statistic versus subset plot for
7952                          numerous statistics.
7953
7954Reference:
7955    Hyndman and Fan (November 1996), "Sample Quantiles in Statistical
7956    Packages", The American Statistician, Vol. 50, No. 4, pp. 361-365.
7957
7958Applications:
7959    Data Analysis
7960
7961Implementation Date:
7962    1998/12
7963    2015/2: Support for R7 and R8 methods
7964
7965Program 1:
7966    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
7967    LET A1 = 30 PERCENTILE Y1
7968
7969Program 2:
7970    . Step 1:   Read the data
7971    .
7972    read y
7973    95.1772
7974    95.1567
7975    95.1937
7976    95.1959
7977    95.1442
7978    95.0610
7979    95.1591
7980    95.1195
7981    95.1065
7982    95.0925
7983    95.1990
7984    95.1682
7985    end of data
7986    .
7987    . Step 2:   Compute the percentiles using various methods
7988    .
7989    let p100 = xq
7990    .
7991    let xpr6 = percentile y
7992    let xpr6 = round(xpr6,4)
7993    .
7994    set quantile method r7
7995    let xpr7 = percentile y
7996    let xpr7 = round(xpr7,4)
7997    .
7998    set quantile method r8
7999    let xpr8 = percentile y
8000    let xpr8 = round(xpr8,4)
8001    .
8002    . Step 3:   Print the results
8003    .
8004    print "Percentile with R6 method:  ^xpr6"
8005    print "Percentile with R7 method:  ^xpr7"
8006    print "Percentile with R8 method:  ^xpr8"
8007
8008-----PERCENT POINT PLOT------------------------------------------------
8009
8010PERCENT POINT PLOT
8011
8012Name:
8013    PERCENT POINT PLOT
8014
8015Type:
8016    Graphics Command
8017
8018Purpose:
8019    Generates a percent point plot.
8020
8021Description:
8022    A percent point plot is a graphical data analysis technique for
8023    summarizing the distributional information of a variable.  It
8024    consists of:
8025
8026       Vertical   axis = percent point;
8027       Horizontal axis = percent (0 to 100).
8028
8029    Thus, for example, if the value of 50 is chosen on the horizontal
8030    axis, then the corresponding value on the vertical axis is the
8031    estimated 50% point (that is, the median) from the data.
8032
8033    The percent point plot can be generated for either raw data or for
8034    binned data.
8035
8036    For raw data, the percentile plot is constructed by plotting the
8037    sorted data on the vertical axis.  The corresponding horizontal axis
8038    value for the i-th point is 100*Y(i)/N with Y(i) and N denoting the
8039    i-th observation of the sorted data and the sample size, respectively.
8040    The multiplication by 100 is to covert the horizontal axis to a
8041    percentage value.
8042
8043    For binned data, the vertical axis value is the mid-point of the
8044    bin.  The corresponding horizontal axis values are the cumulative
8045    sums of the frequencies of the bins divided by the sum of the
8046    frequencies for all bins.  This value is multiplied by 100 to convert
8047    the horizontal axis to a percentage value.
8048
8049    By default, raw data is first binned into frequency data.  To
8050    suppress this binning (i.e., generate the raw data version of
8051    the plot), enter the command
8052
8053        SET PERCENT POINT PLOT UNBINNED
8054
8055    To restore the default of binning raw data, enter
8056
8057        SET PERCENT POINT PLOT BINNED
8058
8059    Typically no binning is preferred for small to moderate size data
8060    sets.  Binning can be helpful for large data sets in that it
8061    reduces the number of points that are plotted.
8062
8063Syntax 1:
8064    PERCENT POINT PLOT  <x>  <SUBSET/EXCEPT/FOR qualification>
8065    where <x> is the variable of raw data;
8066    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
8067
8068    This syntax is used for the case where you have raw data.
8069
8070Syntax 2:
8071    PERCENT POINT PLOT <y> <x>  <SUBSET/EXCEPT/FOR qualification>
8072    where <y> is the variable of pre-computed frequencies;
8073          <x> is the variable of distinct values;
8074    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
8075
8076    This syntax is used for the case where you have pre-computed
8077    frequencies at each data level.  This syntax is used when you
8078    have equal width bins.
8079
8080Syntax 3:
8081    PERCENT POINT PLOT <y> <xlow> <xhigh>
8082                       <SUBSET/EXCEPT/FOR qualification>
8083    where <y> is the variable of pre-computed frequencies;
8084          <xlow> is the variable containing the lower limits of the bins;
8085          <xhigh> is the variable containing the upper limits of the bins;
8086    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
8087
8088    This syntax is used for the case where you have pre-computed
8089    frequencies at each data level.  This syntax is used when you have
8090    unequal width bins.
8091
8092Syntax 4:
8093    MULTIPLE PERCENT POINT PLOT <y1> ... <yk>
8094                                <SUBSET/EXCEPT/FOR qualification>
8095    where <y1> ... <yk> is a list of 1 to 30 response variables;
8096    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
8097
8098    This syntax will generate percent point plots of each of the
8099    listed response variables on the same plot.  You can specify
8100    different plot attributes for each response variable.
8101
8102    This syntax is only supported for raw data (i.e., no binned data).
8103
8104Syntax 5:
8105    REPLICATED PERCENT POINT PLOT <y> <x1> ... <xk>
8106                                <SUBSET/EXCEPT/FOR qualification>
8107    where <y> is the response variable;
8108          <x1> ... <xk> is a list of 1 to 6 group-id variables;
8109    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
8110
8111    From one to six group-id variables can be specified (most
8112    commonly there is a single group-id variable).
8113
8114    Note that with this syntax, the plot points corresponding to each
8115    group are drawn with different attributes (i.e., the first group
8116    uses the first setting for the CHARACTER and LINE and related
8117    attribute setting commands, the second group uses the second
8118    setting, and so on).  For example, this syntax can be used to label
8119    the plot points with the group-id.
8120
8121    If there is more than one group-id variable, the attribute settings
8122    work from right to left.  That is, if X1 has 2 levels and X2 has
8123    2 levels, then
8124
8125      trace 1  = Level 1 of X1 and Level 1 of X2
8126      trace 2  = Level 1 of X1 and Level 2 of X2
8127      trace 3  = Level 2 of X1 and Level 1 of X2
8128      trace 4  = Level 2 of X1 and Level 1 of X2
8129
8130Syntax 6:
8131    HIGHLIGHTED PERCENT POINT PLOT <y> <x>
8132                                   <SUBSET/EXCEPT/FOR qualification>
8133    where <y> is the response variable;
8134          <x> is a group-id variable;
8135    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
8136
8137    Although this syntax is similar to the REPLICATION case, it
8138    is generally used in a different way.  The REPLICATION case is
8139    used when we have distinct groups of data and we want to generate
8140    separate percent point plots for each group.  Highlighting is
8141    used when we have a single group of data, but we want to draw
8142    some of the points with different attributes.  For example, we
8143    may want to emphasize the extreme points in the plot.
8144
8145Example:
8146    PERCENT POINT PLOT Y
8147    PERCENT POINT Y X
8148    PERCENT POINT Y XLOW XHIGH
8149    HIGHTLIGHTED PERCENT POINT Y TAG
8150    MULTIPLE PERCENT POINT Y1 Y2 Y3
8151    PERCENT POINT Y X SUBSET X > 2
8152
8153Note:
8154    When raw data is binned, Dataplot divides the raw data into classes
8155    in the same manner as it does for a histogram or frequency polygon.
8156    The percent points are calculated at the mid-points of these histogram
8157    classes.  The defaults are the same as for histograms (the class
8158    width is 0.3*standard deviation, 6 classes above and 6 classes
8159    below the mean).  You can specify your own binning with the
8160    CLASS LOWER, CLASS UPPER, and CLASS WIDTH commands.  This is
8161    demonstrated in the sample program below.
8162
8163    The SET HISTOGRAM CLASS WIDTH can be used to define several other
8164    algorithms for binning the data (HELP HISTOGRAM CLASS WIDTH for
8165    details).  The SET HISTOGRAM OUTLIERS command also applies to
8166    the PERCENT POINT PLOT if raw data is being binned.
8167
8168Note:
8169    Percent point plots are also referred to as quantile plots in
8170    the statistical literature.
8171
8172Note:
8173    The attributes of the plot can be set by the first setting of the
8174    LINE, CHARACTER, SPIKE, and BAR commands (and there corresponding
8175    attribute setting commands).  This is demonstrated in the sample
8176    program below.
8177
8178Default:
8179    None
8180
8181Synonyms:
8182    None
8183
8184Related Commands:
8185    QUAN-QUAN PLOT     = Generates a quantile-quantile plot.
8186    HISTOGRAM          = Generates a histogram.
8187    FREQUENCY PLOT     = Generates a frequency plot.
8188    PIE CHART          = Generates a pie chart.
8189    PROBABILITY PLOT   = Generates a probability plot.
8190    PPCC PLOT          = Generates probability plot correlation
8191                         coefficient plot.
8192    PLOT               = Generates a plot (including bar plots).
8193    CLASS LOWER        = Sets the lower class minimum for histograms,
8194                         frequency plots, and pie charts.
8195    CLASS UPPER        = Sets the upper class maximum for histograms,
8196                         frequency plots, and pie charts.
8197    CLASS WIDTH        = Sets the class width for histograms, frequency
8198                         plots, and pie charts.
8199
8200Applications:
8201    Distributional Analysis
8202
8203Reference:
8204    Chambers, Cleveland, Kleiner, and Tukey (1983), "Graphical Methods
8205    for Data Analysis", Wadsworth.
8206
8207Implementation Date:
8208    Pre-1987
8209    1998/09: Support for SET PERCENT POINT PLOT command.
8210    2011/02: Support for REPLICATION and MULTIPLE options.
8211    2011/02: Support for HIGHLIGHT option.
8212
8213Program 1:
8214    SKIP 25
8215    READ SUNSPOT2.DAT Y
8216    .
8217    LET ALOW = MINIMUM Y
8218    LET AHIGH = MAXIMUM Y
8219    CLASS LOWER ALOW
8220    CLASS UPPER AHIGH
8221    CLASS WIDTH 1.0
8222    CHARACTER CIRCLE
8223    CHARACTER FILL ON
8224    CHARACTER SIZE 1.2
8225    X1LABEL PERCENT POINT
8226    Y1LABEL DATA VALUE
8227    TITLE AUTOMATIC
8228    .
8229    PERCENT POINT PLOT Y
8230
8231Program 2:
8232    let y1 = norm rand numb for i = 1 1 100
8233    .
8234    title case asis
8235    title offset 2
8236    title automatic
8237    label case asis
8238    tic mark offset units screen
8239    tic mark offset 3 3
8240    .
8241    char circle
8242    char fill on
8243    char hw 0.5 0.375
8244    line blank
8245    .
8246    multiplot corner coordinates 5 5 95 95
8247    multiplot scale factor 2
8248    multiplot 2 2
8249    .
8250    set percent point plot unbinned
8251    set histogram outliers on
8252    set histogram empty bins off
8253    title Unbinned Data
8254    percent point plot y1
8255    .
8256    set percent point plot binned
8257    title Data Binned by Command
8258    percent point plot y1
8259    .
8260    title User Created Bins: Equi-Spaced Bins
8261    let z2 x2 = binned y1
8262    percent point plot z2 x2
8263    .
8264    let minsize = 5
8265    let z3 xlow xhigh = combine frequency table z2 x2
8266    title User Created Bins: Unequal-Spaced Bins
8267    percent point plot z3 xlow xhigh
8268    .
8269    end of multiplot
8270    justification center
8271    move 50 97
8272    text Percent Point Plots for 100 Normal Random Numbers
8273    move 50 5
8274    text Percentile
8275    direction vertical
8276    move 3 50
8277    text Response Value
8278
8279Program 3:
8280    dimension 500 rows
8281    skip 25
8282    read iris.dat y1 y2 y3 y4
8283    let m = create matrix y1 y2 y3 y4
8284    .
8285    title case asis
8286    title offset 2
8287    label case asis
8288    .
8289    char circle all
8290    char color black
8291    char fill on all
8292    char hw 0.5 0.375 all
8293    line blank all
8294    .
8295    y1label Response Value
8296    x1label Percentile
8297    title IRIS Data (all species combined)
8298    .
8299    set percent point plot unbinned
8300    set histogram outliers on
8301    set histogram empty bins off
8302    percent point plot m
8303    .
8304    char color red blue cyan green
8305    title IRIS Data (species plotted separately)
8306    multiple percent point plot y1 to y4
8307
8308Program 4:
8309    skip 25
8310    read gear.dat y x
8311    .
8312    title case asis
8313    title offset 2
8314    label case asis
8315    tic mark offset units screen
8316    tic mark offset 5 5
8317    .
8318    char circle all
8319    char color black red blue green cyan grey brown magenta dgreen orange
8320    char fill on all
8321    char hw 0.5 0.375 all
8322    line blank all
8323    .
8324    title Percent Point Plots for GEAR.DAT
8325    y1label Response Value
8326    x1label Percentile
8327    .
8328    set percent point plot unbinned
8329    set histogram outliers on
8330    set histogram empty bins off
8331    replicated percent point plot y x
8332
8333-----PERCERR (LET)--------------------------------
8334
8335PERCERR
8336
8337Name:
8338    PERCERR (LET)
8339
8340Type:
8341    Library Function
8342
8343Purpose:
8344    Return the percent error of two numbers.
8345
8346Description:
8347    The definition of the percent error between a "true" value
8348    X(t) and an observed value X(o) used by Dataplot is:
8349
8350         Percent Error = 100*(X(t) - X(o))/X(t)
8351
8352    There may be some slight differences for this formula in other
8353    sources.  Specifically,
8354
8355    1) Some sources take the absolute value of the above
8356       quantity.  In Dataplot, you can use the ABS function
8357       to obtain this form.
8358
8359    2) Some sources may reverse the order of the X(t) and X(o) values.
8360       This changes the sign of the result, but not the magnitude.
8361
8362Syntax:
8363    LET <y> = PERCERR(<y1>,<y2>)      <SUBSET/EXCEPT/FOR qualification>
8364    where <y1> is a variable or a parameter;
8365          <y2> is a variable or a parameter;
8366          <y>  is a variable or a parameter (depending on what <y1> and
8367               <y2> are) where the computed percent error values
8368               are stored;
8369    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
8370
8371Examples:
8372    LET A = PERCERR(14,10)
8373    LET A = PERCERR(A1,A2)
8374    LET X2 = PERCERR(X1,X4)
8375    LET X2 = PERCERR(X1-4,X2+6)
8376
8377Note:
8378    Library functions are distinguished from let subcommands
8379    in the following ways.
8380    1) Functions enclose the input value in parenthesis.  Let
8381       subcommands use spaces.
8382    2) Functions can accept (and return) either parameters
8383       (i.e., single values) or variables (i.e., an array of
8384       values) while let subcommands are specific in which they
8385       accept as input and what they return as output.
8386    3) Functions can accept expressions while let subcommands
8387       do not.  For example, the following is legal:
8388           LET Y2 = ABS(Y1-INT(Y1))
8389       For let subcommands, you typically have to do something
8390       like the following:
8391           LET YTEMP = Y**2 + 8
8392           LET A = SUM YTEMP
8393
8394Default:
8395    None
8396
8397Synonyms:
8398    None
8399
8400Related Commands:
8401    PERCDIF  = Compute the percent difference of two numbers.
8402    RELDIF   = Compute the relative difference of two numbers.
8403    MIN      = Compute the minimum of two numbers.
8404    MAX      = Compute the maximum of two numbers.
8405    ABS      = Compute the absolute value of a number.
8406
8407Applications:
8408    Data Management
8409
8410Implementation Date:
8411    2010/12
8412
8413Program:
8414    LET X = SEQUENCE 0.1  0.1  3
8415    LET Y1 = X**2
8416    LET Y2 = X**(1/2)
8417    LET Y3 = PERCERR(Y1,Y2)
8418    SET WRITE DECIMALS 5
8419    PRINT Y1 Y2 Y3
8420
8421-----PERIODOGRAM-------------------------------------------------------
8422
8423PERIODOGRAM
8424
8425Name:
8426    PERIODOGRAM
8427
8428Type:
8429    Graphics Command
8430
8431Purpose:
8432    Generates an auto-periodogram.
8433
8434Description:
8435    A periodogram is a time series technique which carries out a
8436    Fourier decomposition of the time series.  It consists of:
8437      Vertical   axis = sum of squared Fourier coefficients
8438                        (a(i)**2 + b(i)**2);
8439      Horizontal axis = Fourier frequencies (1/n, 2/n, 3/n, ..., 1/2)
8440                        where n is the number of observations in the
8441                        time series.
8442
8443Syntax 1: (one time series, produces an auto-periodogram)
8444    PERIODOGRAM   <y>   <SUBSET/EXCEPT/FOR qualification>
8445    where <y> is a response variable;
8446    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
8447
8448Examples:
8449    PERIODOGRAM Y
8450    PERIODOGRAM Y2  SUBSET Y2 > 2
8451
8452Note:
8453    The periodogram assumes equi-spaced data.  Equi-spaced time series
8454    are inherently limited to detecting frequencies between 0 and 0.5.
8455
8456Note:
8457    The spectral plot is an improved form of the periodogram and is
8458    generally recommended in its place.  See the SPECTRUM command for
8459    details.
8460
8461Note:
8462    The CROSS-PERIODOGRAM, CO-PERIODOGRAM, and QUADRATURE PERIODOGRAM
8463    commands are recognized.  However, these variations are not
8464    implemented at this time.  These commands will generate a page
8465    erase, but no plot is generated.  These options are recognized for
8466    the SPECTRUM command.
8467
8468Default:
8469    None
8470
8471Synonyms:
8472    None
8473
8474Related Commands:
8475    SPECTRUM            = Generates a spectral plot.
8476    CORRELATION PLOT    = Generates a correlation plot.
8477    COMPLEX DEMOD  PLOT = Generates a complex demodulation plot.
8478    LAG PLOT            = Generates a lag plot.
8479    PLOT                = Generates a data or function plot.
8480    4-PLOT              = Generates 4-plot univariate analysis.
8481    CHARACTERS          = Sets the types for plot characters.
8482    LINES               = Sets the types for plot lines.
8483    SPIKES              = Sets the on/off switches for plot spikes.
8484    SUMMARY             = Generates a table of summary statistics.
8485    LET                 = Generates  sin/cos transformations (plus
8486                          much more).
8487    FIT                 = Carries out a least squares fit.
8488
8489Reference:
8490    "Spectral Analysis of Time Series", Jenkins and Watts, ...
8491
8492Applications:
8493    Frequency Time Series Analysis
8494
8495Implementation Date:
8496    Pre-1987
8497
8498Program:
8499    .  THIS SAMPLE PROGRAM READS THE FILE LEW.DAT IN THE
8500    .  DATAPLOT REFERENCE DIRECTORY.  SINCE IT CONTAINS 200
8501    .  DATA POINTS, IT IS NOT REPRODUCED HERE.  THESE DATA ARE
8502    .  BEAM DEFLECTION DATA.
8503    .
8504    SKIP 25
8505    READ LEW.DAT DEFLECT
8506    .
8507    SPIKE ON
8508    LINE BLANK
8509    YLIMITS 0 40000
8510    YTIC OFFSET 0 2000
8511    .
8512    PERIODOGRAM DEFLECT
8513
8514-----PERPINDICULAR LINES--------------------------------------------------
8515
8516PERPINDICULAR LINES
8517
8518Name:
8519    PERPINDICULAR LINES
8520
8521Type:
8522    LET Subcommand
8523
8524Purpose:
8525    Given a line defined by two points and a third point, find the line
8526    perpindicular to the first line and containing the third point.
8527
8528Syntax:
8529    LET <yout> <xout>= PERPINDICULAR LINES <x1> <y1> <x2> <y2> <x3> <y3>
8530                       <SUBSET/EXPCEPT/FOR qualification>
8531    where <x1> is a variable or parameter containing the x-coordinates for the
8532               first point of line one;
8533          <y1> is a variable or parameter containing the y-coordinates for the
8534               first point of line one;
8535          <x2> is a variable or parameter containing the x-coordinates for the
8536               second point of line one;
8537          <y2> is a variable or parameter containing the y-coordinates for the
8538               second point of line one;
8539          <x3> is a variable or parameter containing the x-coordinates for the
8540               third point;
8541          <y3> is a variable or parameter containing the y-coordinates for the
8542               third point;
8543          <yout> is a variable containing the y-coordinates of the
8544               second point of the perpindicular line;
8545          <xout> is a variable containing the x-coordinates of the
8546               second point of the perpindicular line;
8547    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
8548
8549Examples:
8550    LET YOUT XOUT = PERPINDICULAR LINES X1 Y1 X2 Y2 X3 Y3 X4 Y4
8551
8552Default:
8553    None
8554
8555Synonyms:
8556    None
8557
8558Related Commands:
8559    PARALLEL LINE      = Determine the coordinates for a point that defines
8560                         a parallel line determined by a point and a line
8561                         defined by two points.
8562    POINTS IN POLYGON  = Determine whether points are in the interior
8563                         of a convex polygon.
8564    CONVEX HULL        = Determine the convex hull of a set of points.
8565    TRANSFORM POINTS   = Perform location, scale, and rotation
8566                         transformation for a set of points.
8567    EXTREME POINTS     = Determine the extreme points of a set of points.
8568    LINE INTERSECTIONS = Determine the intersection points for a set of
8569                         lines.
8570
8571Applications:
8572    Computational Geometry
8573
8574Implementation Date:
8575    2012/10
8576
8577Program:
8578    dimension 40 columns
8579    skip 25
8580    read convhull.dat x y
8581    .
8582    let y2 x2 = 2d convex hull y x
8583    let xtemp = x2(1)
8584    let ytemp = y2(1)
8585    let y2 = combine y2 ytemp
8586    let x2 = combine x2 xtemp
8587    let x3 = x2
8588    let y3 = y2
8589    let n = size y2
8590    let nm1 = n - 1
8591    retain x2 y2 for i = 1 1 nm1
8592    retain x3 y3 for i = 2 1 n
8593    let slope = slope(x2,y2,x3,y3)
8594    let pdist = dpntline(xtemp,ytemp,x3,y3,slope)
8595    let xtempv = xtemp for i = 1 1 nm1
8596    let ytempv = ytemp for i = 1 1 nm1
8597    let y5 x5 = perpindicular line x2 y2 x3 y3 xtempv ytempv
8598    .
8599    set write decimals 4
8600    print "Anchor Point: (^xtemp,^ytemp)"
8601    print " "
8602    print " "
8603    print x2 y2 x3 y3 x5 y5
8604
8605-----PEXCDF (LET)--------------------------------
8606
8607PEXCDF
8608
8609Name:
8610    PEXCDF (LET)
8611
8612Type:
8613    Library Function
8614
8615Purpose:
8616    Compute the exponential power cumulative distribution function
8617    with shape parameter beta.
8618
8619Description:
8620    The exponential power distribution has the following cumulative
8621    distribution function:
8622
8623        F(x;beta) = 1 - EXP(1 - EXP(X**BETA))
8624                    x > 0; beta > 0
8625
8626    with beta denoting the shape parameter.
8627
8628    This distribution can be generalized with location and
8629    scale parameters using the relation
8630
8631         F(x;beta,loc,scale) = F((x-loc)/scale;beta,0,1)
8632
8633    This distribution was proposed by Dhillon as useful
8634    distribution for reliability applications since it can
8635    have increasing, decreasing, or bathtub shaped hazard
8636    functions.
8637
8638Syntax:
8639    LET <y> = PEXCDF(<x>,<beta>,<loc>,<scale>)
8640              <SUBSET/EXCEPT/FOR qualification>
8641    where <x> is a number, parameter, or variable containing positive
8642               values;
8643          <y> is a variable or a parameter (depending on what <x> is)
8644               where the computed exponential power cdf value is
8645               stored;
8646          <beta> is a positive number, parameter, or variable that
8647               specifies the shape parameter;
8648          <loc> is a number, parameter, or variable that specifies
8649               the location parameter;
8650          <scale> is a positive number, parameter, or variable that
8651               specifies the scale parameter;
8652    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
8653
8654    If <loc> and <scale> are omitted, they default to 0 and 1,
8655    respectively.
8656
8657Examples:
8658    LET A = PEXCDF(0.3,2.5)
8659    LET A = PEXCDF(X1,2.5,0,10)
8660    PLOT PEXCDF(X,2.5,0,3) FOR X = 0.1  0.1  10
8661
8662Note:
8663    The 11/2007 version changed the syntax for this function
8664    from
8665
8666        LET A = PEXCDF(X,ALPHA,BETA,LOC,SCALE)
8667
8668    to
8669
8670        LET A = PEXCDF(X,BETA,LOC,SCALE)
8671
8672    This was done since ALPHA is in fact a scale parameter
8673    (in the articles listed in the References section, ALPHA
8674    is actually the reciprocal of the scale parameter).
8675
8676Note:
8677    Library functions are distinguished from let subcommands
8678    in the following ways.
8679    1) Functions enclose the input value in parenthesis.  Let
8680       subcommands use spaces.
8681    2) Functions can accept (and return) either parameters
8682       (i.e., single values) or variables (i.e., an array of
8683       values) while let subcommands are specific in which they
8684       accept as input and what they return as output.
8685    3) Functions can accept expressions while let subcommands
8686       do not.  For example, the following is legal:
8687           LET Y2 = ABS(Y1-INT(Y1))
8688       For let subcommands, you typically have to do something
8689       like the following:
8690           LET YTEMP = Y**2 + 8
8691           LET A = SUM YTEMP
8692
8693Default:
8694    None
8695
8696Synonyms:
8697    None
8698
8699Related Commands:
8700    PEXPDF  = Compute the exponential power probability density
8701              function.
8702    PEXPPF  = Compute the exponential power percent point function.
8703    PEXHAZ  = Compute the exponential power hazard function.
8704    PEXCHAZ = Compute the exponential power cumulative hazard
8705              function.
8706    ALPPDF  = Compute the alpha probability density function.
8707    WEIPDF  = Compute the Weibull probability density function.
8708    LGNPDF  = Compute the log-normal probability density function.
8709    NORCDF  = Compute the normal cumulative distribution function.
8710    NORPDF  = Compute the normal probability density function.
8711
8712References:
8713    Johnson, Kotz, and Balakrishnan (1994), "Continuous Univariate
8714    Distributions--Volume 2", Second Edition, John Wiley and Sons,
8715    pp. 643-644.
8716
8717    Dhillon (1981), "Life Distributions", IEEE Transactions on
8718    Reliability, Vol. R-30, No. 5, pp. 457-459.
8719
8720Applications:
8721    Reliability, accelerated life testing
8722
8723Implementation Date:
8724    1998/4
8725    2007/11: Corrected the second shape parameter to be the
8726             scale parameter
8727
8728Program:
8729    LABEL CASE ASIS
8730    TITLE CASE ASIS
8731    TITLE OFFSET 2
8732    .
8733    MULTIPLOT 2 2
8734    MULTIPLOT CORNER COORDINATES 0 0 100 95
8735    MULTIPLOT SCALE FACTOR 2
8736    .
8737    LET BETA  = 0.5
8738    TITLE BETA = ^beta
8739    PLOT PEXCDF(X,BETA) FOR X = 0.01  0.01  2
8740    .
8741    LET BETA  = 1
8742    TITLE BETA = ^beta
8743    PLOT PEXCDF(X,BETA) FOR X = 0.01  0.01  2
8744    .
8745    LET BETA  = 2
8746    TITLE BETA = ^beta
8747    PLOT PEXCDF(X,BETA) FOR X = 0.01  0.01  2
8748    .
8749    LET BETA  = 5
8750    TITLE BETA = ^beta
8751    PLOT PEXCDF(X,BETA) FOR X = 0.01  0.01  2
8752    .
8753    END OF MULTIPLOT
8754    .
8755    JUSTIFICATION CENTER
8756    MOVE 50 97
8757    TEXT Exponential Power Cumulative Distribution Functions
8758
8759-----PEXCHAZ (LET)--------------------------------
8760
8761PEXCHAZ
8762
8763Name:
8764    PEXCHAZ (LET)
8765
8766Type:
8767    Library Function
8768
8769Purpose:
8770    Compute the exponential power cumulative hazard function
8771    with shape parameter beta.
8772
8773Description:
8774    The exponential power distribution has the following cumulative
8775    hazard function:
8776
8777        H(x;beta) = EXP(x**beta) - 1
8778                    x > 0; beta > 0
8779
8780    with beta denoting the shape parameter.
8781
8782    This distribution can be generalized with location and
8783    scale parameters using the relation
8784
8785         H(x;beta,loc,scale) = H((x-loc)/scale;beta,0,1)
8786
8787    This distribution was proposed by Dhillon as useful
8788    distribution for reliability applications since it can
8789    have increasing, decreasing, or bathtub shaped hazard
8790    functions.
8791
8792Syntax:
8793    LET <y> = PEXCHAZ(<x>,<beta>,<loc>,<scale>)
8794              <SUBSET/EXCEPT/FOR qualification>
8795    where <x> is a number, parameter, or variable containing positive
8796               values;
8797          <y> is a variable or a parameter (depending on what <x> is)
8798               where the computed exponential power cumulative
8799               hazard value is stored;
8800          <beta> is a positive number, parameter, or variable that
8801               specifies the shape parameter;
8802          <loc> is a number, parameter, or variable that specifies
8803               the location parameter;
8804          <scale> is a positive number, parameter, or variable that
8805               specifies the scale parameter;
8806    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
8807
8808    If <loc> and <scale> are omitted, they default to 0 and 1,
8809    respectively.
8810
8811Examples:
8812    LET A = PEXCHAZ(0.3,2.5)
8813    LET A = PEXCHAZ(X1,2.5,0,10)
8814    PLOT PEXCHAZ(X,2.5,0,3) FOR X = 0.1  0.1  10
8815
8816Note:
8817    The 11/2007 version changed the syntax for this function
8818    from
8819
8820        LET A = PEXCHAZ(X,ALPHA,BETA,LOC,SCALE)
8821
8822    to
8823
8824        LET A = PEXCHAZ(X,BETA,LOC,SCALE)
8825
8826    This was done since ALPHA is in fact a scale parameter
8827    (in the articles listed in the References section, ALPHA
8828    is actually the reciprocal of the scale parameter).
8829
8830Note:
8831    Library functions are distinguished from let subcommands
8832    in the following ways.
8833    1) Functions enclose the input value in parenthesis.  Let
8834       subcommands use spaces.
8835    2) Functions can accept (and return) either parameters
8836       (i.e., single values) or variables (i.e., an array of
8837       values) while let subcommands are specific in which they
8838       accept as input and what they return as output.
8839    3) Functions can accept expressions while let subcommands
8840       do not.  For example, the following is legal:
8841           LET Y2 = ABS(Y1-INT(Y1))
8842       For let subcommands, you typically have to do something
8843       like the following:
8844           LET YTEMP = Y**2 + 8
8845           LET A = SUM YTEMP
8846
8847Default:
8848    None
8849
8850Synonyms:
8851    None
8852
8853Related Commands:
8854    PEXCDF  = Compute the exponential power cumulative distribution
8855              function.
8856    PEXPDF  = Compute the exponential power probability density
8857              function.
8858    PEXPPF  = Compute the exponential power percent point function.
8859    PEXHAZ  = Compute the exponential power hazard function.
8860    ALPPDF  = Compute the alpha probability density function.
8861    WEIPDF  = Compute the Weibull probability density function.
8862    LGNPDF  = Compute the log-normal probability density function.
8863    NORCDF  = Compute the normal cumulative distribution function.
8864    NORPDF  = Compute the normal probability density function.
8865
8866References:
8867    Johnson, Kotz, and Balakrishnan (1994), "Continuous Univariate
8868    Distributions--Volume 2", Second Edition, John Wiley and Sons,
8869    pp. 643-644.
8870
8871    Dhillon (1981), "Life Distributions", IEEE Transactions on
8872    Reliability, Vol. R-30, No. 5, pp. 457-459.
8873
8874Applications:
8875    Reliability, accelerated life testing
8876
8877Implementation Date:
8878    1998/4
8879    2007/11: Corrected the second shape parameter to be the
8880             scale parameter
8881
8882Program:
8883    LABEL CASE ASIS
8884    TITLE CASE ASIS
8885    TITLE OFFSET 2
8886    .
8887    MULTIPLOT 2 2
8888    MULTIPLOT CORNER COORDINATES 0 0 100 95
8889    MULTIPLOT SCALE FACTOR 2
8890    .
8891    LET BETA  = 0.5
8892    TITLE BETA = ^beta
8893    PLOT PEXCHAZ(X,BETA) FOR X = 0.01  0.01  2
8894    .
8895    LET BETA  = 1
8896    TITLE BETA = ^beta
8897    PLOT PEXCHAZ(X,BETA) FOR X = 0.01  0.01  2
8898    .
8899    LET BETA  = 2
8900    TITLE BETA = ^beta
8901    PLOT PEXCHAZ(X,BETA) FOR X = 0.01  0.01  2
8902    .
8903    LET BETA  = 5
8904    TITLE BETA = ^beta
8905    PLOT PEXCHAZ(X,BETA) FOR X = 0.01  0.01  2
8906    .
8907    END OF MULTIPLOT
8908    .
8909    JUSTIFICATION CENTER
8910    MOVE 50 97
8911    TEXT Exponential Power Cumulative Hazard Functions
8912
8913-----PEXHAZ (LET)--------------------------------
8914
8915PEXHAZ
8916
8917Name:
8918    PEXHAZ (LET)
8919
8920Type:
8921    Library Function
8922
8923Purpose:
8924    Compute the exponential power hazard function with shape
8925    parameter beta.
8926
8927Description:
8928    The exponential power distribution has the following hazard
8929    function:
8930
8931        h(x;beta) = beta*x**(beta-1)*EXP(x**beta)
8932                    x > 0; beta > 0
8933
8934    with beta denoting the shape parameter.
8935
8936    This distribution can be generalized with location and
8937    scale parameters using the relation
8938
8939         h(x;beta,loc,scale) = (1/scale)*h((x-loc)/scale;beta,0,1)
8940
8941    This distribution was proposed by Dhillon as useful
8942    distribution for reliability applications since it can
8943    have increasing, decreasing, or bathtub shaped hazard
8944    functions.
8945
8946Syntax:
8947    LET <y> = PEXHAZ(<x>,<beta>,<loc>,<scale>)
8948              <SUBSET/EXCEPT/FOR qualification>
8949    where <x> is a number, parameter, or variable containing positive
8950               values;
8951          <y> is a variable or a parameter (depending on what <x> is)
8952               where the computed exponential power hazard value is
8953               stored;
8954          <beta> is a positive number, parameter, or variable that
8955               specifies the shape parameter;
8956          <loc> is a number, parameter, or variable that specifies
8957               the location parameter;
8958          <scale> is a positive number, parameter, or variable that
8959               specifies the scale parameter;
8960    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
8961
8962    If <loc> and <scale> are omitted, they default to 0 and 1,
8963    respectively.
8964
8965Examples:
8966    LET A = PEXHAZ(0.3,2.5)
8967    LET A = PEXHAZ(X1,2.5,0,10)
8968    PLOT PEXHAZ(X,2.5,0,3) FOR X = 0.1  0.1  10
8969
8970Note:
8971    The 11/2007 version changed the syntax for this function
8972    from
8973
8974        LET A = PEXHAZ(X,ALPHA,BETA,LOC,SCALE)
8975
8976    to
8977
8978        LET A = PEXHAZ(X,BETA,LOC,SCALE)
8979
8980    This was done since ALPHA is in fact a scale parameter
8981    (in the articles listed in the References section, ALPHA
8982    is actually the reciprocal of the scale parameter).
8983
8984Note:
8985    Library functions are distinguished from let subcommands
8986    in the following ways.
8987    1) Functions enclose the input value in parenthesis.  Let
8988       subcommands use spaces.
8989    2) Functions can accept (and return) either parameters
8990       (i.e., single values) or variables (i.e., an array of
8991       values) while let subcommands are specific in which they
8992       accept as input and what they return as output.
8993    3) Functions can accept expressions while let subcommands
8994       do not.  For example, the following is legal:
8995           LET Y2 = ABS(Y1-INT(Y1))
8996       For let subcommands, you typically have to do something
8997       like the following:
8998           LET YTEMP = Y**2 + 8
8999           LET A = SUM YTEMP
9000
9001Default:
9002    None
9003
9004Synonyms:
9005    None
9006
9007Related Commands:
9008    PEXCDF  = Compute the exponential power cumulative distribution
9009              function.
9010    PEXCHAZ = Compute the exponential power cumulative hazard
9011              function.
9012    PEXPDF  = Compute the exponential power probability density
9013              function.
9014    PEXPPF  = Compute the exponential power percent point function.
9015    ALPPDF  = Compute the alpha probability density function.
9016    WEIPDF  = Compute the Weibull probability density function.
9017    LGNPDF  = Compute the log-normal probability density function.
9018    NORCDF  = Compute the normal cumulative distribution function.
9019    NORPDF  = Compute the normal probability density function.
9020
9021References:
9022    Johnson, Kotz, and Balakrishnan (1994), "Continuous Univariate
9023    Distributions--Volume 2", Second Edition, John Wiley and Sons,
9024    pp. 643-644.
9025
9026    Dhillon (1981), "Life Distributions", IEEE Transactions on
9027    Reliability, Vol. R-30, No. 5, pp. 457-459.
9028
9029Applications:
9030    Reliability, accelerated life testing
9031
9032Implementation Date:
9033    1998/4
9034    2007/11: Corrected the second shape parameter to be the
9035             scale parameter
9036
9037Program:
9038    LABEL CASE ASIS
9039    TITLE CASE ASIS
9040    TITLE OFFSET 2
9041    .
9042    MULTIPLOT 2 2
9043    MULTIPLOT CORNER COORDINATES 0 0 100 95
9044    MULTIPLOT SCALE FACTOR 2
9045    .
9046    LET BETA  = 0.5
9047    TITLE BETA = ^beta
9048    PLOT PEXHAZ(X,BETA) FOR X = 0.01  0.01  2
9049    .
9050    LET BETA  = 1
9051    TITLE BETA = ^beta
9052    PLOT PEXHAZ(X,BETA) FOR X = 0.01  0.01  2
9053    .
9054    LET BETA  = 2
9055    TITLE BETA = ^beta
9056    PLOT PEXHAZ(X,BETA) FOR X = 0.01  0.01  2
9057    .
9058    LET BETA  = 5
9059    TITLE BETA = ^beta
9060    PLOT PEXHAZ(X,BETA) FOR X = 0.01  0.01  2
9061    .
9062    END OF MULTIPLOT
9063    .
9064    JUSTIFICATION CENTER
9065    MOVE 50 97
9066    TEXT Exponential Power Hazard Functions
9067
9068-----PEXPDF (LET)--------------------------------
9069
9070PEXPDF
9071
9072Name:
9073    PEXPDF (LET)
9074
9075Type:
9076    Library Function
9077
9078Purpose:
9079    Compute the exponential power probability density function with
9080    shape parameter beta.
9081
9082Description:
9083    The exponential power distribution has the following probability
9084    density function:
9085
9086        f(x;beta) = beta*x**(beta-1)*EXP(x**beta)*
9087                    EXP(1 - EXP(x**beta))
9088                    x > 0; beta > 0
9089
9090    with beta denoting the shape parameter.
9091
9092    This distribution can be generalized with location and
9093    scale parameters using the relation
9094
9095         f(x;beta,loc,scale) = (1/scale)*f((x-loc)/scale;beta,0,1)
9096
9097    This distribution was proposed by Dhillon as useful
9098    distribution for reliability applications since it can
9099    have increasing, decreasing, or bathtub shaped hazard
9100    functions.
9101
9102Syntax:
9103    LET <y> = PEXPDF(<x>,<beta>,<loc>,<scale>)
9104              <SUBSET/EXCEPT/FOR qualification>
9105    where <x> is a number, parameter, or variable containing positive
9106               values;
9107          <y> is a variable or a parameter (depending on what <x> is)
9108               where the computed exponential power pdf value is
9109               stored;
9110          <beta> is a positive number, parameter, or variable that
9111               specifies the shape parameter;
9112          <loc> is a number, parameter, or variable that specifies
9113               the location parameter;
9114          <scale> is a positive number, parameter, or variable that
9115               specifies the scale parameter;
9116    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
9117
9118    If <loc> and <scale> are omitted, they default to 0 and 1,
9119    respectively.
9120
9121Examples:
9122    LET A = PEXPDF(0.3,2.5)
9123    LET A = PEXPDF(X1,2.5,0,10)
9124    PLOT PEXPDF(X,2.5,0,3) FOR X = 0.1  0.1  10
9125
9126Note:
9127    The 11/2007 version changed the syntax for this function
9128    from
9129
9130        LET A = PEXPDF(X,ALPHA,BETA,LOC,SCALE)
9131
9132    to
9133
9134        LET A = PEXPDF(X,BETA,LOC,SCALE)
9135
9136    This was done since ALPHA is in fact a scale parameter
9137    (in the articles listed in the References section, ALPHA
9138    is actually the reciprocal of the scale parameter).
9139
9140Note:
9141    Exponential power random numbers, probability plots, and
9142    goodness of fit tests can be generated with the commands:
9143
9144       LET BETA = <value>
9145       LET Y = EXPONENTIAL POWER RANDOM NUMBERS FOR I = 1 1 N
9146       EXPONENTIAL POWER PROBABILITY PLOT Y
9147       EXPONENTIAL POWER PROBABILITY PLOT Y2 X2
9148       EXPONENTIAL POWER PROBABILITY PLOT Y3 XLOW XHIGH
9149       EXPONENTIAL POWER KOLMOGOROV SMIRNOV GOODNESS OF FIT Y
9150       EXPONENTIAL POWER CHI-SQUARE GOODNESS OF FIT Y2 X2
9151       EXPONENTIAL POWER CHI-SQUARE GOODNESS OF FIT Y3 XLOW XHIGH
9152
9153    The following commands can be used to estimate the beta
9154    shape parameter for the exponential power distribution:
9155
9156       LET BETA1 = <value>
9157       LET BETA2 = <value>
9158       EXPONENTIAL POWER PPCC PLOT Y
9159       EXPONENTIAL POWER PPCC PLOT Y2 X2
9160       EXPONENTIAL POWER PPCC PLOT Y3 XLOW XHIGH
9161       EXPONENTIAL POWER KS PLOT Y
9162       EXPONENTIAL POWER KS PLOT Y2 X2
9163       EXPONENTIAL POWER KS PLOT Y3 XLOW XHIGH
9164
9165    The default values for BETA1 and BETA2 are 0.5 and 10.
9166
9167    The probability plot can then be used to estimate the
9168    location and scale (location = PPA0, scale = PPA1).
9169
9170    The 2-parameter exponential power maximum likelihood
9171    estimates can be obtained using the command
9172
9173       EXPONENTIAL POWER MAXIMUM LIKELIHOOD Y
9174
9175
9176    solution of the following simultaneous equations:
9177
9178       (n/beta) + n*LOG(alpha) + SUM[i=1 to n][A(i)] -
9179       SUM[i=1 to n][B(i)*C(i)*EXP(B(i))] +
9180       SUM[i=1 to n][B(i)*C(i)] = 0
9181
9182       (beta*n/alpha) -
9183       (beta/alpha)*SUM[i=1 to n][B(i)*EXP(B(i))] +
9184       SUM[i=1 to n][B(i)] = 0
9185
9186    where
9187
9188       alpha = 1/scale
9189       A(i)  = LOG(X(i))
9190       B(i)  = (alpha*X(i))**beta
9191       C(i)  = LOG(alpha*X(i))
9192
9193    Our experience indicates that the maximum likelihood
9194    can fail, particularly when the scale parameter is > 1.
9195    Specifying improved starting values can sometimes help
9196    (for example, use the estimates obtained from the ppcc/
9197    probability plot method as starting values).  These can
9198    be specified with the commands
9199
9200       LET ALPHASV = <value>
9201       LET BETASV  = <value>
9202
9203    In this context, ALPHASV is the starting value for the
9204    scale parameter, not the reciprocal of the scale parameter.
9205
9206    The BOOTSTRAP DISTRIBUTION command can be used to find
9207    uncertainty intervals for the ppcc plot and the ks plot
9208    methods.
9209
9210Note:
9211    Library functions are distinguished from let subcommands
9212    in the following ways.
9213    1) Functions enclose the input value in parenthesis.  Let
9214       subcommands use spaces.
9215    2) Functions can accept (and return) either parameters
9216       (i.e., single values) or variables (i.e., an array of
9217       values) while let subcommands are specific in which they
9218       accept as input and what they return as output.
9219    3) Functions can accept expressions while let subcommands
9220       do not.  For example, the following is legal:
9221           LET Y2 = ABS(Y1-INT(Y1))
9222       For let subcommands, you typically have to do something
9223       like the following:
9224           LET YTEMP = Y**2 + 8
9225           LET A = SUM YTEMP
9226
9227Default:
9228    None
9229
9230Synonyms:
9231    None
9232
9233Related Commands:
9234    PEXCDF  = Compute the exponential power cumulative distribution
9235              function.
9236    PEXPPF  = Compute the exponential power percent point function.
9237    PEXHAZ  = Compute the exponential power hazard function.
9238    PEXCHAZ = Compute the exponential power cumulative hazard
9239              function.
9240    ALPPDF  = Compute the alpha probability density function.
9241    WEIPDF  = Compute the Weibull probability density function.
9242    LGNPDF  = Compute the log-normal probability density function.
9243    NORCDF  = Compute the normal cumulative distribution function.
9244    NORPDF  = Compute the normal probability density function.
9245
9246References:
9247    Johnson, Kotz, and Balakrishnan (1994), "Continuous Univariate
9248    Distributions--Volume 2", Second Edition, John Wiley and Sons,
9249    pp. 643-644.
9250
9251    Dhillon (1981), "Life Distributions", IEEE Transactions on
9252    Reliability, Vol. R-30, No. 5, pp. 457-459.
9253
9254Applications:
9255    Reliability, accelerated life testing
9256
9257Implementation Date:
9258    1998/4
9259    2007/11: Corrected the second shape parameter to be the
9260             scale parameter
9261
9262Program 1:
9263    LABEL CASE ASIS
9264    TITLE CASE ASIS
9265    TITLE OFFSET 2
9266    .
9267    MULTIPLOT 2 2
9268    MULTIPLOT CORNER COORDINATES 0 0 100 95
9269    MULTIPLOT SCALE FACTOR 2
9270    .
9271    LET BETA  = 0.5
9272    TITLE BETA = ^beta
9273    PLOT PEXPDF(X,BETA) FOR X = 0.01  0.01  2
9274    .
9275    LET BETA  = 1
9276    TITLE BETA = ^beta
9277    PLOT PEXPDF(X,BETA) FOR X = 0.01  0.01  2
9278    .
9279    LET BETA  = 2
9280    TITLE BETA = ^beta
9281    PLOT PEXPDF(X,BETA) FOR X = 0.01  0.01  2
9282    .
9283    LET BETA  = 5
9284    TITLE BETA = ^beta
9285    PLOT PEXPDF(X,BETA) FOR X = 0.01  0.01  2
9286    .
9287    END OF MULTIPLOT
9288    .
9289    JUSTIFICATION CENTER
9290    MOVE 50 97
9291    TEXT Exponential Power Probability Density Functions
9292
9293Program 2:
9294    let beta = 2.4
9295    let y = exponential power random numbers for i = 1 1 200
9296    let y = 0.6*y
9297    let betasav = beta
9298    let amax = maximum y
9299    .
9300    exponential power ppcc plot y
9301    let beta1 = beta - 1
9302    let beta1 = max(beta1,0.1)
9303    let beta2 = beta + 1
9304    y1label Correlation Coefficient
9305    x1label Beta
9306    exponential power ppcc plot y
9307    justification center
9308    move 50 6
9309    let beta = shape
9310    text Betahat = ^beta (True Value: ^betasav)
9311    .
9312    char x
9313    line bl
9314    y1label Data
9315    x1label Theoretical
9316    exponential power prob plot y
9317    move 50 6
9318    text Location = ^ppa0, Scale = ^ppa1
9319    move 50 2
9320    text PPCC = ^ppcc
9321    char bl
9322    line so
9323    label
9324    .
9325    relative histogram y
9326    limits freeze
9327    pre-erase off
9328    plot pexpdf(x,beta,ppa0,ppa1) for x = 0.01 .01 amax
9329    limits
9330    pre-erase on
9331    .
9332    let ksloc = ppa0
9333    let ksscale = ppa1
9334    exponential power kolm smir goodness of fit y
9335    .
9336    exponential power mle y
9337    .
9338    let beta = betaml
9339    let ksloc = ppa0
9340    let ksscale = alphaml
9341    exponential power kolm smir goodness of fit y
9342
9343-----PEXPPF (LET)--------------------------------
9344
9345PEXPPF
9346
9347Name:
9348    PEXPPF (LET)
9349
9350Type:
9351    Library Function
9352
9353Purpose:
9354    Compute the exponential power percent point function
9355    with shape parameter beta.
9356
9357Description:
9358    The exponential power distribution has the following percent
9359    point function:
9360
9361        G(p;beta) = -{LOG[1 - LOG(1-p)]}**(1/beta)
9362                    0 < p < 1; beta > 0
9363
9364    with beta denoting the shape parameter.
9365
9366    This distribution can be generalized with location and
9367    scale parameters using the relation
9368
9369         G(p;beta,loc,scale) = loc + scale*G(p;beta,0,1)
9370
9371    This distribution was proposed by Dhillon as useful
9372    distribution for reliability applications since it can
9373    have increasing, decreasing, or bathtub shaped hazard
9374    functions.
9375
9376Syntax:
9377    LET <y> = PEXPPF(<x>,<beta>,<loc>,<scale>)
9378              <SUBSET/EXCEPT/FOR qualification>
9379    where <x> is a number, parameter, or variable containing positive
9380               values;
9381          <y> is a variable or a parameter (depending on what <x> is)
9382               where the computed exponential power ppf value is
9383               stored;
9384          <beta> is a positive number, parameter, or variable that
9385               specifies the shape parameter;
9386          <loc> is a number, parameter, or variable that specifies
9387               the location parameter;
9388          <scale> is a positive number, parameter, or variable that
9389               specifies the scale parameter;
9390    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
9391
9392    If <loc> and <scale> are omitted, they default to 0 and 1,
9393    respectively.
9394
9395Examples:
9396    LET A = PEXPPF(0.95,2.5)
9397    LET A = PEXPPF(P1,2.5,0,10)
9398    PLOT PEXPPF(P,2.5,0,3) FOR P = 0.01  0.01  0.99
9399
9400Note:
9401    The 11/2007 version changed the syntax for this function
9402    from
9403
9404        LET A = PEXPPF(P,ALPHA,BETA,LOC,SCALE)
9405
9406    to
9407
9408        LET A = PEXPPF(P,BETA,LOC,SCALE)
9409
9410    This was done since ALPHA is in fact a scale parameter
9411    (in the articles listed in the References section, ALPHA
9412    is actually the reciprocal of the scale parameter).
9413
9414Note:
9415    Library functions are distinguished from let subcommands
9416    in the following ways.
9417    1) Functions enclose the input value in parenthesis.  Let
9418       subcommands use spaces.
9419    2) Functions can accept (and return) either parameters
9420       (i.e., single values) or variables (i.e., an array of
9421       values) while let subcommands are specific in which they
9422       accept as input and what they return as output.
9423    3) Functions can accept expressions while let subcommands
9424       do not.  For example, the following is legal:
9425           LET Y2 = ABS(Y1-INT(Y1))
9426       For let subcommands, you typically have to do something
9427       like the following:
9428           LET YTEMP = Y**2 + 8
9429           LET A = SUM YTEMP
9430
9431Default:
9432    None
9433
9434Synonyms:
9435    None
9436
9437Related Commands:
9438    PEXCDF  = Compute the exponential power cumulative distribution
9439              function.
9440    PEXPDF  = Compute the exponential power probability density
9441              function.
9442    PEXHAZ  = Compute the exponential power hazard function.
9443    PEXCHAZ = Compute the exponential power cumulative hazard
9444              function.
9445    ALPPDF  = Compute the alpha probability density function.
9446    WEIPDF  = Compute the Weibull probability density function.
9447    LGNPDF  = Compute the log-normal probability density function.
9448    NORCDF  = Compute the normal cumulative distribution function.
9449    NORPDF  = Compute the normal probability density function.
9450
9451References:
9452    Johnson, Kotz, and Balakrishnan (1994), "Continuous Univariate
9453    Distributions--Volume 2", Second Edition, John Wiley and Sons,
9454    pp. 643-644.
9455
9456    Dhillon (1981), "Life Distributions", IEEE Transactions on
9457    Reliability, Vol. R-30, No. 5, pp. 457-459.
9458
9459Applications:
9460    Reliability, accelerated life testing
9461
9462Implementation Date:
9463    1998/4
9464    2007/11: Corrected the second shape parameter to be the
9465             scale parameter
9466
9467Program:
9468    LABEL CASE ASIS
9469    TITLE CASE ASIS
9470    TITLE OFFSET 2
9471    .
9472    MULTIPLOT 2 2
9473    MULTIPLOT CORNER COORDINATES 0 0 100 95
9474    MULTIPLOT SCALE FACTOR 2
9475    .
9476    LET BETA  = 0.5
9477    TITLE BETA = ^beta
9478    PLOT PEXPPF(P,BETA) FOR P = 0.01  0.01  0.99
9479    .
9480    LET BETA  = 1
9481    TITLE BETA = ^beta
9482    PLOT PEXPPF(P,BETA) FOR P = 0.01  0.01  0.99
9483    .
9484    LET BETA  = 2
9485    TITLE BETA = ^beta
9486    PLOT PEXPPF(P,BETA) FOR P = 0.01  0.01  0.99
9487    .
9488    LET BETA  = 5
9489    TITLE BETA = ^beta
9490    PLOT PEXPPF(P,BETA) FOR P = 0.01  0.01  0.99
9491    .
9492    END OF MULTIPLOT
9493    .
9494    JUSTIFICATION CENTER
9495    MOVE 50 97
9496    TEXT Exponential Power Percent Point Functions
9497
9498-----PHASE PLANE DIAGRAM--------------------------------------
9499
9500PHASE PLANE DIAGRAM
9501
9502Name:
9503    PHASE PLANE DIAGRAM
9504
9505Type:
9506    Graphics Command
9507
9508Purpose:
9509    Generates a phase plane diagram.
9510
9511Description:
9512    A first order differential equation is one of the form:
9513        y'=F(t,y)
9514    where t is an independent variable (often it is time) and y is a
9515    dependent variable.  A second order differential equation is one
9516    of the form:
9517        y''=F(t,y,y')
9518    Second (and higher order) differential equations are commonly
9519    reordered as a system of first order differential equations.  For
9520    the second order equation, this is done as:
9521        y1=y
9522        y2=y1'   = y'
9523        y3=y2'   = y''
9524    and the system of equations is:
9525        y1'=y2
9526        y2'=y3
9527    For example, the differential equation
9528        y''+y'=x**2 + y**2
9529    can be transformed into the two equations
9530        y1'=y2
9531        y2'=x**2+y**2-y2
9532
9533    The phase space is the coordinate system determined by the
9534    dependent variables (y for first order equation, y1 and y2 for the
9535    second order case).  For the second order differential equation,
9536    the phase diagram (or phase portrait) plots the points:
9537          (y1(ti),y2(ti))
9538    where ti is the time at i = 0, 1, 2, ..., n.  In the original
9539    equations these points are:
9540          (y(ti),y'(ti))
9541    This idea extends to higher dimensions as well.
9542
9543    If the functional forms are known, then the RUNGE KUTTA command
9544    can be used to find y and y', and the phase diagram can be plotted
9545    from those variables.
9546
9547    The PHASE PLANE DIAGRAM is used for the case where the functional
9548    form of the differential equation is unknown.  It works on a set of
9549    data points (i.e., values for y and optionally for time) to give
9550    a graphical estimate of the phase diagram. It uses the fact that
9551    y'=dy/dx (i.e., the change in y divided by the change in x).  The
9552    one variable case (i.e., y only) plots the following:
9553       Vertical   axis = Y(i+1) - Y(i);
9554       Horizontal axis = Y(i).
9555    The two variable case plots the following:
9556       Vertical   axis = (Y(i+1) - Y(i))/(X(i+1)-X(i));
9557       Horizontal axis = Y(i).
9558    For the one variable case, the X values are assumed to be equally
9559    spaced and equal to 1 (that is, dx=1) and Y(i+1) - Y(i) is an
9560    estimate of dy.  For the two variable case, X(i+1) - X(i) is an
9561    estimate of dx and Y(i+1) - Y(i) is an estimate of dy.  In either
9562    case, the vertical axis is an estimate of the derivative of Y.
9563
9564Syntax 1:
9565    PHASE PLANE DIAGRAM  <y>  <SUBSET/EXCEPT/FOR qualification>
9566    where <y> is a response variable;
9567    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
9568
9569Syntax 2:
9570    PHASE PLANE DIAGRAM <y> <x> <SUBSET/EXCEPT/FOR qualification>
9571    where <y> is a response variable;
9572          <x> is the independent variable (usually time);
9573    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
9574
9575Examples:
9576    PHASE PLANE DIAGRAM Y1 X
9577    PHASE PLANE DIAGRAM Y1
9578    PHASE PLANE DIAGRAM Y1 Y2 SUBSET TAG > 3
9579
9580Note:
9581    A related technique is to plot y(t+1) vs. y(t).  This can be done
9582    in DATAPLOT with the LAG PLOT command.
9583
9584Default:
9585    None
9586
9587Synonyms:
9588    None
9589
9590Related Commands:
9591    LINES          = Sets type for plot lines.
9592    CHARACTER      = Sets type for plot characters.
9593    LAG PLOT       = Generates a lag plot.
9594    PLOT           = Generates a data/function plot.
9595    MULTIPLOT      = Allows multiple plots per page
9596    RUNGE KUTTA    = Numerically solve a first or second order
9597                     differential equation.
9598
9599Reference:
9600    "Differential Equations, Dynamical Systems, and Linear Algebra",
9601    Hirsch and Smale, Academic Press, 1974 (pp. 2-4).
9602
9603    "Chaos", James Gleick, Penguin Press, 1987 (pp. 264-266).
9604
9605Applications:
9606    Differential Equations
9607
9608Implementation Date:
9609    88/9
9610
9611Program:
9612    . SOURCE--DORN, WILLIAM S. AND MCCRACKEN, DANIEL D., NUMERICAL METHODS
9613    .         WITH FORTRAN IV CASE STUDIES, JOHN WILEY AND SONS, INC.,
9614    .         NEW YORK, 1972, PAGES 391-401.
9615    . TO FIND--DEFLECTION VALUE FOR VARIOUS DISTANCES OUT ONTO THE BEAM
9616    . NOTE--THE ELASTIC DEFLECTION SATISFIES THE DIFFERENTIAL EQUATION--
9617    .       Y'' / (1 + (Y')**2 )**(3/2)   =   P*(L-X) / (E*I)
9618    .       Y'' = P*(L-X) / (E*I)     *    (1 + (Y')**2 )**(3/2)
9619    .       WITH Y(0) = 0 AND Y'(0) = 0
9620    .       WHERE
9621    .          Y = DEFLECTION FROM HORIZONTAL (IN INCHES)
9622    .          X = DISTANCE OUT ONTO BEAM (X = 0, 2, 4, 6, ..., 100 INCHES)
9623    .          P = LOAD (IN POUNDS) AT FREE END (HERE = 64)
9624    .          L = LENGTH (IN INCHES) OF BEAM (HERE = 100)
9625    .          E = YOUNG'S MODULUS (= 6 * 10**6)
9626    .          I = MOMENT OF INERTIA OF CROSS SECTION (HERE = 0.128 INCHES**4)
9627    . -----START POINT-----------------------------------
9628    .
9629    .      STEP 1--DEFINE THE PHYSICAL PARAMETERS OF THE BEAM
9630    LET P = 64
9631    LET L = 100
9632    LET E = 6*10**6
9633    LET I = 0.128
9634    .      STEP 2--DEFINE THE RIGHT-SIDE FUNCTION OF Y''(X) = F
9635    LET FUNCTION F1 = P*(L-X)/(E*I)
9636    LET FUNCTION F2 = (1+YP**2)**(3/2)
9637    LET FUNCTION F = F1*F2
9638    .      STEP 3--DEFINE INITIAL CONDITIONS AND DEFINE THE DESIRED SEQUENCE
9639    .              OF POINTS AT WHICH TO COMPUTE THE SOLUTION CURVE.
9640    LET Y(1) = 0
9641    LET YP(1) = 0
9642    LET X = SEQUENCE 0 2 100
9643    .      STEP 4--SOLVE THE DIFFERENTIAL EQUATION
9644    LET Y YP = RUNGA-KUTTA F X
9645    .
9646    X1LABEL Y
9647    Y1LABEL Y' DERIVED FROM DATA
9648    PHASE PLANE DIAGRAM Y X
9649
9650-----PI-------------------------------------------------------
9651
9652PI
9653
9654Name:
9655    PI
9656
9657Type:
9658    Keyword
9659
9660Purpose:
9661    An internal DATAPLOT parameter which has the value 3.1415926.
9662
9663Description:
9664    This parameter is automatically-provided and can be used like
9665    any other parameter.
9666
9667Syntax:
9668    None
9669
9670Examples:
9671    PLOT SIN(PI*X) FOR X = 0 .1 2
9672    LET Y2 = (1/SQRT(2*PI))*EXP(0.5*X**2)
9673    FIT Y = A+B*SIN(OMEGA*PI*T)
9674
9675Note:
9676    When PI is used in a FIT, as in
9677       FIT Y = A+B*SIN(OMEGA*PI*T)
9678    then DATAPLOT recognizes this parameter as a built-in constant (as
9679    one would hope) and so the FIT code will not attempt to produce
9680    least squares estimates of this parameter as it will for all the
9681    other parameters in the model being fitted.
9682
9683Default:
9684    None
9685
9686Synonyms:
9687    None
9688
9689Related Commands:
9690    INFINITY    = Built-in parameter with the value machine infinity.
9691
9692Applications:
9693    XX
9694
9695Implementation Date:
9696    XX
9697
9698Program:
9699    XX
9700
9701-----PICTURE POINTS-------------------------------------------------
9702
9703PICTURE POINTS
9704
9705Name:
9706    PICTURE POINTS
9707
9708Type:
9709    Output Device Command
9710
9711Purpose:
9712    This command specifies the number of pixels (horizontal and
9713    vertical) on a device.
9714
9715Description:
9716    Normally, specifying the device sets this value correctly.
9717    However, this command can sometimes be useful when using a
9718    different model number of a supported device.
9719
9720Syntax 1:
9721    PICTURE POINTS  <hor>  <vert>
9722    where <hor> is a number or parameter that specifies the number of
9723              horizontal pixels;
9724    and   <vert> is a number or parameter that specifies the number of
9725              vertical pixels.
9726
9727    This syntax sets the picture points on device 1 (i.e., the
9728    terminal).
9729
9730Syntax 2:
9731    DEVICE <1/2/3>  PICTURE POINTS  <hor>  <vert>
9732    where 1 specifies device 1, 2 specifies device 2, and 3 specifies
9733              device 3;
9734          <hor> is a number or parameter that specifies the number of
9735              horizontal pixels;
9736    and   <vert> is a number or parameter that specifies the number of
9737              vertical pixels.
9738
9739    This syntax sets the picture points on the specified device (1, 2,
9740    or 3).
9741
9742Examples:
9743    PICTURE POINTS 1000 500
9744    DEVICE 2 PICTURE POINTS 1000 500
9745
9746Default:
9747    None
9748
9749Synonyms:
9750    DEVICE PICTURE POINTS
9751
9752Related Commands:
9753    DEVICE           = Specify the graphics device.
9754    DEVICE COLOR     = Specify if the graphics device is color.
9755    DEVICE POWER     = Specify if the device is on or not.
9756
9757Applications:
9758    Graphics Output
9759
9760Implementation Date:
9761    Pre-1987
9762
9763Program:
9764    DEVICE 2 GD JPEG
9765    DEVICE 2 PICTURE POINTS 700 450
9766    SKIP 25
9767    READ ZARR15.DAT Y
9768    4-PLOT Y
9769
9770-----PIE CHART-------------------------------------------------------
9771
9772PIE CHART
9773
9774Name:
9775    PIE CHART
9776
9777Type:
9778    Graphics Command
9779
9780Purpose:
9781    Generates a pie chart.
9782
9783Description:
9784    A pie chart is a graphical data analysis technique for summarizing
9785    the distributional information of a variable.  It is a circular
9786    plot consisting of wedges where the size of each wedge is
9787    proportional to the frequency (= number of observations) in that
9788    wedge.  The plot is to be read clockwise (where the first wedge is
9789    at "9 o'clock).
9790
9791    If a single variable is specified, Dataplot divides the values
9792    into frequency classes in the same manner as for a histogram.  The
9793    histogram and the pie chart have the same information except the
9794    histogram has bars at the data values (where the height of the bar
9795    is proportional to the number of observations in the class),
9796    whereas the pie chart has wedges (where the area of the wedge is
9797    proportional to the number of observations in the class).
9798
9799    If two variables are specified, the first variable contains
9800    pre-computed frequencies and the second variable is a group
9801    identifier.  This second form is more commonly used.
9802
9803    As mentioned above, by default raw data is first binned into
9804    frequency data.  However, in many if not most cases, the response
9805    variable is intended to be interpreted as a frequency (i.e., the
9806    proportion for Y(i) is Y(i)/SUM[Y(i)]).  That is, we have an implicit
9807    group-id variable that is simply 1, 2, ..., N where N is the number
9808    of points in the response variable.
9809
9810    To suppress this binning for the single variable case, enter
9811
9812        SET PIE CHART UNBINNED
9813
9814    To restore the default of binning raw data, enter
9815
9816        SET PIE CHART BINNED
9817
9818    Typically no binning is preferred for small size data sets.  Binning
9819    can be helpful for larger data sets in that it reduces the number of
9820    pie wedges that are plotted (in this case, we are really treating a
9821    pie chart as an alternative way to graph a histogram).
9822
9823Syntax 1:
9824    PIE CHART   <x>    <SUBSET/EXCEPT/FOR qualification>
9825    where <x> is the variable of raw data values;
9826    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
9827
9828    This syntax is used for the case where you have raw data.
9829
9830Syntax 2:
9831    PIE CHART   <y>   <x>   <SUBSET/EXCEPT/FOR qualification>
9832    where <y> is the variable of pre-computed frequencies;
9833          <x> is the variable of group identifiers;
9834    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
9835
9836    This syntax is used for the case where you have pre-computed
9837    frequencies at each data level.  This assumes that you have
9838    equal width bins.
9839
9840Syntax 3:
9841    PIE CHART  <y>  <xlow>  <xhigh>   <SUBSET/EXCEPT/FOR qualification>
9842    where <y> is the variable of pre-computed frequencies;
9843          <xlow> is the variable containing the lower limits of the bins;
9844          <xhigh> is the variable containing the upper limits of the bins;
9845    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
9846
9847    This syntax is used for the case where you have pre-computed
9848    frequencies at each data level.  This syntax is used when you have
9849    unequal width bins.
9850
9851Examples:
9852    PIE CHART X
9853    PIE CHART TEMP  SUBSET TEMP > 0
9854    PIE CHART F X   SUBSET X > 2
9855    PIE CHART COUNTS STATE
9856
9857Note:
9858    Each wedge is drawn with a common set of attributes.  The
9859    attributes of the wedge borders are set with the LINE, LINE COLOR,
9860    and LINE THICKNESS commands (typically they are all set the same).
9861    The attributes of the interior are set with the various REGION
9862    commands.  Any labels for the wedges must be set with the LEGEND or
9863    TEXT commands.  The CROSS HAIR command can help in positioning
9864    labels.  The program example below shows how to set the attributes.
9865    Dataplot does not support features such as 3d pie charts or
9866    exploding slices that are common in many business graphics
9867    programs.
9868
9869Note:
9870    Although pie charts are popular in business graphics, they are
9871    generally a poor graphics technique.  See the book listed in the
9872    Reference section below for more information.
9873
9874Note:
9875    For the one variable form of the command, Dataplot uses a class
9876    width of 0.3 X the standard deviation of the variable.  Use the
9877    CLASS WIDTH to override this default.  Dataplot also tends to
9878    generate a large number of zero frequency classes at the lower and
9879    upper tails.  The CLASS LOWER and CLASS UPPER commands can be used
9880    to set lower and upper limits for the classes.
9881
9882Default:
9883    None
9884
9885Synonyms:
9886    None
9887
9888Related Commands:
9889    HISTOGRAM          = Generates a histogram.
9890    FREQUENCY PLOT     = Generates a frequency plot.
9891    PERCENT POINT PLOT = Generates a percent point plot.
9892    PLOT               = Generates a plot (including bar plots).
9893    CLASS LOWER        = Sets the lower class minimum for histograms,
9894                         frequency plots, and pie charts.
9895    CLASS UPPER        = Sets the upper class maximum for histograms,
9896                         frequency plots, and pie charts.
9897    CLASS WIDTH        = Sets the class width for histogram, frequency
9898                         plots, and pie charts.
9899    LINE               = Sets the types for plot lines.
9900    LINE COLOR         = Sets the colors for plot lines.
9901    LINE THICKNESS     = Sets the thicknesses for plot lines.
9902    REGION FILL        = Sets on/off switches for region fills.
9903
9904Reference:
9905    William Cleveland (1985), "The Elements of Graphing Data", Wadsworth,
9906    p. 264.
9907
9908Applications:
9909    Business Graphics
9910
9911Implementation Date:
9912    Pre-1987
9913    1993/11: Added the ability to set the attributes of the pie wedges.
9914
9915Program:
9916    LET X = DATA 81 82 83 84 85
9917    LET Y = DATA 2 5 9 15 28
9918    .
9919    TITLE SALES IN MILLIONS OF DOLLARS
9920    LINE THICKNESS .3 ALL
9921    REGION FILL ON ALL
9922    REGION PATTERN COLOR G10 G30 G50 G70 G90
9923    REGION FILL COLOR G10 G30 G50 G70 G90
9924    LET N = SIZE X
9925    LOOP FOR K = 1 1 N
9926        LET A = X(K)
9927        LEGEND ^K 19^A
9928    END OF LOOP
9929    LEGEND 1 COORDINATES 8 58
9930    LEGEND 2 COORDINATES 10 71
9931    LEGEND 3 COORDINATES 28 92
9932    LEGEND 4 COORDINATES 68 77
9933    LEGEND 5 COORDINATES 67 30
9934    PIE CHART Y X
9935
9936-----PIXMAP TITLE--------------------------------------------------
9937
9938PIXMAP TITLE
9939
9940Name:
9941    PIXMAP TITLE
9942
9943Type:
9944    Support Command
9945
9946Purpose:
9947    Specify a title for a plot saved with the SAVE PLOT command.
9948    This is a temporary title used for identification purposes
9949    only and is not saved with the plot.
9950
9951Description:
9952    The SAVE PLOT and REPEAT PLOT commands allow you to save and
9953    recall graphs.  The primary use of this is to compare the current
9954    graph to previously created graphs.
9955
9956    The PIXMAP TITLE command applies to the current plot when
9957    the SAVE PLOT command is entered.  The order of the plot
9958    command and PIXMAP TITLE command does not matter.
9959
9960    Dataplot maintains a list of saved graphs for the current
9961    session.  The "current list" consists of all plots saved in
9962    the current session and any plots from previous Dataplot
9963    sessions explicitly recalled with the REPEAT PLOT command.
9964
9965    These commands are host dependent.  They are currently
9966    supported for the following platforms:
9967
9968       1) Unix platforms via the X11 device driver;
9969       2) Windows 95/98/NT command line version built with the
9970          Microsoft Fortran compiler;
9971       3) Dataplot GUI (both Unix and Windows 95/98/NT).
9972
9973Syntax:
9974    PIXMAP TITLE <string>
9975    where <string> specifies the title for the saved plot.
9976
9977Examples:
9978    HISTOGRAM Y1
9979    PIXMAP TITLE HISTOGRAM: Y1
9980    SAVE PLOT HIST.1
9981
9982Default:
9983    None
9984
9985Synonyms:
9986    None
9987
9988Note:
9989    Be aware that for SAVE PLOT AUTOMATIC, the saving for a given
9990    plot is not executed until the next screen erase (typically the
9991    next plot) is encountered to allow for multi-plotting and the
9992    addition of diagrammatic graphics to a plot.  The order of
9993    the commands would typically be something like:
9994
9995       SAVE GRAPH AUTOMATIC
9996       4-PLOT Y
9997       PIXMAP TITLE 4-PLOT
9998       PLOT Y
9999       PIXMAP TITLE PLOT Y
10000       HISTOGRAM Y
10001       PIXMAP TITLE HISTOGRAM
10002
10003    The main point here is that the PIXMAP TITLE comes AFTER the
10004    plot command.
10005
10006Note:
10007    Unlike the regular TITLE command, the PIXMAP TITLE command does
10008    not persist.  That is, it applies only to the next saved plot and
10009    then reverts to the default of using the file name.
10010
10011Note:
10012    The REPEAT PLOT command is used to display a plot saved
10013    with SAVE PLOT.  The LIST PLOT command lists the currently
10014    saved plots (by sequence number, file name, and title).
10015    The CYCLE PLOT command allows you to cycle through the
10016    pixmaps in the current list by clicking mouse buttons.
10017    The PIXMAP TITLE command allows you to specify the title
10018    for a saved plot.  This title is simply for ease of
10019    identification in listing the saved plots and is not
10020    saved as part of the plot.
10021
10022Related Commands:
10023    LIST PLOT    = List saved plots.
10024    REPEAT PLOT  = Redraw a previously saved plot.
10025    SAVE PLOT    = Save a plot.
10026    CYCLE PLOT   = Cycle through previously saved graphs using
10027                   mouse buttons.
10028
10029Applications:
10030    Interactive Usage
10031
10032Implementation Date:
10033    7/1997
10034
10035Program:
10036    READ BERGER1.DAT Y X
10037    FIT Y X
10038    4-PLOT RES
10039    PIXMAP TITLE RESIDUALS FROM LINEAR FIT
10040    SAVE PLOT RES.1
10041    QUADRATIC FIT Y X
10042    4-PLOT RES
10043    PIXMAP TITLE RESIDUALS FROM QUADRATIC FIT
10044    SAVE PLOT RES.2
10045    LIST PLOT
10046
10047-----PLEM (LET)----------------------------------------------
10048
10049PLEM
10050
10051Name:
10052    PLEM (LET)
10053
10054Type:
10055    Library Function
10056
10057Purpose:
10058    Compute the real component of the Weierstrass P elliptic function
10059    of a complex number (lemniscatic case with unit period
10060    parallelogram).
10061
10062Description:
10063    The Weierstrass elliptic function is described in detail in the
10064    Handbook of Mathematical Functions (see REFERENCE section below).
10065
10066Syntax:
10067    LET <a> = PLEM(<xr>,<xc>)  <SUBSET/EXCEPT/FOR qualification>
10068    where <xr> is a number, parameter, or variable that specifies the
10069              the real component of the input;
10070          <xc> is a number, parameter, or variable that specifies the
10071              the complex component of the input;
10072          <a> is a variable or a parameter (depending on what <xr> and
10073               <xc> are) where the computed values are stored;
10074    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
10075
10076Examples:
10077    LET A = PLEM(2,1)
10078    LET A = PLEM(X,4)
10079    LET X2 = PLEM(1,Y)
10080
10081Note:
10082    The Weierstrass elliptic functions are computed using algorithm
10083    549 from the ACM Transactions on Mathematical Software (see the
10084    REFERENCE section below).
10085
10086Note:
10087    If the input value corresponds to a lattice point, an error
10088    message is printed and the output value is set to the largest
10089    real number on the machine.
10090
10091Note:
10092    Library functions are distinguished from let subcommands
10093    in the following ways.
10094    1) Functions enclose the input value in parenthesis.  Let
10095       subcommands use spaces.
10096    2) Functions can accept (and return) either parameters
10097       (i.e., single values) or variables (i.e., an array of
10098       values) while let subcommands are specific in which they
10099       accept as input and what they return as output.
10100    3) Functions can accept expressions while let subcommands
10101       do not.  For example, the following is legal:
10102           LET Y2 = ABS(Y1-INT(Y1))
10103       For let subcommands, you typically have to do something
10104       like the following:
10105           LET YTEMP = Y**2 + 8
10106           LET A = SUM YTEMP
10107
10108Default:
10109    None
10110
10111Synonyms:
10112    None
10113
10114Related Commands:
10115    PEQ     = Compute the real component of the Weierstrass elliptic
10116              function (equianharmonic case).
10117    PEQI    = Compute the complex component of the Weierstrass elliptic
10118              function (equianharmonic case).
10119    PEQ1    = Compute the real component of the first derivative of
10120              the Weierstrass elliptic function (equianharmonic case).
10121    PEQ1I   = Compute the complex component of the first derivative of
10122              the Weierstrass elliptic function (equianharmonic case).
10123    PLEMI   = Compute the complex component of the Weierstrass elliptic
10124              function (lemniscatic case).
10125    PLEM1   = Compute the real component of the first derivative of
10126              the Weierstrass elliptic function (lemniscatic case).
10127    PLEM1I  = Compute the complex component of the first derivative of
10128              the Weierstrass elliptic function (lemniscatic case).
10129    SN      = Compute the Jacobi elliptic function sn.
10130    CN      = Compute the Jacobi elliptic function cn.
10131    DN      = Compute the Jacobi elliptic function dn.
10132    RF      = Compute the Carlson elliptic integral of the first kind.
10133    RD      = Compute the Carlson elliptic integral of the second kind.
10134    RJ      = Compute the Carlson elliptic integral of the third kind.
10135    ELLIPC1 = Compute the Legendre complete elliptic integral of the
10136              first kind.
10137    ELLIPC2 = Compute the Legendre complete elliptic integral of the
10138              second kind.
10139    ELLIP1  = Compute the Legendre elliptic integral of the first
10140              kind.
10141    ELLIP2  = Compute the Legendre elliptic integral of the second
10142              kind.
10143    ELLIP3  = Compute the Legendre's elliptic integral of the third
10144              kind.
10145
10146Reference:
10147    "Algorithm 549: Weierstrass' Elliptic Functions", Eckhardt, ACM
10148    Transactions on Mathematical Software, vol. 6 (pp. 112-120).
10149
10150    "Handbook of Mathematical Functions, Applied Mathematics Series,
10151    Vol. 55", Abramowitz and Stegun, National Bureau of Standards,
10152    1964 (chapter 18).
10153
10154Applications:
10155    Special Functions
10156
10157Implementation Date:
10158    94/11
10159
10160Program:
10161    TITLE WEIERSTRASS ELLIPTIC FUNCTIONS
10162    LINE SOLID DASH
10163    PLOT PLEM(X,0.5) FOR X = 0 0.01 5 AND
10164    PLOT PLEMI(X,0.5) FOR X = 0 0.01 5
10165
10166-----PLEMI (LET)----------------------------------------------
10167
10168PLEMI
10169
10170Name:
10171    PLEMI (LET)
10172
10173Type:
10174    Library Function
10175
10176Purpose:
10177    Compute the complex component of the Weierstrass P elliptic
10178    function of a complex number (lemniscatic case with unit period
10179    parallelogram).
10180
10181Description:
10182    The Weierstrass elliptic function is described in detail in the
10183    Handbook of Mathematical Functions (see REFERENCE section below).
10184
10185Syntax:
10186    LET <a> = PLEMI(<xr>,<xc>)  <SUBSET/EXCEPT/FOR qualification>
10187    where <xr> is a number, parameter, or variable that specifies the
10188              the real component of the input;
10189          <xc> is a number, parameter, or variable that specifies the
10190              the complex component of the input;
10191          <a> is a variable or a parameter (depending on what <xr> and
10192               <xc> are) where the computed values are stored;
10193    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
10194
10195Examples:
10196    LET A = PLEMI(2,1)
10197    LET A = PLEMI(X,4)
10198    LET X2 = PLEMI(1,Y)
10199
10200Note:
10201    The Weierstrass elliptic functions are computed using algorithm
10202    549 from the ACM Transactions on Mathematical Software (see the
10203    REFERENCE section below).
10204
10205Note:
10206    If the input value corresponds to a lattice point, an error
10207    message is printed and the output value is set to the largest
10208    real number on the machine.
10209
10210Note:
10211    Library functions are distinguished from let subcommands
10212    in the following ways.
10213    1) Functions enclose the input value in parenthesis.  Let
10214       subcommands use spaces.
10215    2) Functions can accept (and return) either parameters
10216       (i.e., single values) or variables (i.e., an array of
10217       values) while let subcommands are specific in which they
10218       accept as input and what they return as output.
10219    3) Functions can accept expressions while let subcommands
10220       do not.  For example, the following is legal:
10221           LET Y2 = ABS(Y1-INT(Y1))
10222       For let subcommands, you typically have to do something
10223       like the following:
10224           LET YTEMP = Y**2 + 8
10225           LET A = SUM YTEMP
10226
10227Default:
10228    None
10229
10230Synonyms:
10231    None
10232
10233Related Commands:
10234    PEQ     = Compute the real component of the Weierstrass elliptic
10235              function (equianharmonic case).
10236    PEQI    = Compute the complex component of the Weierstrass elliptic
10237              function (equianharmonic case).
10238    PEQ1    = Compute the real component of the first derivative of
10239              the Weierstrass elliptic function (equianharmonic case).
10240    PEQ1I   = Compute the complex component of the first derivative of
10241              the Weierstrass elliptic function (equianharmonic case).
10242    PLEM    = Compute the real component of the Weierstrass elliptic
10243              function (lemniscatic case).
10244    PLEM1   = Compute the real component of the first derivative of
10245              the Weierstrass elliptic function (lemniscatic case).
10246    PLEM1I  = Compute the complex component of the first derivative of
10247              the Weierstrass elliptic function (lemniscatic case).
10248    SN      = Compute the Jacobi elliptic function sn.
10249    CN      = Compute the Jacobi elliptic function cn.
10250    DN      = Compute the Jacobi elliptic function dn.
10251    RF      = Compute the Carlson elliptic integral of the first kind.
10252    RD      = Compute the Carlson elliptic integral of the second kind.
10253    RJ      = Compute the Carlson elliptic integral of the third kind.
10254    ELLIPC1 = Compute the Legendre complete elliptic integral of the
10255              first kind.
10256    ELLIPC2 = Compute the Legendre complete elliptic integral of the
10257              second kind.
10258    ELLIP1  = Compute the Legendre elliptic integral of the first
10259              kind.
10260    ELLIP2  = Compute the Legendre elliptic integral of the second
10261              kind.
10262    ELLIP3  = Compute the Legendre's elliptic integral of the third
10263              kind.
10264
10265Reference:
10266    "Algorithm 549: Weierstrass' Elliptic Functions", Eckhardt, ACM
10267    Transactions on Mathematical Software, vol. 6 (pp. 112-120).
10268
10269    "Handbook of Mathematical Functions, Applied Mathematics Series,
10270    Vol. 55", Abramowitz and Stegun, National Bureau of Standards,
10271    1964 (chapter 18).
10272
10273Applications:
10274    Special Functions
10275
10276Implementation Date:
10277    94/11
10278
10279Program:
10280    TITLE WEIERSTRASS ELLIPTIC FUNCTIONS
10281    LINE SOLID DASH
10282    PLOT PLEMI(X,0.5) FOR X = 0 0.01 5 AND
10283    PLOT PLEM(X,0.5) FOR X = 0 0.01 5
10284
10285-----PLEM1 (LET)----------------------------------------------
10286
10287PLEM1
10288
10289Name:
10290    PLEM1 (LET)
10291
10292Type:
10293    Library Function
10294
10295Purpose:
10296    Compute the real component of the first derivative of the
10297    Weierstrass P elliptic function of a complex number (lemniscatic
10298    case with unit period parallelogram).
10299
10300Description:
10301    The Weierstrass elliptic function is described in detail in the
10302    Handbook of Mathematical Functions (see REFERENCE section below).
10303
10304Syntax:
10305    LET <a> = PLEM1(<xr>,<xc>)  <SUBSET/EXCEPT/FOR qualification>
10306    where <xr> is a number, parameter, or variable that specifies the
10307              the real component of the input;
10308          <xc> is a number, parameter, or variable that specifies the
10309              the complex component of the input;
10310          <a> is a variable or a parameter (depending on what <xr> and
10311               <xc> are) where the computed values are stored;
10312    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
10313
10314Examples:
10315    LET A = PLEM1(2,1)
10316    LET A = PLEM1(X,4)
10317    LET X2 = PLEM1(1,Y)
10318
10319Note:
10320    The Weierstrass elliptic functions are computed using algorithm
10321    549 from the ACM Transactions on Mathematical Software (see the
10322    REFERENCE section below).
10323
10324Note:
10325    If the input value corresponds to a lattice point, an error
10326    message is printed and the output value is set to the largest
10327    real number on the machine.
10328
10329Note:
10330    Library functions are distinguished from let subcommands
10331    in the following ways.
10332    1) Functions enclose the input value in parenthesis.  Let
10333       subcommands use spaces.
10334    2) Functions can accept (and return) either parameters
10335       (i.e., single values) or variables (i.e., an array of
10336       values) while let subcommands are specific in which they
10337       accept as input and what they return as output.
10338    3) Functions can accept expressions while let subcommands
10339       do not.  For example, the following is legal:
10340           LET Y2 = ABS(Y1-INT(Y1))
10341       For let subcommands, you typically have to do something
10342       like the following:
10343           LET YTEMP = Y**2 + 8
10344           LET A = SUM YTEMP
10345
10346Default:
10347    None
10348
10349Synonyms:
10350    None
10351
10352Related Commands:
10353    PEQ     = Compute the real component of the Weierstrass elliptic
10354              function (equianharmonic case).
10355    PEQI    = Compute the complex component of the Weierstrass elliptic
10356              function (equianharmonic case).
10357    PEQ1    = Compute the real component of the first derivative of
10358              the Weierstrass elliptic function (equianharmonic case).
10359    PEQ1I   = Compute the complex component of the first derivative of
10360              the Weierstrass elliptic function (equianharmonic case).
10361    PLEM    = Compute the real component of the Weierstrass elliptic
10362              function (lemniscatic case).
10363    PLEMI   = Compute the complex component of the Weierstrass elliptic
10364              function (lemniscatic case).
10365    PLEM1I  = Compute the complex component of the first derivative of
10366              the Weierstrass elliptic function (lemniscatic case).
10367    SN      = Compute the Jacobi elliptic function sn.
10368    CN      = Compute the Jacobi elliptic function cn.
10369    DN      = Compute the Jacobi elliptic function dn.
10370    RF      = Compute the Carlson elliptic integral of the first kind.
10371    RD      = Compute the Carlson elliptic integral of the second kind.
10372    RJ      = Compute the Carlson elliptic integral of the third kind.
10373    ELLIPC1 = Compute the Legendre complete elliptic integral of the
10374              first kind.
10375    ELLIPC2 = Compute the Legendre complete elliptic integral of the
10376              second kind.
10377    ELLIP1  = Compute the Legendre elliptic integral of the first
10378              kind.
10379    ELLIP2  = Compute the Legendre elliptic integral of the second
10380              kind.
10381    ELLIP3  = Compute the Legendre's elliptic integral of the third
10382              kind.
10383
10384Reference:
10385    "Algorithm 549: Weierstrass' Elliptic Functions", Eckhardt, ACM
10386    Transactions on Mathematical Software, vol. 6 (pp. 112-120).
10387
10388    "Handbook of Mathematical Functions, Applied Mathematics Series,
10389    Vol. 55", Abramowitz and Stegun, National Bureau of Standards,
10390    1964 (chapter 18).
10391
10392Applications:
10393    Special Functions
10394
10395Implementation Date:
10396    94/11
10397
10398Program:
10399    TITLE WEIERSTRASS ELLIPTIC FUNCTIONS
10400    LINE SOLID DASH
10401    PLOT PLEM1(X,0.5) FOR X = 0 0.01 5 AND
10402    PLOT PLEM1I(X,0.5) FOR X = 0 0.01 5
10403
10404-----PLEM1I (LET)----------------------------------------------
10405
10406PLEM1I
10407
10408Name:
10409    PLEM1I (LET)
10410
10411Type:
10412    Library Function
10413
10414Purpose:
10415    Compute the complex component of the first derivative of the
10416    Weierstrass P elliptic function of a complex number (lemniscatic
10417    case with unit period parallelogram).
10418
10419Description:
10420    The Weierstrass elliptic function is described in detail in the
10421    Handbook of Mathematical Functions (see REFERENCE section below).
10422
10423Syntax:
10424    LET <a> = PLEM1I(<xr>,<xc>)  <SUBSET/EXCEPT/FOR qualification>
10425    where <xr> is a number, parameter, or variable that specifies the
10426              the real component of the input;
10427          <xc> is a number, parameter, or variable that specifies the
10428              the complex component of the input;
10429          <a> is a variable or a parameter (depending on what <xr> and
10430               <xc> are) where the computed values are stored;
10431    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
10432
10433Examples:
10434    LET A = PLEM1I(2,1)
10435    LET A = PLEM1I(X,4)
10436    LET X2 = PLEM1I(1,Y)
10437
10438Note:
10439    The Weierstrass elliptic functions are computed using algorithm
10440    549 from the ACM Transactions on Mathematical Software (see the
10441    REFERENCE section below).
10442
10443Note:
10444    If the input value corresponds to a lattice point, an error
10445    message is printed and the output value is set to the largest
10446    real number on the machine.
10447
10448Note:
10449    Library functions are distinguished from let subcommands
10450    in the following ways.
10451    1) Functions enclose the input value in parenthesis.  Let
10452       subcommands use spaces.
10453    2) Functions can accept (and return) either parameters
10454       (i.e., single values) or variables (i.e., an array of
10455       values) while let subcommands are specific in which they
10456       accept as input and what they return as output.
10457    3) Functions can accept expressions while let subcommands
10458       do not.  For example, the following is legal:
10459           LET Y2 = ABS(Y1-INT(Y1))
10460       For let subcommands, you typically have to do something
10461       like the following:
10462           LET YTEMP = Y**2 + 8
10463           LET A = SUM YTEMP
10464
10465Default:
10466    None
10467
10468Synonyms:
10469    None
10470
10471Related Commands:
10472    PEQ     = Compute the real component of the Weierstrass elliptic
10473              function (equianharmonic case).
10474    PEQI    = Compute the complex component of the Weierstrass elliptic
10475              function (equianharmonic case).
10476    PEQ1    = Compute the real component of the first derivative of
10477              the Weierstrass elliptic function (equianharmonic case).
10478    PEQ1I   = Compute the complex component of the first derivative of
10479              the Weierstrass elliptic function (equianharmonic case).
10480    PLEM    = Compute the real component of the Weierstrass elliptic
10481              function (lemniscatic case).
10482    PLEMI   = Compute the complex component of the Weierstrass elliptic
10483              function (lemniscatic case).
10484    PLEM1   = Compute the real component of the first derivative of
10485              the Weierstrass elliptic function (lemniscatic case).
10486    SN      = Compute the Jacobi elliptic function sn.
10487    CN      = Compute the Jacobi elliptic function cn.
10488    DN      = Compute the Jacobi elliptic function dn.
10489    RF      = Compute the Carlson elliptic integral of the first kind.
10490    RD      = Compute the Carlson elliptic integral of the second kind.
10491    RJ      = Compute the Carlson elliptic integral of the third kind.
10492    ELLIPC1 = Compute the Legendre complete elliptic integral of the
10493              first kind.
10494    ELLIPC2 = Compute the Legendre complete elliptic integral of the
10495              second kind.
10496    ELLIP1  = Compute the Legendre elliptic integral of the first
10497              kind.
10498    ELLIP2  = Compute the Legendre elliptic integral of the second
10499              kind.
10500    ELLIP3  = Compute the Legendre's elliptic integral of the third
10501              kind.
10502
10503Reference:
10504    "Algorithm 549: Weierstrass' Elliptic Functions", Eckhardt, ACM
10505    Transactions on Mathematical Software, vol. 6 (pp. 112-120).
10506
10507    "Handbook of Mathematical Functions, Applied Mathematics Series,
10508    Vol. 55", Abramowitz and Stegun, National Bureau of Standards,
10509    1964 (chapter 18).
10510
10511Applications:
10512    Special Functions
10513
10514Implementation Date:
10515    94/11
10516
10517Program:
10518    TITLE WEIERSTRASS ELLIPTIC FUNCTIONS
10519    LINE SOLID DASH
10520    PLOT PLEM1I(X,0.5) FOR X = 0 0.01 5 AND
10521    PLOT PLEM1(X,0.5) FOR X = 0 0.01 5
10522
10523-----PLNCDF (LET)--------------------------------
10524
10525PLNCDF
10526
10527Name:
10528    PLNCDF (LET)
10529
10530Type:
10531    Library Function
10532
10533Purpose:
10534    Compute the standard power-lognormal cumulative distribution
10535    function.
10536
10537Description:
10538    The standard power-lognormal distribution has the following
10539    cumulative distribution function:
10540       F(x,sigma,p) = 1 - {NORCDF(-ln(x)/sigma)}**p
10541                      for x, sigma, p > 0
10542    where sigma is a shape parameter, p is a shape (power) parameter,
10543    and NORCDF and NORPDF are the cumulative distribution function
10544    and the probability density function for the standard normal
10545    distribution, respectively.
10546
10547    If p is 1, this distribution reduces to the lognormal
10548    distribution.
10549
10550Syntax:
10551    LET <y> = PLNCDF(<x>,<p>,<s>)   <SUBSET/EXCEPT/FOR qualification>
10552    where <x> is a non-negative number, parameter, or variable;
10553          <p> is a positive number, parameter, or variable
10554              that specifies the power parameter;
10555          <s> is an optional positive number, parameter, or variable
10556              that specifies the shape parameter;
10557          <y> is a variable or a parameter (depending on what <x> is)
10558              where the computed power-lognormal cdf value is stored;
10559    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
10560
10561    If the <s> parameter is omitted, it defaults to 1.
10562
10563Examples:
10564    LET A = PLNCDF(3,2,1)
10565    LET X2 = PLNCDF(X1,POW,SD)
10566    LET X2 = PLNCDF(X1,1,0.5)
10567
10568Note:
10569    The general power-lognormal cumulative distribution function
10570    can be expressed in terms of the standard power-lognormal
10571    cumulative distribution function as follows:
10572       F(x,sigma,p,loc,scale)=F((x-loc)/scale,sigma,p)
10573                          for x > loc,  sigma, p, scale > 0
10574    where loc and scale are the location and scales parameters,
10575    respectively.
10576
10577Note:
10578    Library functions are distinguished from let subcommands
10579    in the following ways.
10580    1) Functions enclose the input value in parenthesis.  Let
10581       subcommands use spaces.
10582    2) Functions can accept (and return) either parameters
10583       (i.e., single values) or variables (i.e., an array of
10584       values) while let subcommands are specific in which they
10585       accept as input and what they return as output.
10586    3) Functions can accept expressions while let subcommands
10587       do not.  For example, the following is legal:
10588           LET Y2 = ABS(Y1-INT(Y1))
10589       For let subcommands, you typically have to do something
10590       like the following:
10591           LET YTEMP = Y**2 + 8
10592           LET A = SUM YTEMP
10593
10594Default:
10595    None
10596
10597Synonyms:
10598    None
10599
10600Related Commands:
10601    PLNPDF  = Compute the power-lognormal probability density
10602              function.
10603    PLNPPF  = Compute the power-lognormal percent point function.
10604    PLNHAZ  = Compute the power-lognormal hazard function.
10605    PLNCHAZ = Compute the power-lognormal cumulative hazard function.
10606    PNRPDF  = Compute the power-normal probability density function.
10607    LGNPDF  = Compute the lognormal probability density function.
10608    HFNPDF  = Compute the half-normal probability density function.
10609    NORPDF  = Compute the normal probability density function.
10610
10611Reference:
10612    "A Computer Program POWNOR for Fitting the Power-Normal and
10613    -Lognormal Models to Life or Strength Data from Specimens of
10614    Various Sizes", Nelson and Doganaksoy, NIST-IR 4760, March 1992.
10615
10616Applications:
10617    Reliability
10618
10619Implementation Date:
10620    1995/5
10621
10622Program:
10623    LABEL CASE ASIS
10624    X1LABEL X
10625    Y1LABEL Probability
10626    Y1LABEL DISPLACEMENT 12
10627    TITLE CASE ASIS
10628    .
10629    MULTIPLOT 2 2
10630    MULTIPLOT CORNER COORDINATES 0 0 100 95
10631    .
10632    TITLE P = 0.5, SIGMA = 0.2, 0.4, 0.7, 1.0
10633    PLOT PLNCDF(X,0.5,0.2) FOR X = 0.01 .01 3 AND
10634    PLOT PLNCDF(X,0.5,0.4) FOR X = 0.01 .01 3 AND
10635    PLOT PLNCDF(X,0.5,0.7) FOR X = 0.01 .01 3 AND
10636    PLOT PLNCDF(X,0.5,1.0) FOR X = 0.01 .01 3
10637    TITLE P = 1.0, SIGMA = 0.2, 0.4, 0.7, 1.0
10638    PLOT PLNCDF(X,1.0,0.2) FOR X = 0.01 .01 3 AND
10639    PLOT PLNCDF(X,1.0,0.4) FOR X = 0.01 .01 3 AND
10640    PLOT PLNCDF(X,1.0,0.7) FOR X = 0.01 .01 3 AND
10641    PLOT PLNCDF(X,1.0,1.0) FOR X = 0.01 .01 3
10642    TITLE P = 5.0, SIGMA = 0.2, 0.4, 0.7, 1.0
10643    PLOT PLNCDF(X,5.0,0.2) FOR X = 0.01 .01 2 AND
10644    PLOT PLNCDF(X,5.0,0.4) FOR X = 0.01 .01 2 AND
10645    PLOT PLNCDF(X,5.0,0.7) FOR X = 0.01 .01 2 AND
10646    PLOT PLNCDF(X,5.0,1.0) FOR X = 0.01 .01 2
10647    TITLE P = 20, SIGMA = 0.2, 0.4, 0.7, 1.0
10648    PLOT PLNCDF(X,20,0.2) FOR X = 0.01 .01 1 AND
10649    PLOT PLNCDF(X,20,0.4) FOR X = 0.01 .01 1 AND
10650    PLOT PLNCDF(X,20,0.7) FOR X = 0.01 .01 1 AND
10651    PLOT PLNCDF(X,20,1.0) FOR X = 0.01 .01 1
10652    .
10653    END OF MULTIPLOT
10654    MOVE 50 97
10655    JUSTIFICATION CENTER
10656    TEXT Power Lognormal CDF's
10657
10658-----PLNCHAZ (LET)--------------------------------
10659
10660PLNCHAZ
10661
10662Name:
10663    PLNCHAZ (LET)
10664
10665Type:
10666    Library Function
10667
10668Purpose:
10669    Compute the standard power-lognormal hazard function.
10670
10671Description:
10672    The standard power-lognormal distribution has the following
10673    cumulative hazard function:
10674       H(x,sigma,p)=-LOG[(NORCDF(-LOG(x)/sigma))**p)
10675                     for x, p, sigma > 0
10676    where sigma is a shape parameter, p is a shape (power) parameter,
10677    and NORCDF is the cumulative distribution function for the
10678    standard normal distribution.
10679
10680    If p is 1, this distribution reduces to the lognormal
10681    distribution.
10682
10683Syntax:
10684    LET <y> = PLNCHAZ(<x>,<p>,<s>)   <SUBSET/EXCEPT/FOR qualification>
10685    where <x> is a non-negative number, parameter, or variable;
10686          <p> is a positive number, parameter, or variable
10687              that specifies the power parameter;
10688          <s> is an optional positive number, parameter, or variable
10689              that specifies the shape parameter;
10690          <y> is a variable or a parameter (depending on what <y1>
10691              is) where the computed power-lognormal cumulative
10692              hazard value is stored;
10693    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
10694
10695    If the <s> parameter is omitted, it defaults to 1.
10696
10697Examples:
10698    LET A = PLNCHAZ(3,2,1)
10699    LET X2 = PLNCHAZ(X1,POW,SD)
10700    LET X2 = PLNCHAZ(X1,0.5,0.5)
10701
10702Note:
10703    The general power-lognormal cumulative hazard function can be
10704    expressed in terms of the standard power-lognormal cumulative
10705    hazard function as follows:
10706       H(x,sigma,p,loc,scale)=H((x-loc)/scale,sigma,p)
10707                          for x > loc,  sigma, p,scale > 0
10708    where loc and scale are the location and scales parameters,
10709    respectively.
10710
10711Note:
10712    Library functions are distinguished from let subcommands
10713    in the following ways.
10714    1) Functions enclose the input value in parenthesis.  Let
10715       subcommands use spaces.
10716    2) Functions can accept (and return) either parameters
10717       (i.e., single values) or variables (i.e., an array of
10718       values) while let subcommands are specific in which they
10719       accept as input and what they return as output.
10720    3) Functions can accept expressions while let subcommands
10721       do not.  For example, the following is legal:
10722           LET Y2 = ABS(Y1-INT(Y1))
10723       For let subcommands, you typically have to do something
10724       like the following:
10725           LET YTEMP = Y**2 + 8
10726           LET A = SUM YTEMP
10727
10728Default:
10729    None
10730
10731Synonyms:
10732    None
10733
10734Related Commands:
10735    PLNCDF  = Compute the power-lognormal cumulative distribution
10736              function.
10737    PLNPDF  = Compute the power-lognormal probability density
10738              function.
10739    PLNPPF  = Compute the power-lognormal percent point function.
10740    PLNHAZ  = Compute the power-lognormal hazard function.
10741    PNRPDF  = Compute the power-normal probability density function.
10742    LGNPDF  = Compute the lognormal probability density function.
10743    HFNPDF  = Compute the half-normal probability density function.
10744    NORPDF  = Compute the normal probability density function.
10745
10746Reference:
10747    "A Computer Program POWNOR for Fitting the Power-Normal and
10748    -Lognormal Models to Life or Strength Data from Specimens of
10749    Various Sizes", Nelson and Doganaksoy, NIST-IR 4760, March 1992.
10750
10751Applications:
10752    Reliability
10753
10754Implementation Date:
10755    1998/4
10756
10757Program:
10758    LABEL CASE ASIS
10759    X1LABEL X
10760    Y1LABEL Cumulative Hazard
10761    TITLE CASE ASIS
10762    .
10763    MULTIPLOT 2 2
10764    MULTIPLOT CORNER COORDINATES 0 0 100 95
10765    .
10766    TITLE P = 0.5, SIGMA = 0.2, 0.4, 0.7, 1.0
10767    PLOT PLNCHAZ(X,0.5,0.2) FOR X = 0.01 .01 3 AND
10768    PLOT PLNCHAZ(X,0.5,0.4) FOR X = 0.01 .01 3 AND
10769    PLOT PLNCHAZ(X,0.5,0.7) FOR X = 0.01 .01 3 AND
10770    PLOT PLNCHAZ(X,0.5,1.0) FOR X = 0.01 .01 3
10771    TITLE P = 1.0, SIGMA = 0.2, 0.4, 0.7, 1.0
10772    PLOT PLNCHAZ(X,1.0,0.2) FOR X = 0.01 .01 3 AND
10773    PLOT PLNCHAZ(X,1.0,0.4) FOR X = 0.01 .01 3 AND
10774    PLOT PLNCHAZ(X,1.0,0.7) FOR X = 0.01 .01 3 AND
10775    PLOT PLNCHAZ(X,1.0,1.0) FOR X = 0.01 .01 3
10776    TITLE P = 5.0, SIGMA = 0.2, 0.4, 0.7, 1.0
10777    PLOT PLNCHAZ(X,5.0,0.2) FOR X = 0.01 .01 2 AND
10778    PLOT PLNCHAZ(X,5.0,0.4) FOR X = 0.01 .01 2 AND
10779    PLOT PLNCHAZ(X,5.0,0.7) FOR X = 0.01 .01 2 AND
10780    PLOT PLNCHAZ(X,5.0,1.0) FOR X = 0.01 .01 2
10781    TITLE P = 20, SIGMA = 0.2, 0.4, 0.7, 1.0
10782    PLOT PLNCHAZ(X,20,0.2) FOR X = 0.01 .01 1 AND
10783    PLOT PLNCHAZ(X,20,0.4) FOR X = 0.01 .01 1 AND
10784    PLOT PLNCHAZ(X,20,0.7) FOR X = 0.01 .01 1 AND
10785    PLOT PLNCHAZ(X,20,1.0) FOR X = 0.01 .01 1
10786    .
10787    END OF MULTIPLOT
10788    MOVE 50 97
10789    JUSTIFICATION CENTER
10790    TEXT Power Lognormal Cumulative Hazard Functions
10791
10792-----PLNHAZ (LET)--------------------------------
10793
10794PLNHAZ
10795
10796Name:
10797    PLNHAZ (LET)
10798
10799Type:
10800    Library Function
10801
10802Purpose:
10803    Compute the standard power-lognormal hazard function.
10804
10805Description:
10806    The standard power-lognormal distribution has the following
10807    hazard function:
10808       h(x,sigma,p)=p*(1/(x*sigma))*NORPDF(ln(x)/sigma)/
10809                    NORCDF(-ln(x)/sigma)     for x, p, sigma > 0
10810    where sigma is a shape parameter, p is a shape (power) parameter,
10811    and NORCDF and NORPDF are the cumulative distribution function
10812    and the probability density function for the standard normal
10813    distribution respectively.
10814
10815    The hazard function for the power-lognormal distribution is
10816    a multiple (p) of the hazard function of the lognormal
10817    distribution.
10818
10819    If p is 1, this distribution reduces to the lognormal
10820    distribution.
10821
10822Syntax:
10823    LET <y> = PLNHAZ(<x>,<p>,<s>)   <SUBSET/EXCEPT/FOR qualification>
10824    where <x> is a non-negative number, parameter, or variable;
10825          <p> is a positive number, parameter, or variable
10826              that specifies the power parameter;
10827          <s> is an optional positive number, parameter, or variable
10828              that specifies the shape parameter;
10829          <y> is a variable or a parameter (depending on what <y1>
10830              is) where the computed power-lognormal hazard value is
10831              stored;
10832    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
10833
10834    If the <s> parameter is omitted, it defaults to 1.
10835
10836Examples:
10837    LET A = PLNHAZ(3,2,1)
10838    LET X2 = PLNHAZ(X1,POW,SD)
10839    LET X2 = PLNHAZ(X1,0.5,0.5)
10840
10841Note:
10842    The general power-lognormal hazard function can be expressed
10843    in terms of the standard power-lognormal hazard function as
10844    follows:
10845       h(x,sigma,p,loc,scale)=h((x-loc)/scale,sigma,p)/scale
10846                          for x > loc,  sigma, p, scale > 0
10847    where loc and scale are the location and scales parameters,
10848    respectively.
10849
10850Note:
10851    Library functions are distinguished from let subcommands
10852    in the following ways.
10853    1) Functions enclose the input value in parenthesis.  Let
10854       subcommands use spaces.
10855    2) Functions can accept (and return) either parameters
10856       (i.e., single values) or variables (i.e., an array of
10857       values) while let subcommands are specific in which they
10858       accept as input and what they return as output.
10859    3) Functions can accept expressions while let subcommands
10860       do not.  For example, the following is legal:
10861           LET Y2 = ABS(Y1-INT(Y1))
10862       For let subcommands, you typically have to do something
10863       like the following:
10864           LET YTEMP = Y**2 + 8
10865           LET A = SUM YTEMP
10866
10867Default:
10868    None
10869
10870Synonyms:
10871    None
10872
10873Related Commands:
10874    PLNCDF  = Compute the power-lognormal cumulative distribution
10875              function.
10876    PLNPDF  = Compute the power-lognormal probability density
10877              function.
10878    PLNPPF  = Compute the power-lognormal percent point function.
10879    PLNCHAZ = Compute the power-lognormal cumulative hazard function.
10880    PNRPDF  = Compute the power-normal probability density function.
10881    LGNPDF  = Compute the lognormal probability density function.
10882    HFNPDF  = Compute the half-normal probability density function.
10883    NORPDF  = Compute the normal probability density function.
10884
10885Reference:
10886    "A Computer Program POWNOR for Fitting the Power-Normal and
10887    -Lognormal Models to Life or Strength Data from Specimens of
10888    Various Sizes", Nelson and Doganaksoy, NIST-IR 4760, March 1992.
10889
10890Applications:
10891    Reliability
10892
10893Implementation Date:
10894    1998/4
10895
10896Program:
10897    LABEL CASE ASIS
10898    X1LABEL X
10899    Y1LABEL Hazard
10900    TITLE CASE ASIS
10901    .
10902    MULTIPLOT 2 2
10903    MULTIPLOT CORNER COORDINATES 0 0 100 95
10904    .
10905    TITLE P = 0.5, SIGMA = 0.2, 0.4, 0.7, 1.0
10906    PLOT PLNHAZ(X,0.5,0.2) FOR X = 0.01 .01 3 AND
10907    PLOT PLNHAZ(X,0.5,0.4) FOR X = 0.01 .01 3 AND
10908    PLOT PLNHAZ(X,0.5,0.7) FOR X = 0.01 .01 3 AND
10909    PLOT PLNHAZ(X,0.5,1.0) FOR X = 0.01 .01 3
10910    TITLE P = 1.0, SIGMA = 0.2, 0.4, 0.7, 1.0
10911    PLOT PLNHAZ(X,1.0,0.2) FOR X = 0.01 .01 3 AND
10912    PLOT PLNHAZ(X,1.0,0.4) FOR X = 0.01 .01 3 AND
10913    PLOT PLNHAZ(X,1.0,0.7) FOR X = 0.01 .01 3 AND
10914    PLOT PLNHAZ(X,1.0,1.0) FOR X = 0.01 .01 3
10915    TITLE P = 5.0, SIGMA = 0.2, 0.4, 0.7, 1.0
10916    PLOT PLNHAZ(X,5.0,0.2) FOR X = 0.01 .01 2 AND
10917    PLOT PLNHAZ(X,5.0,0.4) FOR X = 0.01 .01 2 AND
10918    PLOT PLNHAZ(X,5.0,0.7) FOR X = 0.01 .01 2 AND
10919    PLOT PLNHAZ(X,5.0,1.0) FOR X = 0.01 .01 2
10920    TITLE P = 20, SIGMA = 0.2, 0.4, 0.7, 1.0
10921    PLOT PLNHAZ(X,20,0.2) FOR X = 0.01 .01 1 AND
10922    PLOT PLNHAZ(X,20,0.4) FOR X = 0.01 .01 1 AND
10923    PLOT PLNHAZ(X,20,0.7) FOR X = 0.01 .01 1 AND
10924    PLOT PLNHAZ(X,20,1.0) FOR X = 0.01 .01 1
10925    .
10926    END OF MULTIPLOT
10927    MOVE 50 97
10928    JUSTIFICATION CENTER
10929    TEXT Power Lognormal Hazard Functions
10930
10931-----PLNPDF (LET)--------------------------------
10932
10933PLNPDF
10934
10935Name:
10936    PLNPDF (LET)
10937
10938Type:
10939    Library Function
10940
10941Purpose:
10942    Compute the standard power-lognormal probability density
10943    function.
10944
10945Description:
10946    The standard power-lognormal distribution has the following
10947    probability density function:
10948       f(x,sigma,p)=(p/(x*sigma))*NORPDF(ln(x)/sigma)*
10949                    NORCDF(-ln(x)/sigma)**(p-1)
10950                    for x, p, sigma > 0
10951    where sigma is a shape parameter, p is a shape (power) parameter,
10952    and NORCDF and NORPDF are the cumulative distribution function
10953    and the probability density function for the standard normal
10954    distribution respectively.
10955
10956    If p is 1, this distribution reduces to the lognormal
10957    distribution.
10958
10959Syntax:
10960    LET <y> = PLNPDF(<x>,<p>,<s>)   <SUBSET/EXCEPT/FOR qualification>
10961    where <x> is a non-negative number, parameter, or variable;
10962          <p> is a positive number, parameter, or variable
10963              that specifies the power parameter;
10964          <s> is an optional positive number, parameter, or variable
10965              that specifies the shape parameter;
10966          <y> is a variable or a parameter (depending on what <y1>
10967              is) where the computed power-lognormal pdf value is
10968              stored;
10969    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
10970
10971    If the <s> parameter is omitted, it defaults to 1.
10972
10973Examples:
10974    LET A = PLNPDF(3,2,1)
10975    LET X2 = PLNPDF(X1,POW,SD)
10976    LET X2 = PLNPDF(X1,0.5,0.5)
10977
10978Note:
10979    The general power-lognormal probability density function can
10980    be expressed in terms of the standard power-lognormal
10981    probability density function as follows:
10982       f(x,sigma,p,loc,scale)=f((x-loc)/scale,sigma,p)/scale
10983                          for x > loc,  sigma, p, scale > 0
10984    where loc and scale are the location and scales parameters,
10985    respectively.
10986
10987Note:
10988    Library functions are distinguished from let subcommands
10989    in the following ways.
10990    1) Functions enclose the input value in parenthesis.  Let
10991       subcommands use spaces.
10992    2) Functions can accept (and return) either parameters
10993       (i.e., single values) or variables (i.e., an array of
10994       values) while let subcommands are specific in which they
10995       accept as input and what they return as output.
10996    3) Functions can accept expressions while let subcommands
10997       do not.  For example, the following is legal:
10998           LET Y2 = ABS(Y1-INT(Y1))
10999       For let subcommands, you typically have to do something
11000       like the following:
11001           LET YTEMP = Y**2 + 8
11002           LET A = SUM YTEMP
11003
11004Default:
11005    None
11006
11007Synonyms:
11008    None
11009
11010Related Commands:
11011    PLNCDF  = Compute the power-lognormal cumulative distribution
11012              function.
11013    PLNPPF  = Compute the power-lognormal percent point function.
11014    PLNHAZ  = Compute the power-lognormal hazard function.
11015    PLNCHAZ = Compute the power-lognormal cumulative hazard function.
11016    PNRPDF  = Compute the power-normal probability density function.
11017    LGNPDF  = Compute the lognormal probability density function.
11018    HFNPDF  = Compute the half-normal probability density function.
11019    NORPDF  = Compute the normal probability density function.
11020
11021Reference:
11022    "A Computer Program POWNOR for Fitting the Power-Normal and
11023    -Lognormal Models to Life or Strength Data from Specimens of
11024    Various Sizes", Nelson and Doganaksoy, NIST-IR 4760, March 1992.
11025
11026Applications:
11027    Reliability
11028
11029Implementation Date:
11030    1995/5
11031
11032Program:
11033    LABEL CASE ASIS
11034    X1LABEL X
11035    Y1LABEL Probability
11036    TITLE CASE ASIS
11037    .
11038    MULTIPLOT 2 2
11039    MULTIPLOT CORNER COORDINATES 0 0 100 95
11040    .
11041    TITLE P = 0.5, SIGMA = 0.2, 0.4, 0.7, 1.0
11042    PLOT PLNPDF(X,0.5,0.2) FOR X = 0.01 .01 3 AND
11043    PLOT PLNPDF(X,0.5,0.4) FOR X = 0.01 .01 3 AND
11044    PLOT PLNPDF(X,0.5,0.7) FOR X = 0.01 .01 3 AND
11045    PLOT PLNPDF(X,0.5,1.0) FOR X = 0.01 .01 3
11046    TITLE P = 1.0, SIGMA = 0.2, 0.4, 0.7, 1.0
11047    PLOT PLNPDF(X,1.0,0.2) FOR X = 0.01 .01 3 AND
11048    PLOT PLNPDF(X,1.0,0.4) FOR X = 0.01 .01 3 AND
11049    PLOT PLNPDF(X,1.0,0.7) FOR X = 0.01 .01 3 AND
11050    PLOT PLNPDF(X,1.0,1.0) FOR X = 0.01 .01 3
11051    TITLE P = 5.0, SIGMA = 0.2, 0.4, 0.7, 1.0
11052    PLOT PLNPDF(X,5.0,0.2) FOR X = 0.01 .01 2 AND
11053    PLOT PLNPDF(X,5.0,0.4) FOR X = 0.01 .01 2 AND
11054    PLOT PLNPDF(X,5.0,0.7) FOR X = 0.01 .01 2 AND
11055    PLOT PLNPDF(X,5.0,1.0) FOR X = 0.01 .01 2
11056    TITLE P = 20, SIGMA = 0.2, 0.4, 0.7, 1.0
11057    PLOT PLNPDF(X,20,0.2) FOR X = 0.01 .01 1 AND
11058    PLOT PLNPDF(X,20,0.4) FOR X = 0.01 .01 1 AND
11059    PLOT PLNPDF(X,20,0.7) FOR X = 0.01 .01 1 AND
11060    PLOT PLNPDF(X,20,1.0) FOR X = 0.01 .01 1
11061    .
11062    END OF MULTIPLOT
11063    MOVE 50 97
11064    JUSTIFICATION CENTER
11065    TEXT Power Lognormal PDF's
11066
11067-----PLNPPF (LET)--------------------------------
11068
11069PLNPPF
11070
11071Name:
11072    PLNPPF (LET)
11073
11074Type:
11075    Library Function
11076
11077Purpose:
11078    Compute the power-lognormal percent point function.
11079
11080Description:
11081    The standard lognormal distribution has the following percent
11082    point function:
11083       G(f,sigma,p) = EXP(NORPPF(1-(1-f)**(1/p))/sigma)
11084                  for 0 < f < 1,  sigma, p > 0
11085    where sigma is a shape parameter, p is a shape (power) parameter,
11086    and NORPPF is the percent point function of the standard normal
11087    distribution.  The input value is a real number between 0 and 1
11088    (since it corresponds to a probability).
11089
11090    If p is 1, this distribution reduces to the lognormal
11091    distribution.
11092
11093Syntax:
11094    LET <y> = PLNPPF(<x>,<p>,<s>)   <SUBSET/EXCEPT/FOR qualification>
11095    where <x> is a number, parameter, or variable in the range 0 to 1;
11096          <p> is a positive number, parameter, or variable
11097              that specifies the power parameter;
11098          <s> is an optional positive number, parameter, or variable
11099              that specifies the shape parameter;
11100          <y> is a variable or a parameter (depending on what <x> is)
11101               where the computed power-lognormal ppf value is stored;
11102    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
11103
11104    If the <s> parameter is omitted, it defaults to 1.
11105
11106Examples:
11107    LET A = PLNPPF(0.9,2,1)
11108    LET X2 = PLNPPF(X1,P,SD)
11109    LET X2 = PLNPPF(X1,0.5,3)
11110
11111Note:
11112    The general power-lognormal percent point function can be
11113    expressed in terms of the standard power-lognormal percent point
11114    function as follows:
11115       G(f,sigma,p,loc,scale) = loc + scale*G(f,sigma,p)
11116                            for 0 < f < 1,  sigma, p, scale > 0
11117    where loc and scale are the location and scales parameters,
11118    respectively.
11119
11120Note:
11121    Library functions are distinguished from let subcommands
11122    in the following ways.
11123    1) Functions enclose the input value in parenthesis.  Let
11124       subcommands use spaces.
11125    2) Functions can accept (and return) either parameters
11126       (i.e., single values) or variables (i.e., an array of
11127       values) while let subcommands are specific in which they
11128       accept as input and what they return as output.
11129    3) Functions can accept expressions while let subcommands
11130       do not.  For example, the following is legal:
11131           LET Y2 = ABS(Y1-INT(Y1))
11132       For let subcommands, you typically have to do something
11133       like the following:
11134           LET YTEMP = Y**2 + 8
11135           LET A = SUM YTEMP
11136
11137Default:
11138    None
11139
11140Synonyms:
11141    None
11142
11143Related Commands:
11144    PLNCDF  = Compute the power-lognormal cumulative distribution
11145              function.
11146    PLNPDF  = Compute the power-lognormal probability density
11147              function.
11148    PLNHAZ  = Compute the power-lognormal hazard function.
11149    PLNCHAZ = Compute the power-lognormal cumulative hazard function.
11150    PNRPDF  = Compute the power-normal probability density function.
11151    LGNPDF  = Compute the lognormal probability density function.
11152    HFNPDF  = Compute the half-normal probability density function.
11153    NORPDF  = Compute the normal probability density function.
11154
11155Reference:
11156    "A Computer Program POWNOR for Fitting the Power-Normal and
11157    -Lognormal Models to Life or Strength Data from Specimens of
11158    Various Sizes", Nelson and Doganaksoy, NIST-IR 4760, March 1992.
11159
11160Applications:
11161    Reliability
11162
11163Implementation Date:
11164    1995/5
11165
11166Program:
11167    LABEL CASE ASIS
11168    Y1LABEL X
11169    X1LABEL Probability
11170    TITLE CASE ASIS
11171    .
11172    MULTIPLOT 2 2
11173    MULTIPLOT CORNER COORDINATES 0 0 100 95
11174    .
11175    TITLE P = 0.5, SIGMA = 0.2, 0.4, 0.7, 1.0
11176    PLOT PLNPPF(F,0.5,0.2) FOR F = 0.01 .01 0.99 AND
11177    PLOT PLNPPF(F,0.5,0.4) FOR F = 0.01 .01 0.99 AND
11178    PLOT PLNPPF(F,0.5,0.7) FOR F = 0.01 .01 0.99 AND
11179    PLOT PLNPPF(F,0.5,1.0) FOR F = 0.01 .01 0.99
11180    TITLE P = 1.0, SIGMA = 0.2, 0.4, 0.7, 1.0
11181    PLOT PLNPPF(F,1.0,0.2) FOR F = 0.01 .01 0.99 AND
11182    PLOT PLNPPF(F,1.0,0.4) FOR F = 0.01 .01 0.99 AND
11183    PLOT PLNPPF(F,1.0,0.7) FOR F = 0.01 .01 0.99 AND
11184    PLOT PLNPPF(F,1.0,1.0) FOR F = 0.01 .01 0.99
11185    TITLE P = 5.0, SIGMA = 0.2, 0.4, 0.7, 1.0
11186    PLOT PLNPPF(F,5.0,0.2) FOR F = 0.01 .01 0.99 AND
11187    PLOT PLNPPF(F,5.0,0.4) FOR F = 0.01 .01 0.99 AND
11188    PLOT PLNPPF(F,5.0,0.7) FOR F = 0.01 .01 0.99 AND
11189    PLOT PLNPPF(F,5.0,1.0) FOR F = 0.01 .01 0.99
11190    TITLE P = 20, SIGMA = 0.2, 0.4, 0.7, 1.0
11191    PLOT PLNPPF(F,20,0.2) FOR F = 0.01 .01 0.99 AND
11192    PLOT PLNPPF(F,20,0.4) FOR F = 0.01 .01 0.99 AND
11193    PLOT PLNPPF(F,20,0.7) FOR F = 0.01 .01 0.99 AND
11194    PLOT PLNPPF(F,20,1.0) FOR F = 0.01 .01 0.99
11195    .
11196    END OF MULTIPLOT
11197    MOVE 50 97
11198    JUSTIFICATION CENTER
11199    TEXT Power Lognormal PPF's
11200
11201-----PLOT-------------------------------------------------------
11202
11203PLOT
11204
11205Name:
11206    PLOT
11207
11208Type:
11209    Graphics Command
11210
11211Purpose:
11212    Generates a plot.
11213
11214Description:
11215    The PLOT command allows the analyst to generate single or
11216    multi-trace plots of data, functions, or both.  It is DATAPLOT's
11217    most powerful, most important, and most heavily used graphics
11218    command.  There are 7 general plot syntaxes:
11219          1) 1-variable form
11220          2) 2-variable form
11221          3) 3-variable multi-trace form
11222          4) VERSUS form
11223          5) multi-VERSUS form
11224          6) function form
11225          7) AND form
11226
11227    DATAPLOT uses the concept of traces.  A trace is a connected set of
11228    points.  Points in the same trace are plotted with the same
11229    attributes.  In most cases, a single variable is one trace.
11230    However, a single variable can be split into multiple traces if
11231    desired (see SYNTAX 3).
11232
11233Syntax 1: (1-variable form)
11234    PLOT   <y>    <SUBSET/EXCEPT/FOR qualification>
11235    where <y> is a variable;
11236    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
11237
11238    This form for the PLOT command is used for plotting <y> versus its
11239    dummy index.  The resulting plot will have <y> on the vertical
11240    axis and the dummy index 1, 2, 3, ..., n (where n = the number of
11241    elements in <y>) on the horizontal axis.
11242
11243Syntax 2: (2-variable form)
11244    PLOT   <y>   <x>   <SUBSET/EXCEPT/FOR qualification>
11245    where <y> is an independent (i.e., the vertical axis) variable;
11246          <x> is an independent (i.e., the horizontal axis) variable;
11247    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
11248
11249    This is the 2-argument form for the PLOT command.  It is used for
11250    plotting <y> versus <x>.  The resulting plot will have <y> on the
11251    vertical axis and <x> on the horizontal axis.
11252
11253Syntax 3: (the 3-variable multi-trace form)
11254    PLOT   <y>   <x>   <tag>  <SUBSET/EXPECT/FOR qualification>
11255    where <y> is an independent (i.e., the vertical axis) variable;
11256          <x> is an independent (i.e., the horizontal axis) variable;
11257          <tag> is a variable that identifies groups in <y> and <x>
11258              that are plotted with common attributes;
11259    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
11260
11261    This is the 3-argument form for the PLOT command.  It is used for
11262    multi-trace plotting of <y> versus <x>.  The resulting plot will
11263    have <y> on the vertical axis, <x> on the horizontal axis, and will
11264    have one trace for each distinct value in the <tag> variable.
11265
11266    If the <x> variable and the <tag> variable are identical, all
11267    points with a common <x> value are treated as a common trace (i.e.,
11268    they are plotted with common attributes).
11269
11270    Although DATAPLOT supports a large number of built-in plot formats,
11271    there will be cases where you may want a specialized chart format
11272    that is not available.  This syntax for the PLOT command can often
11273    be used for this purpose by defining the <tag> variable in the
11274    right way.  Points with a common <tag> value are treated as a
11275    trace, and attributes can be set for each individual trace.
11276
11277Syntax 4: (VERSUS form)
11278    PLOT   <y1>   <y2>   <y3>  ... <yk>   VERSUS   <x>
11279                <SUBSET/EXCEPT/FOR qualification>
11280    where <y1>, <y2>, <y3>, ..., <yk> are dependent (i.e., vertical
11281              axis) variables;
11282          <x> is an independent (i.e., the horizontal axis) variable;
11283    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
11284
11285    This is the single-VERSUS argument form for the PLOT command.   It
11286    is used for multi-trace plotting where the dependent variables are
11287    plotted against a common <x> variable.  The resulting plot will
11288    have one trace for each <yi> variable:
11289       <y1> (vertically) versus <x> (horizontally)
11290       <y2> (vertically) versus <x> (horizontally)
11291       <y3> (vertically) versus <x> (horizontally)
11292       ...
11293       <yk> (vertically) versus <x> (horizontally)
11294
11295    VS and VS. can also be used for VERSUS.
11296
11297Syntax: 5 (multi-VERSUS form)
11298    PLOT   <syntax 4>   <syntax 4>   ...   <syntax 4>
11299
11300    This is the multi-VERSUS argument form for the PLOT command.  It
11301    is used for multi-trace plotting where the dependent variables are
11302    plotted against different <x> variables.
11303
11304Syntax: 6 (function form)
11305    PLOT  <f>  FOR  <x>  =  <start>  <increment>  <stop>
11306    where <f> is a function (either pre-defined via the LET
11307              FUNCTION command, or explicitly defined herein);
11308          <x> is the dummy variable in the function;
11309          <start> is the desired minimum value for <x> at which the
11310              function is to be evaluated;
11311          <increment> is the desired increment value for <x> at which
11312              the function is to be evaluated;
11313    and   <stop> is the desired maximum value for <x> at which the
11314              function is to be evaluated.
11315
11316    This is the function form for the PLOT command.   It is used for
11317    plotting a function of one variable.
11318
11319Syntax: 7 (AND form)
11320    <any valid syntax 1 to 6>  AND
11321    <any valid syntax 1 to 6>  AND
11322    <any valid syntax 1 to 6>  AND
11323    ...
11324    <any valid syntax 1 to 6>  AND
11325    <any valid syntax 1 to 6>
11326
11327    This is the most general syntax for PLOT.  It is used for
11328    generating multi-trace plots of variables, of functions, or of
11329    mixtures of both.
11330
11331Examples:
11332    PLOT Y
11333    PLOT TEMP  SUBSET TAG > 4
11334
11335    PLOT Y X
11336    PLOT RES X  SUBSET X > -9999
11337
11338    PLOT Y X LAB
11339    PLOT PRES TEMP DAY
11340    PLOT PRES TEMP DAY  DAY <> 4
11341
11342    PLOT Y1 Y2 Y3 VERSUS X
11343    PLOT Y PRED VERSUS X
11344    PLOT Y PRED VERSUS X  SUBSET X = 10.6 TO 19.7
11345
11346    PLOT Y1 Y2 Y3 VERSUS X1 Y4 Y5 VERSUS X2
11347    PLOT P1 VERSUS T1 P2 VERSUS T2 P3 VERUS T3
11348
11349    PLOT SIN(X)*EXP(-X) FOR X = 0 .1 5
11350
11351    LET FUNCTION F = EXP(-X*SIN(X**2))
11352    PLOT F FOR X = 0 .1 3
11353
11354    PLOT Y X AND
11355    PLOT A+B*X FOR X = 1 1 10
11356
11357    PLOT Y1 Y2 VS X AND
11358    PLOT Y X AND
11359    PLOT A*SIN(B*X) FOR X = 1 .1 3 AND
11360    PLOT Y3 X3 LAB
11361
11362Note:
11363    Plot points can be plotted as characters, connected lines, spikes,
11364    or bars.  These are set independently of each other.  The default
11365    is to plot each trace as a connected line with no symbol, no bar,
11366    and no spike.  The LINE, CHARACTER, SPIKE, and BAR commands are
11367    used to set the switches for plotting a given trace as a connected
11368    line, a character, a spike, or a bar respectively.
11369
11370    There are attribute setting commands for lines, characters, spikes,
11371    and bars.  See the documentation for LINE, CHARACTER, SPIKE, and
11372    BAR for a complete list of these commands.  Attributes are set
11373    giving a list of values.  The first trace uses the first setting,
11374    the second trace uses the second setting, and so on.  For example,
11375    CHARACTER SIZE 2.0 3.0 1.5 sets the character size for trace 1 to
11376    2.0, the character size for trace 2 to 3.0, and the character size
11377    for trace 3 to 1.5.  Attributes can be set for up to 100 traces.
11378
11379    As a more complex example, suppose you want to plot a variable Y
11380    as a connected line and every fifth point as a filled circle.  You
11381    can do something like the following:
11382        LET N = SIZE Y
11383        LET X = SEQUENCE 1 1 N
11384        LET TAG = PATTERN 1 2 2 2 2 FOR I = 1 1 N
11385        CHARACTER CIRCLE BLANK
11386        CHARACTER FILL ON OFF
11387        CHARACTER SIZE 1.5
11388        PLOT Y X TAG
11389
11390Note:
11391    DATAPLOT provides a large range of plot control features for the
11392    plot.  This includes titles, axis labels, legends, and so on.
11393    DATAPLOT sets these with separate commands (as opposed to
11394    arguments on the PLOT command itself).  Each of these features
11395    typically has its own attribute setting commands as well.  DATAPLOT
11396    simply uses whatever the current setting is for each of these
11397    attributes when it generates a plot.  For example, a TITLE command
11398    is entered to define the plot title (nothing is actually generated
11399    until the next PLOT is performed).  This title remains in effect
11400    for all subsequent plots until it is changed (another TITLE
11401    command) or deleted (TITLE with no arguments).
11402
11403    Most of the commonly used plot features are listed below.  The
11404    attribute setting commands are not listed (e.g., TITLE is listed,
11405    but TITLE COLOR and TITLE SIZE are not).  See the documentation
11406    for the plot feature for its attribute setting commands.
11407
11408Note:
11409    Dataplot allows subregions to be added to plots.  Enter
11410    HELP SUBREGION for details.
11411
11412    This capability was implemented 2000/1.
11413
11414Note:
11415    DATAPLOT saves the following internal parameters after a plot:
11416
11417    PLOTCORR - correlation of the X and Y coordinates on the plot
11418    PLOTCOR1 - correlation of the X and Y coordinates on the plot
11419               with a tag value of 1.  This can be useful for
11420               plots that generate reference lines (which you
11421               do not want included in the correlation computation
11422    PLOTYMAX - maximum Y coordinate
11423    YMAXINDE - index of the maximum Y coordinate
11424    PLOTYMIN - minimum Y coordinate
11425    YMININDE - index of the minimum Y coordinate
11426    PLOTXMAX - maximum X coordinate
11427    XMAXINDE - index of the maximum X coordinate
11428    PLOTXMIN - minimum X coordinate
11429    XMININDE - index of the minimum X coordinate
11430    NACCEPT  - number of plot points inside the first subregion
11431               (0 if no subregions defined)
11432    NREJECT  - number of plot points outside the first subregion
11433               (0 if no subregions defined)
11434    NTOTAL   - number of plot points (NACCEPT + NREJECT)
11435               (0 if no subregions defined)
11436
11437    These internal parameters are actually computed for all plot
11438    types, not just the PLOT command.
11439
11440    This capability was implemented 2000/1.
11441
11442Default:
11443    None
11444
11445Synonyms:
11446    VS and VS. are synonyms for VERSUS.
11447
11448Related Commands:
11449    CHARACTERS          = Sets the types for plot characters.
11450    LINES               = Sets the types for plot lines.
11451    SPIKES              = Sets the on/off switches for plot spikes.
11452    BARS                = Sets the on/off switches for plot bars.
11453    TITLE               = Sets the plot title.
11454    LABEL               = Sets the plot axis labels.
11455    LEGEND              = Sets the plot legends.
11456    BOX COORDINATES     = Sets the locations for plot boxes.
11457    ARROW COORDINATES   = Sets the locations for plot arrows.
11458    SEGMENT COORDINATES = Sets the locations for plot segments.
11459    FRAME               = Sets the on/off switch for the plot frame.
11460    FRAME COORDINATES   = Sets the location for the plot frame.
11461    GRID                = Sets the on/off switch for the plot grid.
11462    LOG                 = Sets the on/off switch for log scale.
11463    TIC                 = Sets the on/off switch for the plot tics.
11464    TIC LABEL           = Sets the on/off switch for the plot tic
11465                          labels.
11466    MARGIN COLOR        = Sets the color for the plot margin.
11467    BACKGROUND COLOR    = Sets the color for the plot background.
11468    PRE-ERASE           = Sets the automatic pre-erase switch for
11469                          plots.
11470    SEQUENCE            = Sets the automatic sequence switch for plots.
11471    MULTIPLOT           = Generate multiple plots per page.
11472
11473Applications:
11474    Graphics
11475
11476Implementation Date:
11477    Pre-1987
11478
11479Program:
11480    . POLLUTION SOURCE ANALYSIS, LLOYD CURRIE, DATE--1990
11481    . SUBSET OF CURRIE.DAT REFERENCE FILE
11482    .
11483    LET ID2 = DATA 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2
11484    LET LEAD = DATA 164 426 59 98 312 263 607 497 213 54 160 262 547 325 419 94 70
11485    LET POT = DATA 106 175 61 79 94 121 424 328 107 218 140 179 246 231 245 339 99
11486    .
11487    MULTIPLOT 2 2; MULTIPLOT CORNER COORDINATES 0 0 100 100
11488    TITLE SCATTER PLOT; X1LABEL LEAD; Y1LABEL POTASSIUM
11489    LINE BLANK ALL; CHARACTER CIRCLE; CHARACTER FILL ON
11490    PLOT POT LEAD
11491    .
11492    CHARACTER CIRCLE SQUARE; CHARACTER FILL OFF ALL
11493    TITLE SCATTER PLOT WITH GROUPS
11494    LEGEND 1 CIRC() - GROUP 1; LEGEND 2 SQUA() - GROUP 2
11495    LEGEND FILL ON; LEGEND FONT DUPLEX
11496    PLOT POT LEAD ID2
11497    .
11498    CHARACTER CIRCLE CIRCLE SQUARE SQUARE; CHARACTER FILL OFF ON OFF ON
11499    LET X = SEQUENCE 1 1 17
11500    LEGEND 1 CIRC() - POTASSIUM; LEGEND 2 SQUA() - LEAD
11501    X1LABEL SEQUENCE; Y1LABEL; TITLE CHARACTER FILL REPRESENTS GROUP ID
11502    PLOT POT X ID2 AND
11503    PLOT LEAD X ID2
11504    .
11505    CHARACTER BLANK ALL; LINE SOLID DASH
11506    SEGMENT 1 COORDINATES 16 85 19 85
11507    SEGMENT 2 COORDINATES 16 81 19 81
11508    SEGMENT 2 PATTERN DASH
11509    TITLE MULTIPLE TRACES AS LINES
11510    PLOT POT LEAD VS X
11511    END OF MULTIPLOT
11512
11513-----PNRCDF (LET)--------------------------------
11514
11515PNRCDF
11516
11517Name:
11518    PNRCDF (LET)
11519
11520Type:
11521    Library Function
11522
11523Purpose:
11524    Compute the standard power-normal cumulative distribution
11525    function.
11526
11527Description:
11528    The standard power-normal distribution has the following
11529    probability density function:
11530       f(x,p)=p*NORPDF(x)*NORCDF(-x)**(p-1)    for x > 0,  p > 0
11531    where p is the shape (power) parameter, and NORCDF and NORPDF are
11532    the cumulative distribution function and the probability density
11533    function for the standard normal distribution respectively.
11534
11535    The cumulative distribution is the area under the curve from
11536    negative infinity to x (i.e., the integral of the above function).
11537    It has the formula:
11538       F(x,p) = 1 - (NORCDF(-x))**p       for x > 0, p > 0
11539
11540    If p is 1, this distribution reduces to the normal distribution.
11541
11542Syntax:
11543    LET <y2> = PNRCDF(<y1>,<p>)  <SUBSET/EXCEPT/FOR qualification>
11544    where <y1> is a non-negative number, parameter, or variable;
11545          <p> is a positive number, parameter, or variable
11546               that specifies the power parameter;
11547          <y2> is a variable or a parameter (depending on what <y1> is)
11548               where the computed power-normal cdf value is stored;
11549    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
11550
11551Examples:
11552    LET A = PNRCDF(3,2)
11553    LET X2 = PNRCDF(X1,POW)
11554    LET X2 = PNRCDF(X1,0.5)
11555
11556Note:
11557    The general power-normal distribution has the following
11558    probability density function:
11559       f(x,u,s,p)=(p/s)*NORPDF((x-u)/s)*NORCDF(-(x-u)/s)**(p-1)
11560                                     for x > 0,  s > 0, p > 0
11561    where u is the location parameter, s is the scale parameter, and p
11562    is the power parameter.  The cumulative distribution function has
11563    the formula:
11564       F(x,u,s,p) = 1 - (NORCDF(-(x-u)/s))**p   for x > 0, s > 0, p > 0
11565
11566Note:
11567    Library functions are distinguished from let subcommands
11568    in the following ways.
11569    1) Functions enclose the input value in parenthesis.  Let
11570       subcommands use spaces.
11571    2) Functions can accept (and return) either parameters
11572       (i.e., single values) or variables (i.e., an array of
11573       values) while let subcommands are specific in which they
11574       accept as input and what they return as output.
11575    3) Functions can accept expressions while let subcommands
11576       do not.  For example, the following is legal:
11577           LET Y2 = ABS(Y1-INT(Y1))
11578       For let subcommands, you typically have to do something
11579       like the following:
11580           LET YTEMP = Y**2 + 8
11581           LET A = SUM YTEMP
11582
11583Default:
11584    None
11585
11586Synonyms:
11587    None
11588
11589Related Commands:
11590    PNRPDF = Compute the power-normal probability density function.
11591    PNRPPF = Compute the power-normal percent point function.
11592    PLNCDF = Compute the power-lognormal cumulative distribution
11593             function.
11594    PLNPDF = Compute the power-lognormal probability density function.
11595    PLNPPF = Compute the power-lognormal percent point function.
11596    LGNCDF = Compute the lognormal cumulative distribution function.
11597    LGNPDF = Compute the lognormal probability density function.
11598    LGNPPF = Compute the lognormal percent point function.
11599    NORCDF = Compute the normal cumulative distribution function.
11600    NORPDF = Compute the normal probability density function.
11601    NORPPF = Compute the normal percent point function.
11602
11603Reference:
11604    "A Computer Program POWNOR for Fitting the Power-Normal and
11605    -Lognormal Models to Life or Strength Data from Specimens of
11606    Various Sizes", Nelson and Doganaksoy, NIST-IR 4760, March 1992.
11607
11608Applications:
11609    Reliability
11610
11611Implementation Date:
11612    1995/5
11613
11614Program:
11615    LABEL CASE ASIS
11616    X1LABEL X
11617    YLIMITS 0  1
11618    Y1LABEL Probability
11619    MAJOR YTIC MARK NUMBER 6
11620    TITLE CASE ASIS
11621    TITLE Power Normal PDF Plot CR() ...
11622     SD=1, P=10000, 3000, 1000, 300, 100, 50, 20, 5, 1, 0.5, 0.2 0.1
11623    .
11624    PLOT PNRCDF(X,10000) FOR X = -5 .05 5 AND
11625    PLOT PNRCDF(X,3000) FOR X = -5 .05 5 AND
11626    PLOT PNRCDF(X,1000) FOR X = -5 .05 5 AND
11627    PLOT PNRCDF(X,300) FOR X = -5 .05 5 AND
11628    PLOT PNRCDF(X,100) FOR X = -5 .05 5 AND
11629    PLOT PNRCDF(X,50) FOR X = -5 .05 5 AND
11630    PLOT PNRCDF(X,20) FOR X = -5 .05 5 AND
11631    PLOT PNRCDF(X,5) FOR X = -5 .05 5 AND
11632    PLOT PNRCDF(X,1) FOR X = -5 .05 5 AND
11633    PLOT PNRCDF(X,0.5) FOR X = -5 .05 5 AND
11634    PLOT PNRCDF(X,0.2) FOR X = -5 .05 5 AND
11635    PLOT PNRCDF(X,0.1) FOR X = -5 .05 5
11636
11637-----PNRCHAZ (LET)--------------------------------
11638
11639PNRCHAZ
11640
11641Name:
11642    PNRCHAZ (LET)
11643
11644Type:
11645    Library Function
11646
11647Purpose:
11648    Compute the standard power-normal cumulative hazard function.
11649
11650Description:
11651    The standard power-normal distribution has the following
11652    cumulative hazard function:
11653       H(x,p)=-LOG[(NORCDF(-x))**p]       for x, p > 0
11654    where p is the shape (power) parameter and NORCDF is the
11655    cumulative distribution function for the standard normal
11656    distribution.
11657
11658    If p is 1, this distribution reduces to the normal distribution.
11659
11660Syntax:
11661    LET <y> = PNRCHAZ(<x>,<p>)    <SUBSET/EXCEPT/FOR qualification>
11662    where <x> is a non-negative number, parameter, or variable;
11663          <p> is a positive number, parameter, or variable
11664               that specifies the power parameter;
11665          <y> is a variable or a parameter (depending on what <x> is)
11666               where the computed power-normal cumulative hazard
11667               value is stored;
11668    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
11669
11670Examples:
11671    LET A = PNRCHAZ(3,2)
11672    LET X2 = PNRCHAZ(X1,POW)
11673    LET X2 = PNRCHAZ(X1,0.5)
11674
11675Note:
11676    The general form of the power-normal cumulative hazard function is:
11677       H(x,p,mu,sigma)=-LOG[(NORCDF(-(x-mu)/sigma))**p]
11678                        for x, p, sigma > 0
11679    where mu and sigma are the location and scale parameters,
11680    respectively.
11681
11682Default:
11683    None
11684
11685Synonyms:
11686    None
11687
11688Related Commands:
11689    PNRCDF  = Compute the power-normal cumulative distribution
11690              function.
11691    PNRPDF  = Compute the power-normal probability density function.
11692    PNRPPF  = Compute the power-normal percent point function.
11693    PNRHAZ  = Compute the power-normal hazard function.
11694    PLNPDF  = Compute the power-lognormal probability density function.
11695    LGNPDF  = Compute the lognormal probability density function.
11696    NORPDF  = Compute the normal probability density function.
11697
11698Reference:
11699    "A Computer Program POWNOR for Fitting the Power-Normal and
11700    -Lognormal Models to Life or Strength Data from Specimens of
11701    Various Sizes", Nelson and Doganaksoy, NIST-IR 4760, March 1992.
11702
11703Applications:
11704    Reliability
11705
11706Implementation Date:
11707    1998/4
11708
11709Program:
11710    LABEL CASE ASIS
11711    X1LABEL X
11712    Y1LABEL Cumulative Hazard
11713    YLIMITS 0 1
11714    MAJOR YTIC MARK NUMBER 6
11715    TITLE CASE ASIS
11716    TITLE Power Normal Cumulative Hazard Plot CR() ...
11717     SD=1, P=10000, 3000, 1000, 300, 100, 50, 20, 5, 1, 0.5, 0.2 0.1
11718    .
11719    PLOT PNRCHAZ(X,10000) FOR X = -5 .05 5 AND
11720    PLOT PNRCHAZ(X,3000) FOR X = -5 .05 5 AND
11721    PLOT PNRCHAZ(X,1000) FOR X = -5 .05 5 AND
11722    PLOT PNRCHAZ(X,300) FOR X = -5 .05 5 AND
11723    PLOT PNRCHAZ(X,100) FOR X = -5 .05 5 AND
11724    PLOT PNRCHAZ(X,50) FOR X = -5 .05 5 AND
11725    PLOT PNRCHAZ(X,20) FOR X = -5 .05 5 AND
11726    PLOT PNRCHAZ(X,5) FOR X = -5 .05 5 AND
11727    PLOT PNRCHAZ(X,1) FOR X = -5 .05 5 AND
11728    PLOT PNRCHAZ(X,0.5) FOR X = -5 .05 5 AND
11729    PLOT PNRCHAZ(X,0.2) FOR X = -5 .05 5 AND
11730    PLOT PNRCHAZ(X,0.1) FOR X = -5 .05 5
11731
11732-----PNRHAZ (LET)--------------------------------
11733
11734PNRHAZ
11735
11736Name:
11737    PNRHAZ (LET)
11738
11739Type:
11740    Library Function
11741
11742Purpose:
11743    Compute the standard power-normal hazard function.
11744
11745Description:
11746    The standard power-normal distribution has the following
11747    hazard function:
11748       h(x,p)=p*NORPDF(x)/NORCDF(-x)       for x > 0,   p > 0
11749    where p is the power parameter, and NORCDF and NORPDF are the
11750    cumulative distribution function and the probability density
11751    function for the standard normal distribution respectively.
11752
11753    If p is 1, this distribution reduces to the normal distribution.
11754
11755Syntax:
11756    LET <y> = PNRHAZ(<x>,<p>)    <SUBSET/EXCEPT/FOR qualification>
11757    where <x> is a non-negative number, parameter, or variable;
11758          <p> is a positive number, parameter, or variable
11759               that specifies the power parameter;
11760          <y> is a variable or a parameter (depending on what <x> is)
11761               where the computed power-normal hazard value is stored;
11762    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
11763
11764Examples:
11765    LET A = PNRHAZ(3,2)
11766    LET X2 = PNRHAZ(X1,POW)
11767    LET X2 = PNRHAZ(X1,0.5)
11768
11769Note:
11770    The general form of the power-normal hazard function is:
11771        h(x,p,mu,sigma)=p*NORPDF((x-mu)/sigma)/
11772                 [sigma*NORCDF(-(x-mu)/sigma)   for x, p, sigma > 0
11773    where mu and sigma are the location and scale parameters,
11774    respectively.
11775
11776Default:
11777    None
11778
11779Synonyms:
11780    None
11781
11782Related Commands:
11783    PNRCDF  = Compute the power-normal cumulative distribution
11784              function.
11785    PNRPDF  = Compute the power-normal probability density function.
11786    PNRPPF  = Compute the power-normal percent point function.
11787    PNRCHAZ = Compute the power-normal cumulative hazard function.
11788    PLNPDF  = Compute the power-lognormal probability density function.
11789    LGNPDF  = Compute the lognormal probability density function.
11790    NORPDF  = Compute the normal probability density function.
11791
11792Reference:
11793    "A Computer Program POWNOR for Fitting the Power-Normal and
11794    -Lognormal Models to Life or Strength Data from Specimens of
11795    Various Sizes", Nelson and Doganaksoy, NIST-IR 4760, March 1992.
11796
11797Applications:
11798    Reliability
11799
11800Implementation Date:
11801    1998/4
11802
11803Program:
11804    LABEL CASE ASIS
11805    X1LABEL X
11806    Y1LABEL Hazard
11807    YLIMITS 0 1
11808    MAJOR YTIC MARK NUMBER 6
11809    TITLE CASE ASIS
11810    TITLE Power Normal Hazard Plot CR() ...
11811     SD=1, P=10000, 3000, 1000, 300, 100, 50, 20, 5, 1, 0.5, 0.2 0.1
11812    .
11813    PLOT PNRHAZ(X,10000) FOR X = -5 .05 5 AND
11814    PLOT PNRHAZ(X,3000) FOR X = -5 .05 5 AND
11815    PLOT PNRHAZ(X,1000) FOR X = -5 .05 5 AND
11816    PLOT PNRHAZ(X,300) FOR X = -5 .05 5 AND
11817    PLOT PNRHAZ(X,100) FOR X = -5 .05 5 AND
11818    PLOT PNRHAZ(X,50) FOR X = -5 .05 5 AND
11819    PLOT PNRHAZ(X,20) FOR X = -5 .05 5 AND
11820    PLOT PNRHAZ(X,5) FOR X = -5 .05 5 AND
11821    PLOT PNRHAZ(X,1) FOR X = -5 .05 5 AND
11822    PLOT PNRHAZ(X,0.5) FOR X = -5 .05 5 AND
11823    PLOT PNRHAZ(X,0.2) FOR X = -5 .05 5 AND
11824    PLOT PNRHAZ(X,0.1) FOR X = -5 .05 5
11825
11826-----PNRPDF (LET)--------------------------------
11827
11828PNRPDF
11829
11830Name:
11831    PNRPDF (LET)
11832
11833Type:
11834    Library Function
11835
11836Purpose:
11837    Compute the standard power-normal probability density function.
11838
11839Description:
11840    The standard power-normal distribution has the following
11841    probability density function:
11842       f(x,p)=p*NORPDF(x)*NORCDF(-x)**(p-1) for x > 0,  p > 0
11843    where p is the power parameter, and NORCDF and NORPDF are the
11844    cumulative distribution function and the probability density
11845    function for the standard normal distribution respectively.
11846
11847    If p is 1, this distribution reduces to the normal distribution.
11848
11849Syntax:
11850    LET <y2> = PNRPDF(<y1>,<p>)  <SUBSET/EXCEPT/FOR qualification>
11851    where <y1> is a non-negative number, parameter, or variable;
11852          <p> is a positive number, parameter, or variable
11853               that specifies the power parameter;
11854          <y2> is a variable or a parameter (depending on what <y1> is)
11855               where the computed power-normal pdf value is stored;
11856    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
11857
11858Examples:
11859    LET A = PNRPDF(3,2)
11860    LET X2 = PNRPDF(X1,POW)
11861    LET X2 = PNRPDF(X1,0.5)
11862
11863Note:
11864    The general power-normal distribution has the following
11865    probability density function:
11866       f(x,u,s,p)=(p/s)*NORPDF((x-u)/s)*NORCDF(-(x-u)/s)**(p-1)
11867                                     for x > 0,  s > 0, p > 0
11868    where u is the location parameter, s is the shape parameter, and p
11869    is the power parameter.
11870
11871Default:
11872    None
11873
11874Synonyms:
11875    None
11876
11877Related Commands:
11878    PNRCDF = Compute the power-normal cumulative distribution
11879             function.
11880    PNRPPF = Compute the power-normal percent point function.
11881    PLNCDF = Compute the power-lognormal cumulative distribution
11882             function.
11883    PLNPDF = Compute the power-lognormal probability density function.
11884    PLNPPF = Compute the power-lognormal percent point function.
11885    LGNCDF = Compute the lognormal cumulative distribution function.
11886    LGNPDF = Compute the lognormal probability density function.
11887    LGNPPF = Compute the lognormal percent point function.
11888    NORCDF = Compute the normal cumulative distribution function.
11889    NORPDF = Compute the normal probability density function.
11890    NORPPF = Compute the normal percent point function.
11891
11892Reference:
11893    "A Computer Program POWNOR for Fitting the Power-Normal and
11894    -Lognormal Models to Life or Strength Data from Specimens of
11895    Various Sizes", Nelson and Doganaksoy, NIST-IR 4760, March 1992.
11896
11897Applications:
11898    Reliability
11899
11900Implementation Date:
11901    1995/5
11902
11903Program:
11904    LABEL CASE ASIS
11905    X1LABEL X
11906    YLIMITS 0 1.5
11907    Y1LABEL Probability
11908    MAJOR YTIC MARK NUMBER 6
11909    TITLE CASE ASIS
11910    TITLE Power Normal PDF Plot CR() ...
11911     SD=1, P=10000, 3000, 1000, 300, 100, 50, 20, 5, 1, 0.5, 0.2 0.1
11912    .
11913    PLOT PNRPDF(X,10000) FOR X = -5 .05 5 AND
11914    PLOT PNRPDF(X,3000) FOR X = -5 .05 5 AND
11915    PLOT PNRPDF(X,1000) FOR X = -5 .05 5 AND
11916    PLOT PNRPDF(X,300) FOR X = -5 .05 5 AND
11917    PLOT PNRPDF(X,100) FOR X = -5 .05 5 AND
11918    PLOT PNRPDF(X,50) FOR X = -5 .05 5 AND
11919    PLOT PNRPDF(X,20) FOR X = -5 .05 5 AND
11920    PLOT PNRPDF(X,5) FOR X = -5 .05 5 AND
11921    PLOT PNRPDF(X,1) FOR X = -5 .05 5 AND
11922    PLOT PNRPDF(X,0.5) FOR X = -5 .05 5 AND
11923    PLOT PNRPDF(X,0.2) FOR X = -5 .05 5 AND
11924    PLOT PNRPDF(X,0.1) FOR X = -5 .05 5
11925
11926-----PNRPPF (LET)--------------------------------
11927
11928PNRPPF
11929
11930Name:
11931    PNRPPF (LET)
11932
11933Type:
11934    Library Function
11935
11936Purpose:
11937    Compute the power-normal percent point function.
11938
11939Description:
11940    The standard power-normal distribution has the following
11941    percent point function:
11942       G(f,p) = NORPPF(1-(1-f)**(1/p))    0 < f < 1; p > 0
11943    where p is the shape (power) parameter and NORPPF is the percent
11944    point function of the standard normal distribution.  The input
11945    value is a real number between 0 and 1 (since it corresponds to a
11946    probability).
11947
11948    If p is 1, this distribution reduces to the normal distribution.
11949
11950Syntax:
11951    LET <y2> = PNRPPF(<y1>,<p>)    <SUBSET/EXCEPT/FOR qualification>
11952    where <y1> is a number, parameter, or variable in the range 0 to 1;
11953          <p> is a positive number, parameter, or variable
11954               that specifies the power parameter;
11955          <y2> is a variable or a parameter (depending on what <y1> is)
11956               where the computed power-normal ppf value is stored;
11957    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
11958
11959Examples:
11960    LET A = PNRPPF(0.9,2)
11961    LET X2 = PNRPPF(X1,P)
11962    LET X2 = PNRPPF(X1,0.5)
11963
11964Note:
11965    The general power-normal distribution has the following
11966    percent point function:
11967       G(f,p,mu,sigma) = mu + sigma*NORPPF(1-(1-f)**(1/p))
11968                         for 0 < f < 1; p, sigma > 0
11969    where mu and sigma are the location and scale parameters,
11970    respectively.
11971
11972Note:
11973    Library functions are distinguished from let subcommands
11974    in the following ways.
11975    1) Functions enclose the input value in parenthesis.  Let
11976       subcommands use spaces.
11977    2) Functions can accept (and return) either parameters
11978       (i.e., single values) or variables (i.e., an array of
11979       values) while let subcommands are specific in which they
11980       accept as input and what they return as output.
11981    3) Functions can accept expressions while let subcommands
11982       do not.  For example, the following is legal:
11983           LET Y2 = ABS(Y1-INT(Y1))
11984       For let subcommands, you typically have to do something
11985       like the following:
11986           LET YTEMP = Y**2 + 8
11987           LET A = SUM YTEMP
11988
11989Default:
11990    None
11991
11992Synonyms:
11993    None
11994
11995Related Commands:
11996    PNRCDF  = Compute the power-normal cumulative density function.
11997    PNRPDF  = Compute the power-normal probability density function.
11998    PNRHAZ  = Compute the power-normal hazard function.
11999    PNRCHAZ = Compute the power-normal cumulative hazard function.
12000    PLNPDF  = Compute the power-lognormal probability density
12001              function.
12002    LGNPDF  = Compute the lognormal probability density function.
12003    HFNPDF  = Compute the half-normal probability density function.
12004    NORPDF  = Compute the normal probability density function.
12005
12006Reference:
12007    "A Computer Program POWNOR for Fitting the Power-Normal and
12008    -Lognormal Models to Life or Strength Data from Specimens of
12009    Various Sizes", Nelson and Doganaksoy, NIST-IR 4760, March 1992.
12010
12011Applications:
12012    Reliability
12013
12014Implementation Date:
12015    1995/5
12016
12017Program:
12018    LABEL CASE ASIS
12019    X1LABEL Probabiulity
12020    Y1LABEL X
12021    YLIMITS -5 10
12022    TITLE CASE ASIS
12023    TITLE Power Normal PPF Plot CR() ...
12024     SD=1, P=10000, 3000, 1000, 300, 100, 50, 20, 5, 1, 0.5, 0.2 0.1
12025    .
12026    PLOT PNRPPF(F,10000) FOR F = 0.01 0.01 0.99 AND
12027    PLOT PNRPPF(F,3000) FOR F = 0.01 0.01 0.99 AND
12028    PLOT PNRPPF(F,1000) FOR F = 0.01 0.01 0.99 AND
12029    PLOT PNRPPF(F,300) FOR F = 0.01 0.01 0.99 AND
12030    PLOT PNRPPF(F,100) FOR F = 0.01 0.01 0.99 AND
12031    PLOT PNRPPF(F,50) FOR F = 0.01 0.01 0.99 AND
12032    PLOT PNRPPF(F,20) FOR F = 0.01 0.01 0.99 AND
12033    PLOT PNRPPF(F,5) FOR F = 0.01 0.01 0.99 AND
12034    PLOT PNRPPF(F,1) FOR F = 0.01 0.01 0.99 AND
12035    PLOT PNRPPF(F,0.5) FOR F = 0.01 0.01 0.99 AND
12036    PLOT PNRPPF(F,0.2) FOR F = 0.01 0.01 0.99 AND
12037    PLOT PNRPPF(F,0.1) FOR F = 0.01 0.01 0.99
12038
12039-----POCH (LET)--------------------------------
12040
12041POCH
12042
12043Name:
12044    POCH (LET)
12045
12046Type:
12047    Library Function
12048
12049Purpose:
12050    Compute a generalization of Pochhammer's symbol.
12051
12052Description:
12053    Pochhammer's generalized symbol is defined to be:
12054        POCH(X,A) = GAMMA(A+X)/GAMMA(A)
12055    where GAMMA is the gamma function.  See the documentation for the
12056    GAMMA command for a description of the gamma function.
12057
12058Syntax:
12059    LET <y> = POCH(<x>,<a>)  <SUBSET/EXCEPT/FOR qualification>
12060    where <x> is a number, parameter or variable;
12061          <a> is a number, parameter, or variable;
12062          <y> is a variable or a parameter (depending on what <x>
12063               and <a> are) where the computed values are stored;
12064    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
12065
12066Examples:
12067    LET P = POCH(2.3,1)
12068    LET A = POCH(X,A1)
12069    LET X2 = POCH(X1,4.2)
12070
12071Note:
12072    DATAPLOT uses the routine DPOCH from the SLATEC Common Mathematical
12073    Library to compute this function.  SLATEC is a large set of high
12074    quality, portable, public domain Fortran routines for various
12075    mathematical capabilities maintained by seven federal laboratories.
12076
12077Note:
12078    Library functions are distinguished from let subcommands
12079    in the following ways.
12080    1) Functions enclose the input value in parenthesis.  Let
12081       subcommands use spaces.
12082    2) Functions can accept (and return) either parameters
12083       (i.e., single values) or variables (i.e., an array of
12084       values) while let subcommands are specific in which they
12085       accept as input and what they return as output.
12086    3) Functions can accept expressions while let subcommands
12087       do not.  For example, the following is legal:
12088           LET Y2 = ABS(Y1-INT(Y1))
12089       For let subcommands, you typically have to do something
12090       like the following:
12091           LET YTEMP = Y**2 + 8
12092           LET A = SUM YTEMP
12093
12094Default:
12095    None
12096
12097Synonyms:
12098    None
12099
12100Related Commands:
12101    POCH1      = Compute a generalization of Pochhammer's symbol
12102                 starting from the first order.
12103    GAMMA      = Compute the gamma function.
12104    LOGGAMMA   = Compute the log (to base e) gamma function.
12105    GAMMAIP    = Compute an alternate form of the incomplete gamma
12106                 function.
12107    GAMMAIC    = Compute the complementary incomplete Gamma function.
12108    GAMMAR     = Compute the reciprocal gamma function.
12109    TRICOMI    = Compute Tricomi's incomplete gamma function.
12110    DIGAMMA    = Compute the digamma function.
12111
12112Reference:
12113    "Handbook of Mathematical Functions, Applied Mathematics Series,
12114    Vol. 55", Abramowitz and Stegun, National Bureau of Standards,
12115    1964 (chapter 6).
12116
12117Applications:
12118    Special Functions
12119
12120Implementation Date:
12121    94/9
12122
12123Program:
12124    TITLE AUTOMATIC
12125    PLOT POCH(X,2.5) FOR X = 1 0.1 10
12126
12127-----POCH1 (LET)--------------------------------
12128
12129POCH1
12130
12131Name:
12132    POCH1 (LET)
12133
12134Type:
12135    Library Function
12136
12137Purpose:
12138    Compute a generalization of Pochhammer's symbol starting from the
12139    first order.
12140
12141Description:
12142    Pochhammer's generalized symbol starting from the first order is
12143    defined to be:
12144        POCH1(X,A) = [GAMMA(A+X)/(GAMMA(A)-1)]/X
12145    where GAMMA is the gamma function.  See the documentation for the
12146    GAMMA command for a description of the gamma function.
12147
12148Syntax:
12149    LET <y> = POCH1(<x>,<a>)  <SUBSET/EXCEPT/FOR qualification>
12150    where <x> is a number, parameter or variable;
12151          <a> is a number, parameter, or variable;
12152          <y> is a variable or a parameter (depending on what <x>
12153               and <a> are) where the computed values are stored;
12154    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
12155
12156Examples:
12157    LET P = POCH1(2.3,1)
12158    LET A = POCH1(X,A1)
12159    LET X2 = POCH1(X1,4.2)
12160
12161Note:
12162    DATAPLOT uses the routine DPOCH1 from the SLATEC Common
12163    Mathematical Library to compute this function.  SLATEC is a large
12164    set of high quality, portable, public domain Fortran routines for
12165    various mathematical capabilities maintained by seven federal
12166    laboratories.
12167
12168Note:
12169    Library functions are distinguished from let subcommands
12170    in the following ways.
12171    1) Functions enclose the input value in parenthesis.  Let
12172       subcommands use spaces.
12173    2) Functions can accept (and return) either parameters
12174       (i.e., single values) or variables (i.e., an array of
12175       values) while let subcommands are specific in which they
12176       accept as input and what they return as output.
12177    3) Functions can accept expressions while let subcommands
12178       do not.  For example, the following is legal:
12179           LET Y2 = ABS(Y1-INT(Y1))
12180       For let subcommands, you typically have to do something
12181       like the following:
12182           LET YTEMP = Y**2 + 8
12183           LET A = SUM YTEMP
12184
12185Default:
12186    None
12187
12188Synonyms:
12189    None
12190
12191Related Commands:
12192    POCH       = Compute a generalization of Pochhammer's symbol.
12193    GAMMA      = Compute the gamma function.
12194    LOGGAMMA   = Compute the log (to base e) gamma function.
12195    GAMMAIP    = Compute an alternate form of the incomplete gamma
12196                 function.
12197    GAMMAIC    = Compute the complementary incomplete Gamma function.
12198    GAMMAR     = Compute the reciprocal gamma function.
12199    TRICOMI    = Compute Tricomi's incomplete gamma function.
12200    DIGAMMA    = Compute the digamma function.
12201
12202Reference:
12203    "Handbook of Mathematical Functions, Applied Mathematics Series,
12204    Vol. 55", Abramowitz and Stegun, National Bureau of Standards,
12205    1964 (chapter 6).
12206
12207    "The Special Functions and their Approximations, Volume 1", Luke,
12208    Academic Press, 34, (1969).
12209
12210Applications:
12211    Special Functions
12212
12213Implementation Date:
12214    94/9
12215
12216Program:
12217    TITLE AUTOMATIC
12218    PLOT POCH1(X,2.5) FOR X = 1 0.1 10
12219
12220-----POICDF (LET)--------------------------------
12221
12222POICDF
12223
12224Name:
12225    POICDF (LET)
12226
12227Type:
12228    Library Function
12229
12230Purpose:
12231    Compute the Poisson cumulative distribution function.
12232
12233Description:
12234    The Poisson distribution is the distribution of the number of
12235    events in the interval (0,lambda) when the waiting time between
12236    events is exponentially distributed with mean 1 and standard
12237    deviation 1 (there are alternate interpretations as well).  The
12238    Poisson distribution has the following probability density
12239    function:
12240       p(x,lambda) = exp(-lambda)*lambda**x/lambda!
12241    where x is a non-negative integer.  The cumulative distribution is
12242    the probability of obtaining x or fewer events.  It is the sum of
12243    the Poisson probabilities of 0 to x.  The cumulative distribution
12244    is computed via a chi-square approximation.
12245
12246Syntax:
12247    LET <y2> = POICDF(<y1>,<lambda>) <SUBSET/EXCEPT/FOR qualification>
12248    where <y1> is a non-negative integer variable, number, or
12249               parameter (a warning message is printed if it is not);
12250          <y2> is a variable or a parameter (depending on what <y1> is)
12251               where the computed Poisson cdf value is stored;
12252          <lambda> is a number or parameter that specifies the shape
12253               parameter of the Poisson distribution;
12254    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
12255
12256Examples:
12257    LET A = POICDF(3,0.5)
12258    LET X2 = POICDF(X1,0.3)
12259
12260Note:
12261    Library functions are distinguished from let subcommands
12262    in the following ways.
12263    1) Functions enclose the input value in parenthesis.  Let
12264       subcommands use spaces.
12265    2) Functions can accept (and return) either parameters
12266       (i.e., single values) or variables (i.e., an array of
12267       values) while let subcommands are specific in which they
12268       accept as input and what they return as output.
12269    3) Functions can accept expressions while let subcommands
12270       do not.  For example, the following is legal:
12271           LET Y2 = ABS(Y1-INT(Y1))
12272       For let subcommands, you typically have to do something
12273       like the following:
12274           LET YTEMP = Y**2 + 8
12275           LET A = SUM YTEMP
12276
12277Default:
12278    None
12279
12280Synonyms:
12281    None
12282
12283Related Commands:
12284    POIPDF = Compute the Poisson probability density function.
12285    POIPPF = Compute the Poisson percent point function.
12286    BINCDF = Compute the binomial cumulative distribution function.
12287    BINPDF = Compute the binomial probability density function.
12288    BINPPF = Compute the binomial percent point function.
12289    NBCDF  = Compute the negative binomial cumulative distribution
12290             function.
12291    NBPDF  = Compute the negative binomial probability density
12292             function.
12293    NBPPF  = Compute the negative binomial percent point function.
12294    GEOCDF = Compute the geometric cumulative distribution function.
12295    GEOPDF = Compute the geometric probability density function.
12296    GEOPPF = Compute the geometric percent point function.
12297
12298Reference:
12299    "Discrete Univariate Distributions", Johnson and Kotz, Houghton
12300    Mifflin, 1970 (chapter 4).
12301
12302Applications:
12303    XX
12304
12305Implementation Date:
12306    94/4
12307
12308Program:
12309    MULTIPLOT 2 2; MULTIPLOT CORNER COORDINATES 0 0 100 100
12310    YLIMITS 0 1
12311    MAJOR YTIC NUMBER 6
12312    MINOR YTIC NUMBER 1
12313    YTIC DECIMAL 1
12314    XLIMITS 0 50
12315    XTIC OFFSET 0.5 0.5
12316    LINE BLANK
12317    SPIKE ON
12318    SPIKE LINE DASH
12319    CHARACTER CIRCLE
12320    CHARACTER FILL ON
12321    CHARACTER SIZE 1.2
12322    TITLE AUTOMATIC
12323    X1LABEL NUMBER OF SUCCESSES
12324    Y1LABEL PROBABILITY
12325    TITLE AUTOMATIC; TITLE SIZE 3
12326    PLOT POICDF(X,5) FOR X = 0 1 50
12327    PLOT POICDF(X,15) FOR X = 0 1 50
12328    PLOT POICDF(X,25) FOR X = 0 1 50
12329    PLOT POICDF(X,35) FOR X = 0 1 50
12330    END OF MULTIPLOT
12331
12332-----POINTS IN POLYGON--------------------------------------------------
12333
12334POINTS IN POLYGON
12335
12336Name:
12337    POINTS IN POLYGON
12338
12339Type:
12340    LET Subcommand
12341
12342Purpose:
12343    Given a polygon and a set of points, determine if each of these
12344    points are interior points, exterior points, edge points, or
12345    equal to a vertex.
12346
12347Description:
12348    A basic problem in computational geometry is to determine if a
12349    point is inside or outside of a polygon.  In a Dataplot context,
12350    the most common application for this basic problem is to determine
12351    whether a point should be plotted or not plotted.
12352
12353    Given a set of one or more points, this command returns a tag
12354    value (where each row of the tag variable corresponds to the
12355    row of the variables containing the x and y coordinates of the
12356    points being tested).  Each value of the tag variable will contain
12357    either a 1, 2, 3, or 4 where
12358
12359           1 = interior point
12360           2 = exterior point
12361           3 = edge point
12362           4 = vertex point
12363
12364Syntax:
12365    LET <tag> = POINTS IN POLYGON  <xval>  <yval>  <xpoly> <ypoly>
12366                <SUBSET/EXPCEPT/FOR qualification>
12367    where <xval> is a variable containing the x-coordinates of
12368               the data points being checked;
12369          <yval> is a variable containing the y-coordinates of
12370               the data points being checked;
12371          <xpoly> is a variable that will contain the x-coordinats
12372               of the polygon;
12373          <ypoly> is a variable that will contain the y-coordinats
12374               of the polygon;
12375          <tag> is a variable (of the same size as <xval> and <yval>)
12376               that specifies whether each point is an interior,
12377               exterior, edge, or vertex point;
12378    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
12379
12380Examples:
12381    LET TAG = POINTS IN POLYGON XVAL YVAL XPOLY YPOLY
12382
12383Note:
12384    Dataplot uses a Fortran translation of the C routine "InPoly1"
12385    algorithm given on page 244 of O'Rourke (see Reference section
12386    below).
12387
12388    This algorithm is based on counting the number of ray tracings.
12389    A complete description of the algorithm is given on pages
12390    239-245 of O'Rourke's book.
12391
12392    This algorithm works for both convex and non-convex polygons.
12393
12394Note:
12395    The points in the polygon are assumed to be sorted (i.e.,
12396    contiguous rows define an edge).  No check is made that these
12397    points in fact define a valid polygon.
12398
12399    The <xval> and <yval> points do not need to be in any specific
12400    order since they are tested independently of each other.
12401
12402Note:
12403    In deterining if a point is equal to a vertex point, Dataplot
12404    checks that the x-coordinate and the y-coordinate are within
12405    epsilon of each vertex where epsilon is set equal to 0.0000001.
12406
12407Default:
12408    None
12409
12410Synonyms:
12411    None
12412
12413Related Commands:
12414    CONVEX HULL             = Compute the convex hull of a set of
12415                              points.
12416    MINIMAL SPANNING TREE   = Determine the minimal spanning tree.
12417    SPAINNING FOREST        = Determine the spanning forest.
12418
12419References:
12420    O'Rourke (1998), "Computational Geometry in C", Second Edition,
12421    Cambridge Unversity Press, Chapter 7.
12422
12423Applications:
12424    Computational Geometry
12425
12426Implementation Date:
12427    2011/9
12428
12429Program:
12430    . Name:     poly.dp
12431    . Purpose:  Demonstrate "points in polygon" routine
12432    . Source:   Data from O'Rourke (1998), "Computational Geometry in
12433    .           C", Second Edition.
12434    .
12435    . Step 1: Read data
12436    .
12437    read xpoly ypoly
12438    0 0
12439    2 0
12440    2 2
12441    3 1
12442    4 2
12443    5 2
12444    3 3
12445    3 2
12446    2 4
12447    6 3
12448    7 4
12449    7 2
12450    8 5
12451    8 7
12452    7 7
12453    8 8
12454    5 9
12455    6 6
12456    5 7
12457    4 6
12458    4 8
12459    3 7
12460    2 7
12461    3 6
12462    4 4
12463    0 7
12464    2 3
12465    0 2
12466    end of data
12467    .
12468    read xval yval
12469    0 0
12470    1 0
12471    2 1
12472    1 2
12473    0 2
12474    6 2
12475    2 4
12476    5 4
12477    1 5
12478    3 5
12479    6 5
12480    7 6
12481    8 6
12482    1 7
12483    2 7
12484    3 7
12485    4 7
12486    4 8
12487    5 9
12488    end of data
12489    .
12490    . Step 2: Plot data
12491    .
12492    tic mark offset units screen
12493    tic mark offset 5 5
12494    pre-sort off
12495    line blank solid
12496    character circ blank
12497    character hw 0.5 0.375
12498    character fill on
12499    plot yval xval and
12500    plot ypoly xpoly
12501    set isubro popl
12502    cpu time
12503    let t1 = cputime
12504    let tag = point in polygon xval yval xpoly ypoly
12505    pause
12506    .
12507    line bl bl bl bl solid
12508    character circ circ circ circ blank
12509    character hw 0.5 0.375 all
12510    character fill on all
12511    char color blue red green cyan black
12512    plot yval xval subset tag = 1 and
12513    plot yval xval subset tag = 2 and
12514    plot yval xval subset tag = 3 and
12515    plot yval xval subset tag = 4 and
12516    plot ypoly xpoly
12517
12518-----POINT-------------------------------------------------------
12519
12520POINT
12521
12522Name:
12523    POINT
12524
12525Type:
12526    Diagrammatic Graphics Command
12527
12528Purpose:
12529    Draws a point at a position.
12530
12531Description:
12532    The coordinates define the (x,y) value of the position.
12533
12534Syntax:
12535    POINT   <x>   <y>
12536    where <x> is a decimal number or parameter in the range 0 to 100
12537              that specifies the horizontal coordinate;
12538    and   <y> is a decimal number or parameter in the range 0 to 100
12539              that specifies the vertical coordinate.
12540
12541Examples:
12542    POINT 50 50
12543    POINT 20 80
12544    POINT 70 65.3
12545
12546Note:
12547    The keywords DATA and RELATIVE were added to the TRIANGLE
12548    command 7/1997.  These keywords are independent and can
12549    be used separately or together.  For example,
12550    TRIANGLE DATA, TRIANGLE RELATIVE, or TRIANGLE DATA RELATIVE.
12551    The word DATA should come before the word RELATIVE if both
12552    appear.
12553
12554    DATA means that the coordinates are specified in terms of
12555    the data units of the most recent plot rather than Dataplot
12556    0 to 100 screen units.
12557
12558    RELATIVE means that the coordinates of the first point
12559    are drawn in absolute coordinates an all subsequent points
12560    in the figure are relative to that first point.
12561
12562Default:
12563    None
12564
12565Synonyms:
12566    None
12567
12568Related Commands:
12569    CIRCLE           = Draws a circle.
12570    ARROW            = Draws an arrow.
12571    TRIANGLE         = Draws a triangle.
12572    BOX              = Draws a box.
12573    HEXAGON          = Draws a hexagon.
12574    SEMI-CIRCLE      = Draws a semi-circle.
12575    ARC              = Draws an arc.
12576    ELLIPSE          = Draws an ellipse.
12577    OVAL             = Draws an oval.
12578    DIAMOND          = Draws a diamond.
12579    DRAW             = Draws a line.
12580    MOVE             = Moves to a point.
12581    LINES            = Sets the line type for figures and plot lines.
12582    LINE THICKNESSES = Sets the line thickness for figures and  plot
12583                       lines.
12584    LINE COLOR       = Sets the line colors for figures and plot lines.
12585    CROSS-HAIR       = Activates and reads the cross-hair.
12586    TEXT             = Writes a text string.
12587
12588Applications:
12589    Presentation Graphics
12590
12591Implementation Date:
12592    Pre-1987
12593
12594Program:
12595    XX
12596
12597-----POIPDF (LET)--------------------------------
12598
12599POIPDF
12600
12601Name:
12602    POIPDF (LET)
12603
12604Type:
12605    Library Function
12606
12607Purpose:
12608    Compute the Poisson probability density function.
12609
12610Description:
12611    The Poisson distribution is the distribution of the number of
12612    events in the interval (0,lambda) when the waiting time between
12613    events is exponentially distributed with mean 1 and standard
12614    deviation 1 (there are alternate interpretations as well).  The
12615    Poisson distribution has the following probability mass
12616    function:
12617
12618       p(x,lambda) = exp(-lambda)*lambda**x/lambda!
12619                     x = 0, 1, 2, ...
12620
12621    with lambda denoting the shape parameter.
12622
12623Syntax:
12624    LET <y> = POIPDF(<x>,<lambda>)  <SUBSET/EXCEPT/FOR qualification>
12625    where <x> is a non-negative integer variable, number, or
12626              parameter;
12627          <lambda> is a number or parameter that specifies the shape
12628               parameter of the Poisson distribution;
12629          <y> is a variable or a parameter (depending on what <x>
12630              is) where the computed Poisson pdf value is stored;
12631    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
12632
12633Examples:
12634    LET A = POIPDF(3,0.5)
12635    LET X2 = POIPDF(X1,0.3)
12636
12637Note:
12638    For a number of commands utilizing the Poisson distribution,
12639    it is convenient to bin the data.  There are two basic ways
12640    of binning the data.
12641
12642      1) For some commands (histograms, maximum likelihood
12643         estimation), bins with equal size widths are
12644         required.  This can be accomplished with the
12645         following commands:
12646
12647            LET AMIN = MINIMUM Y
12648            LET AMAX = MAXIMUM Y
12649            LET AMIN2 = AMIN - 0.5
12650            LET AMAX2 = AMAX + 0.5
12651            CLASS MINIMUM AMIN2
12652            CLASS MAXIMUM AMAX2
12653            CLASS WIDTH 1
12654            LET Y2 X2 = BINNED
12655
12656      2) For some commands, unequal width bins may be
12657         helpful.  In particular, for the chi-square goodness
12658         of fit, it is typically recommended that the minimum
12659         class frequency be at least 5.  In this case, it may
12660         be helpful to combine small frequencies in the tails.
12661         Unequal class width bins can be created with the
12662         commands
12663
12664            LET MINSIZE = <value>
12665            LET Y3 XLOW XHIGH = INTEGER FREQUENCY TABLE Y
12666
12667         If you already have equal width bins data, you can
12668         use the commands
12669
12670            LET MINSIZE = <value>
12671            LET Y3 XLOW XHIGH = COMBINE FREQUENCY TABLE Y2 X2
12672
12673         The MINSIZE parameter defines the minimum class
12674         frequency.  The default value is 5.
12675
12676Note:
12677    You can generate Poisson random numbers, probability
12678    plots, and chi-square goodness of fit tests with the
12679    following commands:
12680
12681       LET LAMBDA = <value>
12682       LET Y = POISSON RANDOM NUMBERS FOR I = 1 1 N
12683
12684       POISSON PROBABILITY PLOT Y
12685       POISSON PROBABILITY PLOT Y2 X2
12686       POISSON PROBABILITY PLOT Y3 XLOW XHIGH
12687
12688       POISSON CHI-SQUARE GOODNESS OF FIT Y
12689       POISSON CHI-SQUARE GOODNESS OF FIT Y2 X2
12690       POISSON CHI-SQUARE GOODNESS OF FIT Y3 XLOW XHIGH
12691
12692    To obtain the maximum likelihood estimates of lambda,
12693    enter the command
12694
12695        POISSON MAXIMUM LIKELIHOOD Y
12696
12697    The formula for the maximum likelihood estimate of
12698    lambda is:
12699
12700        lambdahat = xbar
12701
12702    with  xbar denoting the sample mean.
12703
12704    You can generate the estimate of lambda based on the
12705    maximum ppcc value or the minimum chi-square goodness of
12706    fit with the commands
12707
12708        LET LAMBDA1 = <value>
12709        LET LAMBDA2 = <value>
12710        POISSON KS PLOT Y
12711        POISSON KS PLOT Y2 X2
12712        POISSON KS PLOT Y3 XLOW XHIGH
12713        POISSON PPCC PLOT Y
12714        POISSON PPCC PLOT Y2 X2
12715        POISSON PPCC PLOT Y3 XLOW XHIGH
12716
12717    The default values of lambda1 and lambda2 are 1 and 50,
12718    respectively.  Due to the discrete nature of the percent
12719    point function for discrete distributions, the ppcc plot
12720    will not be smooth.  For that reason, if there is sufficient
12721    sample size the KS PLOT (i.e., the minimum chi-square value)
12722    is typically preferred.  However, it may sometimes be useful
12723    to perform one iteration of the PPCC PLOT to obtain a rough
12724    idea of an appropriate neighborhood for the shape parameter
12725    since the minimum chi-square statistic can generate extremely
12726    large values for non-optimal values of the shape parameters.
12727    Also, since the data is integer values, one of the binned
12728    forms is preferred for these commands.
12729
12730Note:
12731    Library functions are distinguished from let subcommands
12732    in the following ways.
12733    1) Functions enclose the input value in parenthesis.  Let
12734       subcommands use spaces.
12735    2) Functions can accept (and return) either parameters
12736       (i.e., single values) or variables (i.e., an array of
12737       values) while let subcommands are specific in which they
12738       accept as input and what they return as output.
12739    3) Functions can accept expressions while let subcommands
12740       do not.  For example, the following is legal:
12741           LET Y2 = ABS(Y1-INT(Y1))
12742       For let subcommands, you typically have to do something
12743       like the following:
12744           LET YTEMP = Y**2 + 8
12745           LET A = SUM YTEMP
12746
12747Default:
12748    None
12749
12750Synonyms:
12751    None
12752
12753Related Commands:
12754    POICDF = Compute the Poisson cumulative distribution function.
12755    POIPPF = Compute the Poisson percent point function.
12756    BINCDF = Compute the binomial cumulative distribution function.
12757    BINPDF = Compute the binomial probability mass function.
12758    BINPPF = Compute the binomial percent point function.
12759    NBCDF  = Compute the negative binomial cumulative distribution
12760             function.
12761    NBPDF  = Compute the negative binomial probability mass
12762             function.
12763    NBPPF  = Compute the negative binomial percent point function.
12764    GEOCDF = Compute the geometric cumulative distribution function.
12765    GEOPDF = Compute the geometric probability mass function.
12766    GEOPPF = Compute the geometric percent point function.
12767
12768Reference:
12769    Johnson, Kotz, and Kemp (1992), "Univariate Discrete
12770    Distributions", Second Edition, Wiley, chapter 4.
12771
12772    Evans, Hastings, and Peacock (2000), "Statistical
12773    Distributions", Third Edition, Wiley, pp. 155-160.
12774
12775Applications:
12776    Distributional Modeling
12777
12778Implementation Date:
12779    1994/4
12780
12781Program:
12782    MULTIPLOT 2 2; MULTIPLOT CORNER COORDINATES 0 0 100 100
12783    YLIMITS 0 0.2
12784    XLIMITS 0 50
12785    XTIC OFFSET 0.5 0.5
12786    LINE BLANK
12787    SPIKE ON
12788    SPIKE LINE DASH
12789    CHARACTER CIRCLE
12790    CHARACTER FILL ON
12791    CHARACTER SIZE 1.2
12792    TITLE AUTOMATIC
12793    X1LABEL NUMBER OF SUCCESSES
12794    Y1LABEL PROBABILITY
12795    TITLE AUTOMATIC; TITLE SIZE 3
12796    PLOT POIPDF(X,5) FOR X = 0 1 50
12797    PLOT POIPDF(X,15) FOR X = 0 1 50
12798    PLOT POIPDF(X,25) FOR X = 0 1 50
12799    PLOT POIPDF(X,35) FOR X = 0 1 50
12800    END OF MULTIPLOT
12801
12802-----POIPPF (LET)--------------------------------
12803
12804POIPPF
12805
12806Name:
12807    POIPPF (LET)
12808
12809Type:
12810    Library Function
12811
12812Purpose:
12813    Compute the Poisson percent point function.
12814
12815Description:
12816    The Poisson distribution is the distribution of the number of
12817    events in the interval (0,lambda) when the waiting time between
12818    events is exponentially distributed with mean 1 and standard
12819    deviation 1 (there are alternate interpretations as well).  The
12820    Poisson distribution has the following probability density
12821    function:
12822       p(x,lambda) = exp(-lambda)*lambda**x/lambda!
12823    where x is a non-negative integer.
12824
12825    The percent point function is the inverse of the cumulative
12826    distribution function.  The cumulative distribution sums the
12827    probability from 0 to the given x value.  The percent point
12828    function takes a cumulative probability value and computes the
12829    corresponding x value.  The Poisson percent point function is
12830    computed using a normal approximation.
12831
12832    The input value is a real number between 0 and 1 (since it
12833    corresponds to a probability).
12834
12835Syntax:
12836    LET <y2> = POIPPF(<y1>,<lambda>) <SUBSET/EXCEPT/FOR qualification>
12837    where <y1> is a variable, a number, or a parameter in the range 0
12838              to 1;
12839          <y2> is a variable or a parameter (depending on what <y1> is)
12840               where the computed Poisson ppf value is stored;
12841          <lambda> is a number or parameter that specifies the shape
12842               parameter of the Poisson distribution;
12843    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
12844
12845Examples:
12846    LET A = POIPPF(0.9,5)
12847    LET X2 = POIPPF(X1,0.7)
12848
12849Note:
12850    Library functions are distinguished from let subcommands
12851    in the following ways.
12852    1) Functions enclose the input value in parenthesis.  Let
12853       subcommands use spaces.
12854    2) Functions can accept (and return) either parameters
12855       (i.e., single values) or variables (i.e., an array of
12856       values) while let subcommands are specific in which they
12857       accept as input and what they return as output.
12858    3) Functions can accept expressions while let subcommands
12859       do not.  For example, the following is legal:
12860           LET Y2 = ABS(Y1-INT(Y1))
12861       For let subcommands, you typically have to do something
12862       like the following:
12863           LET YTEMP = Y**2 + 8
12864           LET A = SUM YTEMP
12865
12866Default:
12867    None
12868
12869Synonyms:
12870    None
12871
12872Related Commands:
12873    POICDF = Compute the Poisson cumulative distribution function.
12874    POIPDF = Compute the Poisson probability density function.
12875    BINCDF = Compute the binomial cumulative distribution function.
12876    BINPDF = Compute the binomial probability density function.
12877    BINPPF = Compute the binomial percent point function.
12878    NBCDF  = Compute the negative binomial cumulative distribution
12879             function.
12880    NBPDF  = Compute the negative binomial probability density
12881             function.
12882    NBPPF  = Compute the negative binomial percent point function.
12883    GEOCDF = Compute the geometric cumulative distribution function.
12884    GEOPDF = Compute the geometric probability density function.
12885    GEOPPF = Compute the geometric percent point function.
12886
12887Reference:
12888    "Discrete Univariate Distributions", Johnson and Kotz, Houghton
12889    Mifflin, 1970 (chapter 4).
12890
12891Applications:
12892    Pre-1987
12893
12894Implementation Date:
12895    1994/4
12896
12897Program:
12898    MULTIPLOT 2 2
12899    MULTIPLOT CORNER COORDINATES 0 0 100 100
12900    YLIMITS 0 50
12901    XLIMITS 0 1
12902    MAJOR XTIC NUMBER 6
12903    MINOR XTIC NUMBER 1
12904    XTIC DECIMAL 1
12905    TITLE AUTOMATIC
12906    X1LABEL PROBABILITY
12907    Y1LABEL NUMBER OF SUCCESSES
12908    PLOT POIPPF(X,5) FOR X = 0.01 0.01 0.99
12909    PLOT POIPPF(X,15) FOR X = 0.01 0.01 0.99
12910    PLOT POIPPF(X,25) FOR X = 0.01 0.01 0.99
12911    PLOT POIPPF(X,35) FOR X = 0.01 0.01 0.99
12912    END OF MULTIPLOT
12913
12914-----POISSON DISPERSION TEST------------------------------------
12915
12916POISSON DISPERSION TEST
12917
12918Name:
12919    POISSON DISPERSION TEST
12920
12921Type:
12922    Analysis Command
12923
12924Purpose:
12925    Perform a Poisson dispersion test for Poissonality.
12926
12927Description:
12928    The Poisson dispersion test is one of the most common tests to
12929    determine if a univariate data set follows a Poisson distribution.
12930
12931    The Poisson dispersion test statistic is defined as:
12932
12933        D = SUM[i=1 to N][(X(i) - XBAR)**2/XBAR]
12934
12935    with XBAR and N denoting the sample mean and the sample size,
12936    respectively.
12937
12938    Note that this test can be applied to either raw (ungrouped) data
12939    or to frequency (grouped) data.
12940
12941    This test follows an approximately chi-square distribution with
12942    N - 1 degrees of freedom.  This is a two-tailed test.
12943
12944Syntax 1:
12945    POISSON DISPERSION TEST   <y>    <SUBSET/EXCEPT/FOR qualification>
12946    where <y> is the response variable;
12947    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
12948
12949    This syntax is used for the raw (ungrouped) data case.
12950
12951Syntax 2:
12952    POISSON DISPERSION TEST  <y>  <x>   <SUBSET/EXCEPT/FOR qualification>
12953    where <y> is the variable containing the frequencies;
12954          <x> is the variable containing the class mid-points;
12955    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
12956
12957    This syntax is used for the grouped data case.
12958
12959Syntax 3:
12960    MULTIPLE POISSON DISPERSION TEST  <y1>  ...  <yk>
12961                         <SUBSET/EXCEPT/FOR qualification>
12962    where <y1> ... <yk> is a list of 1 to 30 response variables;
12963    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
12964
12965    This syntax performs a Poisson dispersion test on <y1>, then
12966    on <y2>, and so on.  Up to 30 response variables may be specified.
12967
12968    Note that the syntax
12969
12970         MULTIPLE POISSON DISPERSION TEST Y1 TO Y4
12971
12972    is supported.  This is equivalent to
12973
12974         MULTIPLE POISSON DISPERSION TEST Y1 Y2 Y3 Y4
12975
12976Syntax 4:
12977    REPLICATED POISSON DISPERSION TEST  <y>  <x1> ...  <xk>
12978                         <SUBSET/EXCEPT/FOR qualification>
12979    where <y> is the response variable;
12980          <x1> ... <xk> is a list of 1 to 6 group-id variables;
12981    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
12982
12983    This syntax peforms a cross-tabulation of <x1> ... <xk> and performs a
12984    Poisson dispersion test for each unique combination of cross-tabulated
12985    values.  For example, if X1 has 3 levels and X2 has 2 levels, there
12986    will be a total of 6 Poisson dispersion tests performed.
12987
12988    Up to six group-id variables can be specified.
12989
12990    Note that the syntax
12991
12992         REPLICATED POISSON DISPERSION TEST Y X1 TO X4
12993
12994    is supported.  This is equivalent to
12995
12996         REPLICATED POISSON DISPERSION TEST Y X1 X2 X3 X4
12997
12998Examples:
12999    POISSON DISPERSION TEST Y1
13000    POISSON DISPERSION TEST Y1   SUBSET TAG > 2
13001    MULTIPLE POISSON DISPERSION TEST Y1 TO Y10
13002    REPLICATED POISSON DISPERSION TEST Y X
13003
13004Note:
13005    Syntax 1 and Syntax 3 support matrix arguments.  Syntax 3 and
13006    Syntax 4 support the TO syntax.
13007
13008    For Syntax 4 (the REPLICATED form), the variables must all have the
13009    same number of observations.
13010
13011Note:
13012    The following statistics are also supported:
13013
13014        LET A = POISSON DISPERSION TEST          Y
13015        LET A = POISSON DISPERSION TEST CDF      Y
13016        LET A = POISSON DISPERSION TEST PVALUE   Y
13017
13018        LET A = GROUPED POISSON DISPERSION TEST          Y X
13019        LET A = GROUPED POISSON DISPERSION TEST CDF      Y X
13020        LET A = GROUPED POISSON DISPERSION TEST PVALUE   Y X
13021
13022    In addition to the above LET command, built-in statistics are
13023    supported for about 17 different commands (enter HELP STATISTICS
13024    for details).
13025
13026Note:
13027    The POISSON DISPERSION TEST command automatically saves the following
13028    internal parameters:
13029
13030        STATVAL   = the value of the test statistic
13031        STATCDF   = the CDF of the test statistic
13032        PVALUE    = the p-value for the two-sided test
13033        CUTLOW50  = the 50% lower tailed critical value
13034        CUTUPP50  = the 50% upper tailed critical value
13035        CUTLOW80  = the 80% lower tailed critical value
13036        CUTUPP80  = the 80% upper tailed critical value
13037        CUTLOW90  = the 90% lower tailed critical value
13038        CUTUPP90  = the 90% upper tailed critical value
13039        CUTLOW95  = the 95% lower tailed critical value
13040        CUTUPP95  = the 95% upper tailed critical value
13041        CUTLOW99  = the 99% lower tailed critical value
13042        CUTUPP99  = the 99% upper tailed critical value
13043        CUTLO999  = the 99.9% lower tailed critical value
13044        CUTUP999  = the 99.9% upper tailed critical value
13045
13046    If the MULTIPLE or REPLICATED option is used, these values will
13047    be written to the file "dpst1f.dat" instead.
13048
13049Default:
13050    None
13051
13052Synonyms:
13053    None
13054
13055Related Commands:
13056    POISSON PLOT     = Generate a Poisson plot.
13057    GOODNESS OF FIT  = Perform Anderson-Darling, Kolmogorov-Smirnov,
13058                       Chi-Square, and PPCC goodness of fit tests.
13059    POIPDF           = Compute the Poisson probability mass function.
13060
13061Reference:
13062    Spinelli and Stephens (1997), "Cramer-Von Mises Tests of Fit for the
13063    Poisson Distribution", Canadian Journal of Statistics, Vol. 25(2),
13064    pp. 257-267.
13065
13066    Kendell and Stuart (1979), "The Advanced Theory of Statistics: Volume 2",
13067    Fourth Edition, Griffin, London.
13068
13069Applications:
13070    Distributional Fitting
13071
13072Implementation Date:
13073    2013/11
13074
13075Program 1:
13076    LET LAMBDA = 25
13077    LET Y = POISSON RANDOM NUMBERS FOR I = 1 1 1000
13078    SET WRITE DECIMALS 4
13079    POISSON DISPERSION TEST Y
13080
13081Program 2:
13082    . Step 1: Read the data
13083    .
13084    .         This data set is from:
13085    .
13086    .         Spinelli and Stephens (1997), "Cramer-Von Mises Tests of Fit
13087    .         for the Poisson Distribution", Canadian Journal of Statistics,
13088    .         Vol. 25(2).
13089    .
13090    .         Hoaglin (1980), "A Poissonness Plot", The American Statistician,
13091    .         34, pp. 146-149.
13092    .
13093    .         Note that there is an error in one of the entries in the Spinelli
13094    .         and Stephens (for cell 2, they give a value of 283 rather than the
13095    .         value of 383, their computed statistics are consistent with using
13096    .         the value 383).
13097    .
13098    read x2 y2
13099     0   57
13100     1  203
13101     2  383
13102     3  525
13103     4  532
13104     5  408
13105     6  273
13106     7  139
13107     8   45
13108     9   27
13109    10   10
13110    11    4
13111    12    0
13112    13    1
13113    14    1
13114    end of data
13115    .
13116    . Step 2: Perform the Poisson Dispersion test.
13117    .
13118    set write decimals 4
13119    poisson dispersion test y2 x2
13120
13121-----POISSON PLOT--------------------------------------
13122
13123POISSON PLOT
13124
13125Name:
13126    POISSON PLOT
13127
13128Type:
13129    Graphics Command
13130
13131Purpose:
13132    Generates one of the following types of plots:
13133
13134       1) a Poisson plot
13135       2) a geometric plot
13136       3) a negative binomial plot
13137       4) a binomial plot
13138       5) a logarithmic series plot
13139
13140Description:
13141    These plots are used to determine if the specified
13142    distribution provides an appropriate distributiuonal
13143    model to a set of data.  These are similar in concept
13144    to probability plots in that we generate a plot that
13145    should appear linear if the data are in fact fit well
13146    by the distribution.
13147
13148    The following table shows how these plots are constructed
13149    where x and n(x) denote the class value and the corresponding
13150    frequency.  In all cases, the x-coordinate is x.
13151
13152                       phi(n*(x))
13153                       Y-Axis           Theoretical   Theoretical
13154    Distribution       Coordinate       Slope         Intercept
13155    ==============================================================
13156    Poisson            LOG(x!*n*(x)/N)  LOG(lambda)   -lambda
13157    Geometric          LOG(n*(x)/N)     LOG(1-p)      LOG(p)
13158    Negative Binomial  LOG(n*(x)/       LOG(1-p)      n*LOG(p)
13159                       {N*(n+x-1  x)}
13160    Binomial           LOG(n*(x)/       LOG(p/(1-p))  n*LOG(1-p)
13161                       {N*(n+x   x)}
13162    Logarithmic Series LOG(x*n*(x)/N)   LOG(theta)    -LOG(-LOG(1-theta))
13163
13164    where
13165       p      = probability of success parameter for the
13166                geometric, binomial, and negative binomial
13167                distributions.
13168       theta  = the shape parameter for the logarithmic series
13169                distribution.
13170       n      = the number of trials parameter for the binomial
13171                distribution.
13172       x      = class value
13173       n*(x)  = adjusted class frequency (defined below)
13174
13175    The theoretical slope parameter can be used to estimate
13176    the shape parameter of the distribution.
13177
13178    Hoaglin and Tukey (see References below) provides the
13179    derivations of why these plots should be linear if the specified
13180    distribution is appropriate.  They also make the following
13181    suggestions for enhancing these plots:
13182
13183       1) A 95% confidence interval for each point on the plot
13184          is given as
13185
13186            phi(n*(x)) +/- h(x)
13187
13188          where
13189
13190              n*(x)    = n(x) - 0.8*n(x)/N - 0.67    n(x) >= 2
13191                       = 1/e                         n(x) = 1
13192                       = undefined                   n(x) = 0
13193
13194              h(x)     = 1.96*SQRT(1 - phat(x))/
13195                         SQRT{n(x) - (0.25*phat(x) +0.47)*SQRT(n(x))}
13196
13197              N        = total sample size
13198
13199              phat(x)  = n(k)/N
13200
13201          The rationale for this confidence interval is given in
13202          the Hoaglin and Tukey reference.
13203
13204          The n*(x) values are referred to as the adjusted
13205          frequencies.
13206
13207       2) These plots can be "leveled".  By leveling, we convert
13208          the plot from interpretation of departures from a
13209          diagonal line to departures from a horizontal line.
13210          This may be an easier visual task.
13211
13212          To level the plot, we plot
13213
13214             phi'(n(x)) =  phi(n(x)) - (intercept + slope*x)
13215
13216          where intercept and slope are taken from the columns
13217          "theoretical intercept" and "theoretical slope" in the
13218          table above.
13219
13220          Note that a preliminary estimate of the shape parameter
13221          for the distribution is required to compute the
13222          theoretical intercept and the theoretical slope.
13223          This is discussed further in a Note section below.
13224
13225Syntax 1:
13226    <dist> PLOT <y>       <SUBSET/EXCEPT/FOR qualification>
13227    where <y> is a response variable;
13228          <dist> is one of the following:
13229              POISSON
13230              GEOMETRIC
13231              NEGATIVE BINOMIAL
13232              BINOMIAL
13233              LOGARITHMIC SERIES;
13234    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
13235
13236    This syntax is used for the case where you have raw data.
13237    Dataplot will automatically create the frequency table.
13238
13239Syntax 2:
13240    <dist> PLOT <y> <x>     <SUBSET/EXCEPT/FOR qualification>
13241    where <y> is a variable containing frequencies;
13242          <x> is a variable containing the class value;
13243          <dist> is one of the distributions listed above:
13244    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
13245
13246Examples:
13247    POISSON PLOT Y
13248    POISSON PLOT Y X
13249    GEOMETRIC PLOT Y
13250    GEOMETRIC PLOT Y X
13251
13252Note:
13253    For the leveled version of the plot, a preliminary estimate
13254    of the shape parameter(s) is required.
13255
13256       1) For the Poisson distribution, the maximum likelihood
13257          estimate of lambda is the sample mean.  This is used
13258          as the prelimanary estimate of lambda in the leveled
13259          version of the plot.
13260
13261       2) For the binomial distribution, you need to specify
13262          the n parameter (the number of trials) by entering
13263          the following command before the BINOMIAL PLOT
13264          command:
13265
13266              LET N = <value>
13267
13268          The sample mean is then used as the estimate of the
13269          p (probability of success) parameter. This is the
13270          maximum likelihood estimate.
13271
13272       3) For the geometric distribution, the maximum likelihood
13273          estimate of the p (probability of success) parameter is
13274
13275              1/(xbar + 1)
13276
13277          where xbar is the sample mean.
13278
13279       4) For the negative binomial distribution, there are two
13280          parameters: p and k.  For this plot, k is restricted to
13281          integer values.
13282
13283          You can either specify a value for k by entering
13284          the command
13285
13286              LET K = <value>
13287
13288          or you can let Dataplot estimate the value.
13289
13290          If k is not specified, the moment estimate of k is
13291          used:
13292
13293              kmom = xbar**2/(s**2 - xbar)
13294
13295          This estimate will be rounded to the nearest integer.
13296
13297          The maximum likelihood estimate of p is then
13298
13299              phat = k/(xbar + k)
13300
13301          If k >= 2, then the bias corrected estimate is used
13302
13303              phat = (k - 1)/(xbar + k - 1)
13304
13305       5) For the logarithmic series distribution, you can
13306          specify the desired value of theta by entering the
13307          command
13308
13309              LET THETA = <value>
13310
13311          You can obtain this estimate either by using
13312          maximum likelihood, the PPCC plot, or the KS plot.
13313
13314Note:
13315    The appearance of the plot can be controlled with
13316    the LINE and CHARACTER commands.  Specifically,
13317
13318        trace 1           = phi(n(x)) versus x
13319        trace 2           = fitted line for phi(n(x)) versus x
13320        trace 3           = phi(n*(x)) versus x
13321        trace 4           = fitted line for phi(n*(x)) versus x
13322        trace 5           = lower confidence point
13323        trace 6           = upper confidence point
13324        trace 7 and above = line connecting the lower and upper
13325                            confidence points
13326
13327    If you want to suppress any of these components, you can
13328    set both the CHARACTER and LINE settings to BLANK.  The
13329    example programs below demonstrate the use of the LINE
13330    and CHARACTER commands to control the appearance of the plot.
13331
13332Note:
13333    By default, the unleveled plot is generated.  To generate
13334    the leveled plot, enter the command
13335
13336        SET POISSON PLOT LEVEL ON
13337
13338    To reset the default, enter the command
13339
13340        SET POISSON PLOT LEVEL OFF
13341
13342    This command applies to all five of the plots described here,
13343    not just the Poisson plot.
13344
13345Note:
13346    The following internal parameters are saved by this plot:
13347
13348    All plots:
13349        PPA0      - the intercept of the fitted line (unadjusted
13350                    frequencies)
13351        PPA1      - the slope of the fitted line (unadjusted
13352                    frequencies)
13353        PPA0ADJU  - the intercept of the fitted line (adjusted
13354                    frequencies)
13355        PPA1      - the slope of the fitted line (adjusted
13356                    frequencies)
13357
13358     Poisson plot:
13359        LAMBDAPP  - the estimate of lambda based on the
13360                    unadjusted frequencies
13361        LAMBDAPA  - the estimate of lambda based on the
13362                    adjusted frequencies
13363
13364     Binomial, negative binomial, geometric plot:
13365        PPP       - the estimate of p based on the unadjusted
13366                    frequencies
13367        PPPADJ    - the estimate of p based on the adjusted
13368                    frequencies
13369
13370     Logarithmic series plot:
13371        THETAPP   - the estimate of theta based on the
13372                    unadjusted frequencies
13373        THETAPPA  - the estimate of theta based on the
13374                    adjusted frequencies
13375
13376Default:
13377    The unleveled version of the plot is generated by default.
13378
13379Synonyms:
13380    None
13381
13382Related Commands:
13383    PROBABILITY PLOT    = Generates a probability plot.
13384    PPCC PLOT           = Generates a ppcc plot.
13385    KS PLOT             = Generates a Kolmogorov-Smirnov (or
13386                          chi-square) plot.
13387    ORD PLOT            = Generate an Ord plot.
13388    HISTOGRAM           = Generates a histogram.
13389    LINES               = Sets the type for plot lines.
13390    CHARACTER           = Sets the type for plot characters.
13391
13392References:
13393    Hoaglin (1980), "A Poissonness Plot", The American Statistician,
13394    34, pp. 146-149.
13395
13396    Hoaglin and Tukey (1985), "Checking The Shape of Discrete
13397    Distributions". In Hoaglin, Mosteller, and Tukey, editors,
13398    "Exploring Data Tables, Trends, and Shapes", chapter 9,
13399    John Wiley and Sons, New York.
13400
13401    Friendly (2000), "Visualizing Categorical Data", SAS Publishing,
13402    Cary, NC, pp. 49-56.
13403
13404Applications:
13405    Distributional Modeling
13406
13407Implementation Date:
13408    2007/5
13409
13410Program:
13411    .  Following data from p. 51 of Friendly
13412    read x y
13413    0  109
13414    1   65
13415    2   22
13416    3    3
13417    4    1
13418    end of data
13419    .
13420    title case asis
13421    title offset 2
13422    label case asis
13423    x1label displacement 6
13424    title Poisson Plot
13425    x1label X
13426    y1label LOG(x!*n(x)/N)
13427    x3label
13428    .
13429    char blank all
13430    char fill off all
13431    char hw 1.5 1.2 all
13432    char color black all
13433    char circle blank circle blank circle circle
13434    char fill on off on
13435    char color blue black green
13436    line dotted all
13437    line blank solid blank solid blank blank
13438    line color black blue black green
13439    tic offset units screen
13440    tic offset 3 3
13441    .
13442    poisson plot y x
13443    .
13444    let lambml = weighted mean x y
13445    justification center
13446    move 50 8
13447    text Unadjusted: Intercept = ^ppa0, Slope = ^ppa1
13448    move 50 5
13449    text Adjusted: Intercept = ^ppa0adju, Slope = ^ppa1adju
13450    move 50 2
13451    text Lambda: ML = ^lambml, PP = ^lambdapp, PPadj = ^lambdapa
13452
13453-----POLYGON-------------------------------------------------------
13454
13455POLYGON
13456
13457Name:
13458    POLYGON
13459
13460Type:
13461    Diagrammatic Graphics Command
13462
13463Purpose:
13464    Draws a polygon.
13465
13466Description:
13467    The POLYGON command takes an array of x-coordinates and an
13468    array of y-coordinates and draws the polygon defined by these
13469    points.
13470
13471    Although Dataplot provides many specific geometric figures, the
13472    POLYGON command provides the most flexible option.  That is,
13473    you can create an arbitrarily complex geometric figure to
13474    append to a plot.
13475
13476Syntax 1:
13477    POLYGON   <x>   <y>      <SUBSET/EXCEPT/FOR qualification>
13478    where <x> is an array of x coordinates;
13479          <y> is an array of y coordinates;
13480    and where the <SUBSET/EXCEPT/FOR qualification> is optional and
13481               rarely used in this context.
13482
13483    In this syntax, the coordinates are specified in absolute
13484    0 to 100 Dataplot screen units.
13485
13486Syntax 2:
13487    POLYGON DATA  <x>   <y>      <SUBSET/EXCEPT/FOR qualification>
13488    where <x> is an array of x coordinates;
13489          <y> is an array of y coordinates;
13490    and where the <SUBSET/EXCEPT/FOR qualification> is optional and
13491               rarely used in this context.
13492
13493    In this syntax, the coordinates are specified in absolute
13494    units of the most recent plot.
13495
13496Syntax 3:
13497    POLYGON RELATIVE <x>  <y>     <SUBSET/EXCEPT/FOR qualification>
13498    where <x> is an array of x coordinates;
13499          <y> is an array of y coordinates;
13500    and where the <SUBSET/EXCEPT/FOR qualification> is optional and
13501               rarely used in this context.
13502
13503    In this syntax, the first coordinate is specified in absolute
13504    0 to 100 Dataplot screen units.  Subsequent points are
13505    relative to the prior point (i.e., point 2 is relatvie to
13506    point 1, point 3 is relative to point 2, etc.) in Dataplot
13507    0 to 100 screen units.
13508
13509Syntax 4:
13510    POLYGON RELATIVE DATA <x>  <y>  <SUBSET/EXCEPT/FOR qualification>
13511    where <x> is an array of x coordinates;
13512          <y> is an array of y coordinates;
13513    and where the <SUBSET/EXCEPT/FOR qualification> is optional and
13514               rarely used in this context.
13515
13516    In this syntax, the first coordinate is specified in absolute
13517    units of the most recent plot.  Subsequent points are
13518    relative to the prior point (i.e., point 2 is relatvie to
13519    point 1, point 3 is relative to point 2, etc.) in units of
13520    the most recent plot.
13521
13522Examples:
13523    LET X = DATA 0.5 1.5 1.5 0.5 0.5
13524    LET Y = DATA 0   0   10  10  0
13525    POLYGON DATA X Y
13526
13527Note:
13528    The line style (i.e., SOLID, DASH), line color, and line thickness
13529    for drawing the border of the polygon are dictated by the first
13530    entry of the LINE, LINE COLOR, and LINE THICKNESS commands
13531    respectively.  The attributes of the interior of the polygon
13532    are controlled by the various REGION attribute commands
13533    (e.g., REGION FILL, REGION FILL COLOR).
13534
13535Note:
13536    Dataplot will automatically check if the first point is equal
13537    to the last point.  If not, Dataplot adds a point to close the
13538    polygon.
13539
13540Default:
13541    None
13542
13543Synonyms:
13544    None
13545
13546Related Commands:
13547    BOX              = Draws a box.
13548    CIRCLE           = Draws a circle.
13549    ARC              = Draws an arc.
13550    DRAW             = Draws a line.
13551    MOVE             = Moves to a point.
13552    LINES            = Sets the line type for figures and plot lines.
13553    LINE THICKNESSES = Sets the line thickness for figures and  plot
13554                       lines.
13555    LINE COLOR       = Sets the line colors for figures and plot lines.
13556    CROSS-HAIR       = Activates and reads the cross-hair.
13557    TEXT             = Writes a text string.
13558    REGION FILL      = Specifies the fill attribute of a region.
13559
13560Applications:
13561    Presentation Graphics
13562
13563Implementation Date:
13564    7/1997
13565
13566Program:
13567    SKIP 25
13568    READ TEXAS.DAT X Y
13569    .
13570    PLOT Y X
13571    .
13572    REGION FILL ON
13573    REGION FILL COLOR G90
13574    POLYGON DATA X Y
13575
13576-----POLYNOMIAL (LET)-----------------------------------
13577
13578POLYNOMIAL
13579
13580The following are DATAPLOT polynomial commands:
13581    POLYNOMIAL ADDITION       = Carries out a polynomial addition.
13582    POLYNOMIAL SUBTRACTION    = Carries out a polynomial subtraction.
13583    POLYNOMIAL MULTIPLICATION = Carries out a polynomial multiplication.
13584    POLYNOMIAL DIVISION       = Carries out a polynomial division.
13585    POLYNOMIAL SQUARE         = Carries out a polynomial square.
13586    POLYNOMIAL EVALUATION     = Carries out a polynomial evaluation.
13587
13588-----POLYNOMIAL ADDITION (LET)-----------------------------------
13589
13590POLYNOMIAL ADDITION (LET)
13591
13592Name:
13593    POLYNOMIAL ADDITION (LET)
13594
13595Type:
13596    Subcommand under LET
13597
13598Purpose:
13599    Carry out the addition of 2 polynomials (with real coefficients).
13600
13601Syntax:
13602    LET <v3> = POLYNOMIAL ADDITION <v1> <v2>
13603              <SUBSET/EXCEPT/FOR/qualification>
13604    where <v1> is the variable whose elements are the ordered (real)
13605               coefficients of the first polynomial;
13606          <v2> is the variable whose elements are the ordered (real)
13607               coefficients of the second polynomial;
13608          <v3> is the variable whose elements are the ordered (real)
13609               coefficients of the resultant polynomial;
13610    and where the <SUBSET/EXCEPT/FOR qualification> is optional and
13611               rarely used in this context.
13612
13613Examples:
13614    LET Y3  = POLYNOMIAL ADDITION Y1 Y2
13615    LET Y3  = POLYNOMIAL ADDITION Y1 Y2 SUBSET Y1 > 10
13616    LET Y3  = POLYNOMIAL ADDITION Y1 Y2 FOR I = 1 1 3
13617
13618Note:
13619    The ordering of the coefficients within a variable is as follows:
13620          element 1 is the coefficient of the constant term;
13621          element 2 is the coefficient of the linear term;
13622          element 3 is the coefficient of the quadratic term;
13623          element 4 is the coefficient of the cubic term;
13624          etc.
13625    Thus the polynomial
13626       4 + 11*x + 37*x**2 + 8*x**3 + 19*x**4
13627    can be stored in the variable Y with 5 elements (4 11 37 8 19) via:
13628          SERIAL READ Y
13629          4 11 37 8 19
13630          END OF DATA
13631    or
13632          LET Y = DATA 4 11 37 8 19
13633
13634Default:
13635    None
13636
13637Synonyms:
13638    None
13639
13640Related Commands:
13641    LET                       = Evaluates general functions.
13642    POLYNOMIAL SUBTRACTION    = Carries out a polynomial subtraction.
13643    POLYNOMIAL MULTIPLICATION = Carries out a polynomial multiplication.
13644    POLYNOMIAL DIVISION       = Carries out a polynomial division.
13645    POLYNOMIAL SQUARE         = Carries out a polynomial square.
13646    POLYNOMIAL EVALUATION     = Carries out a polynomial evaluation.
13647    COMPLEX ROOTS             = Computes the roots of complex
13648                                polynomial.
13649    PLOT                      = Plots data or functions
13650    COMPLEX ADDITION          = Carries out a complex addition.
13651    VECTOR ADDITION           = Carries out a vector addition.
13652    SET UNION                 = Carries out a set union.
13653    LOGICAL AND               = Carries out a logical and.
13654    MATRIX ADDITION           = Carries out a matrix addition.
13655
13656Applications:
13657    Mathematics
13658
13659Implementation Date:
13660    87/10
13661
13662Program:
13663    LET Y1 = DATA 4 11 37 8 19
13664    LET Y2 = DATA 1 2 1
13665    LET Y3 = POLYNOMIAL ADDITION Y1 Y2
13666    SET WRITE DECIMALS 0
13667    WRITE Y1 Y2 Y3
13668
13669-----POLYNOMIAL DEGREE-------------------------------------------------
13670
13671POLYNOMIAL DEGREE
13672
13673Name:
13674    POLYNOMIAL DEGREE
13675
13676Type:
13677    Support Command
13678
13679Purpose:
13680    Specifies the polynomial degree for certain variations of the
13681    SMOOTH, SPLINE FIT, and FIT commands.
13682
13683Description:
13684    The syntax for the SMOOTH, SPINE FIT, and FIT commands allows the
13685    analyst to embed the desired degree directly in the command, as a
13686    pre-word, as in
13687       CUBIC SMOOTH Y
13688       QUINTIC SPLINE FIT Y X K
13689       QUARTIC FIT Y X
13690    If the analyst chooses not to use such a pre-word, the degree
13691    information can be conveyed via the POLYNOMIAL DEGREE command, as
13692    in
13693       POLYNOMIAL DEGREE 3
13694       SMOOTH Y
13695       POLYNOMIAL DEGREE 5
13696       SPLINE FIT Y X K
13697       POLYNOMIAL DEGREE 4
13698       FIT Y X
13699    In practice, embedding degree information directly in the command
13700    is much more popular than using the POLYNOMIAL DEGREE command.
13701
13702Syntax:
13703    POLYNOMIAL DEGREE   <n>
13704    where <n> is an integer number or parameter that is the desired
13705              degree of the polynomial in certain forms of the FIT,
13706              SPLINE FIT, and SMOOTH commands.
13707
13708Examples:
13709    POLYNOMIAL DEGREE 3
13710    POLYNOMIAL DEGREE 1
13711
13712Note:
13713    The POLYNOMIAL DEGREE command with no arguments reverts the
13714    polynomial degree to default.
13715
13716Default:
13717    For smoothing     --1 (= linear);
13718    for spline fitting--3 (= cubic);
13719    for fitting       --1 (= linear).
13720
13721Synonyms:
13722    None
13723
13724Related Commands:
13725    FIT                = Carries out least squares fit.
13726    PRE-FIT            = Carries out least squares pre-fit.
13727    SPLINE FIT         = Carries out spline fit.
13728    SMOOTH             = Carries out smoothing.
13729    FIT STANDARD DEVI  = Set the minimum standard deviation for the
13730                         fit command.
13731    WEIGHTS            = Set weights for the fit command.
13732    FILTER WIDTH       = Set the filter width for the SMOOTH command.
13733    KNOTS              = Set the knots variable for the SPLINE FIT
13734                         command.
13735
13736Applications:
13737    XX
13738
13739Implementation Date:
13740    XX
13741
13742Program:
13743    XX
13744
13745-----POLYNOMIAL DIVISION (LET)-----------------------------------
13746
13747POLYNOMIAL DIVISION (LET)
13748
13749Name:
13750    POLYNOMIAL DIVISION (LET)
13751
13752Type:
13753    Subcommand under LET
13754
13755Purpose:
13756    Carry out the division of 2 polynomials (with real coefficients).
13757
13758Syntax:
13759    LET <v3> <v4> = POLYNOMIAL DIVISION <v1> <v2>
13760              <SUBSET/EXCEPT/FOR/qualification>
13761    where <v1> is the variable whose elements are the ordered (real)
13762               coefficients of the first polynomial;
13763          <v2> is the variable whose elements are the ordered (real)
13764               coefficients of the second polynomial;
13765          <v3> is the variable whose elements are the ordered (real)
13766               coefficients of the resultant quotient polynomial;
13767          <v4> is the variable whose elements are the ordered (real)
13768               coefficients of the resultant remainder polynomial;
13769    and where the <SUBSET/EXCEPT/FOR qualification> is optional and
13770               rarely used in this context.
13771
13772Examples:
13773    LET Y3 Y4 = POLYNOMIAL DIVISION Y1 Y2
13774
13775Note:
13776    The ordering of the coefficients within a variable is as follows:
13777          element 1 is the coefficient of the constant term;
13778          element 2 is the coefficient of the linear term;
13779          element 3 is the coefficient of the quadratic term;
13780          element 4 is the coefficient of the cubic term;
13781          etc.
13782    Thus the polynomial
13783       4 + 11*x + 37*x**2 + 8*x**3 + 19*x**4
13784    can be stored in the variable Y with 5 elements (4 11 37 8 19) via:
13785          SERIAL READ Y
13786          4 11 37 8 19
13787          END OF DATA
13788    or
13789          LET Y = DATA 4 11 37 8 19
13790
13791Default:
13792    None
13793
13794Synonyms:
13795    None
13796
13797Related Commands:
13798    LET                       = Evaluates general functions.
13799    POLYNOMIAL ADDITION       = Carries out a polynomial addition.
13800    POLYNOMIAL SUBTRACTION    = Carries out a polynomial subtraction.
13801    POLYNOMIAL MULTIPLICATION = Carries out a polynomial multiplication.
13802    POLYNOMIAL SQUARE         = Carries out a polynomial square.
13803    POLYNOMIAL EVALUATION     = Carries out a polynomial evaluation.
13804    COMPLEX DIVISION          = Carries out complex division.
13805    COMPLEX ROOTS             = Computes the roots of a complex
13806                                polynomial.
13807    PLOT                      = Plots data or functions
13808
13809Applications:
13810    Mathematics
13811
13812Implementation Date:
13813    87/10
13814
13815Program:
13816    LET Y1 = DATA 1 -5 6
13817    LET Y2 = DATA 1 -2
13818    LET Y3 Y4 = POLYNOMIAL DIVISION Y1 Y2
13819    WRITE Y1 Y2
13820    WRITE Y3
13821    WRITE Y4
13822
13823-----POLYNOMIAL EVALUATION (LET)---------------------------------
13824
13825POLYNOMIAL EVALUATION (LET)
13826
13827Name:
13828    POLYNOMIAL EVALUATION (LET)
13829
13830Type:
13831    Subcommand under LET
13832
13833Purpose:
13834    Carry out the evaluation of a polynomial (with real coefficients)
13835    for each point in a variable.
13836
13837Syntax:
13838    LET <v3> = POLYNOMIAL EVALUATION <v1> <v2>
13839                      <SUBSET/EXCEPT/FOR/qualification>
13840    where <v1> is the variable whose elements are the ordered (real)
13841               coefficients of the polynomial;
13842          <v2> is the variable whose elements are the values at which
13843               the polynomial is to be evaluated;
13844          <v3> is the variable whose elements are the computed values of
13845               the polynomial;
13846    and where the <SUBSET/EXCEPT/FOR qualification> is optional and
13847               rarely used in this context.
13848
13849Examples:
13850    LET Y  = POLYNOMIAL EVALUATION C X
13851    LET Y  = POLYNOMIAL EVALUATION C X SUBSET X > 10
13852    LET Y  = POLYNOMIAL EVALUATION C X FOR I = 1 1 3
13853
13854Note:
13855    The ordering of the coefficients within a variable is as follows:
13856          element 1 is the coefficient of the constant term;
13857          element 2 is the coefficient of the linear term;
13858          element 3 is the coefficient of the quadratic term;
13859          element 4 is the coefficient of the cubic term;
13860          etc.
13861    Thus the polynomial
13862       4 + 11*x + 37*x**2 + 8*x**3 + 19*x**4
13863    can be stored in the variable Y with 5 elements (4 11 37 8 19) via:
13864          SERIAL READ Y
13865          4 11 37 8 19
13866          END OF DATA
13867    or
13868          LET Y = DATA 4 11 37 8 19
13869
13870Default:
13871    None
13872
13873Synonyms:
13874    None
13875
13876Related Commands:
13877    LET                       = Evaluates general functions.
13878    POLYNOMIAL ADDITION       = Carries out a polynomial addition.
13879    POLYNOMIAL SUBTRACTION    = Carries out a polynomial subtraction.
13880    POLYNOMIAL MULTIPLICATION = Carries out a polynomial multiplication.
13881    POLYNOMIAL DIVISION       = Carries out a polynomial division.
13882    POLYNOMIAL SQUARE         = Carries out a polynomial square.
13883    COMPLEX ROOTS             = Computes the roots of a complex
13884                                polynomial.
13885    PLOT                      = Plots data or functions
13886
13887Applications:
13888    Mathematics
13889
13890Implementation Date:
13891    87/10
13892
13893Program:
13894    . PURPOSE--DETERMINE THE COMPLEX ROOTS OF THE POLYNOMIAL
13895    .          1.2 + 3.55*X + 12.25*X**2 + 7.33*X**3
13896    .          + 14.2377*X**4 -10.752*X**5 + 5.42*X**6
13897    . NOTE--FOR TESTING PURPOSES, THE ROOTS ARE
13898    .          -0.1977768    -0.6085631
13899    .          -0.1977768     0.6085631
13900    .          -0.1802901    -0.3198090
13901    .          -0.1802901     0.3198091
13902    .           1.369949      1.461156
13903    .           1.369949     -1.461156
13904    .
13905    .      STEP 1--DEFINE THE COEFFICIENTS OF THE POLYNOMIAL
13906    LET P = DATA 1.2 3.55 12.25 7.33 14.2377 -10.752 5.42
13907    .      STEP 2--DEFINE A SEQUENCE OF POINTS, EVALUATE THE POLYNOMIAL
13908    .              AT THOSE POINTS, PLOT THE EVALUATED POLYNOMIAL.
13909    LET X = SEQUENCE -1 .1 1
13910    LET Y = POLYNOMIAL EVALUATION P X
13911    MULTIPLOT 2 1; MULTIPLOT CORNER COORDINATES 0 0 100 100
13912    TITLE ORIGINAL FUNCTION
13913    PLOT Y X
13914    .      STEP 3--FIND THE COMPLEX ROOTS
13915    LET X2 Y2 = COMPLEX ROOTS P
13916    PRINT X2 Y2
13917    .      STEP 4--PLOT THE COMPLEX ROOTS
13918    CHAR X
13919    LINES
13920    X1LABEL REAL COMPONENT
13921    Y1LABEL COMPLEX COMPONENT
13922    GRID ON
13923    TITLE ROOTS OF FUNCTION
13924    PLOT Y2 X2
13925    END OF MULTIPLOT
13926
13927-----POLYNOMIAL MULTIPLICATION (LET)-----------------------------
13928
13929POLYNOMIAL MULTIPLICATION (LET)
13930
13931Name:
13932    POLYNOMIAL MULTIPLICATION (LET)
13933
13934Type:
13935    Subcommand under LET
13936
13937Purpose:
13938    Carry out the multiplication of 2 polynomials (with real
13939    coefficients).
13940
13941Syntax:
13942    LET <v3> = POLYNOMIAL MULTIPLICATION <v1> <v2>
13943                      <SUBSET/EXCEPT/FOR/qualification>
13944    where <v1> is the variable whose elements are the ordered (real)
13945               coefficients of the first polynomial;
13946          <v2> is the variable whose elements are the ordered (real)
13947               coefficients of the second polynomial;
13948          <v3> is the variable whose elements are the ordered (real)
13949               coefficients of the resultant polynomial;
13950    and where the <SUBSET/EXCEPT/FOR qualification> is optional and
13951               rarely used in this context.
13952
13953Examples:
13954    LET Y3  = POLYNOMIAL MULTIPLICATION Y1 Y2
13955    LET Y3  = POLYNOMIAL MULTIPLICATION Y1 Y2 SUBSET Y1 > 7
13956    LET Y3  = POLYNOMIAL MULTIPLICATION Y1 Y2 FOR I = 1 1 3
13957
13958Note:
13959    The ordering of the coefficients within a variable is as follows:
13960          element 1 is the coefficient of the constant term;
13961          element 2 is the coefficient of the linear term;
13962          element 3 is the coefficient of the quadratic term;
13963          element 4 is the coefficient of the cubic term;
13964          etc.
13965    Thus the polynomial
13966       4 + 11*x + 37*x**2 + 8*x**3 + 19*x**4
13967    can be stored in the variable Y with 5 elements (4 11 37 8 19) via:
13968          SERIAL READ Y
13969          4 11 37 8 19
13970          END OF DATA
13971    or
13972          LET Y = DATA 4 11 37 8 19
13973
13974Default:
13975    None
13976
13977Synonyms:
13978    None
13979
13980Related Commands:
13981    LET                       = Evaluates general functions.
13982    POLYNOMIAL ADDITION       = Carries out a polynomial addition.
13983    POLYNOMIAL SUBTRACTION    = Carries out a polynomial subtraction.
13984    POLYNOMIAL DIVISION       = Carries out a polynomial division.
13985    POLYNOMIAL SQUARE         = Carries out a polynomial square.
13986    POLYNOMIAL EVALUATION     = Carries out a polynomial evaluation.
13987    COMPLEX ROOTS             = Computes the roots of a complex
13988                                polynomial.
13989    PLOT                      = Plots data or functions
13990    COMPLEX MULTIPLICATION    = Carries out a complex multiplication.
13991    VECTOR DOT PRODUCT        = Computes the vector dot product.
13992    MATRIX MULTIPLICATION     = Carries out a matrix multiplication.
13993
13994Applications:
13995    Mathematics
13996
13997Implementation Date:
13998    87/10
13999
14000Program:
14001    . PURPOSE--DETERMINE THE COMPLEX ROOTS OF A SUM OF 20 QUINTICS
14002    .          WHERE THE K-TH QUINTIC IS OF THE FORM (1 + (1/K)*X)**5
14003    . NOTE--FOR TESTING PURPOSES--
14004    .       THE RESULTING POLYNOMIAL HAS COEFFICIENTS--
14005    .             0.2000000E+02
14006    .             0.1798870E+02
14007    .             0.1596163E+02
14008    .             0.1200868E+02
14009    .             0.5411423E+01
14010    .             0.1036926E+01
14011    .       WITH COMPLEX ROOTS--
14012    .            -0.2387324E+01  0.0000000E+00 (DOUBLE ROOT)
14013    .            -0.1639799E+01 -0.1343364E+01
14014    .            -0.1639799E+01  0.1343364E+01
14015    .             0.2241036E+00 -0.1322019E+01
14016    .             0.2241036E+00  0.1322019E+01
14017    .
14018    FEEDBACK OFF; DIMENSION 100 VARIABLES
14019    LET N = 20
14020    .      STEP 1--DEFINE THE 20 MONOMIALS
14021    LOOP FOR K = 1 1 N
14022        LET M^K (1) = 1
14023        LET M^K (2) = 1/K
14024    END OF LOOP
14025    .      STEP 2--DEFINE THE 20 POLYNOMIALS
14026    LOOP FOR K = 1 1 N
14027        LET P^K = POLYNOMIAL MULTIPLICATION M^K M^K
14028        LET P^K = POLYNOMIAL MULTIPLICATION P^K M^K
14029        LET P^K = POLYNOMIAL MULTIPLICATION P^K M^K
14030        LET P^K = POLYNOMIAL MULTIPLICATION P^K M^K
14031    END OF LOOP
14032    .      STEP 3--COMPUTE THE SUM OF THE 20 POLYNOMIALS
14033    LET PSUM = DATA 0 0 0 0
14034    LOOP FOR K = 1 1 N
14035        LET PSUM = POLYNOMIAL ADDITION PSUM P^K
14036    END OF LOOP
14037    .      STEP 4--PLOT THE FUNCTION
14038    .
14039    MULTIPLOT 2 1; MULTIPLOT CORNER COORDINATES 0 0 100 100
14040    LET X = SEQUENCE -5 .1 5
14041    LET Y = POLYNOMIAL EVALUATION PSUM X
14042    TITLE SUM OF POLYNOMIALS
14043    PLOT Y X
14044    .      STEP 5--FIND THE COMPLEX ROOTS
14045    LET X2 Y2 = COMPLEX ROOTS PSUM
14046    .      STEP 6--PLOT THE COMPLEX ROOTS
14047    CHAR X; LINES; GRID ON
14048    X1LABEL REAL COMPONENT; Y1LABEL COMPLEX COMPONENT; TITLE PLOT ROOTS
14049    PLOT Y2 X2
14050    END OF MULTIPLOT
14051
14052-----POLYNOMIAL SQUARE (LET)-------------------------------------
14053
14054POLYNOMIAL SQUARE (LET)
14055
14056Name:
14057    POLYNOMIAL SQUARE (LET)
14058
14059Type:
14060    Subcommand under LET
14061
14062Purpose:
14063    Carry out the squaring of a polynomial (with real coefficients).
14064
14065Syntax:
14066    LET <v2> = POLYNOMIAL SQUARE <v1> <SUBSET/EXCEPT/FOR/qualification>
14067    where <v1> is the variable whose elements are the ordered (real)
14068               coefficients of the polynomial to be squared;
14069          <v2> is the variable whose elements are the ordered (real)
14070               coefficients of the resultant polynomial;
14071    and where the <SUBSET/EXCEPT/FOR qualification> is optional and
14072               rarely used in this context.
14073
14074Examples:
14075    LET Y2  = POLYNOMIAL SQUARE Y1
14076    LET Y2  = POLYNOMIAL SQUARE Y1 SUBSET Y1 > 10
14077    LET Y2  = POLYNOMIAL SQUARE Y1 FOR I = 1 1 3
14078
14079Note:
14080    The ordering of the coefficients within a variable is as follows:
14081          element 1 is the coefficient of the constant term;
14082          element 2 is the coefficient of the linear term;
14083          element 3 is the coefficient of the quadratic term;
14084          element 4 is the coefficient of the cubic term;
14085          etc.
14086    Thus the polynomial
14087       4 + 11*x + 37*x**2 + 8*x**3 + 19*x**4
14088    can be stored in the variable Y with 5 elements (4 11 37 8 19) via:
14089          SERIAL READ Y
14090          4 11 37 8 19
14091          END OF DATA
14092    or
14093          LET Y = DATA 4 11 37 8 19
14094
14095Default:
14096    None
14097
14098Synonyms:
14099    None
14100
14101Related Commands:
14102    LET                       = Evaluates general functions.
14103    POLYNOMIAL ADDITION       = Carries out a polynomial addition.
14104    POLYNOMIAL SUBTRACTION    = Carries out a polynomial subtraction.
14105    POLYNOMIAL MULTIPLICATION = Carries out a polynomial multiplication.
14106    POLYNOMIAL DIVISION       = Carries out a polynomial division.
14107    POLYNOMIAL EVALUATION     = Carries out a polynomial evaluation.
14108    COMPLEX ROOTS             = Computes the roots of a complex
14109                                polynomial.
14110    COMPLEX EXPONENTIATION    = Carries out a complex exponentiation.
14111    PLOT                      = Plots data or functions
14112
14113Applications:
14114    Mathematics
14115
14116Implementation Date:
14117    87/10
14118
14119Program:
14120    LET Y1 = DATA 4 11 37 8 19
14121    LET Y2 = POLYNOMIAL SQUARE Y1
14122    SET WRITE DECIMALS 0
14123    WRITE Y1 Y2
14124
14125-----POLYNOMIAL SUBTRACTION (LET)--------------------------------
14126
14127POLYNOMIAL SUBTRACTION (LET)
14128
14129Name:
14130    POLYNOMIAL SUBTRACTION (LET)
14131
14132Type:
14133    Subcommand under LET
14134
14135Purpose:
14136    Carry out the subtraction of 2 polynomials (with real coefficients).
14137
14138Syntax:
14139    LET <v3> = POLYNOMIAL SUBTRACTION <v1> <v2>
14140                      <SUBSET/EXCEPT/FOR/qualification>
14141    where <v1> is the variable whose elements are the ordered (real)
14142               coefficients of the first polynomial;
14143          <v2> is the variable whose elements are the ordered (real)
14144               coefficients of the second polynomial;
14145          <v3> is the variable whose elements are the ordered (real)
14146               coefficients of the resultant polynomial;
14147    and where the <SUBSET/EXCEPT/FOR qualification> is optional and
14148               rarely used in this context.
14149
14150Examples:
14151    LET Y3  = POLYNOMIAL SUBTRACTION Y1 Y2
14152    LET Y3  = POLYNOMIAL SUBTRACTION Y1 Y2 SUBSET Y1 > 10
14153    LET Y3  = POLYNOMIAL SUBTRACTION Y1 Y2 FOR I = 1 1 3
14154
14155Note:
14156    The ordering of the coefficients within a variable is as follows:
14157          element 1 is the coefficient of the constant term;
14158          element 2 is the coefficient of the linear term;
14159          element 3 is the coefficient of the quadratic term;
14160          element 4 is the coefficient of the cubic term;
14161          etc.
14162    Thus the polynomial
14163       4 + 11*x + 37*x**2 + 8*x**3 + 19*x**4
14164    can be stored in the variable Y with 5 elements (4 11 37 8 19) via:
14165          SERIAL READ Y
14166          4 11 37 8 19
14167          END OF DATA
14168    or
14169          LET Y = DATA 4 11 37 8 19
14170
14171Default:
14172    None
14173
14174Synonyms:
14175    None
14176
14177Related Commands:
14178    LET                       = Evaluates general functions.
14179    POLYNOMIAL ADDITION       = Carries out a polynomial addition.
14180    POLYNOMIAL MULTIPLICATION = Carries out a polynomial multiplication.
14181    POLYNOMIAL DIVISION       = Carries out a polynomial division.
14182    POLYNOMIAL SQUARE         = Carries out a polynomial square.
14183    POLYNOMIAL EVALUATION     = Carries out a polynomial evaluation.
14184    COMPLEX SUBTRACTION       = Carries out a complex subtraction.
14185    VECTOR SUBTRACTION        = Carries out a vector subtraction.
14186    SET INTERSECTION          = Carries out a set intersection.
14187    LOGICAL OR                = Carries out a logical or.
14188    MATRIX SUBTRACTION        = Carries out a matrix subtraction.
14189    COMPLEX ROOTS             = Computes the roots of a complex
14190                                polynomial.
14191    PLOT                      = Plots data or functions
14192
14193Applications:
14194    Mathematics
14195
14196Implementation Date:
14197    87/10
14198
14199Program:
14200    LET Y1 = DATA 4 11 37 8 19
14201    LET Y2 = DATA 1 2 1
14202    LET Y3 = POLYNOMIAL SUBTRACTION Y1 Y2
14203    SET WRITE DECIMALS 0
14204    WRITE Y1 Y2 Y3
14205
14206-----POOLED VARIANCE-COVARIANCE MATRIX (LET)-------------------------
14207
14208POOLED VARIANCE-COVARIANCE MATRIX
14209
14210Name:
14211    POOLED VARIANCE-COVARIANCE MATRIX (LET)
14212
14213Type:
14214    Let Subcommand
14215
14216Purpose:
14217    Compute the pooled variance-covariance matrix of a matrix.
14218
14219Description:
14220    This command operates on a matrix (M) and a group id variable
14221    (TAG).  The TAG variable has the same number of rows as the
14222    matrix M.  The values of TAG are typically integers that
14223    identify the group to which the corresponding row of the
14224    matrix belongs.
14225
14226    The POOLED VARIANCE-COVARIANCE MATRIX command returns a matrix
14227    that contains a pooled variance-covariance matrix, which is
14228    defined as:
14229
14230        SPOOL = (1/SUM(N(i)-1)) * SUM((1/N(i)-1)*C(i)))
14231
14232    where N(i) is the number of elements in group i and C(i)
14233    is the variance-covariance matrix of the rows belonging to
14234    group i.
14235
14236Syntax 1:
14237    LET <mat2> = POOLED VARIANCE-COVARIANCE MATRIX <mat1>  <tag>
14238    where <mat1> is a matrix for which the pooled covariance matrix
14239              is to be computed;
14240          <tag> is the group-id variable;
14241    and where <mat2> is a matrix where the resulting pooled
14242              covariance matrix is saved.
14243
14244Syntax 2:
14245    LET <mat3> = POOLED VARIANCE-COVARIANCE MATRIX <mat1>  <mat2>
14246    where <mat1> is a matrix containing the data for group 1;
14247          <mat2> is a matrix containing the data for group 2;
14248    and where <mat3> is a matrix where the resulting pooled
14249             variance-covariance matrix is saved.
14250
14251    This syntax can be used for the case where there are
14252    exactly two groups.  In this case, the data for each group
14253    is stored in a separate matrix and no group id variable
14254    is required.
14255
14256Examples:
14257    LET COV = POOLED VARIANCE-COVARIANCE MATRIX M TAG
14258
14259Note:
14260    Matrices are created with either the READ MATRIX command or the
14261    MATRIX DEFINITION command.  Enter HELP MATRIX DEFINITION and HELP
14262    READ MATRIX for details.
14263
14264Default:
14265    None
14266
14267Synonyms:
14268    None
14269
14270Related Commands:
14271    VARIANCE-COVARIANCE MATRIX = Compute the variance-covariance
14272                                 matrix of a matrix.
14273    CORRELATION MATRIX         = Compute the correlation matrix of
14274                                 a matrix.
14275    MATRIX GROUP SD            = Compute the group means for a matrix.
14276    MATRIX GROUP SD            = Compute the group standard deviations
14277                                 for a matrix.
14278
14279Reference:
14280    "Applied Multivariate Statistical Analysis", Third Edition,
14281    Johnson and Wichern, Prentice-Hall, 1992.
14282
14283Applications:
14284    Multivariate Analysis
14285
14286Implementation Date:
14287    1998/8
14288
14289Program:
14290    DIMENSION 50 COLUMNS
14291    SKIP 25
14292    READ IRIS.DAT Y1 Y2 Y3 Y4 TAG
14293    LET N = SIZE Y1
14294    LET M = MATRIX DEFINITION Y1 N 4
14295    LET Z = POOLED VARIANCE-COVARIANCE MATRIX M TAG
14296
14297-----POSITIONAL TABULATION--------------------------------------
14298
14299POSITIONAL TABULATION
14300
14301Name:
14302    POSITIONAL TABULATION
14303
14304Type:
14305    Analysis Command
14306
14307Purpose:
14308    Generate a position tabulation for one of Dataplot's supported
14309    univariate statistics for either a list of variables or a list
14310    of matrices.
14311
14312Description:
14313    Dataplot typically computes statistic for the rows of a variable.
14314    However, there may be times where it is desirable to compute a
14315    statistic for each row of a list of variables.  For example, given
14316    the variables A, B, C, and D where each variable has 5 rows,
14317    the POSITIONAL TABULATION MEAN command will print the means for
14318
14319        row 1: mean of A(1), B(1), C(1), D(1)
14320        row 2: mean of A(2), B(2), C(2), D(2)
14321        row 3: mean of A(3), B(3), C(3), D(3)
14322        row 4: mean of A(4), B(4), C(4), D(4)
14323        row 5: mean of A(5), B(5), C(5), D(5)
14324
14325    If you specify a list of matrices, then the statistic will be
14326    computed for each (i,j) position of the matrices.
14327
14328Syntax:
14329    POSITIONAL TABULATION  <stat>  <y1> ... <yk>
14330                           <SUBSET/EXCEPT/FOR qualification>
14331    where <stat> is one of Dataplot's supported statistics;
14332          <y1> ... <yk> is a list of 1 to 30 response variables or
14333               matrices (with the same dimensions);
14334    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
14335
14336    The list of response variables must all be of the same type (i.e.,
14337    either all variables or all matrices).  They must also have the
14338    same dimension (if variables, all must have the same number of
14339    rows and if matrices, all must have the same number of rows and
14340    the same number of columns).
14341
14342Examples:
14343    POSITIONAL TABULATION MEAN Y1 TO Y5
14344    POSITIONAL TABULATION MEAN Y1 TO Y5  FOR I = 1 1 25
14345
14346Note:
14347    For a list of supported statistics, enter the command
14348
14349        HELP STATISTICS
14350
14351    Only statistics that operate on a single response are supported.
14352
14353Note:
14354    The output is also written to the file DPST1F.DAT.  For example,
14355    you can do something like the following
14356
14357       POSITIONAL TABULATION MEAN A B C D
14358       SKIP 0
14359       READ DPST1F.DAT ROW COL YMEAN
14360
14361Note:
14362    To specify the number of digits to print to the right of the
14363    decimal point, enter the command (the default is exponential
14364    format)
14365
14366       SET WRITE DECIMALS <value>
14367
14368Default:
14369    None
14370
14371Synonyms:
14372    None
14373
14374Related Commands:
14375    CROSS TABULATE        = Generates a cross tabulation for a specified
14376                            statistic.
14377    MATRIX ROW STATISTIC  = Generate row statistics for a matrix.
14378    STATISTIC PLOT        = Generate a statistic versus subset plot.
14379    FLUCTUATION PLOT      = Generate a fluctuation plot.
14380    TABULATION PLOT       = Generate a tabulation plot.
14381
14382Applications:
14383    Exploratory Data Analysis
14384
14385Implementation Date:
14386    2011/9
14387
14388Program 1:
14389    let y1 = data 1 2 3
14390    let y2 = data 4 5 6
14391    let y3 = data 7 8 9
14392    .
14393    set write decimals 3
14394    positional tabulation mean y1 y2 y3
14395    .
14396    read dpst1f.dat row col ymean
14397
14398 Program 2:
14399     read matrix a
14400     1 2 3
14401     4 5 6
14402     7 8 9
14403     end of data
14404     .
14405     read matrix b
14406     11 21 31
14407     41 51 61
14408     71 81 91
14409     end of data
14410     .
14411     read matrix c
14412     101  102  103
14413     111  121  131
14414     141  151  161
14415     end of data
14416     .
14417     SET WRITE DECIMALS 1
14418     POSITIONAL TABULATION SUM A B C
14419
14420-----POSITIVE PREDICTIVE VALUE (LET)--------------------------------
14421
14422POSITIVE PREDICTIVE VALUE
14423
14424Name:
14425    POSITIVE PREDICTIVE VALUE (LET)
14426
14427Type:
14428    Let Subcommand
14429
14430Purpose:
14431    Compute the positive predictive value between two
14432    binary variables.
14433
14434Description:
14435    Given two variables with n parired observations where each
14436    variable has exactly two possible outcomes, we can generate
14437    the following 2x2 table:
14438
14439                      |       Variable 2        |
14440        Variable 1    |   Success      Failure  |  Row Total
14441        ====================================================
14442        Success       |   N11            N12    |  N11 + N12
14443        Failure       |   N21            N22    |  N21 + N22
14444        ====================================================
14445        Column Total  |   N11+N21      N12+N22  |  Total
14446
14447    The parameters N11, N12, N21, and N22 denote the counts
14448    for each category.
14449
14450    Success and failure can denote any binary response.
14451    Dataplot expects "success" to be coded as "1" and "failure"
14452    to be coded as "0".  Some typical examples would be:
14453
14454       1) Variable 1 denotes whether or not a patient has a
14455          disease (1 denotes disease is present, 0 denotes
14456          disease not present).  Variable 2 denotes the result
14457          of a test to detect the disease (1 denotes a positive
14458          result and 0 denotes a negative result).
14459
14460       2) Variable 1 denotes whether an object is present or
14461          not (1 denotes present, 0 denotes absent). Variable 2
14462          denotes a detection device (1 denotes object detected
14463          and 0 denotes object not detected).
14464
14465    In these examples, the "ground truth" is typically given
14466    as variable 1 while some estimator of the ground truth is
14467    given as variable 2.
14468
14469    The positive predictive value is then N11/(N11+N21).  This
14470    is the conditional probability of variable 1 being true
14471    given that variable 2 is true.  In the context of the first
14472    example above, this is the probability that the disease is
14473    present when there is a positive test result.
14474
14475    Fleiss and his co-authors recommend positive predictive value
14476    and negative predictive value as an alternative to false
14477    positive and false negative due to the fact that the
14478    definitions of false positive and false negative have
14479    been inconsistent in the literature.
14480
14481Syntax:
14482    LET <par> = POSITIVE PREDICTIVE VALUE <y1> <y2>
14483                              <SUBSET/EXCEPT/FOR qualification>
14484    where <y1> is the first  response variable;
14485          <y2> is the second response variable;
14486          <par> is a parameter where the computed positive
14487               predictive value is stored;
14488    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
14489
14490Examples:
14491    LET A = POSITIVE PREDICTIVE VALUE Y1 Y2
14492    LET A = POSITIVE PREDICTIVE VALUE Y1 Y2 SUBSET TAG > 2
14493
14494Note:
14495    The two variables must have the same number of elements.
14496
14497Note:
14498    There are two ways you can define the response variables:
14499
14500       1) Raw data - in this case, the variables contain
14501          0's and 1's.
14502
14503          If the data is not coded as 0's and 1's, Dataplot
14504          will check for the number of distinct values.  If
14505          there are two distinct values, the minimum value
14506          is converted to 0's and the maximum value is
14507          converted to 1's.  If there is a single distinct
14508          value, it is converted to 0's if it is less than
14509          0.5 and to 1's if it is greater than or equal to
14510          0.5.  If there are more than two distinct values,
14511          an error is returned.
14512
14513       2) Summary data - if there are two observations, the
14514          data is assummed to be the 2x2 summary table.
14515          That is,
14516
14517              Y1(1) = N11
14518              Y1(2) = N21
14519              Y2(1) = N12
14520              Y2(2) = N22
14521
14522Note:
14523    The following additional commands are supported
14524
14525        TABULATE POSITIVE PREDICTIVE VALUE  Y1 Y2 X
14526        CROSS TABULATE POSITIVE PREDICTIVE VALUE Y1 Y2 X1 X2
14527
14528        POSITIVE PREDICTIVE VALUE PLOT Y1 Y2 X
14529        CROSS TABULATE POSITIVE PREDICTIVE VALUE PLOT Y1 Y2 X1 X2
14530
14531        BOOTSTRAP POSITIVE PREDICTIVE VALUE PLOT Y1 Y2
14532        JACKNIFE  POSITIVE PREDICTIVE VALUE PLOT Y1 Y2
14533
14534Default:
14535    None
14536
14537Synonyms:
14538    PPV is a synonym for POSITIVE PREDICTIVE VALUE.
14539
14540Related Commands:
14541    NEGATIVE PREDICTIVE VALUE  = Compute the negative predictive
14542                                 value between two binary variables.
14543    TRUE POSITIVES             = Compute the proportion of
14544                                 true positives.
14545    TRUE NEGATIVES             = Compute the proportion of
14546                                 true negatives.
14547    FALSE POSITIVES            = Compute the proportion of
14548                                 false positives.
14549    FALSE NEGATIVES            = Compute the proportion of
14550                                 false negatives.
14551    TEST SENSITIVITY           = Compute the test sensitivity.
14552    TEST SPECIFICITY           = Compute the test specificity.
14553    ODDS RATIO                 = Compute the bias corrected
14554                                 log(odds ratio).
14555    ODDS RATIO STANDARD ERROR  = Compute the standard error of the
14556                                 bias corrected log(odds ratio).
14557    RELATIVE RISK              = Compute the relative risk.
14558    TABULATE                   = Compute a statistic for data with
14559                                 a single grouping variable.
14560    CROSS TABULATE             = Compute a statistic for data with
14561                                 two grouping variables.
14562    STATISTIC PLOT             = Generate a plot of a statistic for
14563                                 data with a single grouping
14564                                 variable.
14565    CROSS TABULATE PLOT        = Generate a plot of a statistic for
14566                                 data with two grouping variables.
14567    BOOTSTRAP PLOT             = Generate a bootstrap plot for a
14568                                 given statistic.
14569
14570Reference:
14571    Fleiss, Levin, and Paik (2003), "Statistical Methods for
14572    Rates and Proportions", Third Edition, Wiley, chapter 1.
14573
14574Applications:
14575    Categorical Data Analysis
14576
14577Implementation Date:
14578    2007/4
14579
14580Program:
14581    let n = 1
14582    .
14583    let p = 0.2
14584    let y1 = binomial rand numb for i = 1 1 100
14585    let p = 0.1
14586    let y2 = binomial rand numb for i = 1 1 100
14587    .
14588    let p = 0.4
14589    let y1 = binomial rand numb for i = 101 1 200
14590    let p = 0.08
14591    let y2 = binomial rand numb for i = 101 1 200
14592    .
14593    let p = 0.15
14594    let y1 = binomial rand numb for i = 201 1 300
14595    let p = 0.18
14596    let y2 = binomial rand numb for i = 201 1 300
14597    .
14598    let p = 0.6
14599    let y1 = binomial rand numb for i = 301 1 400
14600    let p = 0.45
14601    let y2 = binomial rand numb for i = 301 1 400
14602    .
14603    let p = 0.3
14604    let y1 = binomial rand numb for i = 401 1 500
14605    let p = 0.1
14606    let y2 = binomial rand numb for i = 401 1 500
14607    .
14608    let x = sequence 1 100 1 5
14609    .
14610    let a = positive predictive value y1 y2 subset x = 1
14611    tabulate positive predictive value y1 y2 x
14612    .
14613    label case asis
14614    xlimits 1 5
14615    major xtic mark number 5
14616    minor xtic mark number 0
14617    xtic mark offset 0.5 0.5
14618    ytic mark offset 0.05 0.05
14619    y1label Positive Predictive Value
14620    x1label Group ID
14621    character x blank
14622    line blank solid
14623    .
14624    positive predictive value plot y1 y2 x
14625
14626-----POSTSCRIPT-------------------------------------------------------
14627
14628POSTSCRIPT
14629
14630Name:
14631    POSTSCRIPT
14632
14633Type:
14634    Output Device Command
14635
14636Purpose:
14637    Direct graphical output to a POSTSCRIPT device.
14638
14639Description:
14640    Postscript is a device independent page description language
14641    supported by various vendors.  Although Postscript is primarily
14642    used by printers, it can be used by other types of devices (e.g.,
14643    film recorders) as well.  Note that Postscript is a complete
14644    language as opposed to a simple device protocol.  The Postscript
14645    file is an ASCII file containing Postscript commands.  To render a
14646    Postscript file on a specific device, one of the following
14647    methods is used
14648
14649       1. A specific device may have built-in support for Postscript
14650          files.  Typically, this is provided by a vendor written
14651          driver.  In this case, the Postscript file can be sent
14652          directly to the device.
14653
14654       2. If the device does not support Postscript directly,
14655          a Postscript translator may be available that allows
14656          you to view or print the Postscript file on a non-Postscript
14657          device.  One example of this is the ghostview/ghostscript
14658          software.  Ghostscript is the underlying Postscript
14659          translator while Ghostview is a GUI program that
14660          allows you to view the Postscript file on the screeen
14661          and to print the Postscript file on a non-Postscript
14662          printer.  Other translators/viewers are available.
14663
14664    Postscript is routinely supported in the Linux environment for
14665    printers.  In the Windows environment, it is more common to use
14666    Ghostview (or some other Postscript translator) to send Postscript
14667    files to a printer.
14668
14669    Postscript is the most commonly used format in Dataplot for
14670    printing graphics.
14671
14672    Many word processing and page publishing programs import Postscript
14673    files thereby allowing graphics generated by other programs to be
14674    to be embedded with text.  However, they normally require that the
14675    Postscript file be in a special format called encapsulated
14676    Postscript.  The primary difference between encapsulated Postscript
14677    and standard Postscript is that encapsulated Postscript assumes that
14678    each graph is in a separate file while standard Postscript can
14679    contain multiple pages in the same file.  In order to generate
14680    encapsulated Postscript in Dataplot, you would typically do something
14681    like the following
14682
14683        SET IPL1NA PLOT1.EPS
14684        DEVICE 2 POSTSCRIPT ENCAPSULATED
14685             ...  Generate first plot ..
14686        DEVICE 2 CLOSE
14687        .
14688        SET IPL1NA PLOT2.EPS
14689        DEVICE 2 POSTSCRIPT ENCAPSULATED
14690             ...  Generate second plot ..
14691        DEVICE 2 CLOSE
14692
14693    The SET IPL1NA command is used to give the plot file a unique name.
14694    This basic sequence can be repeated as often as needed.
14695
14696    Postscript is closely related to the Portable Document Format (PDF).
14697    PDF is essentially a binary form of Postscript.
14698
14699Syntax 1:
14700    POSTSCRIPT
14701
14702    This form designates device 1 (the terminal) as a Postscript
14703    device.
14704
14705Syntax 2:
14706    POSTSCRIPT ENCAPSULATED
14707
14708    This form designates device 1 (the terminal) as an encapsulated
14709    Postscript device.
14710
14711Syntax 3:
14712    DEVICE <1/2/3> POSTSCRIPT
14713
14714    This form designates one of DATAPLOT's 3 devices (it will typically
14715    be device 2) as a Postscript device.
14716
14717Syntax 4:
14718    DEVICE <1/2/3> POSTSCRIPT ENCAPSULATED
14719
14720    This form designates one of DATAPLOT's 3 devices (it will typically
14721    be device 2) as an encapsulated Postscript device.
14722
14723Examples:
14724    POSTSCRIPT
14725    DEVICE 2 POSTSCRIPT
14726    DEVICE 3 POSTSCRIPT
14727    DEVICE 2 POSTSCRIPT ENCAPSULATED
14728
14729Note:
14730    The Postscript driver can support either color or monochrome
14731    Postscript devices.  The default is monochrome.  Enter a DEVICE
14732    <num> COLOR ON command after the POSTSCRIPT command to get color.
14733    Postscript supports the full range of color and gray scale provided
14734    for in DATAPLOT.  Enter HELP COLOR for a list of available colors
14735    and gray scales.  Colors can have a different appearance on
14736    different Postscript devices.  Specifically, Postscript color
14737    printers can come with 1 bit, 4 bits. or 8 bits for each of 3
14738    colors.  The output quality will vary significantly depending on
14739    the number of bits used.
14740
14741    Monochrome Postscript devices do support gray scale.  Be aware
14742    that they do it by "dithering" since each pixel is either on or
14743    off.  Dithering means that gray scale is emulated by turning some
14744    proportion of neighboring pixels on or off to get the desired
14745    effect.
14746
14747    If you want to make color on the default, enter the command
14748    (you may want to put this in your DPLOGF.TEX startup file)
14749
14750        SET POSTSCRIPT COLOR DEFAULT
14751
14752Note:
14753    One of Postscript's strengths is the availability of scalable and
14754    rotatable typeset quality fonts.  Postscript fonts (for hardware
14755    generated characters) can be specified with the following command:
14756
14757        SET POSTSCRIPT FONT <font id>
14758
14759    The available fonts (34 are currently supported) can be shown with
14760    the following command:
14761
14762        <a href="../ch7/postshow.pdf">POSTSCRIPT SHOW FONTS</a>
14763
14764    The default font is Helvetica Bold.
14765
14766Note:
14767    Postscript fonts are only used when hardware characters are
14768    generated.  This means that Greek characters and other special
14769    symbols are not available with the Postscript fonts.  The
14770    exception is that the SP(), CR(), LC(), and UC() options are
14771    supported for hardware fonts.
14772
14773    Greek characters (and a few other special symbols) can be generated
14774    by using the symbol font (SET POSTSCRIPT FONT SYMBOL).  In this
14775    case, a Greek alpha is obtained by entering TEXT LC()A rather than
14776    TEXT LC()ALPH().  The limitation is that only one Postscript font
14777    can be active for a plot, so text strings that require a mixture of
14778    standard and Greek characters are not practical with this method.
14779    DATAPLOT does not support automatically switching to the symbol
14780    font when a Greek character (e.g., ALPH(), BETA()) is encountered
14781    in the text string.
14782
14783    At this time, if you have text strings which consist only of Greek
14784    characters you can use the symbol font.  However, if your string is
14785    a mixture of standard and Greek characters, you need to use one of
14786    the software fonts.
14787
14788    NOTE 5/2009:
14789
14790    The Postscript device was upgraded to handle most of Dataplot's
14791    supported special characters.  These special characters are
14792    mapped to the Postscript symbol font.  There is not a 1-to-1
14793    correspondence between Dataplot's special characters and
14794    the symbols available in the Postscript symbol font.  The
14795    supported symbols below are ones that are available in
14796    both the Dataplot special symbol set and the Postscript
14797    symbol font.  Note that this means that you can mix these
14798    Greek characters and special symbols with regular text
14799    without setting the SYMBOL font.
14800
14801    Specifically, the following are supported:
14802
14803      i) subscripts and superscripts
14804
14805     ii) Greek characters
14806
14807    iii) A subset of the mathematical symbols and other special
14808         characters.  The following is the list of Dataplot
14809         special characters that will be translated to
14810         equivalent characters in the Postscript symbol font:
14811
14812             INTE(), SUMM(), PROD(), INFI(), DOTP(),
14813             DEL(), DIVI(), LT(), GT(), LTEQ(), GTEQ(),
14814             NOT(), +-(), APPR(), TILD(), EQUI(), VARI(),
14815             CARA(), TIME(), PART(), RADI(), SUBS(),
14816             SUPE(), UNIO(), INTR(), ELEM(), THEX(),
14817             THFO(), RAPO(), LBRA(), RBRA(), LCBR(),
14818             RCBR(), LELB(), RELB(), RARR(), UARR(),
14819             DARR(), VBAR(), HBAR(), DEGR()
14820
14821         The full set of special symbols supported by Dataplot
14822         is documented in chapter 13 of Volume I of the
14823         Reference Manual
14824
14825            http://www.itl.nist.gov/div898/software/dataplot/
14826            refman1/ch13/homepage.pdf
14827
14828Note:
14829    Postscript printers on most systems require that the first line
14830    start with a "%!".  However, a few require that it start with
14831    " %!".  The default in DATAPLOT is no leading space.  If your
14832    system requires this (i.e, if the Postscript output is printed as
14833    text rather than a graph), enter the following command:
14834
14835         SET POSTSCRIPT SPACE ON
14836
14837    Note that while this was an issue with some early Postscript devices,
14838    with current Postscript devices this should no longer be an issue.
14839
14840Note:
14841    Landscape or portrait orientation can be set via the ORIENTATION
14842    command.  It can be toggled as many times as desired in a
14843    DATAPLOT session.  The default is landscape orientation.
14844
14845Note:
14846    The following SET commands can be used to specify the margins and
14847    resolution of the particular Postscript printer (these should
14848    normally not be required):
14849
14850        SET POSTSCRIPT PPI <number> sets the resolution (in points per
14851           inch).  The default is 300.
14852        SET POSTSCRIPT [LANDSCAPE/PORTRAIT] LEFT    MARGIN sets the
14853           left margin (in dots).  The default is 50.
14854        SET POSTSCRIPT [LANDSCAPE/PORTRAIT] RIGHT   MARGIN sets the
14855           right margin (in dots).  The default is 50.
14856        SET POSTSCRIPT [LANDSCAPE/PORTRAIT] BOTTOM  MARGIN sets the
14857           bottom margin (in dots).  The default is 50.
14858        SET POSTSCRIPT [LANDSCAPE/PORTRAIT] TOP     MARGIN sets the
14859           top margin (in dots).  The default is 50.
14860    You can also use the WINDOW CORNER COORDINATES command to set the
14861    margin, but this affects all the active devices.
14862
14863Note:
14864    Display Postscript is a special version of Postscript for terminals
14865    and workstations.  The standard Postscript driver does not work
14866    for these devices.  Display Postscript does not currently seem
14867    to be of much interest.
14868
14869Note:
14870    Some tweaks were made to the Postscript device 1/2003.
14871
14872    1) Previously, Dataplot started a new page when the device
14873       was intialized.  It also started a new page when the first
14874       plot was generated.  This was to ensure that a fresh
14875       page was started if you were generating diagrammatic
14876       graphics before the first plot.  However, it caused
14877       a blank page to be printed for most applications.
14878       Dataplot now automatically keeps track so that the first
14879       plot will not generate the unneeded page erase.
14880
14881    2) Previously, the LANDSCAPE WORDPERFECT orientation (this
14882       results in a landscape orientation on a portrait page)
14883       was supported for encapsulated Postscript, but not for
14884       regular Postscript.  This orientation is now supported
14885       for regular Postscript.
14886
14887    3) Dataplot allows you to switch between the various
14888       orientations (LANDSCAPE, PORTRAIT, LANDSCAPE WORDPERFECT,
14889       SQUARE) when using Postscript.  For this reason, it sets
14890       the bounding box for an 11x11 inch page.
14891
14892       The following command
14893
14894           SET POSTSCRIPT BOUNDING BOX <FIXED/FLOAT>
14895
14896       can be used to modify this behavior.  If the value is
14897       FLOAT (the default), the bounding box is set for an
14898       11x11 inch page.  If the value is set to FIXED, the
14899       bounding box will be set according to whatever the current
14900       orientation is when the device is initialized.  However,
14901       you should not change the orientation if FIXED is used.
14902
14903       If you are simply using the Postscript output for printing,
14904       then you do not need to worry about this command.  However,
14905       it may occasionally be useful if are importing the Postscript
14906       output into an external program.
14907
14908Note:
14909    In addition to Dataplot's native Postscript driver, you
14910    can also generate Postscript output using
14911
14912        DEVICE 2 LIBPLOT POSTSCRIPT
14913        DEVICE 2 CAIRO POSTSCRIPT
14914
14915     Libplot and Cairo are graphics libraries that support
14916     a number of different graphics devices.
14917
14918Default:
14919    Postscript is the default for the DEVICE 3 output.
14920
14921Synonyms:
14922    DEVICE 2 EPS is a synonym for DEVICE 2 POSTSCRIPT ENCAPSULATED
14923    SET POSTSCRIPT DEFAULT COLOR is a synonym for SET POSTSCRIPT
14924        COLOR DEFAULT
14925
14926DEVICE NOTES
14927    1) HARDWARE TEXT - Postscript hardware characters can be scaled to
14928       any size.  Vertical strings are rotated 90 degrees.  There are
14929       34 typeset fonts that can be selected.  Postscript fonts are
14930       of publication quality.
14931
14932    2) COLOR - Postscript devices are treated as black and white by
14933       default (although they do support gray scale).  To activate
14934       color, enter DEVICE 2 COLOR ON after the DEVICE 2 POSTSCRIPT
14935       command>  Postscript supports the full range of DATAPLOT colors.
14936       The appearance of a specific color can vary depending on the
14937       device.
14938
14939    3) HARDWARE FILL - Area fills are generated in hardware.
14940
14941    4) DASH PATTERNS - The Postscript driver supports unique dash
14942       patterns for DASH, DOT, DASH2, DASH3, and DASH4.  DASH5 is the
14943       same as DASH4.
14944
14945    5) LINE WIDTH - Thick lines are generated in hardware.
14946
14947    6) GRAPHICS INPUT - The CROSS-HAIR command is ignored for this
14948       device.
14949
14950Related Commands:
14951    CALCOMP                = Direct graphical output to a Calcomp
14952                             device.
14953    HPGL                   = Direct graphical output to an HPGL device.
14954    TEKTRONIX              = Direct graphical output to a Tektronix
14955                             device.
14956    X11                    = Direct graphical output to an X11 device.
14957    DEVICE                 = Specify certain actions for the graphics
14958                             output.
14959    SHOW COLOR             = Show the available colors on the Postscript
14960                             device.
14961    SET POSTSCRIPT CONVERT = Automatically convert Postscript output to
14962                             a specified format when Postscript device
14963                             is closed.
14964    PSVIEW                 = View the most recent plot in a Postscript
14965                             viewer.
14966
14967Applications:
14968    Graphics Output
14969
14970Implementation Date:
14971    1989/02
14972    1989/06: Support for SET POSTSCRIPT FONT
14973    2003/01: Better handling of first page so a blank page will
14974             not be generated
14975    2003/01: Support for SET POSTSCRIPT BOUNDING BOX
14976    2003/01: LANDSCAPE WORDPERFECT orientation supported for
14977             regular Postscript
14978    2004/06: Support for SET POSTSCRIPT COLOR DEFAULT
14979    2009/05: Automatic support (i.e.,  SYMBOL font does not need to be
14980             set) for Greek characters and certain special symbols
14981
14982Program:
14983    DEVICE 2 POSTSCRIPT
14984    PLOT X**2 FOR X = 1 1 9
14985    DEVICE 2 CLOSE
14986
14987-----POSTSCRIPT BOUNDING BOX (SET)---------------------------------------
14988
14989POSTSCRIPT BOUNDING BOX
14990
14991Name:
14992    POSTSCRIPT BOUNDING BOX (SET)
14993
14994Type:
14995    Set Subcommand
14996
14997Purpose:
14998    Specify whether the bounding box generated by Dataplot Postscript
14999    output will be "fixed" or "floating".
15000
15001Description:
15002    For Postscript output, Dataplot allows the orientation to be
15003    switched between landscape and portrait mode.  For this reason,
15004    Dataplot sets the bounding box equivalent to an 11 inch x 11 inch
15005    page to accomodate either mode.
15006
15007    When importing Dataplot Postscript files into other programs,
15008    it may be prefferable to have the bounding box reflect either
15009    the landscape (i.e., 11 inch x 8.5 inch) or portrait (i.e.,
15010    8.5 inch x 11 inch) orientation.
15011
15012    Setting this switch to FIXED will set the bounding box according
15013    to whatever orientation is in effect when the DEVICE 2 POSTSCRIPT
15014    command is entered.  In this case, you should not change the
15015    orientation until a DEVICE 2 CLOSE command is entered.  Setting
15016    this swith to FLOAT will use the default 11 inch x 11 inch
15017    bounding box (and you can change the orientation as often as you
15018    like).
15019
15020    If you are only interested in printing the Postscript file, you
15021    can ignore this command.  If you intend to import the Postscript
15022    file into another program, it may be helpful to set the FIXED
15023    option.
15024
15025    This command does not apply to encapsulated Postscript files.
15026    Since encapsulated assumes that each graph will be in a separate
15027    file, it already sets the bounding box according to the orientation.
15028
15029Syntax:
15030    SET POSTSCRIPT BOUNDING BOX <FIXED/FLOAT>
15031    where FIXED specifies that the bounding box will be set using the
15032          current orientation and FLOAT sets the bounding box assuming
15033          that either landscape or portait orientation may be used.
15034
15035Examples:
15036    SET POSTRSCRIPT BOUNDING BOX FIXED
15037    SET POSTRSCRIPT BOUNDING BOX FLOAT
15038
15039Default:
15040    The default is FLOAT.
15041
15042Synonyms:
15043    None
15044
15045Related Commands:
15046    DEVICE xx POSTSCRIPT  = Set the device to Postscript.
15047    ORIENTATION           = Set the orientation of the plot.
15048
15049Applications:
15050    Graphics Output
15051
15052Implementation Date:
15053    2003/1
15054
15055Program:
15056    SET POSTSCRIPT BOUNDING BOX FIXED
15057    ORIENTATION LANDSCAPE
15058    DEVICE 2 POSTSCRIPT
15059    PLOT SIN(X) FOR X = -6 0.1 6
15060    DEVICE 2 CLOSE
15061
15062-----POSTSCRIPT CONVERT (SET)---------------------------------------
15063
15064POSTSCRIPT CONVERT
15065
15066Name:
15067    POSTSCRIPT CONVERT (SET)
15068
15069Type:
15070    Set Subcommand
15071
15072Purpose:
15073    Specify that when a Postscript device is closed it will
15074    automatically be converted to the specified device.
15075
15076Description:
15077    It is often desirable to import Dataplot generated graphs
15078    into external programs.  This includes word processors
15079    (e.g., Word, Word Perfect), presentation software (e.g.,
15080    Power Point), image manipulation programs (e.g., gimp,
15081    pbm image conversion programs), image viewers (xv), web browsers,
15082    graphics editors (e.g., Photoshop, Corel Draw), and so on.
15083
15084    Most of these programs will accept Postscript or encapsulated
15085    Postscript as input.  However, in some cases, non-Postscript
15086    formats are needed or preferred.  For example, web browsers
15087    typically expect GIF, PNG, or JPEG images.  Also, Dataplot
15088    does not generate the optional bit-map preview for encapsulated
15089    Postscript (although you can add one using Ghostview on Windows).
15090    Most programs do not actually convert Postscript files.  Instead,
15091    they use the bit-map preview when displaying on non-Postscript
15092    devices and the original Postscript when displaying on Postscript
15093    devices.  In these cases, it may be more convenient to import a
15094    JPEG version of the graph.
15095
15096    The SET POSTSCRIPT CONVERT command is used to specify one of the
15097    following devices:
15098
15099       1) JPEG
15100       2) PDF (Portable Document Format)
15101       3) TIFF (Ghostscript supports a number of tiff devices, Dataplot
15102          currently uses the "tifflzw" device)
15103       4) PBM (Portable Bit Map, supports black and white only)
15104       5) PGM (Portable Grey Map, supports greyscale, but not color)
15105       6) PPM (Portable Pix Map, supports color)
15106       7) PNM (Portable Any Map, covers PBM, PGM, PPM)
15107
15108    If one of these devices is set and a Postscript device is closed,
15109    then Dataplot invokes Ghostscript to convert the Postscript output
15110    to the specified device.  The original Postscript file is preserved.
15111    The new file has the same name with the file extension replaced with
15112    "jpg", "pdf", "tif", "pbm", "pgm", "ppm", or "pnm" (depending on
15113    the selected device).
15114
15115    Note that Ghostscript supports conversion to a wide variety of
15116    output devices.  The devices selected above were the ones that
15117    are the most useful in exporting Dataplot graphs to other software
15118    programs.  Since our purpose for this command was to provide graphics
15119    formats suitable for input into other programs, we did not add support
15120    for the printer devices.  If your main interest is simply in printing
15121    to a non-Postscript device, then run Ghostview after exiting Dataplot
15122    to print the Postscript file.
15123
15124    Between the original Postscript and the devices supported using the
15125    SET POSTSCRIPT CONVERT, it should be possible to import Dataplot
15126    graphics into most external programs.  In particular, the JPEG and
15127    PBM formats (PBM, PGM, PPM, and PNM) are supported by most image
15128    conversion programs.
15129
15130    Alternatively, you can also use the "convert" program from the
15131    Image Magick software or the PS2PDF program (part of the Ghostscript
15132    installation).  See the Note section below for details.
15133
15134Syntax 1:
15135    SET POSTSCRIPT CONVERT <device>
15136    where <device> is one of JPEG, PDF, TIFF, PBM, PGM, PPM, or PNM
15137          (any other choice is converted to NULL).
15138
15139Syntax 2:
15140    SET POSTSCRIPT CONVERT <program>
15141    where <program> is one of GHOSTSCRIPT, CONVERT, or PS2PDF.
15142
15143Syntax 3:
15144    SET POSTSCRIPT CONVERT <program> <device>
15145    where <program> is one of GHOSTSCRIPT, CONVERT, or PS2PDF;
15146    and   <device> is one of JPEG, PDF, TIFF, PBM, PGM, PPM, or PNM
15147          (any other choice is converted to NULL).
15148
15149Examples:
15150    SET POSTRSCRIPT CONVERT PDF
15151    SET POSTRSCRIPT CONVERT JPEG
15152    SET POSTRSCRIPT CONVERT PPM
15153
15154Note:
15155    This command assumes that Ghostscript is installed on your local
15156    system.  Currently, it is implemented on Unix (this includes Linux,
15157    Mac OSX, and FreeBSD) and Windows platforms.  It can easily be
15158    extended to any platform (e.g., VAX VMS) to which Ghostscript has
15159    been ported.  Contact Alan Heckert (alan.heckert@nist.gov) if
15160    you have a platform that you would like supported.
15161
15162    For Unix platforms, Ghostscript is launched with the command
15163
15164         gs
15165
15166    If gs is not in your default path, you can enter something like
15167
15168         set ghostscript path /usr/local/bin
15169
15170    On Windows platforms, Ghostscript is launched with
15171
15172         <ghostscript path>\GSWIN32C.EXE
15173
15174    where <ghostscript path> is the directory defined by the
15175    SET GHOSTSCRIPT PATH command.  As of the 08/2019 version of
15176    Dataplot, the default path is
15177
15178        C:\Program Files\GS\GS9.27\BIN
15179
15180    If Ghostscript is installed in a different directory (typically the
15181    "GS9.27" will be different if you have installed a different version
15182    of Ghostscript), you can specify the correct directory with the command
15183
15184        SET GHOSTSCRIPT PATH  <path-name>
15185
15186    Enter HELP GHOSTSCRIPT PATH for details.
15187
15188    If you have installed the 64-bit version of Ghostscript, enter the
15189    command
15190
15191         SET GHOSTSCRIPT VERSION 64
15192
15193    This will run the command GSWIN64C.EXE instead of GSWIN32C.EXE.
15194
15195    To reset the 32-bit version, enter
15196
15197         SET GHOSTSCRIPT VERSION 32
15198
15199    If you select the CONVERT option, you must have the Image Magick
15200    software installed on your local platform and the convert program
15201    should be in your default path.
15202
15203Note:
15204    If you use the GHOSTSCRIPT or PS2PDF option on Windows platforms,
15205    there are two addtional issues to consider.
15206
15207       1. Dataplot will typically try to run the underlying SYSTEM
15208          command in "hidden" mode.  In "hidden" mode, the command
15209          prompt window will not pop up.
15210
15211          However, if either the program name or the file name
15212          contains spaces, the hidden mode cannot currently be
15213          used.  In particular, the path name for the Ghostscript
15214          directory contains a space (i.e., the "Program Files")
15215
15216          One solution is to add the following directory to
15217          your default path
15218
15219             C:\Program Files\gs\gs9.27\bin
15220
15221          Change 9.27 to match the version of Ghostscript you have
15222          installed.  Also, non-English systems will typically have a
15223          slightly different name for "Program Files".
15224
15225       2. For the PS2PDF option, the PS2PDF.BAT script is actually
15226          in the "lib" directory.  In addition, the script calls
15227          the Ghostscript executable without a path name.  So if
15228          you want to use PS2PDF, then the following directories
15229          need to be added to your default path
15230
15231             C:\Program Files\gs\gs9.27\bin
15232             C:\Program Files\gs\gs9.27\lib
15233
15234    To add directories to your default path, do the following
15235
15236       1. Bring up the Control Panel.
15237       2. Select "System and Security".
15238       3. Select "System".
15239       4. Select "Advanced System Settings".
15240       5. Select "Environment Variables".
15241
15242    Then use the "Enviroment Variables" menu to add the needed
15243    directories.
15244
15245Note:
15246    By default, the conversion is performed by Ghostscript.  You can also
15247    specify the "convert" program that is part of the Image Magick software
15248    by entering the command
15249
15250        SET POSTSCRIPT CONVERT CONVERT
15251
15252    To reset the use of Ghostscript, enter
15253
15254        SET POSTSCRIPT CONVERT GHOSTSCRIPT
15255
15256    You can also specify the use of the ps2pdf program to perform the
15257    conversion.  The ps2pdf program is a batch script file that is
15258    typically installed as part of the Ghostscript installation.  Linux
15259    installations will typically have Ghostcript and ps2pdf installed.
15260
15261    The GHOSTSCRIPT option generates a Ghostscript command to perform the
15262    conversion, so the GHOSTSCRIPT and PS2PDF options perform essentially
15263    the same conversion.  The advantage of the PS2PDF option is that it
15264    has a simpler syntax.  The advantage of the GHOSTSCRIPT option is
15265    that it is not limited to converting the Postscript to PDF format
15266    (it also supports JPEG, TIFF, PBM, PBM, PGM, PPM, and PNM).
15267
15268    The SET GHOSTSCRIPT PATH applies to the PS2PDF option as well.
15269
15270Note:
15271    The converted image is created with a density of 72 dots per inch
15272    in both the horizontal and vertical directions.  You can specify a
15273    different resolution with the commands
15274
15275         SET CONVERT DENSITY HORIZONTAL <value>
15276         SET CONVERT DENSITY VERTICAL   <value>
15277
15278Note:
15279    When converting to an image format, you will typically want each
15280    graph in a separate file.  You can do this as follows:
15281
15282       SET POSTSCRIPT CONVERT JPEG
15283       ORIENTATION LANDSCAPE WORDPERFECT
15284       SET IPL1NA PLOT1.PS
15285       DEVICE 2 POSTSCRIPT
15286           ... generate first plot ...
15287       DEVICE 2 CLOSE
15288       SET IPL1NA PLOT2.PS
15289       DEVICE 2 POSTSCRIPT
15290           ... generate second plot ...
15291       DEVICE 2 CLOSE
15292
15293    After these commands are run, you will have the Postscript files
15294    PLOT1.PS and PLOT2.PS.  In addition, you will have the JPEG
15295    files PLOT1.jpg and PLOT2.jpg.
15296
15297    PDF may sometimes be the exception.  Acroread (and other PDF
15298    viewers) can read PDF files with multiple graphs in them.
15299
15300Note:
15301    The CAPTURE HTML <file> command is used to generate Dataplot
15302    output to a web page.
15303
15304    If the PDF format is specified and the CAPTURE HTML command
15305    is activated, Dataplot will generate a link to the PDF file
15306    in the generated HTML code.  Enter HELP CAPTURE for more
15307    information about the CAPTURE HTML option
15308
15309Note:
15310    On some platforms, Dataplot can generate PNG and JPEG image
15311    files directly.  Enter HELP GD for details.
15312
15313Default:
15314    The default is device is NULL (i.e., no conversion is performed).
15315
15316Synonyms:
15317    SET OUTPUT DEVICE
15318
15319Related Commands:
15320    DEVICE xx POSTSCRIPT      = Set the device to Postscript.
15321    POSTSCRIPT CONVERT        = Specify the device that Postscript
15322                                output will be converted to.
15323    PP                        = Print the current plot.
15324    SET GHOSTSCRIPT PATH      = Set the directory where Ghostscript is
15325                                installed.
15326    SET GHOSTVIEW PATH        = Set the directory where Ghostview (and
15327                                GSPRINT) is installed.
15328    SET GHOSTSCRIPT PRINTER   = Use Ghostview as the default printer
15329                                under Windows.
15330    GD                        = Specify the GD device for generating
15331                                PNG and JPEG graphics.
15332
15333Applications:
15334    Graphics Output
15335
15336Implementation Date:
15337    2003/01
15338    2007/10: Added support for the "convert" program from ImageMagick
15339    2009/03: Added support for user specified density
15340    2019/08: Added support for the "ps2pdf" program
15341
15342Program:
15343    SET GHOSTSCRIPT PATH /usr/local/src/bin/
15344    SET POSTSCRIPT CONVERT JPEG
15345    DEVICE 2 POSTSCRIPT
15346    PLOT SIN(X) FOR X = -6 0.1 6
15347    DEVICE 2 CLOSE
15348    SYSTEM xv dppl1f.jpg
15349
15350-----POSTSCRIPT DEFAULT COLOR (SET)----------------------------------
15351
15352POSTSCRIPT DEFAULT COLOR
15353
15354Name:
15355    POSTSCRIPT DEFAULT COLOR (SET)
15356
15357Type:
15358    Set Subcommand
15359
15360Purpose:
15361    Specify whether Postscript devices default to black and white
15362    or to color.
15363
15364Description:
15365    Postscript devices can be either black and white or color.
15366    Since many Postscript printers are black and white, Dataplot
15367    initializes Postscript devices as black and white when the
15368
15369       DEVICE <1/2/3> POSTSCRIPT
15370
15371    command is entered.  After entering this command, you can
15372    then specify that the Postscript device command is color by
15373    entering the command
15374
15375       DEVICE <1/2/3> COLOR ON
15376
15377    Although this works well enough for DEVICE 2 output, it is
15378    problematic for DEVICE 3 output.  The DEVICE 3 output contains
15379    the most recent graph only (by default, in Postscript format).
15380    The PP command is used within Dataplot to print this DEVICE 3
15381    output on the default printer.   Dataplot automatically
15382    opens and closes DEVICE 3 as needed without any explicit
15383    commands entered by the user.  This makes it difficult to
15384    know the appropriate time to enter the DEVICE 3 COLOR ON
15385    command and cumbersome even if you can figure out when to
15386    enter the command.
15387
15388    For this reason, we have added the SET POSTSCRIPT DEFAULT COLOR
15389    command to specify whether the default for Postscript devices
15390    should be black and white or color.  Although this command
15391    was motivated by the DEVICE 3 command, it applies to
15392    DEVICE 1 POSTSCRIPT and DEVICE 2 POSTSCRIPT commands as well.
15393
15394Syntax:
15395    SET POSTSCRIPT DEFAULT COLOR <ON/OFF>
15396    where <ON> specifies that Postscript devices will default
15397          to color and <OFF> specifies that they will default
15398          to black and white.
15399
15400Examples:
15401    SET POSTRSCRIPT DEFAULT COLOR ON
15402    SET POSTRSCRIPT DEFAULT COLOR OFF
15403
15404Default:
15405    The default is OFF (i.e., Postscript devices default to black
15406    and white).
15407
15408Synonyms:
15409    None
15410
15411Related Commands:
15412    DEVICE xx POSTSCRIPT      = Set the device to Postscript.
15413    POSTSCRIPT CONVERT        = Specify the device that Postscript
15414                                output will be converted to.
15415    PP                        = Print the current plot.
15416    SET GHOSTSCRIPT PRINTER   = Use Ghostview as the default printer
15417                                under Windows.
15418
15419Applications:
15420    Graphics Output
15421
15422Implementation Date:
15423    2004/6
15424
15425Program:
15426    SET POSTSCRIPT DEFAULT COLOR ON
15427    DEVICE 2 POSTSCRIPT
15428    LINE COLOR BLUE
15429    PLOT SIN(X) FOR X = -6  0.1  6
15430    PP
15431
15432-----POSTSCRIPT SHOW FONTS-----------------------------------------
15433
15434POSTSCRIPT SHOW FONTS
15435
15436Name:
15437    POSTSCRIPT SHOW FONTS
15438
15439Type:
15440    Output Devices Command
15441
15442Purpose:
15443    List the available Postscript fonts and the commands to set the
15444    fonts.
15445
15446Description:
15447    DATAPLOT supports 34 Postscript fonts.  The Postscript font is
15448    used whenever hardware characters are generated on a Postscript
15449    device.  Postscript fonts are publication quality typeset fonts.
15450    This command is provided as a convenience to easily list the
15451    available fonts (and the command for setting it).
15452
15453    The sample output is as follows:
15454
15455       POSTSCRIPT FONT: Times-Roman
15456          SET POSTSCRIPT FONT TROM
15457          SET POSTSCRIPT TIMES ROMAN
15458
15459    The first line is the name of the font while the next two lines
15460    give the command for setting the font.
15461
15462Syntax:
15463    POSTSCRIPT SHOW FONTS
15464
15465Examples:
15466    POSTSCRIPT SHOW FONTS
15467
15468Default:
15469    None
15470
15471Synonyms:
15472    None
15473
15474Related Commands:
15475    SET POSTSCRIPT FONT   = Specify the Postscript font to use.
15476    POSTSCRIPT            = Direct graphical output to a Postscript
15477                            device.
15478
15479Applications:
15480    XX
15481
15482Implementation Date:
15483    XX
15484
15485Program:
15486    POSTSCRIPT SHOW FONTS
15487    SET POSTSCRIPT FONT TROM
15488
15489-----POWCDF (LET)--------------------------------
15490
15491POWCDF
15492
15493Name:
15494    POWCDF (LET)
15495
15496Type:
15497    Library Function
15498
15499Purpose:
15500    Compute the power function cumulative distribution function.
15501
15502Description:
15503    The cumulative distribution function of the standard
15504    power distribution is
15505
15506       F(x,c) = x**c            0 <= x <= 1; c > 0
15507
15508    The standard power distribution can be generalized with
15509    lower and upper bound parameters.  If a and be denote the
15510    lower and upper bounds, then the location and scale
15511    parameters are:
15512
15513        location = a
15514        scale    = b - a
15515
15516    The general form of the power distribution can then be
15517    found using the relation
15518
15519        F(x;c,a,b) = F((x-a)/(b-a);c,0,1)
15520
15521    If X has a Pareto distribution, then 1/X has a power
15522    distribution.  The power distribution is also a special
15523    case of the beta distribution where the second shape
15524    parameter is equal to 1.
15525
15526Syntax:
15527    LET <y> = POWCDF(<x>,<c>,<a>,<b>)
15528              <SUBSET/EXCEPT/FOR qualification>
15529    where <x> is a number, parameter, or variable in the
15530              interval a to b;
15531          <c> is a number, parameter, or variable that specifies the
15532              shape parameter;
15533          <a> is a number, parameter, or variable that
15534              specifies the lower limit;
15535          <b> is a number, parameter, or variable that
15536              specifies the upper limit;
15537          <y> is a variable or a parameter (depending on what <x> is)
15538              where the computed power function cdf value is saved;
15539    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
15540
15541    If the <a> and <b> parameters are omitted, the default to
15542    0 and 1, respectively.
15543
15544Examples:
15545    LET A = POWCDF(3,1.5)
15546    LET X2 = POWCDF(X1,C)
15547
15548Note:
15549    Library functions are distinguished from let subcommands
15550    in the following ways.
15551    1) Functions enclose the input value in parenthesis.  Let
15552       subcommands use spaces.
15553    2) Functions can accept (and return) either parameters
15554       (i.e., single values) or variables (i.e., an array of
15555       values) while let subcommands are specific in which they
15556       accept as input and what they return as output.
15557    3) Functions can accept expressions while let subcommands
15558       do not.  For example, the following is legal:
15559           LET Y2 = ABS(Y1-INT(Y1))
15560       For let subcommands, you typically have to do something
15561       like the following:
15562           LET YTEMP = Y**2 + 8
15563           LET A = SUM YTEMP
15564
15565Default:
15566    None
15567
15568Synonyms:
15569    None
15570
15571Related Commands:
15572    POWPDF = Compute the power function probability density function.
15573    POWPPF = Compute the power function percent point function.
15574    PARPDF = Compute the Pareto probability density function.
15575    BETPDF = Compute the beta probability density function.
15576    GEPPDF = Compute the generalized Pareto probability density
15577             function.
15578    EXPPDF = Compute the exponential probability density function.
15579
15580Reference:
15581    "Continuous Univariate Distributions", 2nd ed., Johnson, Kotz, and
15582    Balakrishnan, John Wiley and Sons, 1994 (page 607).
15583
15584    "Statistical Distributions", Third Edition, Evans, Hastings,
15585    and Peacock, John Wiley & Sons, 2000.
15586
15587Applications:
15588    Distributional Modeling
15589
15590Implementation Date:
15591    95/4
15592
15593Program:
15594    TITLE POWER FUNCTION CDF'S (0.1,  0.5, 1, 3, 10)
15595    PLOT POWCDF(X,0.1) FOR X = 0.01 0.01 1 AND
15596    PLOT POWCDF(X,0.5) FOR X = 0.01 0.01 1 AND
15597    PLOT POWCDF(X,1) FOR X = 0.01 0.01 1 AND
15598    PLOT POWCDF(X,3) FOR X = 0.01 0.01 1 AND
15599    PLOT POWCDF(X,10) FOR X = 0.01 0.01 1
15600
15601-----POWCHAZ (LET)--------------------------------
15602
15603POWCHAZ
15604
15605Name:
15606    POWCHAZ (LET)
15607
15608Type:
15609    Library Function
15610
15611Purpose:
15612    Compute the power function cumulative hazard function.
15613
15614Description:
15615    The standard form of the cumulative hazard function is:
15616
15617       H(x,c) = -LOG(1-x**c)      0 <= x <= 1; c > 0
15618
15619    with c denoting the shape parameter.
15620
15621    The standard power distribution can be generalized with
15622    lower and upper bound parameters.  If a and be denote the
15623    lower and upper bounds, then the location and scale
15624    parameters are:
15625
15626        location = a
15627        scale    = b - a
15628
15629    The general form of the power distribution can then be
15630    found using the relation
15631
15632        H(x;c,a,b) = H((x-a)/(b-a);c,0,1)
15633
15634    If X has a Pareto distribution, then 1/X has a power
15635    distribution.  The power distribution is also a special
15636    case of the beta distribution where the second shape
15637    parameter is equal to 1.
15638
15639Syntax:
15640    LET <y> = POWCHAZ(<x>,<c>,<a>,<b>)
15641              <SUBSET/EXCEPT/FOR qualification>
15642    where <x> is a number, parameter, or variable in the
15643              interval a to b;
15644          <c> is a number, parameter, or variable that specifies the
15645              shape parameter;
15646          <a> is a number, parameter, or variable that
15647              specifies the lower limit;
15648          <b> is a number, parameter, or variable that
15649              specifies the upper limit;
15650          <y> is a variable or a parameter (depending on what <x> is)
15651              where the computed power function cumulative hazard
15652              value is saved;
15653    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
15654
15655    If the <a> and <b> parameters are omitted, the default to
15656    0 and 1, respectively.
15657
15658Examples:
15659    LET A = POWCHAZ(3,1.5)
15660    LET X2 = POWCHAZ(X1,C)
15661
15662Note:
15663    Library functions are distinguished from let subcommands
15664    in the following ways.
15665    1) Functions enclose the input value in parenthesis.  Let
15666       subcommands use spaces.
15667    2) Functions can accept (and return) either parameters
15668       (i.e., single values) or variables (i.e., an array of
15669       values) while let subcommands are specific in which they
15670       accept as input and what they return as output.
15671    3) Functions can accept expressions while let subcommands
15672       do not.  For example, the following is legal:
15673           LET Y2 = ABS(Y1-INT(Y1))
15674       For let subcommands, you typically have to do something
15675       like the following:
15676           LET YTEMP = Y**2 + 8
15677           LET A = SUM YTEMP
15678
15679Default:
15680    None
15681
15682Synonyms:
15683    None
15684
15685Related Commands:
15686    POWCDF  = Compute the power function cumulative distribution
15687              function.
15688    POWHAZ  = Compute the power function hazard function.
15689    POWPDF  = Compute the power function probability density
15690              function.
15691    POWPPF  = Compute the power function percent point function.
15692    PARPDF  = Compute the Pareto probability density function.
15693    BETPDF  = Compute the beta probability density function.
15694    GEPPDF  = Compute the generalized Pareto probability density
15695              function.
15696    EXPPDF  = Compute the exponential probability density function.
15697
15698Reference:
15699    "Continuous Univariate Distributions", 2nd ed., Johnson, Kotz, and
15700    Balakrishnan, John Wiley and Sons, 1994 (page 607).
15701
15702    "Statistical Distributions", Third Edition, Evans, Hastings,
15703    and Peacock, John Wiley & Sons, 2000.
15704
15705Applications:
15706    Distributional Modeling
15707
15708Implementation Date:
15709    2007/12
15710
15711Program:
15712    TITLE POWER FUNCTION CUMULATIVE HAZARD FUNCTIONS (0.1,  0.5, 1, 3, 10)
15713    PLOT POWCHAZ(X,0.1) FOR X = 0.01 0.01 0.99 AND
15714    PLOT POWCHAZ(X,0.5) FOR X = 0.01 0.01 0.99 AND
15715    PLOT POWCHAZ(X,1) FOR X = 0.01 0.01 0.99 AND
15716    PLOT POWCHAZ(X,2) FOR X = 0.01 0.01 0.99 AND
15717    PLOT POWCHAZ(X,5) FOR X = 0.01 0.01 0.99
15718
15719-----POWHAZ (LET)--------------------------------
15720
15721POWHAZ
15722
15723Name:
15724    POWHAZ (LET)
15725
15726Type:
15727    Library Function
15728
15729Purpose:
15730    Compute the power function hazard function.
15731
15732Description:
15733    The standard form of the hazard function is:
15734
15735       h(x,c) = c*x**(c-1)/(1-x**c)      0 <= x < 1; c > 0
15736
15737    with c denoting the shape parameter.
15738
15739    The standard power distribution can be generalized with
15740    lower and upper bound parameters.  If a and be denote the
15741    lower and upper bounds, then the location and scale
15742    parameters are:
15743
15744        location = a
15745        scale    = b - a
15746
15747    The general form of the power distribution can then be
15748    found using the relation
15749
15750        h(x;c,a,b) = (1/(b-a))*h((x-a)/(b-a);c,0,1)
15751
15752    If X has a Pareto distribution, then 1/X has a power
15753    distribution.  The power distribution is also a special
15754    case of the beta distribution where the second shape
15755    parameter is equal to 1.
15756
15757Syntax:
15758    LET <y> = POWHAZ(<x>,<c>,<a>,<b>)
15759              <SUBSET/EXCEPT/FOR qualification>
15760    where <x> is a number, parameter, or variable in the
15761              interval a to b;
15762          <c> is a number, parameter, or variable that specifies the
15763              shape parameter;
15764          <a> is a number, parameter, or variable that
15765              specifies the lower limit;
15766          <b> is a number, parameter, or variable that
15767              specifies the upper limit;
15768          <y> is a variable or a parameter (depending on what <x> is)
15769              where the computed power function hazard value is saved;
15770    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
15771
15772    If the <a> and <b> parameters are omitted, the default to
15773    0 and 1, respectively.
15774
15775
15776Examples:
15777    LET A = POWHAZ(3,1.5)
15778    LET X2 = POWHAZ(X1,C)
15779
15780Note:
15781    Library functions are distinguished from let subcommands
15782    in the following ways.
15783    1) Functions enclose the input value in parenthesis.  Let
15784       subcommands use spaces.
15785    2) Functions can accept (and return) either parameters
15786       (i.e., single values) or variables (i.e., an array of
15787       values) while let subcommands are specific in which they
15788       accept as input and what they return as output.
15789    3) Functions can accept expressions while let subcommands
15790       do not.  For example, the following is legal:
15791           LET Y2 = ABS(Y1-INT(Y1))
15792       For let subcommands, you typically have to do something
15793       like the following:
15794           LET YTEMP = Y**2 + 8
15795           LET A = SUM YTEMP
15796
15797Default:
15798    None
15799
15800Synonyms:
15801    None
15802
15803Related Commands:
15804    POWCDF  = Compute the power function cumulative distribution
15805              function.
15806    POWCHAZ = Compute the power function cumulative hazard
15807              function.
15808    POWPDF  = Compute the power function probability density
15809              function.
15810    POWPPF  = Compute the power function percent point function.
15811    PARPDF  = Compute the Pareto probability density function.
15812    BETPDF  = Compute the beta probability density function.
15813    GEPPDF  = Compute the generalized Pareto probability density
15814              function.
15815    EXPPDF  = Compute the exponential probability density function.
15816
15817Reference:
15818    "Continuous Univariate Distributions", 2nd ed., Johnson, Kotz, and
15819    Balakrishnan, John Wiley and Sons, 1994 (page 607).
15820
15821    "Statistical Distributions", Third Edition, Evans, Hastings,
15822    and Peacock, John Wiley & Sons, 2000.
15823
15824Applications:
15825    Distributional Modeling
15826
15827Implementation Date:
15828    2007/12
15829
15830Program:
15831    TITLE POWER FUNCTION HAZARD FUNCTIONS (0.1,  0.5, 1, 3, 10)
15832    PLOT POWHAZ(X,0.1) FOR X = 0.01 0.01 0.99 AND
15833    PLOT POWHAZ(X,0.5) FOR X = 0.01 0.01 0.99 AND
15834    PLOT POWHAZ(X,1) FOR X = 0.01 0.01 0.99 AND
15835    PLOT POWHAZ(X,2) FOR X = 0.01 0.01 0.99 AND
15836    PLOT POWHAZ(X,5) FOR X = 0.01 0.01 0.99
15837
15838-----POWER LAW RANDOM NUMBERS (LET)----------------------------------
15839
15840POWER LAW RANDOM NUMBERS
15841
15842Name:
15843    POWER LAW RANDOM NUMBERS (LET)
15844
15845Type:
15846    Let Subcommand
15847
15848Purpose:
15849    Generate random failure times from a non-homogeneous
15850    Poisson process (NHPP) following a power law model.
15851
15852Description:
15853    If you have internet access, you can see a discussion of the
15854    NHPP Power Law model by entering the command:
15855
15856        WEB HANDBOOK NHPP POWER LAW
15857
15858    The non-homogeneous Poisson process power law model is:
15859
15860        M(t) = alpha*t**beta     alpha, beta > 0
15861
15862    where M(t) is the expected number of failures at time
15863    t.  The random failure times are generated from the
15864    formula for the interarrival times (i.e., the CDF for
15865    the waiting time for the next failure given a failure at
15866    time T):
15867
15868        F (t) = 1 - EXP(-ALPHA*[(T+t)**BETA-T**BETA]
15869         T
15870
15871Syntax:
15872    LET <y> = POWER LAW RANDUM NUMBERS FOR I = <start> <inc>  <stop>
15873    where <start> is the starting row for the random numbers;
15874          <inc> is the increment for the random numbers;
15875          <stop> is the stopping row for the random numbers;
15876          <y> is a variable where the power law random numbers
15877              are saved.
15878
15879    Typically <start> and <inc> are 1 and <stop> is set to the
15880    number of random numbers to generate.  If <start> and <inc>
15881    are not 1, then <y> will still contain <stop> elements, but
15882    the empty rows will be set to 0.
15883
15884    The alpha and beta parameters are specified with LET commands
15885    before entering the POWER LAW RANDOM NUMBERS command as
15886    demonstrated in the examples below.
15887
15888Examples:
15889    LET ALPHA = 2
15890    LET BETA = 3
15891    LET Y = POWER LAW RANDOM NUMBERS FOR I = 1 1 100
15892
15893    LET ALPHA = 1
15894    LET BETA = 2
15895    LET Y = POWER LAW RANDOM NUMBERS FOR I = 1 1 1000
15896
15897    LET ALPHA = 1
15898    LET BETA = 2
15899    LET Y = POWER LAW RANDOM NUMBERS FOR I = 2 5 100
15900
15901Default:
15902    None
15903
15904Synonyms:
15905    None
15906
15907Related Commands:
15908    RANDOM NUMBERS     = Generate random numbers from various
15909                         probability distributions.
15910    INTERARRIVAL TIME  = Compute the interarrival times of a
15911                         variable.
15912    DUANE PLOT         = Generate a Duane plot.
15913
15914Applications:
15915    Reliability
15916
15917Implementation Date:
15918    1998/5
15919
15920Program:
15921    LET ALPHA = 2
15922    LET BETA = 3
15923    LET Y = POWER LAW RANDOM NUMBERS FOR I = 1 1 100
15924    X1LABEL ALPHA = ^ALPHA, BETA = ^BETA
15925    TITLE AUTOMATIC
15926    DUANE PLOT Y
15927
15928-----POWPDF (LET)--------------------------------
15929
15930POWPDF
15931
15932Name:
15933    POWPDF (LET)
15934
15935Type:
15936    Library Function
15937
15938Purpose:
15939    Compute the power function probability density function.
15940
15941Description:
15942    The standard form of the probability density function is:
15943
15944       f(x,c) = c*x**(c-1)               0 <= x <= 1; c > 0
15945
15946    where c is a shape parameter.
15947
15948    The standard power distribution can be generalized with
15949    lower and upper bound parameters.  If a and be denote the
15950    lower and upper bounds, then the location and scale
15951    parameters are:
15952
15953        location = a
15954        scale    = b - a
15955
15956    The general form of the power distribution can then be
15957    found using the relation
15958
15959        f(x;c,a,b) = (1/(b-a))*f((x-a)/(b-a);c,0,1)
15960
15961    If X has a Pareto distribution, then 1/X has a power
15962    distribution.  The power distribution is also a special
15963    case of the beta distribution where the second shape
15964    parameter is equal to 1.
15965
15966
15967Syntax:
15968    LET <y> = POWPDF(<x>,<c>,<a>,<b>)
15969              <SUBSET/EXCEPT/FOR qualification>
15970    where <x> is a number, parameter, or variable in the
15971              interval a to b;
15972          <c> is a number, parameter, or variable that specifies the
15973              shape parameter;
15974          <a> is a number, parameter, or variable that
15975              specifies the lower limit;
15976          <b> is a number, parameter, or variable that
15977              specifies the upper limit;
15978          <y> is a variable or a parameter (depending on what <x> is)
15979              where the computed power function pdf value is saved;
15980    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
15981
15982    If the <a> and <b> parameters are omitted, the default to
15983    0 and 1, respectively.
15984
15985
15986Examples:
15987    LET A = POWPDF(3,1.5)
15988    LET X2 = POWPDF(X1,C)
15989
15990Note:
15991    Library functions are distinguished from let subcommands
15992    in the following ways.
15993    1) Functions enclose the input value in parenthesis.  Let
15994       subcommands use spaces.
15995    2) Functions can accept (and return) either parameters
15996       (i.e., single values) or variables (i.e., an array of
15997       values) while let subcommands are specific in which they
15998       accept as input and what they return as output.
15999    3) Functions can accept expressions while let subcommands
16000       do not.  For example, the following is legal:
16001           LET Y2 = ABS(Y1-INT(Y1))
16002       For let subcommands, you typically have to do something
16003       like the following:
16004           LET YTEMP = Y**2 + 8
16005           LET A = SUM YTEMP
16006
16007Default:
16008    None
16009
16010Synonyms:
16011    None
16012
16013Related Commands:
16014    POWCDF = Compute the power function cumulative distribution
16015             function.
16016    POWPPF = Compute the power function percent point function.
16017    PARPDF = Compute the Pareto probability density function.
16018    BETPDF = Compute the beta probability density function.
16019    GEPPDF = Compute the generalized Pareto probability density
16020             function.
16021    EXPPDF = Compute the exponential probability density function.
16022
16023Reference:
16024    "Continuous Univariate Distributions", 2nd ed., Johnson, Kotz, and
16025    Balakrishnan, John Wiley and Sons, 1994 (page 607).
16026
16027    "Statistical Distributions", Third Edition, Evans, Hastings,
16028    and Peacock, John Wiley & Sons, 2000.
16029
16030Applications:
16031    Distributional Modeling
16032
16033Implementation Date:
16034    95/4
16035
16036Program:
16037    TITLE POWER FUNCTION PDF'S (0.1,  0.5, 1, 3, 10)
16038    PLOT POWPDF(X,0.1) FOR X = 0.01 0.01 1 AND
16039    PLOT POWPDF(X,0.5) FOR X = 0.01 0.01 1 AND
16040    PLOT POWPDF(X,1) FOR X = 0.01 0.01 1 AND
16041    PLOT POWPDF(X,3) FOR X = 0.01 0.01 1 AND
16042    PLOT POWPDF(X,10) FOR X = 0.01 0.01 1
16043
16044-----POWPPF (LET)--------------------------------
16045
16046POWPPF
16047
16048Name:
16049    POWPPF (LET)
16050
16051Type:
16052    Library Function
16053
16054Purpose:
16055    Compute the power function percent point function.
16056
16057Description:
16058    The standard form of the power function percent point
16059    function is
16060
16061       G(p;c) = p**(1/c)      0 <= p <= 1; c > 0
16062
16063    The standard power distribution can be generalized with
16064    lower and upper bound parameters.  If a and be denote the
16065    lower and upper bounds, then the location and scale
16066    parameters are:
16067
16068        location = a
16069        scale    = b - a
16070
16071    The general form of the power distribution can then be
16072    found using the relation
16073
16074        G(p;c,a,b) = loc + scale*G(p;c,0,1)
16075
16076    If X has a Pareto distribution, then 1/X has a power
16077    distribution.  The power distribution is also a special
16078    case of the beta distribution where the second shape
16079    parameter is equal to 1.
16080
16081
16082Syntax:
16083    LET <y> = POWPPF(<p>,<c>,<a>,<b>)
16084              <SUBSET/EXCEPT/FOR qualification>
16085    where <p> is a number, parameter, or variable in the
16086              interval 0 to 1;
16087          <c> is a number, parameter, or variable that specifies the
16088              shape parameter;
16089          <a> is a number, parameter, or variable that
16090              specifies the lower limit;
16091          <b> is a number, parameter, or variable that
16092              specifies the upper limit;
16093          <y> is a variable or a parameter (depending on what <p> is)
16094              where the computed power function ppf value is saved;
16095    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
16096
16097    If the <a> and <b> parameters are omitted, the default to
16098    0 and 1, respectively.
16099
16100
16101Examples:
16102    LET A = POWPPF(0.9,3)
16103    LET X2 = POWPPF(X1,C)
16104
16105Note:
16106    Library functions are distinguished from let subcommands
16107    in the following ways.
16108    1) Functions enclose the input value in parenthesis.  Let
16109       subcommands use spaces.
16110    2) Functions can accept (and return) either parameters
16111       (i.e., single values) or variables (i.e., an array of
16112       values) while let subcommands are specific in which they
16113       accept as input and what they return as output.
16114    3) Functions can accept expressions while let subcommands
16115       do not.  For example, the following is legal:
16116           LET Y2 = ABS(Y1-INT(Y1))
16117       For let subcommands, you typically have to do something
16118       like the following:
16119           LET YTEMP = Y**2 + 8
16120           LET A = SUM YTEMP
16121
16122Default:
16123    None
16124
16125Synonyms:
16126    None
16127
16128Related Commands:
16129    POWCDF = Compute the power function cumulative distribution
16130             function.
16131    POWPDF = Compute the power function probability density function.
16132    PARPDF = Compute the Pareto probability density function.
16133    BETPDF = Compute the beta probability density function.
16134    GEPPDF = Compute the generalized Pareto probability density
16135             function.
16136    EXPPDF = Compute the exponential probability density function.
16137
16138Reference:
16139    "Continuous Univariate Distributions", 2nd ed., Johnson, Kotz, and
16140    Balakrishnan, John Wiley and Sons, 1994 (page 607).
16141
16142    "Statistical Distributions", Third Edition, Evans, Hastings,
16143    and Peacock, John Wiley & Sons, 2000.
16144
16145Applications:
16146    Distributional Modeling
16147
16148Implementation Date:
16149    95/5
16150
16151Program:
16152    TITLE POWER FUNCTION PPF'S (0.5, 1, 3)
16153    LINE DASH SOLID DOT
16154    PLOT POWPPF(P,0.5) FOR P = 0 .01 1 AND
16155    PLOT POWPPF(P,1) FOR P = 0 .01 1 AND
16156    PLOT POWPPF(P,3) FOR P = 0 .01 1
16157
16158-----PP-------------------------------------------------------
16159
16160PP
16161
16162Name:
16163    PP
16164
16165Type:
16166    Support Command
16167
16168Purpose:
16169    Send the most recent plot to the printer.
16170
16171Description:
16172    DEVICE 3 (in file DPPL2F.DAT, name may vary on some systems)
16173    output is closed and re-opened at the beginning of a plot command,
16174    so only the most recent plot is in the graphics file.
16175
16176Syntax:
16177    PP
16178
16179Examples:
16180    PP
16181
16182Note:
16183    This command is operating system dependent.  It is currently
16184    supported on the IBM PC and Unix (except Cray UNICOS).  It has
16185    been coded (but not tested) for VAX/VMS.  The primary requirement
16186    for supporting it on other systems is the ability to send a
16187    command to the operating system from a Fortran program.  Contact
16188    your local site installer to see about adding this capability to
16189    your version if it does not currently work.
16190
16191Note:
16192    This command sends the file to the default printer.  On the IBM PC,
16193    this is LPT1 (i.e., the printer connected to your PC).  For Unix,
16194    enter the setenv PRINTER command before entering DATAPLOT.
16195
16196Note:
16197    By default, Postscript output is generated.  To use another
16198    device, enter the following commands:
16199        DEVICE 3 CLOSE
16200        DEVICE 3 <device> <model>
16201
16202Note:
16203    When generating complex and time consuming plots, you may want to
16204    suppress the DEVICE 3 output.  Enter the following commands to do
16205    this:
16206        DEVICE 3 CLOSE
16207        DEVICE 3 NULL
16208
16209Note:
16210    For Postscript devices, DATAPLOT normally generates a blank page
16211    before the first plot (to avoid problems if diagrammatic graphics
16212    are done before the first plot).  This can be a bit of a nuisance
16213    for the PP command since only one plot is printed.  The BLANK
16214    POSTSCRIPT command is used to control whether this blank page
16215    is generated (by default, is not for DEVICE 3).
16216
16217    This command does not affect Postscript output sent to device
16218    2 (use the PRE-ERASE OFF for a similar effect).
16219
16220Default:
16221    None
16222
16223Synonyms:
16224    ADD
16225
16226Related Commands:
16227    / PRINTER   = Re-execute saved commands and send the output to the
16228                  printer.
16229    / PSPRINTER = Re-execute saved commands and send the output to the
16230                  printer in Postscript format.
16231
16232Applications:
16233    Printing
16234
16235Implementation Date:
16236    1992/07
16237
16238Program:
16239    PLOT X**2 FOR X = 1 1 9
16240    PP
16241
16242-----PPCC PLOT-------------------------------------------------------
16243
16244PPCC PLOT
16245
16246Name:
16247    ... PPCC PLOT
16248    ... KOLMOGOROV SMIRNOV PLOT
16249    ... ANDERSON DARLING PLOT
16250    ... CHI-SQUARE PLOT
16251
16252Type:
16253    Graphics Command
16254
16255Purpose:
16256    Generates a probability plot correlation coefficient (PPCC)
16257    plot.  Alternatively, generate the plot based on other
16258    goodness of fit criterion.
16259
16260Description:
16261    A PPCC plot is a graphical data analysis technique for determining
16262    that member of the specified distributional family which provides
16263    a "best" distributional fit to the data.
16264
16265    The PPCC plot is based on the following two ideas:
16266
16267        1) The "straightness" of the probability plot is a good measure
16268           of distributional fit.  That is, the "best" distributional
16269           fit is the one with the most linear probability plot.
16270
16271        2) The correlation coefficient of the points on the
16272           probabability plot is a good measure of the "straightness"
16273           (i.e., linearity) of the probability plot.
16274
16275    The PPCC plot is formed by selecting a value of the shape parameter,
16276    generating the probability plot (this probability plot is not
16277    actually graphed), and then computing the correlation coefficient
16278    of the resulting probability plot.  The PPCC plot then consists of:
16279
16280       Vertical   axis = probability plot correlation coefficient
16281                         value for the given value of the shape parameter;
16282       Horizontal axis = distributional family parameter value (i.e.,
16283                         the value of the shape parameter.
16284
16285    The value of the distributional parameter (on the horizontal axis)
16286    which corresponds to the maximum of the PPCC plot curve (on the
16287    vertical axis) is, of course, of interest since it indicates the
16288    best-fit member of the family.
16289
16290    The PPCC PLOT has been extended to support the following
16291    additional goodness of fit statistics:
16292
16293       1) the Kolmogorov-Smirnov goodness of fit statistic;
16294
16295       2) the Anderson-Darling goodness of fit statistic;
16296
16297       3) the chi-square goodness of fit statistic.
16298
16299    For these alternative measures of goodness of fit, we follow a
16300    similar procedure.  That is, we fix a value of the shape
16301    parameter, generate the corresponding probability plot in the
16302    background to obtain estimates for location and scale, and then
16303    compute the goodness of fit statistic based on these parameters.
16304    For these goodness of fit statistics, we are looking for the
16305    minimum value of the statistic rather than the maximum value of
16306    the statistic.
16307
16308    Some advantages of the PPCC plot as a fitting technique are:
16309
16310        1) The probability plot is invariant with respect to location
16311           and scale.  This means that the fundamental linearity of the
16312           probability plot does not depend on the values of the
16313           location and shape parameters (i.e., we could plug-in
16314           any arbitrary values for them and the probability plot
16315           would still have the same linearity as measured by the
16316           ppcc statistic.  The property follows from the fact that
16317
16318               G(p;loc,scale,shape) = loc + scale*G(p;0,1,shape)
16319
16320           where G denotes the percent point function of the
16321           specified distribution.  So for the probability plot,
16322           using different values for loc and scale will change the
16323           scale on the x-axis, but not the linearity.
16324
16325           Once we determine the optimal value of the shape parameter
16326           from the PPCC plot, we can generate the corresponding
16327           probability plot.  The intercept and slope of line fit to
16328           the probability provide valid estimates of location and
16329           scale (the Dataplot probability plot is designed in such a
16330           way that this is true).
16331
16332           Note: the Anderson-Darling, Kolmogorv-Smirnov, and
16333                 chi-square variants are based on the cumulative
16334                 distribution function and do not share this invariance
16335                 property.  However, we can still use the underlying
16336                 probability plot to obtain estimates of location and
16337                 scale for a given value of the shape parameter.
16338
16339        2) The probability plot, and thus the PPCC plot, only depends on
16340           the percent point function.  That is, if we know how to
16341           compute the percent point function, we can use the
16342           PPCC plot/probability plot to estimate the parameters of
16343           the distribution.
16344
16345           The Anderson-Darling, Kolmogorov-Smirnov, and chi-square
16346           variants also depend on computing the cumulative
16347           distribution function.
16348
16349        3) The PPCC plot can show the sensitivity of the shape parameter.
16350           That is, it can show what neighborhood of the parameter
16351           estimate is likely to produce a reasonably straight
16352           probability plot.
16353
16354        4) The PPCC plot can be applied to binned data.
16355
16356            The chi-square variant can also be applied to binned data.
16357            Currently, the Anderson-Darling and Kolmogorov Smirnov
16358            variants cannot be applied to binned data.
16359
16360        5) The PPCC plot can be applied to censored data.
16361
16362           A censored PPCC plot is generated by finding the value
16363           of the shape parameter that results in the maximum
16364           correlation coefficient of the censored probability plot.
16365           For details on how the censored probablity plot is
16366           generated, enter the command
16367
16368              HELP PROBABILITY PLOT
16369
16370           The censoring variable should contain a 1 to indicate
16371           a failure time and a 0 to indicate a censoring time.
16372           The censored PPCC plot is not suppported for binned data.
16373
16374           The censoring option is not currently supported by the
16375           Anderson-Darling, Kolmogorov-Smirnov, and chi-square
16376           variants of the plot.
16377
16378    Some disadvantages of the PPCC plot as a fitting technique are:
16379
16380        1) The PPCC plot (and its variants) do not have the
16381           mathematical optimality properties that analytic
16382           methods such as maximum likelihood have.
16383
16384        2) If the percent point function is expensive to compute
16385           (e.g., if it involves the numerical inversion of a rather
16386           complicated cumulative distribution function), the ppcc
16387           plot can be slow to generate.  These types of percent
16388           point functions may also have convergence problems.
16389
16390           In these cases, the SET PPCC PLOT DATA POINTS may be
16391           helpful in reducing the computational burden.  See the
16392           Note section below.
16393
16394        2) The PPCC plot does not produce interval estimates for the
16395           parameters.
16396
16397           The bootstrap provides a method for generating these
16398           interval estimates.  For details, enter
16399
16400               HELP DISTRIBUTIONAL BOOTSTRAP
16401
16402        3) Heavy-tailed distributions may have very high variability
16403           in the extremes of the data.  This can sometimes lead to
16404           poor discrimination in the plot.
16405
16406           In our experience, the Anderson-Darling and
16407           Kolmogorov-Smirnov variants of the plot may perform better
16408           for these cases.
16409
16410        4) If a shape parameter behaves much like a scale or
16411           location parameter, the PPCC plot may not discriminate
16412           well.
16413
16414           The Anderson-Darling and Kolmogorov-Smirnov variants have
16415           the option of fixing the values of the location and scale
16416           parameters.  This can sometimes be useful in these cases.
16417
16418        5) The PPCC plot does not generate smooth curves for discrete
16419           distributions due to the discreteness of the percent point
16420           function.  For discrete distributions, the chi-square
16421           variant of the plot typically produces smoother plots.
16422
16423        6) The PPCC plot does not extend well to more than one
16424           shape parameter.
16425
16426           Dataplot has extended the PPCC plot to distributions with
16427           two shape parameters.  Dataplot supports two formats for
16428           the PPCC plot with two shape parameters:
16429
16430           1) As in the one shape parameter case, the Y axis will
16431              contain the value of the correlation coefficient.  The
16432              X axis will contain the value of the second shape
16433              parameter.  Each value of the first shape parameter will
16434              be represented by a separate trace (i.e., curve) on the
16435              plot.
16436
16437              To change the order of the shape parameters in the
16438              above format, enter the command
16439
16440                 SET PPCC PLOT AXIS ORDER REVERSE
16441
16442              To restore the default order, enter the command
16443
16444                 SET PPCC PLOT AXIS ORDER DEFAULT
16445
16446           2) Alternatively, you can generate a 3D wireframe plot.
16447
16448           You can specify which format to use with the command
16449
16450               SET PPCC FORMAT <TRACE/3D>
16451
16452    The PPCC plot now supports two different types of grouping.
16453
16454       1) Some data sets are collected in binned format.  That is,
16455          the values for the data are split into intervals and the
16456          number of occurences of the data within each interval are
16457          are counted.
16458
16459          Dataplot supports either equal sized bins (the bin
16460          variable contains the mid-point of the bin) or
16461          unequal size bins (two bin variables are specified:
16462          one contains the lower limit for the bins and the other
16463          contains the upper limits for the bins).
16464
16465       2) The PPCC plot also supports the case where there are
16466          multiple batches of data.  In this case, a separate
16467          ppcc curve is drawn for each batch of data (for unbinned
16468          data a curve will also be drawn for the full data
16469          set).  We refer to this as the "replication" case
16470          below.  Replication can be used for either the raw data
16471          case or the binned data case.
16472
16473          This form is useful for the case where we want to
16474          know if different batches of data can be modeled
16475          with a common shape parameter.  One example of this
16476          is accelerated testing where Weibull models should
16477          have a common shape parameter at different stress levels
16478          if a linear accelaraton model is valid.
16479
16480    PPCC plots are available for the following continuous distributional
16481    families (with the distributional parameter in parentheses) with one
16482    shape parameter:
16483
16484      1) Weibull                         (gamma)
16485      2) double weibull                  (gamma)
16486      3) inverted weibull                (gamma)
16487      4) gamma                           (gamma)
16488      5) double gamma                    (gamma)
16489      6) log gamma                       (gamma)
16490      7) inverted gamma                  (gamma)
16491      8) Wald                            (gamma)
16492      9) fatigue life                    (gamma)
16493     10) Pareto                          (gamma)
16494     11) Pareto second kind              (gamma)
16495     12) generalized Pareto              (gamma)
16496     13) generalized half logistic       (gamma)
16497     14) extreme value type 2            (gamma)
16498     15) generalized extreme value       (gamma)
16499     16) extreme value                   (gamma, combines Weibull,
16500                                         extreme value type 2)
16501     17) geometric extreme exponential   (gamma)
16502     18) Tukey lambda                    (lambda)
16503     19) skew normal                     (lambda)
16504     20) skew double exponential         (lambda)
16505     21) t                               (nu)
16506     22) folded t                        (nu)
16507     23) chi-squared                     (nu)
16508     24) chi                             (nu)
16509     25) generalized logistic            (alpha)
16510     26) generalized logistic type 2     (alpha)
16511     27) generalized logistic type 3     (alpha)
16512     28) generalized logistic type 5     (alpha)
16513     29) log double exponential          (alpha)
16514     30) error                           (alpha)
16515     31) McLeish                         (alpha)
16516     32) lognormal                       (sd)
16517     33) power-normal                    (p)
16518     34) Von Mises                       (b)
16519     35) reciprocal                      (b)
16520     36) log-logistic                    (delta)
16521     37) wrapped cauchy                  (c)
16522     38) power function                  (c)
16523     39) Bradford                        (beta)
16524     40) Topp and Leone                  (beta)
16525     41) asymmetric double exponential   (k)
16526
16527    PPCC plots are available for the following continuous distributional
16528    families (with the distributional parameter in parentheses) with two
16529    shape parameters:
16530
16531      1) inverse Gaussian                (gamma, mu)
16532      2) reciprocal inverse gaussian     (gamma, mu)
16533      3) generalized gamma               (gamma, c)
16534      4) exponentiated Weibull           (gamma, theta)
16535      5) exponential power               (alpha, beta)
16536      6) beta                            (alpha, beta)
16537      7) inverted beta                   (alpha, beta)
16538      8) beta-normal                     (alpha, beta)
16539      9) asymmetric log double expo      (alpha, beta)
16540     10) generalized Topp and Leone      (alpha, beta)
16541     11) reflected gene Topp and Leone   (alpha, beta)
16542     12) log beta                        (alpha, beta, assume
16543                                         c and d known)
16544     13) two-sided power                 (theta, n)
16545     14) Johnson SU                      (alpha1, alpha2)
16546     15) Johnson SB                      (alpha1, alpha2)
16547     16) alpha                           (alpha1, alpha2)
16548     17) Gompertz                        (c, b)
16549     18) g and h                         (g, h)
16550     19) F                               (nu1, nu2)
16551     20) log skew normal                 (lambda, sd)
16552     21) power lognormal                 (nu, sd)
16553     22) folded normal                   (mu, sd)
16554     23) folded Cauchy                   (loc, scale)
16555     24) skew t                          (nu, lambda)
16556     25) noncentral t                    (nu, lambda)
16557     26) noncentral chi-square           (nu, lambda)
16558     27) truncated exponential           (m, sd, assume truncation point,
16559                                         X0, is known)
16560     28) generalized Tukey-Lambda        (lambda3, lambda4)
16561     29) Gompertz-Makeham                (eta, zeta)
16562     30) generalized asymmetric Laplace  (k, tau or mu, tau)
16563     31) generalized McLeish             (alpha, a)
16564     32) trapezoid                       (b, c, assume a and d known)
16565     33) generalized logistic type 4     (p, q)
16566
16567    PPCC plots are available for the following discrete distributional
16568    families (with the distributional parameter in parentheses):
16569
16570      1) geometric               (p)
16571      2) Yule                    (p)
16572      3) Poisson                 (lambda)
16573      4) binomial                (p, assume n known)
16574      5) logarithmic series      (theta)
16575      6) Consul                  (theta or m)
16576      7) zeta                    (alpha)
16577      8) Hermite                 (alpha, beta)
16578      9) beta geometric          (alpha, beta)
16579     10) beta-binomial           (alpha, beta assume n known)
16580     11) Katz                    (alpha, beta)
16581     12) negative binomial       (k, p)
16582     13) zipf                    (alpha, n)
16583     14) discrete Weibull        (beta, q)
16584     15) Borel-Tanner            (lambda, k)
16585     16) Lagrange Poisson        (lambda, theta)
16586     17) Polya-Aeppli            (theta, p)
16587     18) lost games              (p, n)
16588     19) generalized loga series (theta, beta)
16589     20) geeta                   (theta, beta or mu, beta)
16590     21) generalized lost games  (p, a, assume j known)
16591
16592    The percent point function for the discrete distributions is a
16593    step function (since X is restricted to integer values).  This can
16594    result in non-smooth ppcc and probability plots.  For discrete
16595    distributions, the KS PLOT (which will plot the minimum value
16596    of chi-square statistic) is recommended over the PPCC PLOT as
16597    long as the sample size is reasonably large.
16598
16599Syntax 1:
16600    <family>  PPCC PLOT  <y>   <SUBSET/EXCEPT/FOR/qualification>
16601    where <y> is the variable of raw data values under analysis;
16602          <family> is one of the distributions listed above:
16603              WEIBULL, DOUBLE WEIBULL, INVERTED WEIBULL,
16604              GAMMA, DOUBLE GAMMA, LOG GAMMA, INVERTED GAMMA,
16605              WALD, FATIGUE LIFE, PARETO, PARETO SECOND KIND,
16606              GENERALIZED PARETO, GENERALIZED HALF LOGISTIC,
16607              FRECHET (for extreme value type 2),
16608              GENERALIZED EXTREME VALUE, EXTREME VALUE,
16609              GEOMETRIC EXTREME EXPONENTIAL,
16610              TUKEY LAMBDA, SKEW NORMAL, T, FOLDED T,
16611              CHI-SQUARE, CHI, GENERALIZED LOGISTIC,
16612              LOG DOUBLE EXPONENTIAL, ERROR, LOGNORMAL,
16613              POWER NORMAL, VON MISES, RECIPROCAL, LOG LOGISTIC,
16614              WRAPPED CAUCHY,
16615              INVERSE GAUSSIAN, RECIPROCAL INVERSE GAUSSIAN,
16616              GENERALIZED GAMMA, EXPONENTIATED WEIBULL,
16617              EXPONENTIAL POWER, BETA, INVERTED BETA,
16618              TWO SIDED POWER, JOHNSON SU, JOHNSON SB, ALPHA,
16619              GOMPERTZ, G AND H, F, LOG SKEW NORMAL,
16620              POWER LOGNORMAL, FOLDED NORMAL,
16621              FOLDED CAUCHY, SKEW T, NONCENTRAL T,
16622              GEOMTRIC, YULE, POISSON, LOGARITHMIC SERIES,
16623              HERMITE, BETA BINOMIAL, NEGATIVE BINOMIAL,
16624              WARING
16625    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
16626
16627    This syntax is used for the raw data case.
16628
16629    Note that the response variable can also be a matrix.  If a matrix
16630    name is encountered, a ppcc plot  will be drawn for all the values
16631    in the matrix.
16632
16633    The syntax PPCC PLOT can be replaced with ANDERSON DARLING PLOT,
16634    KOLMOGOROV SMIRNOV PLOT, or  CHI-SQUARE PLOT to generate the
16635    Anderson-Darling, Kolmogorov-Smirnov, and chi-square variants of
16636    the plot, respectively.
16637
16638Syntax 2:
16639    <family>  PPCC  PLOT  <y>  <x>   <SUBSET/EXCEPT/FOR/qualification>
16640    where <y> is the variable of pre-computed frequencies;
16641          <x> is the variable of distinct values for the variable
16642              under analysis;
16643          <family> is one of the families listed above;
16644    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
16645
16646    This syntax is used for the binned data case where the bins
16647    are defined by the mid-points of each bin.
16648
16649    The syntax PPCC PLOT can be replaced with CHI-SQUARE PLOT to
16650    generate the chi-square variant of the plot.  This syntax is
16651    not supported for the Anderson-Darling and Kolmogorov-Smirnov
16652    variants of the plot.
16653
16654Syntax 3:
16655    <family>  PPCC  PLOT  <y>  <xlow>  <xhigh>
16656                          <SUBSET/EXCEPT/FOR/qualification>
16657    where <y> is the variable of pre-computed frequencies;
16658          <xlow> is the variable containing the lower limits for the
16659              bins;
16660          <xhigh> is the variable containing the upper limits for the
16661              bins;
16662          <family> is one of the families listed above;
16663    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
16664
16665    This syntax is used for the binned data case where the bins
16666    are defined by the lower and upper limits of the bins (i.e.,
16667    the bins can be of unequal width).
16668
16669    The syntax PPCC PLOT can be replaced with CHI-SQUARE PLOT to
16670    generate the chi-square variant of the plot.  This syntax is
16671    not supported for the Anderson-Darling and Kolmogorov-Smirnov
16672    variants of the plot.
16673
16674Syntax 4:
16675    <family>  CENSORED PPCC PLOT  <y>  <x>
16676                             <SUBSET/EXCEPT/FOR/qualification>
16677    where <y> is the variable of raw data values under analysis;
16678          <x> is the censoring variabe;
16679          <family> is one of the distributions listed above;
16680    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
16681
16682    This syntax is used for the raw data case where there is
16683    censoring.  A value of 1 indicates a failure time and a value
16684    of 0 indicates a censoring time.
16685
16686    Censoring is not supported for discrete disributions or grouped
16687    data.  It is also not supported for the Anderson-Darling,
16688    Kolmogorov-Smirnov, and chi-square variants of the plot.
16689
16690Syntax 5:
16691    <family>  CENSORED PPCC  PLOT  <y>  <censor>  <x>
16692                                   <SUBSET/EXCEPT/FOR/qualification>
16693    where <y> is the variable of pre-computed frequencies;
16694          <censor> is the censoring variabe;
16695          <x> is the variable of distinct values for the variable
16696              under analysis;
16697          <family> is one of the families listed above;
16698    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
16699
16700    This syntax is used for the case where we have frequency (binned)
16701    data with censoring.  The bins are defined by their mid-points.
16702    When a particular bin has both censored and uncensored data,
16703    there will be 2 rows with the same value for <x>.
16704
16705    A value of 1 indicates a failure time and a value of 0 indicates
16706    a censoring time.
16707
16708    Censoring is not supported for discrete disributions or grouped
16709    data.  It is also not supported for the Anderson-Darling,
16710    Kolmogorov-Smirnov, and chi-square variants of the plot.
16711
16712Syntax 6:
16713    <family>  CENSORED PPCC  PLOT  <y>  <censor>  <xlow>  <xhigh>
16714                             <SUBSET/EXCEPT/FOR/qualification>
16715    where <y> is the variable of pre-computed frequencies;
16716          <censor> is the censoring variabe;
16717          <xlow> is the variable containing the lower limits for the
16718              bins;
16719          <xhigh> is the variable containing the upper limits for the
16720              bins;
16721          <family> is one of the families listed above;
16722    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
16723
16724    This syntax is used for the case where we have frequency (binned)
16725    data with censoring.  The bins are defined by their lower and upper
16726    limits.  This syntax allows bins with unequal widths.
16727    When a particular bin has both censored and uncensored data,
16728    there will be 2 rows with the same values for <xlow> and <xhigh>.
16729
16730    A value of 1 indicates a failure time and a value of 0 indicates
16731    a censoring time for the censoring variable.
16732
16733    Censoring is not supported for discrete disributions or grouped
16734    data.  It is also not supported for the Anderson-Darling,
16735    Kolmogorov-Smirnov, and chi-square variants of the plot.
16736
16737Syntax 7:
16738    <family>  REPLICATED PPCC PLOT  <y>  <x1> ... <xk>
16739                             <SUBSET/EXCEPT/FOR/qualification>
16740    where <y> is the variable of raw data values under analysis;
16741          <x1> ... <xk> is a list of one to two group id variables;
16742          <family> is one of the distributions listed above;
16743    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
16744
16745    The group-id variables are cross-tabulated and a ppcc
16746    plot will be generated for each distinct combination of values
16747    for the group-id variables.  These plots will be overlaid on the
16748    same plot.
16749
16750    The syntax PPCC PLOT can be replaced with ANDERSON DARLING PLOT,
16751    KOLMOGOROV SMIRNOV PLOT, or  CHI-SQUARE PLOT to generate the
16752    Anderson-Darling, Kolmogorov-Smirnov, and chi-square variants of
16753    the plot, respectively.
16754
16755Syntax 8:
16756    <family>  CENSORED REPLICATED PPCC PLOT  <y>  <x>  <x1> .... <xk>
16757                             <SUBSET/EXCEPT/FOR/qualification>
16758    where <y> is the variable of raw data values under analysis;
16759          <x> is the censoring variabe;
16760          <x1> ... <xk> is a list of one to two group id variables;
16761          <family> is one of the distributions listed above;
16762    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
16763
16764    The group-id variables are cross-tabulated and a ppcc
16765    plot will be generated for each distinct combination of values
16766    for the group-id variables.  These plots will be overlaid on the
16767    same plot.
16768
16769    Censoring is not supported for discrete disributions or grouped
16770    data.  It is also not supported for the Anderson-Darling,
16771    Kolmogorov-Smirnov, and chi-square variants of the plot.
16772
16773Syntax 9:
16774    <family>  REPLICATED GROUPED PPCC  PLOT  <y>  <x>  <x1> ... <xk>
16775                          <SUBSET/EXCEPT/FOR/qualification>
16776    where <y> is the variable of pre-computed frequencies;
16777          <x> is the variable of distinct values for the variable
16778              under analysis;
16779          <x1> ... <xk> is a list of one to two group id variables;
16780          <groupid> is a group id variable;
16781          <family> is one of the families listed above;
16782    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
16783
16784    This syntax is used for the binned data case where there are
16785    multiple batches of data.  The bins are defined by the mid-points
16786    of each bin and there are multiple batches of data.
16787
16788    The syntax PPCC PLOT can be replaced with CHI-SQUARE PLOT to
16789    generate the chi-square variant of the plot.  This syntax is
16790    not supported for the Anderson-Darling and Kolmogorov-Smirnov
16791    variants of the plot.
16792
16793Syntax 10:
16794    <family>  REPLICATED UNEQUAL GROUPED PPCC  PLOT
16795                         <y>  <xlow>  <xhigh>  <x1> ... <xk>
16796                         <SUBSET/EXCEPT/FOR/qualification>
16797    where <y> is the variable of pre-computed frequencies;
16798          <xlow> is the variable containing the lower limits for the
16799              bins;
16800          <xhigh> is the variable containing the upper limits for the
16801              bins;
16802          <x1> ... <xk> is a list of one to two group id variables;
16803          <family> is one of the families listed above;
16804    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
16805
16806    This syntax is used for the binned data case where there are
16807    multiple batches of data.  The bins are defined by the lower and
16808    upper limits of the bins (i.e., the bins can be of unequal width).
16809
16810    The syntax PPCC PLOT can be replaced with CHI-SQUARE PLOT to
16811    generate the chi-square variant of the plot.  This syntax is
16812    not supported for the Anderson-Darling and Kolmogorov-Smirnov
16813    variants of the plot.
16814
16815Syntax 11:
16816    <family>  MULTIPLE PPCC PLOT  <y1> ... <yk>
16817                             <SUBSET/EXCEPT/FOR/qualification>
16818    where <family> is one of the distributions listed above;
16819          <y1> ... <yk> is a list of response variables;
16820    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
16821
16822    Note that the response variables can also be matrices.  If a
16823    matrix name is encountered, a ppcc plot  will be drawn for
16824    all the values in the matrix.  For multiple response variables,
16825    the ppcc plots will be overlaid on the same plot.
16826
16827    The syntax PPCC PLOT can be replaced with ANDERSON DARLING PLOT,
16828    KOLMOGOROV SMIRNOV PLOT, or  CHI-SQUARE PLOT to generate the
16829    Anderson-Darling, Kolmogorov-Smirnov, and chi-square variants of
16830    the plot, respectively.
16831
16832Examples:
16833    LAMBDA PPCC PLOT X
16834    T PPCC PLOT X
16835    EXTREME VALUE TYPE 2 PPCC PLOT X
16836    POISSON PPCC PLOT X
16837    LAMBDA PPCC PLOT F X
16838    T PPCC PLOT F X
16839    EXTREME VALUE TYPE 2 PPCC PLOT F X
16840    POISSON PPCC PLOT F X
16841
16842Note:
16843    The PPCC is not the only goodness of fit criterion that
16844    can be used.  The following additional options are available:
16845
16846        KOLMOGOROV-SMIRNOV PLOT (or KS PLOT)
16847        ANDERSON DARLING PLOT   (or AD PLOT)
16848        CHI-SQUARE PLOT         (or CHISQUARE PLOT)
16849
16850    Currently, these alternatives are limited to the uncensored
16851    case.  In addition, the KS PLOT and AD PLOT are restricted to
16852    the raw data case and the CHI-SQUARE PLOT is restricted to
16853    the binned data case.
16854
16855    Note that the PPCC method is invariant to location and scale.
16856    This basically means that we can use the underlying probability
16857    plot to estimate the location and scale parameters.
16858
16859    These other methods are not invariant to location and scale.
16860    By default, we still use the estimates from the underlying
16861    probability plot to estimate location and scale.  Although
16862    these estimates may not be "optimal", they should at least
16863    be reasonable.  However, you can fix the estimates of location
16864    and scale by entering the commands
16865
16866        LET KSLOC   = <value>
16867        LET KSSCALE = <value>
16868
16869    These apply to the Kolmogorov-Smirnov, Anderson-Darling, and
16870    chi-square variants of the plot.
16871
16872Note:
16873    For information on how the Kolmogorov-Smirnov, Anderson-Darling,
16874    and chi-square goodness of fit statistics are computed, enter
16875
16876        HELP GOODNESS OF FIT
16877
16878Note:
16879    The chi-square variant of the plot is most frequently used when the
16880    data are received in pre-binned form (for raw data, the PPCC,
16881    Anderson-Darling or Kolmogorov-Smirnov variants are typically
16882    preferred).  However, you can use the chi-square test for raw data
16883    (you typically will want to have a reasonably large data set before
16884    doing this).  For raw data, you can specify the binning with the
16885    commands CLASS WIDTH, CLASS LOWER, and CLASS UPPER.  The default
16886    class width is 0.3 times the sample standard deviation.  To
16887    specify other default algorithms, enter
16888
16889         HELP HISTOGRAM CLASS WIDTH
16890
16891    The chi-square test is sensitive to the choice of bins.  There is no
16892    optimal choice for the bin width (since the optimal bin width
16893    depends on the distribution).  Most reasonable choices should
16894    produce similar, but not identical, results.
16895
16896    For the chi-square approximation to be valid, the expected frequency
16897    should be at least 5.  The chi-square approximation may not be valid
16898    for small samples, and if some of the counts are less than five, you
16899    may need to combine some bins in the tails.
16900
16901Note:
16902    The range of parameter is determined automatically.  However, if
16903    you wish to restrict the range, you can specify the lower and upper
16904    limits by appending a 1 or 2 to the parameter name and assigning
16905    a value.  For example, to restrict a Weibull ppcc plot to values
16906    0.5 and 20, do the following:
16907
16908       LET GAMMA1 = 0.5
16909       LET GAMMA2 = 20
16910       WEIBULL PPCC PLOT Y
16911
16912    A common use of this is to obtain a refinement of the estimate
16913    of the shape parameter.  That is, an initial iteration (typically
16914    just the default values of the parameter) is used to identify
16915    the appropriate neighborhood of the optimal value of the shape
16916    parameter.  Then a second iteration of the PPCC PLOT is generated
16917    with the parameter restricted to a much narrower range of values.
16918    Although this iteration can be repeated as many times as you
16919    like, for practical purposes a two iterations is typically sufficient.
16920
16921Note:
16922    The PPCC PLOT automatically saves several parameters.  The MAXPPCC
16923    parameter contains the maximum correlation that was computed and
16924    the SHAPE parameter contains the value of the estimated
16925    distributional parameter (e.g., GAMMA for the Weibull distribution)
16926    that corresponds to MAXPPCC.
16927
16928    In the case of two shape parameters, these are saved as SHAPE1 and
16929    SHAPE2.
16930
16931Note:
16932    For the truncated exponential distribution, we assume that the
16933    truncation parameter, X0, is known.  To set this value, enter
16934
16935        LET X0 = <value>
16936
16937    before generating the ppcc plot.
16938
16939    For the noncentral t and noncentral chi-square distributions,
16940    we can fix the value of the degrees of freedom parameter to a
16941    single value.  In this case, the ppcc plot reverts to a
16942    one shape parameter plot.  Enter the commands
16943
16944        LET NU1 = <value>
16945        LET NU2 = <value>
16946
16947    where <value> is the same for NU1 and NU2.
16948
16949Note:
16950    The SET MINMAX command can be used to specify a minimum or maximum
16951    Weibull distribution.  A value of 1 specifies a maximum Weibull
16952    distribution and a value of 2 specifies a minimum Weibull
16953    distribution.
16954
16955Note:
16956    When the percent point function is expensive to compute, the
16957    PPCC plot can take a long time to generate.  Two approaches
16958    to this are:
16959
16960       1) You can bin the data before generating the PPCC plot.
16961
16962       2) As an alternative to binning, you can use the command
16963
16964             SET PPCC PLOT DATA POINTS <value>
16965
16966          With this command, Dataplot will generate <value> equally
16967          spaced percentiles of the data.  The PPCC plot is then
16968          generated on these percentiles.
16969
16970          If the number of data points in the response variable
16971          is less than <value>, then the full data set is used.
16972
16973          The minimum number for <value> is 25.  Numbers in the
16974          range 50 to 200 are typically used.
16975
16976Note:
16977    In the one shape parameter case, 50 values of the shape
16978    parameter are used.  For the two shape parameter case, the
16979    number of values used is dependent on the specific distribution.
16980    Typically, between 25 and 50 values are used in each direction.
16981
16982    You can modify the number values used for the shape parameters
16983    by entering the command
16984
16985        SET PPCC PLOT AXIS POINTS  <val1>  <val2>
16986
16987    where <val1> is the number of values for the first shape
16988    parameter and <val2> is the number of values for the second
16989    shape parameter.
16990
16991    There are two typical uses for this command:
16992
16993       1) For distributions with a fast percent point function
16994          (e.g., the Weibull), you can increase the number of values
16995          in order to generate a more accurate estimate.
16996
16997       2) For distributions with slow percent point functions,
16998          you might want to decrease the number of points in order
16999          to increase the speed of the PPCC plot.
17000
17001Note:
17002    For discrete distributions, the data will typically consist of
17003    integers.  In this case, it is helpful to group the data based
17004    on these integer values.  The following code shows the
17005    recommended way for doing this:
17006
17007      LET YLOW = MINIMUM Y
17008      LET YUPP = MAXIMUM Y
17009      LET YLOW = YLOW - 0.5
17010      CLASS LOWER YLOW
17011      LET YUPP = YUPP + 0.5
17012      CLASS UPPER YUPP
17013      CLASS WIDTH = 1
17014      LET Y2 X2 = BINNED Y
17015      LET LAMBDA = 4.2
17016      POISSON PPCC PLOT Y2 X2
17017      POISSON KS PLOT Y2 X2
17018
17019    This will center the bins around the integer values and will
17020    cover the first and last class.
17021
17022    In this case, the KS PLOT syntax will generate a plot that
17023    shows the minimum value of the chi-square statistic.  It is
17024    usually recommended that the minimum bin size be at least 5 in
17025    order for the chi-square goodness of fit to generate accurate
17026    critical values.  You can automatically combine bins with the
17027    command
17028
17029       LET MINSIZE = <value>
17030       LET Y3 XLOW XHIGH = COMBINE FREQUENCY TABLE Y2 X2
17031
17032Note:
17033    For the PPCC PLOT and the KS PLOT, the location and scale
17034    parameters are estimated via the probability plot.  For
17035    long-tailed distributions, more accurate estimates may be
17036    obtained by applying a biweight fit of the probability plot.
17037    To specify this option, enter the command
17038
17039         SET PPCC PLOT LOCATION SCALE BIWEIGHT
17040
17041    To restore the use of the regular least squares estimates
17042    of location and scale, enter
17043
17044         SET PPCC PLOT LOCATION SCALE DEFAULT
17045
17046    This option is primarily for the KS PLOT.  Since the
17047    PPCC PLOT is invariant to location and scale, we can
17048    simply wait to compute the biweight location and scale
17049    on the final probability plot.  However, the KS PLOT is
17050    not invariant for location and scale and for long-tailed
17051    distributions this option can sometimes lead to improved
17052    estimates for the parameters.
17053
17054Note:
17055    The TO syntax is supported for the PPCC PLOT command.
17056    It is most useful for the MULTIPLE version of the command.
17057
17058Note:
17059    The chi-square variant of the plot can sometimes produce very
17060    large numbers.  To improve the plot resolution for the smaller
17061    values of the chi-square statistic (which is the area of interest)
17062    you can provide a truncation value (i.e., values of the chi-square
17063    statistic greater than the truncation value will be set to the
17064    truncation value), enter the command
17065
17066        SET CHISQUARE LIMIT <value>
17067
17068Note:
17069    For the PPCC PLOT command, Dataplot fits a least squares line
17070    to the points on the underlying probability plot.  For the
17071    AD PLOT, KS PLOT, and CHI-SQUARE PLOT variants, this least
17072    squares fit is used to obtain estimates for the location and
17073    scale parameters.
17074
17075    Alternatively, you can specify that Dataplot fit a robust regression
17076    using the biweight method by entering the command
17077
17078        SET PPCC PLOT LOCATION SCALE BIWEIGHT
17079
17080    To reset the default of non-robust least squares, enter
17081
17082        SET PPCC PLOT LOCATION SCALE DEFAULT
17083
17084    In our experience, this option can be useful for heavy tailed
17085    distributiuons such as the SLASH and CAUCHY distributions.
17086
17087Default:
17088    None
17089
17090Synonyms:
17091    AD PLOT is a synonym for ANDERSON DARLING PLOT
17092    KS PLOT is a synonym for KOLMOGOROV SMIRNOV PLOT
17093
17094    FRECHET and EV2 are synonyms for EXTREME VALUE TYPE 2.
17095
17096    LAMBDA PPCC PLOT and TUKEY PPCC PLOT are synonyms for TUKEY LAMBDA
17097    PPCC PLOT.
17098
17099    STUDENT T PPCC PLOT is a synonym for T PPCC PLOT.
17100
17101    The CHISQUARE term can be specified as CHISQUARE or CHI SQUARE.
17102
17103    FL PPCC PLOT, BRIN SAUNDERS PPCC PLOT, and SAUNDERS BRIN are
17104    synonyms for FATIGUE LIFE PPCC PLOT.
17105
17106    IG PPCC PLOT is a synonym for INVERSE GAUSSIAN PPCC PLOT.
17107
17108    RIG PPCC PLOT is a synonym for RECIPROCAL INVERSE GAUSSIAN PPCC
17109    PLOT.
17110
17111    GEP PPCC PLOT and GP PPCC PLOT are synonyums for GENERALIZED
17112    PARETO PLOT.
17113
17114    LOGNORMAL PPCC PLOT and LOG-NORMAL PPCC PLOT are synonyms for
17115    LOG NORMAL PPCC PLOT.
17116
17117    POWER LOG-NORMAL PPCC PLOT and POWER LOGNORMAL PPCC PLOT are
17118    synonyms for POWER LOG NORMAL PPCC PLOT.
17119
17120    VONMISES PPCC PLOT and VON-MISES PPCC PLOT are synonyms for
17121    VON MISES PPCC PLOT.
17122
17123    LOGLOGISTIC PPCC PLOT and LOG-LOGISTIC PPCC PLOT are synonyms for
17124    LOG LOGISTIC PPCC PLOT.
17125
17126    SKEW LAPLACE PPCC PLOT is a synonym for
17127    SKEW DOUBLE EXPONENTIAL PPCC PLOT.
17128
17129    ASYMMETRIC LAPLACE PPCC PLOT is a synonym for
17130    ASYMMETRIC DOUBLE EXPONENTIAL PPCC PLOT.
17131
17132Related Commands:
17133    PROBABILITY PLOT   = Generates a probability plot.
17134    FREQUENCY PLOT     = Generates a frequency plot.
17135    HISTOGRAM          = Generates a histogram.
17136    PIE CHART          = Generates a pie chart.
17137    PERCENT POINT PLOT = Generates a percent point plot.
17138    PLOT               = Generates a data or function plot.
17139
17140Reference:
17141    James J. Filliben (1975), "The Probability Plot Correlation
17142    Coefficient Test for Normality," Technometric, Vol. 17, No. 1.
17143
17144Applications:
17145    Distributional Modeling
17146
17147Implementation Date:
17148    Pre-1987
17149    1990/5: Implemented IG, WALD, RIG, FL distributions.
17150    1993/12: Implemented GENERALIZED PARETO distribution.
17151    1995/5: Implemented LOGNORMAL, POWER NORMAL, POWER LOGNORMAL,
17152            POWER FUNCTION, CHI, VON MISES, and LOG LOGISTIC
17153            distributions implemented 95/5.
17154    2001/10: Implemented a number of 2 shape parameter distributions.
17155    2002/5: Implemented TWO-SIDED POWER distribution.
17156    2003/5: Implemented ERROR distribution.
17157    2004/1: Implemented FOLDED T, SKEWED T, SKEWED NORMAL, G AND H,
17158            INVERTED BETA distributions.
17159    2004/1: Support for additional two shape parameter distributions.
17160    2004/5: Added support for the SET PPCC FORMAT command
17161    2004/5: Fixed a number of bugs in various distributions.
17162    2004/5: Fixed a number of bugs in various distributions.
17163    2004/6: Implemented SKEW DOUBLE EXPONENTIAL, ASYMMETRIC DOUBLE
17164            EXPONENTIAL, MAXWELL
17165    2004/7: Implemented Meeker re-parametrization for GOMPERTZ MAKEHAM
17166    2004/9: Implemented GENERALIZED ASYMETRIC LAPLACE, BINOMIAL,
17167            MCLEISH, GENERALIZED MCLEISH
17168    2004/9: Implemented SET PPCC PLOT DATA POINTS
17169    2004/9: Implemented SET PPCC PLOT AXIS POINTS
17170    2004/9: Implemented SET PPCC PLOT AXIS ORDER
17171    2004/10: Implemented CENSORED case
17172    2005/5: Implemented REPLICATION case
17173    2005/5: Implemented binned case where bins are specified by
17174            the lower and upper limits (i.e., unequal width bins)
17175    2007/2: Implemented SET PPCC PLOT BIWEIGHT LOCATION SCALE
17176    2007/2: Implemented a additional distributions
17177    2009/10: Support for matrix arguments and TO syntax
17178    2009/10: Support for MULTIPLE and REPLICATION options
17179    2009/10: Support for ANDERSON DARLING variation
17180
17181Program 1:
17182    MULTIPLOT 2 2
17183    MULTIPLOT CORNER COORDINATES 0 0 100 100
17184    MULTIPLOT SCALE FACTOR 1.5
17185    TITLE AUTOMATIC
17186    X1LABEL THEORETICAL VALUE
17187    Y1LABEL DATA VALUE
17188    TITLE OFFSET 2
17189    X1LABEL DISPLACEMENT 10
17190    Y1LABEL DISPLACEMENT 14
17191    CHAR X
17192    LINE BLANK
17193    JUSTIFICATION RIGHT
17194    .
17195    LET LAMBDA = 1.5
17196    LET Y = TUKEY LAMBDA RANDOM NUMBERS FOR I = 1 1 100
17197    TUKEY LAMBDA PPCC PLOT Y
17198    MOVE 82 30
17199    TEXT LAMBDA = ^SHAPE
17200    MOVE 82 25
17201    TEXT PPCC = ^MAXPPCC
17202    .
17203    LET NU = 4
17204    LET Y = T RANDOM NUMBERS FOR I = 1 1 100
17205    T PPCC PLOT Y
17206    MOVE 82 30
17207    TEXT NU = ^SHAPE
17208    MOVE 82 25
17209    TEXT PPCC = ^MAXPPCC
17210    .
17211    LET GAMMA = 2.3
17212    LET Y = WALD RANDOM NUMBERS FOR I = 1 1 100
17213    WALD PPCC PLOT Y
17214    MOVE 82 30
17215    TEXT GAMMA = ^SHAPE
17216    MOVE 82 25
17217    TEXT PPCC = ^MAXPPCC
17218    .
17219    LET GAMMA = 1.6
17220    LET Y = WEIBULL RANDOM NUMBERS FOR I = 1 1 100
17221    SET PPCC PLOT AXIS POINTS 200
17222    LET GAMMA1 = 0.2
17223    LET GAMMA2 = 25
17224    LINE SOLID
17225    CHARACTER BLANK
17226    WEIBULL PPCC PLOT Y
17227    MOVE 82 30
17228    TEXT GAMMA = ^SHAPE
17229    MOVE 82 25
17230    TEXT PPCC = ^MAXPPCC
17231    .
17232    END OF MULTIPLOT
17233
17234Program 2:
17235    let gamma = 5.1
17236    let y = weibull rand numb for i = 1 1 200
17237    .
17238    let gamma1 = 0.5
17239    let gamma2 = 50
17240    set ppcc plot axis points 449
17241    .
17242    multiplot corner coordinates 2 2 98 98
17243    multiplot scale factor 2
17244    multiplot 2 2
17245    title automatic
17246    title offset 2
17247    justification center
17248    height 1.7
17249    tic mark offset units screen
17250    ytic mark offset 3 0
17251    .
17252    weibull ppcc plot y
17253    let shape = round(shape,1)
17254    let maxppcc2 = round(maxppcc,3)
17255    move 50 5
17256    text Shape: ^shape, Max PPCC: ^maxppcc2
17257    .
17258    weibull anderson darling plot y
17259    let shape = round(shape,1)
17260    let minad2 = round(minad,3)
17261    move 50 5
17262    text Shape: ^shape, Min AD: ^minad2
17263    .
17264    weibull ks plot y
17265    let shape = round(shape,1)
17266    let minks = round(minks,3)
17267    move 50 5
17268    text Shape: ^shape, Min KS: ^minks
17269    .
17270    set chisquare limit 100
17271    weibull chi-square plot y
17272    let shape = round(shape,1)
17273    let minchsq = round(minchisq,3)
17274    move 50 5
17275    text Shape: ^shape, Min Chi-Square: ^minchsq
17276    .
17277    end of multiplot
17278
17279-----PRECISION (LET)------------------------------
17280
17281PRECISION
17282
17283Name:
17284    PRECISION (LET)
17285
17286Type:
17287    Let Subcommand
17288
17289Purpose:
17290    Compute the precision of a variable.
17291
17292Description:
17293    The sample precision is defined as the reciprocal of the sample
17294    variance.  That is
17295
17296        Prec = (n-1)/SUM[i=1 to n][(X(i) - xbar)**2]
17297
17298    where n and xbar denote the sample size and the sample mean,
17299    respectively.
17300
17301    Note that high variance implies low precision while low variance
17302    implies high precision.
17303
17304    Some sources define the precision as the reciprocal of the standard
17305    deviation.
17306
17307Syntax 1:
17308    LET <par> = PRECISION <y>    <SUBSET/EXCEPT/FOR qualification>
17309    where <y> is a response variable;
17310          <par> is a parameter where the precision value is saved;
17311    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
17312
17313Syntax 2:
17314    LET <par> = DIFFERENCE OF PRECISION <y1> <y2>
17315                <SUBSET/EXCEPT/FOR qualification>
17316    where <y1> is the first response variable;
17317          <y2> is the second response variable;
17318          <par> is a parameter where the difference of precision
17319              values is saved;
17320    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
17321
17322Examples:
17323    LET PREC = PRECISION Y1
17324    LET PREC = PRECISION Y1 SUBSET TAG > 2
17325
17326    LET DIFFPREC = DIFFERENCE OF PRECISION Y1 Y2
17327
17328Note:
17329    Dataplot statistics can be used in a number of commands.  For
17330    details, enter
17331
17332         HELP STATISTICS
17333
17334Default:
17335    None
17336
17337Synonyms:
17338    None
17339
17340Related Commands:
17341    VARIANCE                 = Compute the variance of a variable.
17342    MEAN                     = Compute the mean of a variable.
17343    STANDARD DEVIATION       = Compute the standard deviation of a
17344                               variable.
17345
17346Applications:
17347    Data Analysis
17348
17349Implementation Date:
17350    2017/01
17351    2017/03: Added DIFFERENCE OF PRECISION
17352
17353Program 1:
17354    SKIP 25
17355    READ ZARR13.DAT Y
17356    LET P = PRECISION Y
17357
17358Program 2:
17359    . Step 1:   Create the data
17360    .
17361    skip 25
17362    read gear.dat y x
17363    skip 0
17364    .
17365    char X
17366    line blank
17367    y1label Precision
17368    x1label Group
17369    x1tic mark offset 0.5 0.5
17370    label case asis
17371    title case asis
17372    title Precision of GEAR.DAT
17373    title offset 2
17374    .
17375    set statistic plot reference line average
17376    precision plot y x
17377    .
17378    set write decimals 5
17379    tabulate precision y x
17380
17381Program 3:
17382    SKIP 25
17383    READ IRIS.DAT Y1 TO Y4 X
17384    .
17385    LET A = DIFFERENCE OF PRECISION Y1 Y2
17386    SET WRITE DECIMALS 4
17387    TABULATE DIFFERENCE OF PRECISION Y1 Y2 X
17388    .
17389    XTIC OFFSET 0.2 0.2
17390    X1LABEL GROUP ID
17391    Y1LABEL DIFFERENCE OF PRECISION
17392    CHAR X
17393    LINE BLANK
17394    DIFFERENCE OF PRECISION PLOT Y1 Y2 X
17395    CHAR X ALL
17396    LINE BLANK ALL
17397    BOOTSTRAP DIFFERENCE OF PRECISION PLOT Y1 Y2 X
17398
17399-----PRED-------------------------------------------------------
17400
17401PRED
17402
17403Name:
17404    PRED
17405
17406Type:
17407    Keyword
17408
17409Purpose:
17410    An internal DATAPLOT variable into which the predicted values
17411    (i.e., "fitted values") are automatically placed whenever the FIT,
17412    PRE-FIT, SPLINE FIT, EXACT RATIONAL FIT, YATES ANALYSIS, LOWESS,
17413    SMOOTH, ANOVA, and MEDIAN POLISH commands are executed.
17414
17415Description:
17416    PRED can be used by the analyst in whatever fashion desired.  A
17417    very common post-fit operation is to superimpose the predicted
17418    values atop the raw data as a visual check of model adequacy.  This
17419    is usually done via
17420          CHARACTERS X BLANK
17421          LINES BLANK SOLID
17422          PLOT Y PRED VERSUS X
17423
17424Syntax:
17425    None
17426
17427Examples:
17428    WRITE X Y PRED RES
17429    PLOT Y PRED VERSUS X
17430    WRITE CALIB. X Y PRED RES
17431    LET PREDNEW = PRED
17432
17433Default:
17434    None
17435
17436Synonyms:
17437    None
17438
17439Related Commands:
17440    RES                = A variable where residuals are stored.
17441    RESSD              = A parameter where the residual standard
17442                         deviation is stored.
17443    RESDF              = A parameter where the residual degrees of
17444                         freedom is stored.
17445    REPSD              = A parameter where the replication standard
17446                         deviation is stored.
17447    REPDF              = A parameter where the replication degrees of
17448                         freedom is stored.
17449    LOFCDF             = A parameter where the lack of fit cdf is
17450                         stored.
17451    FIT                = Carries out a least squares linear or
17452                         non-linear fit.
17453    EXACT RATIONAL FIT = Carries out an exact rational fit.
17454    PRE-FIT            = Carries out a least squares pre-fit.
17455    SPLINE FIT         = Carries out a spline fit.
17456    YATES ANALYSIS     = Carries out an analysis of a Yates design.
17457    LOWESS             = Carries out a locally weighted least squares
17458                         fit.
17459    SMOOTH             = Carries out a smoothing.
17460    ANOVA              = Carries out an ANOVA.
17461    MEDIAN POLISH      = Carries out a median polish.
17462    PLOT               = Generates a data/function plot.
17463
17464Applications:
17465    Fitting
17466
17467Implementation Date:
17468    Pre-1987
17469
17470Program:
17471    SKIP 25
17472    READ BERGER1.DAT Y X
17473    CHARACTER X BLANK
17474    LINE BLANK SOLID
17475    PLOT Y PRED VS X
17476
17477-----PREDICTION BOUNDS--------------------------------------
17478
17479PREDICTION BOUNDS
17480
17481Name:
17482    PREDICTION BOUNDS
17483
17484Type:
17485    Analysis Command
17486
17487Purpose:
17488    Generates prediction bounds for all m new observations given a
17489    previous sample.
17490
17491Description:
17492    Given a sample of n observations with mean xbar and standard
17493    deviation s, the two-sided prediction interval to contain all of
17494    m new indpendent, identically distributed observations is
17495
17496       xbar +/- r(1-alpha,m,n)*s
17497
17498    A conservative approximation for r(1-alpha,m,n) is
17499
17500       SQRT(1 + (1/n))*t(1-alpha/(2*m);n-1)
17501
17502    with t denoting the t percent point function.  Dataplot uses the
17503    tabulated values given in Table A.13 of Hahn and Meeker when
17504    n and m are both less than or equal to 10.  Otherwise, the
17505    approximation above is used.
17506
17507    The corresponding one-sided interval is
17508
17509       lower limit = xbar - r'(1-alpha,m,n)*s
17510       upper limit = xbar + r'(1-alpha,m,n)*s
17511
17512    A conservative approximation for r'(1-alpha,m,n) is
17513
17514       SQRT(1 + (1/n))*t(1-alpha/*m;n-1)
17515
17516    with t denoting the t percent point function.  Dataplot uses the
17517    tabulated values given in Table A.14 of Hahn and Meeker when
17518    n and m are both less than or equal to 10.  Otherwise, the
17519    approximation above is used.
17520
17521    In the formula above, the only value from the new observations is
17522    the sample size.  That is, it can be applied before the new data is
17523    actually collected.  The number of observations for the new sample
17524    is entered with the command
17525
17526        LET NNEW = <value>
17527
17528    If NNEW is not defined, then a value of 1 is used.
17529
17530    The difference between the PREDICTION BOUNDS command and the
17531    PREDICTION LIMITS command is that the PREDICTION LIMITS command
17532    generates a prediction interval for the mean of m new observations
17533    while the PREDICTION BOUNDS command generates a prediction interval
17534    to contain all of the new observations.
17535
17536    This prediction interval is based on the assumption that the
17537    underlying data is approximately normally distributed.  Due to the
17538    central limit thereom, prediction limits for the mean are fairly
17539    robust against non-normality.  However, the central limit thereom
17540    does not apply to prediction intervals to cover all of the new
17541    observations.  So the PREDICTION BOUNDS command is much more
17542    sensitive to non-normality than is the PREDICTION LIMITS command.
17543
17544Syntax 1:
17545    <LOWER/UPPER> <LOGNORMAL/BOXCOX> PREDICTION BOUNDS   <y>
17546                                     <SUBSET/EXCEPT/FOR qualification>
17547    where <y> is the response variable;
17548    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
17549
17550    If LOWER is specified, a one-sided lower prediction limit is
17551    returned.  If UPPER is specified, a one-sided upper prediction
17552    limit is returned.  If neither is specified, a two-sided limit
17553    is returned.
17554
17555    If the keyword LOGNORMAL is present, the log of the data will be
17556    taken, then the normal prediction bounds will be computed, and then
17557    the computed normal lower and upper limits will be exponentiated to
17558    obtain the lognormal prediction bounds.
17559
17560    Similarly, if the keyword BOXCOX is present, a Box-Cox transformation
17561    to normality will be applied to the data before computing the normal
17562    prediction bounds.  The computed lower and upper limits will then
17563    be transformed back to the original scale.
17564
17565    This syntax supports matrix arguments for the response variable.
17566
17567Syntax 2:
17568    MULTIPLE <LOWER/UPPER> <LOGNORMAL/BOXCOX> PREDICTION BOUNDS
17569             <y1> ... <yk>    <SUBSET/EXCEPT/FOR qualification>
17570    where <y1>  .... <yk> is a list of 1 to 30 response variables;
17571    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
17572
17573    This syntax will generate a prediction interval for each of
17574    the response variables.
17575
17576    If LOWER is specified, a one-sided lower prediction limit is
17577    returned.  If UPPER is specified, a one-sided upper prediction
17578    limit is returned.  If neither is specified, a two-sided limit
17579    is returned.
17580
17581    If the keyword LOGNORMAL is present, the log of the data will be
17582    taken, then the normal prediction bounds will be computed, and then
17583    the computed normal lower and upper limits will be exponentiated to
17584    obtain the lognormal prediction bounds.
17585
17586    Similarly, if the keyword BOXCOX is present, a Box-Cox transformation
17587    to normality will be applied to the data before computing the normal
17588    prediction bounds.  The computed lower and upper limits will then
17589    be transformed back to the original scale.
17590
17591    This syntax supports matrix arguments for the response variables.
17592
17593Syntax 3:
17594    REPLICATED <LOWER/UPPER> <LOGNORMAL/BOXCOX> PREDICTION BOUNDS
17595               <y> <x1> ... <xk>    <SUBSET/EXCEPT/FOR qualification>
17596    where <y> is the response variable;
17597          <x1>  .... <xk> is a list of 1 to 6 group-id variables;
17598    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
17599
17600    This syntax performs a cross-tabulation of the <x1> ... <xk>
17601    and generates a prediction interval for each unique combination
17602    of the cross-tabulated values.  For example, if X1 has 3 levels
17603    and X2 has 2 levels, six prediction intervals will be generated.
17604
17605    If LOWER is specified, a one-sided lower prediction limit is
17606    returned.  If UPPER is specified, a one-sided upper prediction
17607    limit is returned.  If neither is specified, a two-sided limit
17608    is returned.
17609
17610    If the keyword LOGNORMAL is present, the log of the data will be
17611    taken, then the normal prediction bounds will be computed, and then
17612    the computed normal lower and upper limits will be exponentiated to
17613    obtain the lognormal prediction bounds.
17614
17615    Similarly, if the keyword BOXCOX is present, a Box-Cox transformation
17616    to normality will be applied to the data before computing the normal
17617    prediction bounds.  The computed lower and upper limits will then
17618    be transformed back to the original scale.
17619
17620    This syntax does not support matrix arguments.
17621
17622Examples:
17623    PREDICTION BOUNDS Y1
17624    PREDICTION BOUNDS Y1  SUBSET TAG > 2
17625    MULTIPLE PREDICTION BOUNDS Y1 TO Y5
17626    REPLICATED PREDICTION BOUNDS Y X
17627
17628Note:
17629    A table of prediction limits is printed for alpha levels of
17630    50.0, 80.0, 90.0, 95.0, 99.0, and 99.9.
17631
17632Note:
17633    In addition to the PREDICTION BOUNDS command, the following
17634    commands can also be used:
17635
17636        LET ALPHA = 0.05
17637        LET NNEW = <value>
17638
17639        LET A = LOWER PREDICTION BOUNDS Y
17640        LET A = UPPPER PREDICTION BOUNDS Y
17641        LET A = ONE SIDED LOWER PREDICTION BOUNDS Y
17642        LET A = ONE SIDED UPPER PREDICTION BOUNDS Y
17643
17644        LET A = SUMMARY LOWER PREDICTION BOUNDS YMEAN YSD N
17645        LET A = SUMMARY UPPPER PREDICTION BOUNDS YMEAN YSD N
17646        LET A = SUMMARY ONE SIDED LOWER PREDICTION BOUNDS YMEAN YSD N
17647        LET A = SUMMARY ONE SIDED UPPER PREDICTION BOUNDS YMEAN YSD N
17648
17649    The first two commands specify the significance level and the number
17650    of new observations.  The next four commands are used when you have
17651    raw data.  The last four commands are used when only summary data
17652    (mean, standard deviation, sample size) is available.
17653
17654    In addition to the above LET command, built-in statistics are
17655    supported for about 20 different commands (enter HELP STATISTICS
17656    for details).
17657
17658Default:
17659    None
17660
17661Synonyms:
17662    None
17663
17664Related Commands:
17665    PREDICTION LIMITS       = Generate prediction intervals for the mean
17666                              of new observations.
17667    SD PREDICTION BOUNDS    = Generate prediction limits for the
17668                              standard deviation.
17669    CONFIDENCE LIMITS       = Generate a confidence limit.
17670    TOLERANCE LIMITS        = Generate a tolerance limit.
17671
17672Reference:
17673    Hahn and Meeker (1991), "Statistical Intervals: A Guide for
17674    Practitioners", Wiley, pp. 62-63.
17675
17676Applications:
17677    Confirmatory Data Analysis
17678
17679Implementation Date:
17680    2013/04
17681    2014/06: Support for LOGNORMAL and BOXCOX options
17682
17683Program 1:
17684    SKIP 25
17685    READ ZARR13.DAT Y
17686    SET WRITE DECIMALS 5
17687    LET NNEW = 5
17688    .
17689    PREDICTION BOUNDS Y
17690    LOWER PREDICTION BOUNDS Y
17691    UPPER PREDICTION BOUNDS Y
17692
17693Program 2:
17694    SKIP 25
17695    READ GEAR.DAT Y X
17696    SET WRITE DECIMALS 5
17697    LET NNEW = 5
17698    .
17699    REPLICATED PREDICTION BOUNDS Y X
17700
17701Program 3:
17702    .  Following example from Hahn and Meeker's book.
17703    .
17704    let ymean = 50.10
17705    let ysd   = 1.31
17706    let n1    = 5
17707    let nnew  = 3
17708    let alpha = 0.05
17709    .
17710    set write decimals 5
17711    let slow1 = summary lower prediction bounds ymean ysd n1
17712    let supp1 = summary upper prediction bounds ymean ysd n1
17713    let slow2 = summary one sided lower prediction bounds ymean ysd n1
17714    let supp2 = summary one sided upper prediction bounds ymean ysd n1
17715    print slow1 supp1 slow2 supp2
17716
17717-----PREDICTION LIMITS--------------------------------------
17718
17719PREDICTION LIMITS
17720
17721Name:
17722    PREDICTION LIMITS
17723
17724Type:
17725    Analysis Command
17726
17727Purpose:
17728    Generates a prediction interval for the mean of one or more
17729    new observations given a previous sample.
17730
17731Description:
17732    Given a sample of n observations with mean xbar and standard
17733    deviation s, the prediction interval to contain the mean
17734    of m new indpendent, identically distributed observations is
17735
17736       xbar +/- t(alpha/2,n-1)*s*SQRT((1/n) + (1/m))
17737
17738    with t denoting the percent point function of the t distribution.
17739
17740    In this formula, the only value from the new observations is the
17741    sample size.  That is, it can be applied before the new data is
17742    actually collected.  The number of observations for the new sample
17743    is entered with the command
17744
17745        LET NNEW = <value>
17746
17747    If NNEW is not defined, then a value of 1 is used.
17748
17749    This prediction interval is based on the assumption that
17750    the underlying data is approximately normally distributed.
17751    However, this prediction interval is fairly robust against
17752    non-normality unless either the original sample size or the
17753    new sample is small or the departure from normality is severe
17754    (in particular, the data is not too skewed).  Note that this
17755    includes the case of a prediction interval for a single future
17756    observation.
17757
17758Syntax 1:
17759    <LOWER/UPPER> <LOGNORMAL/BOXCOX>  PREDICTION LIMITS   <y>
17760                                      <SUBSET/EXCEPT/FOR qualification>
17761    where <y> is the response variable;
17762    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
17763
17764    If LOWER is specified, a one-sided lower prediction limit is
17765    returned.  If UPPER is specified, a one-sided upper prediction
17766    limit is returned.  If neither is specified, a two-sided limit
17767    is returned.
17768
17769    If the keyword LOGNORMAL is present, the log of the data will be
17770    taken, then the normal prediction limits will be computed, and then
17771    the computed normal lower and upper limits will be exponentiated to
17772    obtain the lognormal prediction limits.
17773
17774    Similarly, if the keyword BOXCOX is present, a Box-Cox transformation
17775    to normality will be applied to the data before computing the normal
17776    prediction limits.  The computed lower and upper limits will then
17777    be transformed back to the original scale.
17778
17779    This syntax supports matrix arguments for the response variable.
17780
17781Syntax 2:
17782    MULTIPLE <LOWER/UPPER> <LOGNORMAL/BOXCOX> PREDICTION LIMITS
17783                           <y1> ... <yk>
17784                           <SUBSET/EXCEPT/FOR qualification>
17785    where <y1>  .... <yk> is a list of 1 to 30 response variables;
17786    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
17787
17788    This syntax will generate a prediction interval for each of
17789    the response variables.
17790
17791    If LOWER is specified, a one-sided lower prediction limit is
17792    returned.  If UPPER is specified, a one-sided upper prediction
17793    limit is returned.  If neither is specified, a two-sided limit
17794    is returned.
17795
17796    If the keyword LOGNORMAL is present, the log of the data will be
17797    taken, then the normal prediction limits will be computed, and then
17798    the computed normal lower and upper limits will be exponentiated to
17799    obtain the lognormal prediction limits.
17800
17801    Similarly, if the keyword BOXCOX is present, a Box-Cox transformation
17802    to normality will be applied to the data before computing the normal
17803    prediction limits.  The computed lower and upper limits will then
17804    be transformed back to the original scale.
17805
17806    This syntax supports matrix arguments for the response variables.
17807
17808Syntax 3:
17809    REPLICATED <LOWER/UPPER> <LOGNORMAL/BOXCOX> PREDICTION LIMITS
17810                             <y> <x1> ... <xk>
17811                             <SUBSET/EXCEPT/FOR qualification>
17812    where <y> is the response variable;
17813          <x1>  .... <xk> is a list of 1 to 6 group-id variables;
17814    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
17815
17816    This syntax performs a cross-tabulation of the <x1> ... <xk>
17817    and generates a prediction interval for each unique combination
17818    of the cross-tabulated values.  For example, if X1 has 3 levels
17819    and X2 has 2 levels, six prediction intervals will be generated.
17820
17821    If LOWER is specified, a one-sided lower prediction limit is
17822    returned.  If UPPER is specified, a one-sided upper prediction
17823    limit is returned.  If neither is specified, a two-sided limit
17824    is returned.
17825
17826    If the keyword LOGNORMAL is present, the log of the data will be
17827    taken, then the normal prediction limits will be computed, and then
17828    the computed normal lower and upper limits will be exponentiated to
17829    obtain the lognormal prediction limits.
17830
17831    Similarly, if the keyword BOXCOX is present, a Box-Cox transformation
17832    to normality will be applied to the data before computing the normal
17833    prediction limits.  The computed lower and upper limits will then
17834    be transformed back to the original scale.
17835
17836    This syntax does not support matrix arguments.
17837
17838Examples:
17839    PREDICTION LIMITS Y1
17840    PREDICTION LIMITS Y1  SUBSET TAG > 2
17841    MULTIPLE PREDICTION LIMITS Y1 TO Y5
17842    REPLICATED PREDICTION LIMITS Y X
17843    LOGNORMAL PREDICTION LIMITS Y1
17844
17845Note:
17846    A table of prediction limits is printed for alpha levels of
17847    50.0, 80.0, 90.0, 95.0, 99.0, and 99.9.
17848
17849Note:
17850    In addition to the PREDICTION LIMIT command, the following
17851    commands can also be used:
17852
17853        LET ALPHA = 0.05
17854        LET NNEW = <value>
17855
17856        LET A = LOWER PREDICTION LIMIT Y
17857        LET A = UPPPER PREDICTION LIMIT Y
17858        LET A = ONE SIDED LOWER PREDICTION LIMIT Y
17859        LET A = ONE SIDED UPPER PREDICTION LIMIT Y
17860
17861        LET A = SUMMARY LOWER PREDICTION LIMIT YMEAN YSD N
17862        LET A = SUMMARY UPPPER PREDICTION LIMIT YMEAN YSD N
17863        LET A = SUMMARY ONE SIDED LOWER PREDICTION LIMIT YMEAN YSD N
17864        LET A = SUMMARY ONE SIDED UPPER PREDICTION LIMIT YMEAN YSD N
17865
17866    The first 2 commands specify the significance level and the number
17867    of new observations.  The next 4 commands are used when you have raw
17868    data.  The last 4 commands are used when only summary data (mean,
17869    standard deviation, sample size) is available.
17870
17871    In addition to the above LET command, built-in statistics are
17872    supported for about 20 different commands (enter HELP STATISTICS
17873    for details).
17874
17875Note:
17876    Prediction limits can also be generated for the case where the
17877    interval will contain ALL of the new points.  Enter HELP PREDICTION
17878    BOUNDS for details.
17879
17880Note:
17881    The prediction limits described here are based on the assumption that
17882    the data follow an approximately normal distribution.  If the data is
17883    not normally distributed, lognormal or Box-Cox transformations can be
17884    applied to make the data more closely approximate a normal
17885    distribution.  The keywords LOGNORMAL and BOXCOX have been added to
17886    the command to allow these transformations to be applied automatically.
17887
17888    Note that if these options are used, the limits will be transformed
17889    back to the original scale for the data.
17890
17891Default:
17892    None
17893
17894Synonyms:
17895    PREDICTION INTERVALS is a synonym for PREDICTION LIMITS
17896
17897Related Commands:
17898    PREDICTION BOUNDS       = Generate prediction bounds.
17899    SD PREDICTION LIMITS    = Generate prediction limits for the
17900                              standard deviation.
17901    CONFIDENCE LIMITS       = Generate a confidence limit.
17902    TOLERANCE LIMITS        = Generate a tolerance limit.
17903
17904Reference:
17905    Hahn and Meeker (1991), "Statistical Intervals: A Guide for
17906    Practitioners", Wiley, pp. 61-62.
17907
17908Applications:
17909    Confirmatory Data Analysis
17910
17911Implementation Date:
17912    2013/04
17913    2014/06: Support for LOGNORMAL and BOXCOX options
17914
17915Program 1:
17916    SKIP 25
17917    READ ZARR13.DAT Y
17918    SET WRITE DECIMALS 5
17919    LET NNEW = 5
17920    .
17921    PREDICTION LIMITS Y
17922    LOWER PREDICTION LIMITS Y
17923    UPPER PREDICTION LIMITS Y
17924
17925Program 2:
17926    SKIP 25
17927    READ GEAR.DAT Y X
17928    SET WRITE DECIMALS 5
17929    LET NNEW = 3
17930    .
17931    REPLICATED PREDICTION LIMITS Y X
17932
17933Program 3:
17934    .  Following example from Hahn and Meeker's book.
17935    .
17936    let ymean = 50.10
17937    let ysd   = 1.31
17938    let n1    = 5
17939    let nnew  = 3
17940    let alpha = 0.05
17941    .
17942    set write decimals 5
17943    let slow1 = summary lower prediction limits ymean ysd n1
17944    let supp1 = summary upper prediction limits ymean ysd n1
17945    let slow2 = summary one sided lower prediction limits ymean ysd n1
17946    let supp2 = summary one sided upper prediction limits ymean ysd n1
17947    print slow1 supp1 slow2 supp2
17948
17949-----PRE-ERASE-------------------------------------------------------
17950
17951PRE-ERASE
17952
17953Name:
17954    PRE-ERASE
17955
17956Type:
17957    Plot Control Command
17958
17959Purpose:
17960    Specifies whether or not the screen should be automatically erased
17961    at the beginning of subsequent plots.
17962
17963Description:
17964    This command is typically used to overlay plots.  The PLOT and
17965    3D-PLOT command can do this with the AND syntax.  However, the AND
17966    syntax is not supported on any of the various other plot commands.
17967    The PRE-ERASE command can be used to overlay plots where the AND
17968    syntax is not allowed or is not convenient.
17969
17970Syntax:
17971    PRE-ERASE   <ON or OFF>
17972    where ON specifies that the screen will be erased at the beginning
17973             of subsequent plots while OFF specifies that it will not.
17974
17975Examples:
17976    PRE-ERASE ON
17977    PRE-ERASE OFF
17978    PRE-ERASE
17979
17980Note:
17981    When overlaying plots, it is typically necessary to use the
17982    XLIMITS and YLIMITS commands to keep the axes on the same scales
17983    for all the overlaid plots.  In addition, the frame, titles,
17984    labels, legends, etc. are redrawn with each subsequent plot.
17985    Although this does not cause any harm, it can be time consuming
17986    (particularly if a software font is in effect).  You may want to
17987    shut these off after the original plot (e.g., TITLE ; FRAME OFF;
17988    LABEL ).
17989
17990Note:
17991    The PRE-ERASE command with no arguments reverts the setting to
17992    default.
17993
17994Default:
17995    The default is for plots to have automatic screen erasure (ON).
17996
17997Synonyms:
17998    None
17999
18000Related Commands:
18001    ERASE DELAY = Sets the delay after screen erasure.
18002    BELL        = Sets the automatic bell switch for plots.
18003    HARDCOPY    = Sets the automatic copy switch for plots.
18004    SEQUENCE    = Sets the automatic sequence switch for plots.
18005    PLOT        = Generates a data or function plot.
18006    RING        = Rings the bell (immediately).
18007    ERASE       = Erases the screen (immediately).
18008    COPY        = Copies the screen (immediately).
18009
18010Applications:
18011    XX
18012
18013Implementation Date:
18014    XX
18015
18016Program:
18017    .  PURPOSE--GENERATE A QUARTILE PLOT OF POINT BARROW FREON-11 DATA
18018    SKIP 50
18019    SET READ FORMAT 3F4.0,F5.0,F6.0,F3.0,2F9.0
18020    READ PBF11.DAT YEAR DAY BOT SD F11 FLAG WV CO2
18021    .
18022    RETAIN YEAR DAY BOT SD F11 WV CO2 FLAG SUBSET FLAG 0
18023    LET MONTH=INT(DAY/30.25)+1
18024    .
18025    TITLE QUARTILE PLOT
18026    XLIMITS 0 15
18027    YLIMITS 1 1.01
18028    CHARACTER U U
18029    LINE BLANK SOLID
18030    UPPER QUARTILE PLOT WV MONTH
18031    PRE-ERASE OFF
18032    CHARACTER L L
18033    LOWER QUARTILE PLOT WV MONTH
18034
18035-----PRE-FIT-------------------------------------------------------
18036
18037PRE-FIT
18038
18039Name:
18040    PRE-FIT
18041
18042Type:
18043    Analysis Command
18044
18045Purpose:
18046    Determines the "best fit" coefficients for a model, where the
18047    search is restricted to the points of a user-defined lattice.
18048
18049Description:
18050    The desired lattice is defined by the FOR statements at the end of
18051    the command.  The"best fit" coefficients are determined by
18052    systematically evaluating the sum of squares surface at each of the
18053    points of the specified lattice of parameter values.  The minimum
18054    point over the lattice is determined and noted, along with other
18055    extrema information.  This command receives only light usage,
18056    typically in the following 2 contexts:
18057    1) immediately before the ... FIT command when the model is
18058       non-linear, when the starting values are unknown, and when the
18059       analyst is interested in gathering some preliminary information
18060       about the nature of the sum of squares surface.
18061    2) immediately after the ...FIT command when a least squares fit
18062       has been carried out, and the analyst is interested in examining
18063       the nature of the Lp surface (for p not = 2) in the vicinity of
18064       the least squares estimate.  In this context, the FIT POWER
18065       command is also used.
18066
18067Syntax:
18068    PRE-FIT <y1> = <f> FOR <p> = <p1> <pinc> <p2>
18069                       FOR <q> = <q1> <qinc> <q2>
18070                            <additional optional FOR statements>
18071    where <y1> is the response (= dependent) variable;
18072          <f> is
18073                1) any general FORTRAN-like expression; or
18074                2) any function name that the user has already created
18075                   via the LET FUNCTION command);
18076          <p> is the name of a parameter in the function;
18077          <p1> is a number or parameter that specifies the minimum
18078                value for the parameter;
18079          <pinc> is a number or parameter that specifies the increment
18080                for the parameter;
18081          <p2> is a number or parameter that specifies the maximum
18082                value for the parameter;
18083          <q> is the name of another parameter in the function;
18084          <q1> is a number or parameter that specifies the minimum
18085                value for the parameter;
18086          <qinc> is a number or parameter that specifies the increment
18087                for the parameter;
18088          <q2> is a number or parameter that specifies the maximum
18089                value for the parameter;
18090    and any additional FOR statments have a similar syntax.
18091
18092    All of the FOR statements should be on the same line.
18093
18094Examples:
18095    PRE-FIT Y=A+B*EXP(-C*X) FOR A=10 1 20 FOR B=50 10 100 ...
18096                            FOR C = .1 .1 1
18097    PRE-FIT Y = A+EXP(C/X) FOR A = 1 2 10 FOR C = .5 .05 .6
18098
18099Default:
18100    None
18101
18102Synonyms:
18103    None
18104
18105Related Commands:
18106    PRED               = A variable where predicted values are stored.
18107    RES                = A variable where residuals are stored.
18108    RESSD              = A parameter where the residual standard
18109                         deviation is stored.
18110    RESDF              = A parameter where the residual degrees of
18111                         freedom is stored.
18112    REPSD              = A parameter where the replication standard
18113                         deviation is stored.
18114    REPDF              = A parameter where the replication degrees of
18115                         freedom is stored.
18116    LOFCDF             = A parameter where the lack of fit cdf is
18117                         stored.
18118    FIT                = Carries out a least squares fit.
18119    EXACT RATIONAL FIT = Carries out an exact rational fit.
18120    SPLINE FIT         = Carries out a spline fit.
18121    SMOOTH             = Carries out a smoothing.
18122    ANOVA              = Carries out an ANOVA.
18123    MEDIAN POLISH      = Carries out a median polish.
18124    PLOT               = Generates a data or function plot.
18125
18126Applications:
18127    Non-Linear Fitting
18128
18129Implementation Date:
18130    Pre-1987
18131
18132Program:
18133    XX
18134
18135-----PREPOST-------------------------------------------------------
18136
18137PREPOST
18138
18139Name:
18140    PREPOST
18141
18142Type:
18143    Output Device Command
18144
18145Purpose:
18146    The DEFINE PREPLOT command allows the analyst to specify a string
18147    that is sent to an output device at the beginning of a plot.  The
18148    PREPOST command specifies the device that the DEFINE PREPLOT
18149    command applies to.
18150
18151Description:
18152    These commands are particularly useful for device emulators which
18153    often require escape codes to set the proper emulation mode.
18154
18155Syntax:
18156    PREPOST    <device>
18157    where <device> specifies the graphics device that DEFINE PREPLOT
18158              applies to.
18159
18160Examples:
18161    PREPOST HP-GL
18162    PREPOST TEKTRONIX 4014
18163
18164Default:
18165    None
18166
18167Synonyms:
18168    None
18169
18170Related Commands:
18171    DEFINE PREPLOT  = Define the preplot string.
18172    DEFINE POSTPLOT = Define the postplot string.
18173
18174Applications:
18175    XX
18176
18177Implementation Date:
18178    XX
18179
18180Program:
18181    .  THE FOLLOWING SEQUENCE DEFINES CODES TO PUT A VT-240 IN
18182    .  AND OUT OF TEKTRONIX 4014 MODE.
18183    DEFINE PREPLOT ESC [ ? 3 8 h
18184    DEFINE POSTPLOT  ESC [ ? 3 8 l
18185    PREPOST TEKTRONIX 4014
18186    PLOT X**2 FOR X = 1 1 9
18187
18188-----PRE-SORT-------------------------------------------------------
18189
18190PRE-SORT
18191
18192Name:
18193    PRE-SORT
18194
18195Type:
18196    Plot Control Command
18197
18198Purpose:
18199    Specifies whether or not data to be plotted is pre-sorted by the
18200    horizontal axis variable.
18201
18202Description:
18203    By default, DATAPLOT pre-sorts the data before a plot according to
18204    the horizontal axis variable so that connected lines will look
18205    right.  However, there are situations (e.g., drawing a map,
18206    plotting a trajectory) where it is necessary to plot the data in
18207    the order that they reside in the variables.  The PRE-SORT command
18208    is used to specify this.
18209
18210Syntax:
18211    PRE-SORT  <ON or OFF>
18212    where ON specifies that the data are pre-sorted while OFF specifies
18213            that they are not.
18214
18215Examples:
18216    PRE-SORT ON
18217    PRE-SORT OFF
18218    PRE-SORT
18219
18220Note:
18221    The PRE-SORT command with no arguments reverts the setting to
18222    default.
18223
18224Default:
18225    The default is for plots to pre-sort the data.
18226
18227Synonyms:
18228    None
18229
18230Related Commands:
18231    PLOT       = Generates a data or function plot.
18232
18233Applications:
18234    XX
18235
18236Implementation Date:
18237    XX
18238
18239Program:
18240    PRE-SORT OFF
18241    FRAME OFF
18242    DEGREES
18243    LET THETA = SEQUENCE 0 10 1000
18244    LET R = 2*THETA
18245    LET Y = R*SIN(THETA)
18246    LET X = R*COS(THETA)
18247    TITLE A POLAR COORDINATE FUNCTION
18248    PLOT Y X
18249
18250-----PRIME NUMBERS (LET)----------------------------------------------
18251
18252PRIME
18253
18254Name:
18255    PRIME NUMBERS (LET)
18256
18257Type:
18258    Let Subcommand
18259
18260Purpose:
18261    Compute prime numbers.
18262
18263Description:
18264    Prime numbers are integers that are only divisible by 1 and the
18265    number itself.
18266
18267Syntax:
18268    LET <resp> = PRIME NUMBERS  FOR I = <start>  <inc>  <stop>
18269    where <resp> is a variable where the prime numbers are saved;
18270          <start> is the first row in <resp> where the pattern is saved
18271              (typically has a value of 1);
18272          <inc> is the row increment for saving values in <resp>
18273              (typically has a value of 1); and
18274    and   <stop> is the last row in <resp> for saving values.
18275
18276    This syntax saves the first N (where N is determined by the values
18277    of <start>, <inc>, and <stop>) prime numbers in the variable <resp>.
18278
18279Examples:
18280    LET PRIME = PRIME NUMBERS FOR I = 1 1 100
18281    LET PRIME = PRIME NUMBERS FOR I = 1 1 10
18282
18283Default:
18284    None
18285
18286Synonyms:
18287    None
18288
18289Related Commands:
18290    SEQUENCE            = Generate a sequence of numbers.
18291    PATTERN             = Generate numbers with a specific pattern.
18292    FIBONNACCI NUMBERS  = Generate Fibonnacci numbers.
18293    LOGISTIC NUMBERS    = Generate numbers from a logistic sequence.
18294    CANTOR NUMBERS      = Generate numbers from a Cantor set.
18295    DATA                = Place numbers in a variable.
18296
18297Applications:
18298    XX
18299
18300Implementation Date:
18301    XX
18302
18303Program:
18304    LET PRIME = PRIME NUMBERS FOR I = 1 1 50
18305    PLOT PRIME
18306
18307-----PRINCIPAL COMPONENTS (LET)---------------------------------------
18308
18309PRINCIPAL COMPONENTS
18310
18311Name:
18312    PRINCIPAL COMPONENTS (LET)
18313
18314Type:
18315    Let Subcommand
18316
18317Purpose:
18318    Find the principal components of a matrix.
18319
18320Description:
18321    Given a data matrix X with n cases and p variables (i.e., variables
18322    X1, X2, ... , Xp), a linear transformation to a new set of
18323    variables Y1, Y2, ... , Yp is calculated.  That is,
18324        Y1 = a11X1 + a21X2 + ... + ap1Xp
18325        Y2 = a12X1 + a22X2 + ... + ap2Xp
18326                ....
18327        Yp = a1pX1 + a2pX2 + ... + appXp
18328    The Y variables are called the principal components and they have
18329    the following characteristics:
18330       1) The p principal components are uncorrelated.
18331       2) The first principal component explains the largest percentage
18332          of the variation in the original p-dimensional data set (and
18333          the second principal component explains the second largest
18334          percentage and so on).  Typically the first few variables
18335          account for most of the variation while the remaining
18336          variables make a negligible contribution.
18337
18338    Principle components are used to reduce large dimensional data
18339    sets to data sets with a few dimensions that still retain most of
18340    the information in the original data matrix.  That is, typically
18341    only the first few principal components are used.  If the first
18342    few principal components do not account for most of the variation,
18343    there is little advantage to using them.  By reducing the
18344    dimensionality of the original data, principal components can often
18345    simplify many analyses.  The primary disadvantage of principal
18346    components is that interpretation can be more difficult since you
18347    are no longer working with the original variables.
18348
18349    Principle components reduce to the problem of finding the
18350    eigenvalues and eigenvectors of the covariance (or correlation
18351    matrix) of the data matrix.  The ith row of the A matrix
18352    is the eigenvector corresponding to the ith eigenvalue of the
18353    covariance (or correlation) matrix.  Also, the proportion of the
18354    variance in the original data matrix explained by the ith principal
18355    component is the ith eigenvalue divided by the sum of all p
18356    eigenvalues.  Using the covariance matrix is preferred when the
18357    original data are reasonably comparable scales.  If this is not
18358    the case, the correlation matrix is preferred.
18359
18360    DATAPLOT returns the principal components (i.e., the Y matrix),
18361    the eigenvectors (i.e., the A matrix), and the eigenvalues in
18362    separate steps.
18363
18364Syntax 1:
18365    LET <mat3> = PRINCIPAL COMPONENTS <mat1>
18366               <SUBSET/EXCEPT/FOR qualification>
18367    where <mat1> is the matrix for which the principal components are
18368                 computed (it can be the original data matrix, a
18369                 covariance matrix, or a correlation matrix);
18370          <mat3> is a p by p matrix where the principal components
18371                 (i.e., the Y matrix) are saved (column 1 is the first
18372                 principal component, column p is the pth principal
18373                 component);
18374    and where the <SUBSET/EXCEPT/FOR qualification> is optional (and
18375                 rarely used in this context).
18376
18377Syntax 2:
18378    LET <resp> = <id> PRINCIPAL COMPONENTS <mat1>
18379               <SUBSET/EXCEPT/FOR qualification>
18380    where <mat1> is the matrix for which the principal components are
18381                 computed (it can be the original data matrix, a
18382                 covariance matrix, or a correlation matrix);
18383          <id> identifies a specific principal component to be
18384                 returned (FIRST, SECOND, THIRD, FOURTH, FIFTH, SIXTH,
18385                 SEVENTH, EIGHTH, NINTH, TENTH);
18386          <resp> is a variable of length p where the specific
18387                 principal component is saved;
18388    and where the <SUBSET/EXCEPT/FOR qualification> is optional (and
18389                 rarely used in this context).
18390
18391Syntax 3:
18392    LET <resp> = PRINCIPAL COMPONENTS EIGENVALUES <mat1>
18393               <SUBSET/EXCEPT/FOR qualification>
18394    where <mat1> is the matrix for which the principal components are
18395                 computed (it can be the original data matrix, a
18396                 covariance matrix, or a correlation matrix);
18397          <resp> is a variable of length p where the eigenvalues of
18398                 the covariance (or correlation) matrix are saved;
18399    and where the <SUBSET/EXCEPT/FOR qualification> is optional (and
18400                 rarely used in this context).
18401
18402Syntax 4:
18403    LET <par> = <id> PRINCIPAL COMPONENTS EIGENVALUES <mat1>
18404               <SUBSET/EXCEPT/FOR qualification>
18405    where <mat1> is the matrix for which the principal components are
18406                 computed (it can be the original data matrix, a
18407                 covariance matrix, or a correlation matrix);
18408          <id> identifies a specific eigenvalue to be returned (FIRST,
18409                 SECOND, THIRD, FOURTH, FIFTH, SIXTH, SEVENTH, EIGHTH,
18410                 NINTH, TENTH);
18411          <par> is a parameter where the specific eigenvalue is saved;
18412    and where the <SUBSET/EXCEPT/FOR qualification> is optional (and
18413                 rarely used in this context).
18414
18415Syntax: 5
18416    LET <mat3> = PRINCIPAL COMPONENTS EIGENVECTORS <mat1>
18417               <SUBSET/EXCEPT/FOR qualification>
18418    where <mat1> is the matrix for which the principal components are
18419                 computed (it can be the original data matrix, a
18420                 covariance matrix, or a correlation matrix);
18421          <mat3> is a p by p matrix where the eigenvectors of the
18422                 covariance (or correlation) matrix (i.e., the A
18423                 matrix) are saved;
18424    and where the <SUBSET/EXCEPT/FOR qualification> is optional (and
18425                 rarely used in this context).
18426
18427Syntax: 6
18428    LET <resp> = <id> PRINCIPAL COMPONENTS EIGENVECTORS <mat1>
18429               <SUBSET/EXCEPT/FOR qualification>
18430    where <mat1> is the matrix for which the principal components are
18431                 computed (it can be the original data matrix, a
18432                 covariance matrix, or a correlation matrix);
18433          <id> identifies a specific eigenvector to be returned (FIRST,
18434                 SECOND, THIRD, FOURTH, FIFTH, SIXTH, SEVENTH, EIGHTH,
18435                 NINTH, TENTH);
18436          <resp> is a variable where the specific eigenvector is saved;
18437    and where the <SUBSET/EXCEPT/FOR qualification> is optional (and
18438                 rarely used in this context).
18439
18440Examples:
18441    LET Y = PRINCIPAL COMPONENTS X
18442    LET E = PRINCIPAL COMPONENTS EIGENVALUES X
18443    LET A = PRINCIPAL COMPONENTS EIGENVECTORS X
18444    LET Y1 = FIRST PRINCIPAL COMPONENT X
18445    LET E1 = FIRST PRINCIPAL COMPONENT EIGENVALUE X
18446    LET A1 = FIRST PRINCIPAL COMPONENT EIGENVECTOR X
18447
18448Note:
18449    If the principal components are derived from the original data and
18450    the covariance matrix, the data matrix is scaled by subtracting
18451    the column mean before it is multiplied by the eigenvector matrix.
18452    That is, Y = A*(X-XBAR).
18453
18454Note:
18455    The PRINCIPAL COMPONENT TYPE command is used to specify whether
18456    the original matrix is a data matrix, a covariance matrix, or a
18457    correlation matrix.  It also specifies whether the principal
18458    components are derived from the covariance or the correlation
18459    matrix.  The default is an original data matrix with the
18460    principal components derived from the correlation matrix.
18461
18462Note:
18463    Principle components are sometimes used in regression problems
18464    to avoid multicolinearity problems while still maintaining most
18465    of the information in a large number of variables.  This is
18466    demonstrated in the second program example.
18467
18468Note:
18469    Matrices are created with either the READ MATRIX command or the
18470    MATRIX DEFINITION command.  Enter HELP MATRIX DEFINITION and HELP
18471    READ MATRIX for details.
18472
18473Note:
18474    The columns of a matrix are accessible as variables by appending an
18475    index to the matrix name.  For example, the 4x4 matrix C has
18476    columns C1, C2, C3, and C4.  These columns can be operated on like
18477    any other DATAPLOT variable.
18478
18479Note:
18480    The maximum size matrix that DATAPLOT can handle is set when
18481    DATAPLOT is built on a particular site.  The default maximums are
18482    100 columns and 500 rows.  Earlier versions may be 20 rows and 20
18483    columns or 100 rows and 100 columns.
18484
18485    If you have more than 500 rows in your input data, you can use the
18486    LOOP command to generate a covariance matrix and compute the
18487    principal components from this covariance matrix.
18488
18489Default:
18490    None
18491
18492Synonyms:
18493    None
18494
18495Related Commands:
18496    MATRIX ADDITION      = Perform a matrix addition.
18497    MATRIX ADJOINT       = Compute the adjoint matrix of a matrix.
18498    MATRIX COFACTOR      = Compute a matrix cofactor.
18499    MATRIX DEFINITION    = Set a matrix definition.
18500    MATRIX DETERMINANT   = Compute a matrix determinant.
18501    MATRIX EIGENVALUES   = Compute the matrix eigenvalues.
18502    MATRIX EIGENVECTORS  = Compute the matrix eigenvectors.
18503    MATRIX EUCLID NORM   = Compute the matrix Euclidean norm.
18504    MATRIX INVERSE       = Compute a matrix inverse.
18505    MATRIX MINOR         = Compute a matrix minor.
18506    MATRIX MULTIPLICAT   = Perform a matrix multiplication.
18507    MATRIX NUMB OF COLU  = Compute the number of columns in a matrix.
18508    MATRIX NUMB OF ROWS  = Compute the number of rows in a matrix.
18509    MATRIX RANK          = Compute the rank of a matrix.
18510    MATRIX SIMPLEX SOLU  = Compute a matrix simplex solution.
18511    MATRIX SOLUTION      = Solve a system of linear equations.
18512    MATRIX SPECTRAL NORM = Compute the matrix spectral norm.
18513    MATRIX SPECTRAL RADI = Compute the matrix spectral radius.
18514    MATRIX SUBMATRIX     = Define a matrix submatrix.
18515    MATRIX SUBTRACTION   = Perform a matrix subtraction.
18516    MATRIX TRACE         = Compute a matrix trace.
18517    MATRIX TRANSPOSE     = Compute a matrix transpose.
18518    CORRELATION MATRIX   = Compute the correlation matrix of a matrix.
18519    VARIANCE-COVA MATRIX = Compute the variance-covariance matrix of a
18520                           matrix.
18521    SINGULAR VALUES      = Compute the singular values of a matrix.
18522    SINGULAR VALUE DECOM = Compute the singular value decomposition of
18523                           a matrix.
18524    SINGULAR VALUE FACT  = Compute the singular value factorization of
18525                           a matrix.
18526
18527Reference:
18528    "Principle Components and Factor Analysis: Part I - Principle
18529    Components", Jackson, Journal of Quality Technology, October, 1980.
18530
18531    "Multivariate Statistical Methods", Morrison, McGraw-Hill, 1976.
18532
18533    "Graphical Exploratory Data Analysis", du Toit, Steyn, and Stumpf,
18534    Springer-Verlang, 1986.
18535
18536    "Applied Regression Analysis", Draper and Smith, John Wiley, 1981.
18537
18538Applications:
18539    Multivariate Analysis, Regression
18540
18541Implementation Date:
18542    87/10
18543
18544Program 1:
18545    . SOURCE: "GRAPHICAL EXPLORATORY DATA ANALYSIS", DU TOIT, ET AL
18546    . 28 STUDENTS FROM ABILITY TEST DATA SET (PAGE 6)
18547    DIMENSION 100 COLUMNS
18548    READ MATRIX X
18549    19 21 21 18 20 21 15 14 15 13 15 16 19 19 19 20 17 17
18550    21 20 15 24 22 18 11 18 16 19 14 17 21 15 17 18 18 19
18551    18 19 16 18 18 23 11 13 13 15 11 11 15 18 13 15 18 13
18552    18 23 10 18 16 16 11  9  8 15  6  9 12 16  8 13  9 15
18553    24 24 19 20 23 24 22 18 16 19 16 19 19 21 21 20 18 20
18554    19 19 23 21 23 23  9  8 13 15 20 15 17 12 20 16 16 21
18555    21 20 19 21 21 23 11 16 11 18 18 14 21 17 14 19 18 16
18556    21 20 21 20 16 22  7 11 17 16  8 10 13 17 16 17 15 11
18557    19 20 19 22 18 21 11 12  7 15  9 11 13 12 13 17 12 12
18558    19 23 22 22 16 25 12 15 16 19 15 10 15 20 18 18 17 13
18559    17 13  8 18 13 18 12  8  9 12 12 11  9 14 15 12 13  9
18560    21 22 22 15 23 23 16 12 16 15 13 14 19 17 16 18 19 18
18561    18 18 17 16 15 22  8 11 10 16  8 14 10 13 10 14  9 14
18562    13 18 21 16 17 15 11 12 11  9 11 11 16 18 14 13 15 18
18563    17 13 17 20 22 19 15 11 11 12 11 13 15 15 15 13 16 12
18564    18 12  9  9 15 17  9  5  3 12  7  7 12 10 10 13 10 12
18565    22 15 24 17 15 20 10 12 12 11  9 12 19 16 16  8 11 17
18566    18 17 18 18 13 18 14 12 15 11 10  9 21 14 12 15 11 13
18567    17 15 14 14 12 13  9 10 11  9  7 11 13 15 11 13 10 13
18568    16 20 17 13 15 16 10 16 12 10  7 13 12 18 13 18 10 15
18569    24 21 22 21 21 25 11 17 17 21 11 15 15 18 16 16 17 17
18570    23 23 21 22 16 21 10 18 16 14 14 13 17 21 19 16 17 19
18571    22 22 21 24 18 24  6 16 14 20 16 18 12 12 13 18 18 21
18572    22 17 19 19 21 20 17 15  9 13 16 17 18 11 13 16 19 14
18573    20 23 23 22 22 24 11 18 16 16 16 20 13 16 18 18 20 20
18574    22 17 21 17 17 22 10 14 16 16 13  8 13 18 21 12 13 15
18575    21 18 20 23 21 22  8 15  9 17 11 13 13 20 20 21 15 20
18576    21 22 19 20 18 17 11 15 12 14 11 10 11 13 14 14 15 14
18577    END OF DATA
18578    LET P = MATRIX NUMBER OF COLUMNS X
18579    PRINCIPAL COMPONENTS TYPE DATA COVARIANCE
18580    LET Y = PRINCIPAL COMPONENTS X
18581    LET A = PRINCIPAL COMPONENTS EIGENVECTORS X
18582    LET E = PRINCIPAL COMPONENTS EIGENVALUES X
18583    PRINT E
18584    LET ESUM = CUMULATIVE SUM E
18585    LET TEMP = ESUM(P)
18586    LET RATIO = 100*ESUM/TEMP
18587    .  FORM CORR(Xi,Y1) = Ai1*SQRT(L1)/Si
18588    LOOP FOR K = 1 1 P
18589       LET TEMP = STANDARD DEVIATION X^K
18590       LET SD(K) = TEMP
18591    END OF LOOP
18592    LET TEMP = E(1)
18593    LET R1 = A1*SQRT(TEMP)/SD
18594    .  FORM CORR(Xi,Y2) = Ai2*SQRT(L2)/Si
18595    LET TEMP = E(2)
18596    LET R2 = A2*SQRT(TEMP)/SD
18597    LINE BLANK ALL
18598    CHARACTER 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
18599    LET TAG = SEQUENCE 1 1 P
18600    X1LABEL CORRELATION (XLC()I,UC()Y1)
18601    Y1LABEL CORRELATION (XLC()I,UC()Y2)
18602    LET TEMP = RATIO(1)
18603    LEGEND 1 PC 1 - ^TEMP % EXPLAINED
18604    LET TEMP = RATIO(2)
18605    LEGEND 2 PC 2 - ^TEMP % EXPLAINED
18606    PLOT R2 R1 TAG
18607
18608Program 2:
18609    . SOURCE: "APPLIED REGRESSION ANALYSIS", DRAPER AND SMITH.
18610    . HALD DATA (APPENDIX B)
18611    . PRINCIPAL COMPONENTS REGRESSION (CHAPTER 6-9 OF DRAPER, SMITH)
18612    .
18613    DIMENSION 100 COLUMNS
18614    READ X1 X2 X3 X4 Y
18615    7   26   6  60   78.5
18616    1   29  15  52   74.3
18617    11  56   8  20 104.3
18618    11  31   8  47  87.6
18619    7   52   6  33  95.9
18620    11  55   9  22 109.2
18621    3   71  17   6 102.7
18622    1   31  22  44  72.5
18623    2   54  18  22  93.1
18624    21  47   4  26 115.9
18625    1   40  23  34  83.8
18626    11  66   9  12 113.3
18627    10  68   8  12 109.4
18628    END OF DATA
18629    LET X = MATRIX DEFINITION X1 13 4
18630    LET CORR = CORRELATION MATRIX X
18631    PRINT CORR
18632    PRINCIPAL COMPONENT TYPE DATA CORRELATION
18633    LET W = PRINCIPAL COMPONENTS X
18634    LET E = PRINCIPAL COMPONENT EIGENVALUES X
18635    LET EVECT = PRINCIPAL COMPONENT EIGENVECTORS X
18636    LET RATIO = CUMULATIVE SUM E
18637    LET RATIO = RATIO/4.
18638    .
18639    PRINT E RATIO
18640    PRINT "EIGENVECTORS:"; PRINT EVECT
18641    PRINT "PRINCIPAL COMPONENTS:"; PRINT W
18642    FEEDBACK ON
18643    FIT Y W1 W2
18644
18645-----PRINCIPAL COMPONENTS TYPE----------------------------------------
18646
18647PRINCIPAL COMPONENTS TYPE
18648
18649Name:
18650    PRINCIPAL COMPONENTS TYPE
18651
18652Type:
18653    Support Command
18654
18655Purpose:
18656    Specify the input format of the data for the PRINCIPAL COMPONENTS
18657    command.
18658
18659Description:
18660    See the documentation for the PRINCIPAL COMPONENTS command for a
18661    description of principal components.
18662
18663    Principle components reduce to the problem of finding the
18664    eigenvalues and eigenvectors of the covariance (or correlation
18665    matrix) of the data matrix.  In addition, the data matrix can be
18666    raw data, a covariance matrix, or a correlation matrix.
18667
18668    The PRINCIPAL COMPONENTS TYPE command specifies two things.  First,
18669    it specifies whether the data matrix is raw data, a covariance
18670    matrix, or a correlation matrix.  Second, it specifies whether the
18671    principal components are calculated from the covariance or the
18672    correlation matrix.
18673
18674Syntax:
18675    PRINCIPAL COMPONENTS TYPE  <key1>  <key2>
18676    where <key1> is one of the following:
18677                DATA        - original matrix is raw data
18678                COVARIANCE  - original matrix is a covariance matrix
18679                CORRELATION - original matrix is a correlation matrix;
18680    and   <key2> is one of the following:
18681                COVARIANCE  - principal components computed from a
18682                              covariance matrix
18683                CORRELATION - principal components computed from a
18684                              correlation matrix.
18685
18686Examples:
18687    PRINCIPAL COMPONENTS TYPE DATA COVARIANCE
18688    PRINCIPAL COMPONENTS TYPE DATA CORRELATION
18689    PRINCIPAL COMPONENTS TYPE COVARIANCE COVARIANCE
18690    PRINCIPAL COMPONENTS TYPE COVARIANCE CORRELATION
18691    PRINCIPAL COMPONENTS TYPE CORRELATION CORRELATION
18692
18693Note:
18694    If the original data is a correlation matrix, principal components
18695    can only be computed from a correlation matrix.  That is, the
18696    command PRINCIPAL COMPONENTS TYPE CORRELATION COVARIANCE is not
18697    supported.
18698
18699Default:
18700    The original matrix is raw data and the principal components are
18701    calculated from a covariance matrix.
18702
18703Synonyms:
18704    None
18705
18706Related Commands:
18707    CORRELATION MATRIX   = Compute the correlation matrix of a matrix.
18708    VARIANCE-COVA MATRIX = Compute the variance-covariance matrix of a
18709                           matrix.
18710    PRINCIPAL COMPONENTS = Compute principal components.
18711
18712Reference:
18713    "Principle Components and Factor Analysis: Part I - Principle
18714    Components", Jackson, Journal of Quality Technology, October, 1980.
18715
18716    "Multivariate Statistical Methods", Morrison, McGraw-Hill, 1976.
18717
18718Applications:
18719    Multivariate Analysis
18720
18721Implementation Date:
18722    87/10
18723
18724Program 1:
18725    . SOURCE: "GRAPHICAL EXPLORATORY DATA ANALYSIS", DU TOIT, ET AL
18726    . 28 STUDENTS FROM ABILITY TEST DATA SET (PAGE 6)
18727    DIMENSION 100 COLUMNS
18728    READ MATRIX X
18729    19 21 21 18 20 21 15 14 15 13 15 16 19 19 19 20 17 17
18730    21 20 15 24 22 18 11 18 16 19 14 17 21 15 17 18 18 19
18731    18 19 16 18 18 23 11 13 13 15 11 11 15 18 13 15 18 13
18732    18 23 10 18 16 16 11  9  8 15  6  9 12 16  8 13  9 15
18733    24 24 19 20 23 24 22 18 16 19 16 19 19 21 21 20 18 20
18734    19 19 23 21 23 23  9  8 13 15 20 15 17 12 20 16 16 21
18735    21 20 19 21 21 23 11 16 11 18 18 14 21 17 14 19 18 16
18736    21 20 21 20 16 22  7 11 17 16  8 10 13 17 16 17 15 11
18737    19 20 19 22 18 21 11 12  7 15  9 11 13 12 13 17 12 12
18738    19 23 22 22 16 25 12 15 16 19 15 10 15 20 18 18 17 13
18739    17 13  8 18 13 18 12  8  9 12 12 11  9 14 15 12 13  9
18740    21 22 22 15 23 23 16 12 16 15 13 14 19 17 16 18 19 18
18741    18 18 17 16 15 22  8 11 10 16  8 14 10 13 10 14  9 14
18742    13 18 21 16 17 15 11 12 11  9 11 11 16 18 14 13 15 18
18743    17 13 17 20 22 19 15 11 11 12 11 13 15 15 15 13 16 12
18744    18 12  9  9 15 17  9  5  3 12  7  7 12 10 10 13 10 12
18745    22 15 24 17 15 20 10 12 12 11  9 12 19 16 16  8 11 17
18746    18 17 18 18 13 18 14 12 15 11 10  9 21 14 12 15 11 13
18747    17 15 14 14 12 13  9 10 11  9  7 11 13 15 11 13 10 13
18748    16 20 17 13 15 16 10 16 12 10  7 13 12 18 13 18 10 15
18749    24 21 22 21 21 25 11 17 17 21 11 15 15 18 16 16 17 17
18750    23 23 21 22 16 21 10 18 16 14 14 13 17 21 19 16 17 19
18751    22 22 21 24 18 24  6 16 14 20 16 18 12 12 13 18 18 21
18752    22 17 19 19 21 20 17 15  9 13 16 17 18 11 13 16 19 14
18753    20 23 23 22 22 24 11 18 16 16 16 20 13 16 18 18 20 20
18754    22 17 21 17 17 22 10 14 16 16 13  8 13 18 21 12 13 15
18755    21 18 20 23 21 22  8 15  9 17 11 13 13 20 20 21 15 20
18756    21 22 19 20 18 17 11 15 12 14 11 10 11 13 14 14 15 14
18757    END OF DATA
18758    LET P = MATRIX NUMBER OF COLUMNS X
18759    PRINCIPAL COMPONENTS TYPE DATA COVARIANCE
18760    LET Y = PRINCIPAL COMPONENTS X
18761    LET A = PRINCIPAL COMPONENTS EIGENVECTORS X
18762    LET E = PRINCIPAL COMPONENTS EIGENVALUES X
18763
18764-----PRINTFILE--------------------------------------------------
18765
18766PRINTFILE
18767
18768Name:
18769    PRINTFILE
18770
18771Type:
18772    Support Command
18773
18774Purpose:
18775    Print an ASCII file.
18776
18777Description:
18778    This is an operating system dependent command.
18779
18780    On Windows 7/8/10 platforms, the printing is invoked with the
18781    command
18782
18783        write.exe -p <filename>
18784
18785    This command uses WordPad to print the file.  Note that Wordpad
18786    can print RTF formatted files and some Microsoft Word formatted
18787    files (this can depend on what versions of Word and WorPad you
18788    have installed).  Currently, no provision is made for a non-default
18789    printer.
18790
18791    On Linux/Unix and MacOS platforms, the printing is invoked with
18792    the command
18793
18794        lpr <filename>
18795
18796    If you have specified the printer name with the SET PRINTER command,
18797    then the following command is used
18798
18799        lpr -P<printername> <filename>
18800
18801Syntax:
18802    PRINTFILE  <file1>
18803    where <file1> is the name of the file to print.
18804
18805    In order to avoid conflict with the PRINT command, PRINTFILE cannot
18806    be abbreviated.  Only the first 8 characters are evaluated, so a match
18807    up to PRINTFIL is succifient.
18808
18809Examples:
18810    PRINTFILE BERGER1.DAT
18811
18812Note:
18813    This command requires that the SYSTEM capability is supported.
18814    This should be the case for all currently supported platforms.
18815
18816Default:
18817    None
18818
18819Synonyms:
18820    None
18821
18822Related Commands:
18823    PP         = Print the current plot to a Postscript printer.
18824    COPY       = Copy a file to another file.
18825    LIST       = Print the contents of the file.
18826    SEARCH     = Search a file for a given string.
18827    EDIT       = Edit a file.
18828    SYSTEM     = Perform an operating system command.
18829
18830Applications:
18831    Interactive Usage
18832
18833Implementation Date:
18834    2019/03:
18835
18836Program:
18837    SKIP 25
18838    READ BERGER1.DAT Y X
18839    SET WRITE DECIMALS 4
18840    CPATURE BERGER1.OUT
18841    FIT Y X
18842    END OF CAPTURE
18843    PRINTFILE BERGER1.OUT
18844
18845-----PRINT-------------------------------------------------------
18846
18847PRINT
18848
18849Name:
18850    PRINT
18851
18852Type:
18853    Support Command
18854
18855Purpose:
18856    Writes variables (vectors), parameters (scalars), functions
18857    (including strings), and matrices to the screen or to a file.
18858
18859Syntax 1:
18860    PRINT <variable list>
18861    where <variable list> is a list of parameters, variables, strings,
18862             or matrices (separated by spaces).
18863
18864Syntax 2:
18865    PRINT <file name>  <variable list>
18866    where <file name> specifies the name of the output file;
18867    and   <variable list> is a list of parameters, variables, strings,
18868             or matrics (separated by spaces).
18869
18870    If the file name does not contain a period, place a period (no
18871    spaces) at the end of the file name.
18872
18873Examples:
18874    PRINT OUT. Y1 Y2 Y3 X
18875    PRINT DATA.SAVE X Y PRED RES
18876    PRINT X Y PRED RES
18877
18878Note:
18879    Numbers are written in exponential format by default.  The analyst
18880    can specify a specific format with the SET WRITE FORMAT statement.
18881    The output file is rewound by default (that is, if the file
18882    already exists it is overwritten).  Use the SET WRITE REWIND OFF
18883    command to allow multiple writes to the same file.  The SET WRITE
18884    DECIMALS command can also be used to control the format of
18885    numbers.
18886
18887Note:
18888    DATAPLOT writes to an ASCII text file.  No method of writing
18889    binary files is currently supported.
18890
18891Note:
18892    Literal text can be written by enclosing it in double quotes.  For
18893    example,
18894        PRINT "Enter the value for X"
18895
18896Note:
18897    DATAPLOT has no restrictions on the file name other than it be a
18898    valid file name on the local operating system and that it contain
18899    a period "." in the file name itself or as a trailing character.
18900    DATAPLOT strips off trailing periods on those systems where it is
18901    appropriate to do so.  On systems where trailing periods can be a
18902    valid file name (e.g., Unix), DATAPLOT opens the file with the
18903    trailing period.
18904
18905Note:
18906    File names are case sensitive on Unix file systems.  For Unix,
18907    DATAPLOT opens the file as given.  All other currently supported
18908    systems are not case sensitive regarding file names.
18909
18910    As a further caution for Unix hosts, certain expansion characters
18911    (specifically ~ to refer to your home directory) are interpreted
18912    by the shell and are not recognized by the Fortran compiler.  These
18913    expansion characters are interpreted as literal characters and do
18914    not yield the intended file name.
18915
18916Default:
18917    XX
18918
18919Synonyms:
18920    WRITE is a synonym for PRINT.
18921
18922Related Commands:
18923    SET WRITE FORMAT    = Define a Fortran like format for writing
18924                          data.
18925    SET WRITE DECIMALS  = Specify the number of digits to the right of
18926                          the decimal point when printing numbers.
18927    SET WRITE REWIND    = Specify if the output file is rewound
18928                          before writing.
18929    READ                = Read variables, parameters, strings, and
18930                          matrices from a file.
18931
18932Applications:
18933    XX
18934
18935Implementation Date:
18936    XX
18937
18938Program:
18939    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
18940    LET Y2 = EXPONENTIAL RANDOM NUMBERS FOR I = 1 1 100
18941    LET Y3 = UNIFORM RANDOM NUMBERS FOR I = 1 1 100
18942    WRITE RANDOM.DAT Y1 Y2 Y3
18943
18944-----PRINTER (SET)--------------------------------------------------
18945
18946PRINTER
18947
18948Name:
18949    PRINTER (SET)
18950
18951Type:
18952    Set Subcommand
18953
18954Purpose:
18955    This command sets the printer id for the PP command.
18956
18957Description:
18958    The PP command is used to send the most recent plot to
18959    the printer.
18960
18961    The PP command is operating system dependent.  It is
18962    currently supported in the Unix and Windows 95/98/NT
18963    environments.
18964
18965    The PP command sends the graphics output to the default
18966    printer.  Specifically,
18967
18968      1) On Unix, the PP command issues an "lpr dppl2f.dat"
18969         command.  The default printer in Unix is set by the
18970         UNIX command "setenv PRINTER <printer-id>" for the
18971         c shell (other shells may have a slightly different
18972         way for defining the default printer).
18973
18974      2) On Windows 95/98/NT systems, the PP command issues the
18975         command "COPY DPPL2F.DAT PRN:".
18976
18977    On either system, it is sometimes desirable to override the
18978    default printer.  The SET PRINTER command is used to override
18979    the default printer.  If the command "SET PRINTER printer-id"
18980    is entered in Dataplot, then the PP command does the following:
18981
18982      1) On Unix, the PP command issues a
18983         "lpr -Pprinter-id dppl2f.dat" command.
18984
18985      2) On Windows 95/98/NT systems, the PP command issues the
18986         command "COPY DPPL2F.DAT printer-id".  This is most often
18987         used to send the graphics output to a network printer
18988         rather than the local printer.
18989
18990    The printer-id will be specific to your local host.  If
18991    you are unsure of the appropriate printer name, then contact
18992    your local system administrator for this information.
18993
18994Syntax:
18995    SET PRINTER <printer-id>
18996    where <printer-id> is the desired printer id.
18997
18998Examples:
18999    SET PRINTER lw7_duplex
19000
19001Default:
19002    For Unix, the default printer is set by the "setenv PRINTER"
19003    command when using the c shell.  On Windows, the default
19004    printer is PRN:, i.e., the local printer.
19005
19006Synonyms:
19007    None
19008
19009Note:
19010    Dataplot has no way of determining if the given printer-id
19011    is valid on your system.
19012
19013Related Commands:
19014    PP            = Print the current plot on the default printer.
19015    SYSTEM        = Enter an operating system command within a
19016                    Dataplot session.
19017
19018Applications:
19019    Interactive Usage
19020
19021Implementation Date:
19022    1998/5
19023
19024Program:
19025    SET PRINTER lw7
19026    PLOT X**2 FOR X = 1 1 9
19027    PP
19028
19029-----PRINTER TYPE------------------------------------------------
19030
19031PRINTER TYPE
19032
19033Note:
19034    ******* This command is not yet operational ******
19035
19036Name:
19037    PRINTER TYPE
19038
19039Type:
19040    Support Subcommand
19041
19042Purpose:
19043    Specifies whether the output from the / PRINTER command is
19044    generated as an ASCII text file or as a Postscript file.
19045
19046Description:
19047    The / command re-executes saved commands (see the documentation for
19048    the SAVE command for details).  The / PRINTER command re-executes
19049    saved commands and also re-directs the output to the printer.  The
19050    PRINTER TYPE command specifies whether this output is sent to the
19051    printer as a plain ASCII text file or is reformatted into a
19052    Postscript format.
19053
19054Syntax:
19055    PRINTER TYPE <ASCII/POSTSCRIPT>
19056    where ASCII specifies a plain ASCII text file and POSTSCRIPT
19057             specifies a Postscript formatted file.
19058
19059Examples:
19060    PRINTER TYPE ASCII
19061    PRINTER TYPE POSTSCRIPT
19062
19063Default:
19064    The output is sent as a plain ASCII text file.
19065
19066Synonyms:
19067    None
19068
19069Related Commands:
19070    / PRINTER     = Re-executes saved commands and re-directs the
19071                    output to a printer.
19072    SAVE          = Specify commands to be saved for subsequent
19073                    re-execution.
19074
19075Applications:
19076    XX
19077
19078Implementation Date:
19079    XX
19080
19081Program:
19082    XX
19083
19084-----PRINTING-------------------------------------------------------
19085
19086PRINTING
19087
19088Name:
19089    PRINTING
19090
19091Type:
19092    Support Command
19093
19094Purpose:
19095    Specifies whether the usual tabular output that is generated by
19096    most analysis category commands (FIT, SMOOTH, ANOVA, SUMMARY,
19097    etc.) should be printed or suppressed.
19098
19099Syntax:
19100    PRINTING   <ON or OFF>
19101    where ON specifies that the output should be printed while OFF
19102             specifies that is should not be printed.
19103
19104Examples:
19105    PRINTING ON
19106    PRINTING OFF
19107    PRINTING
19108
19109Note:
19110    The PRINTING command with no arguments is equivalent to
19111    PRINTING ON.
19112
19113Default:
19114    At sign-on, the default is printing (i.e., ON).
19115
19116Synonyms:
19117    None
19118
19119Related Commands:
19120    ECHO         = Allows/suppresses command echoing.
19121    FEEDBACK     = Allows/suppresses feedback messages.
19122    PROMPT       = Allows/suppresses the prompt character.
19123    SET          = Sets the value of an internal variable (e.g., IPR).
19124    PROBE        = Displays the value of an internal variable (e.g.,
19125                   IPR).
19126
19127Applications:
19128    Presentation
19129
19130Implementation Date:
19131    Pre-1987
19132
19133Program:
19134    XX
19135
19136-----PROBABILITY PLOT-------------------------------------------------
19137
19138PROBABILITY PLOT
19139
19140Name:
19141    ... PROBABILITY PLOT
19142
19143Type:
19144    Graphics Command
19145
19146Purpose:
19147    Generates a probability plot for one of 130+ distributions.
19148
19149Description:
19150    A probability plot is a graphical data analysis technique for
19151    determining how well the specified distribution fits the data
19152    set.  Linearity in the probability plot is indicative of a good
19153    distributional fit.
19154
19155    The probability plot consists of:
19156
19157       Vertical   axis = ordered observations;
19158       Horizontal axis = percent point function of the order
19159                         statistic medians.
19160
19161    This is essentially a plot of the data percentiles versus
19162    the percentiles of the theoretical distribution.  Dataplot
19163    computes the percent point function of the uniform order
19164    statistic medians to compute the percentiles of the theoretical
19165    distribution.
19166
19167    DATAPLOT has extensive probability plot capabilities (130+
19168    distributions/distributional families are available).  When
19169    distributional families are specified, the LET command is used
19170    before the PROBABILITY PLOT command to specify which member
19171    of the distributional family is desired.  For example,
19172
19173       LET GAMMA = 5.3
19174       WEIBULL PROBABILITY PLOT Y
19175
19176    The name of the distributional parameter for families is given in
19177    the list below.
19178
19179    Probability plots serve two primary uses.
19180
19181       1) Distributional Modeling
19182
19183          The slope and intercept of the line fit to the probability
19184          plot are estimates for the location and scale parameters
19185          of the distribution.
19186
19187          The following provides one possible approach to
19188          distributional modeling.
19189
19190          a) If the distribution has one or two shape parameters,
19191             use the PPCC PLOT or KS PLOT to obtain estimates for
19192             the shape parameters (HELP PPCC PLOT or HELP KS PLOT for
19193             details).
19194
19195          b) Once the shape parameters (if any) have been estimated,
19196             generate the probability plot to obtain estimates for
19197             the location and scale parameters.
19198
19199          c) The bootstrap can be used to obtain confidence intervals
19200             for the distribution parameters and selected quantiles.
19201             Enter HELP DISTRIBUTIONAL BOOTSTRAP for details.
19202
19203       2) Goodness of Fit
19204
19205          The probability plot provides a graphical assessment of
19206          goodness of fit.  The straighter the probability plot,
19207          the better the fit.  One advantage of the graphical
19208          approach over quantitative measures (e.g., Kolmogorov-Smirnov
19209          test) is that it provides an indication of how the
19210          distribution is not a good fit.  This can provide guidance
19211          to a better distributional model.
19212
19213          The correlation coefficient of the points on the probability
19214          plot provides a numerical measure of the straightness of
19215          the probability plot.  Dataplot automatically saves this
19216          value in the internal parameter PPCC.  The PPCC values
19217          provide a useful ranking measure when comparing different
19218          distributional models.
19219
19220Syntax 1:
19221    <dist>  PROBABILITY PLOT  <y>   <SUBSET/EXCEPT/FOR/qualification>
19222    where <y> is a response variable of raw data values;
19223          <dist> is one of the following distributions:
19224
19225          Distributions with only location and scale parameters
19226            1) NORMAL
19227            2) HALFNORMAL
19228            3) SLASH
19229            4) COSINE
19230            5) LOGISTIC
19231            6) HALF LOGISTIC
19232            7) HYPERBOLIC SECANT
19233            8) CAUCHY
19234            9) HALF CAUCHY
19235           10) DOUBLE EXPONENTIAL
19236           11) EXPONENTIAL
19237           12) EXTREME VALUE TYPE 1  (or GUMBEL)
19238           13) UNIFORM
19239           14) SEMI-CIRCULAR
19240           15) ANGLIT
19241           16) ARCSIN
19242           17) RAYLEIGH
19243
19244          Distributions with one shape parameter
19245            1) MAXWELL                     (SIGMA)
19246            2) WEIBULL                     (GAMMA)
19247            3) DOUBLE WEIBULL              (GAMMA)
19248            4) INVERTED WEIBULL            (GAMMA)
19249            5) GAMMA                       (GAMMA)
19250            6) LOG GAMMA                   (GAMMA)
19251            7) DOUBLE GAMMA                (GAMMA)
19252            8) INVERTED GAMMA              (GAMMA)
19253            9) WALD                        (GAMMA)
19254           10) FATIGUE LIFE                (GAMMA)
19255           11) EXTREME VALUE TYPE 2        (GAMMA)
19256           12) GENERALIZED EXTREME VALUE   (GAMMA)
19257           13) PARETO                      (GAMMA)
19258           14) PARETO SECOND KIND          (GAMMA)
19259           15) GENERALIZED PARETO          (GAMMA)
19260           16) GENERALIZED HALF LOGISTIC   (GAMMA)
19261           17) TUKEY LAMBDA                (LAMBDA)
19262           18) SKEWED NORMAL               (LAMBDA)
19263           19) SKEW DOUBLE EXPONENTIAL     (LAMBDA)
19264           20) POISSON                     (LAMBDA)
19265           21) T                           (NU)
19266           22) FOLDED T                    (NU)
19267           23) CHI-SQUARED                 (NU)
19268           24) CHI                         (NU)
19269           25) LOGNORMAL                   (SD)
19270           26) LOG DOUBLE EXPONENTIAL      (ALPHA)
19271           27) ERROR                       (ALPHA)
19272           28) GENERALIZED LOGISTIC        (ALPHA)
19273           29) GENERALIZED LOGISTIC TYPE 2 (ALPHA)
19274           30) GENERALIZED LOGISTIC TYPE 3 (ALPHA)
19275           31) GENERALIZED LOGISTIC TYPE 5 (ALPHA)
19276           32) MCLEISH                     (ALPHA)
19277           33) ZETA                        (ALPHA)
19278           34) WRAPPED CAUCHY              (C)
19279           35) POWER FUNCTION              (C)
19280           36) TRIANGULAR                  (C)
19281           37) LOG LOGISTIC                (DELTA)
19282           38) VON-MISES                   (B)
19283           39) DISCRETE UNIFORM            (N)
19284           40) LEADS IN COIN TOSSING       (N)
19285           41) GEOMETRIC                   (P)
19286           42) YULE                        (P)
19287           43) LOGARITHMIC SERIES          (THETA)
19288           44) RECIPROCAL                  (B)
19289           45) BRADFORD                    (BETA)
19290           46) TOPP AND LEONE              (BETA)
19291           47) ASYMMETRIC DOUBLE EXPO      (K)
19292           48) CLASSICAL MATCHING          (K)
19293
19294          Distributions with two shape parameter
19295            1) POWER-NORMAL                (P, SD)
19296            2) POWER-LOGNORMAL             (P, SD)
19297            3) FOLDED NORMAL               (M, SD)
19298            4) FOLDED CAUCHY               (M, SD)
19299            5) SKEWED T                    (LAMBDA, NU)
19300            6) NONCENTRAL T                (NU, LAMBDA)
19301            7) NONCENTRAL CHISQUARE        (NU, LAMBDA)
19302            8) LOG SKEWED NORMAL           (LAMBDA, SD)
19303            9) BOREL TANNER                (LAMBDA, K)
19304           10) LAGRANGE POISSON            (LAMBDA, THETA)
19305           11) BETA                        (ALPHA, BETA)
19306           12) INVERTED BETA               (ALPHA, BETA)
19307           13) BETA BINOMIAL               (ALPHA, BETA)
19308           14) HERMITE                     (ALPHA, BETA)
19309           15) EXPONENTIAL POWER           (ALPHA, BETA)
19310           16) BETA NORMAL                 (ALPHA, BETA)
19311           17) ASYMMETRIC LOG DOUBLE EXPO  (ALPHA, BETA)
19312           18) BETA GEOMETRIC              (ALPHA, BETA)
19313           19) ALPHA                       (ALPHA, BETA)
19314           20) KATZ                        (ALPHA, BETA)
19315           21) GENERALIZED TOPP AND LEONE  (ALPHA, BETA)
19316           22) REFLECTED GENE TOPP LEONE   (ALPHA, BETA)
19317           23) G AND H                     (G, H)
19318           24) JOHNSON SB                  (ALPHA1, ALPHA2)
19319           25) JOHNSON SU                  (ALPHA1, ALPHA2)
19320           26) EXPONENTIATED WEIBULL       (GAMMA, THETA)
19321           27) GENERALIZED GAMMA           (GAMMA, C)
19322           28) INVERSE GAUSSIAN            (GAMMA, MU)
19323           29) RECIPROCAL INVERSE GAUSSIAN (GAMMA, MU)
19324           30) F                           (NU1, NU2)
19325           31) TWO-SIDED POWER             (THETA, N)
19326           32) POLYA AEPPLI                (THETA, P)
19327           33) GENERALIZED LOGA SERIES     (THETA, BETA)
19328           34) GEETA                       (THETA, BETA or MU, BETA)
19329           35) CONSUL                      (THETA, BETA or MU, BETA)
19330           36) BINOMIAL                    (N, P)
19331           37) WARING                      (A, C)
19332           38) GOMPERTZ                    (C, B)
19333           39) GENERALIZED MCLEISH         (ALPHA, A)
19334           40) ZIPF                        (ALPHA, N)
19335           41) NEGATIVE BINOMIAL           (K, P)
19336           42) GENERALIZED LOGISTIC TYPE 4 (P, Q)
19337           43) LOST GAMES                  (P, R)
19338           44) DISCRETE WEIBULL            (BETA, Q)
19339           45) CONSUL                      (THETA, M)
19340
19341          Distributions with three or more shape parameter
19342            1) LOG SKEWED T                (LAMBDA, NU, SD)
19343            2) DOUBLY NONCENTRAL T         (NU, LAMBDA1, LAMBDA2)
19344            3) NONCENTRAL F                (NU1, NU2, LAMBDA)
19345            4) NONCENTRAL BETA             (ALPHA, BETA, LAMBDA)
19346            5) TRUNCATED EXPONENTIAL       (X0, M, SD)
19347            6) GENERALIZED EXPONENTIAL     (LAMBDA1, LAMBDA2, S)
19348            7) GOMPERTZ-MAKEHAM            (XI, LAMBDA, THETA)
19349            8) MIELKE BETA-KAPPA           (BETA, THETA, K)
19350            9) HYPERGEOMETRIC              (K, N, M)
19351           10) GENERALIZED INVERSE GAUSS   (CHI, LAMBDA, THETA)
19352           11) BESSEL I                    (SIGMA1SQ, SIGMA2SQ, NU)
19353                                           (B, C, M)
19354           12) BESSEL K                    (SIGMA1SQ, SIGMA2SQ, NU)
19355                                           (B, C, M)
19356           13) WAKEBY                      (GAMMA, BETA, DELTA)
19357           14) BETA-NEGATIVE BINOMIAL      (ALPHA, BETA, K)
19358           15) GENERALIZED NEGATIVE BINO   (THETA, BETA, M)
19359           16) QUASI BINOMIAL TYPE I       (P, M, PHI)
19360           17) GENERALIZED LOST GAMES      (P, A, J)
19361
19362           18) DOUBLY NONCENTRAL F         (NU1, NU2, LAMBDA1, LAMBDA2)
19363           19) TRUNCATED NORMAL            (A, B, M, SD)
19364           20) TRAPEZOID                   (A, B, C, D)
19365           21) LOG BETA                    (ALPHA, BETA, C, D)
19366           22) TRUNCATED GENE NEGA BINO    (THETA, BETA, M, N)
19367
19368           23) NORMAL MIXTURE              (MU1, SD1, MU2, SD2, P)
19369           24) BI-WEIBULL                  (SCALE1, GAMMA1, LOC2, SCALE2,
19370                                           GAMMA2)
19371
19372           25) GENERALIZED TRAPEZOID       (A, B, C, D, NU1, NU3, ALPHA)
19373    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
19374
19375    This syntax is used for the case where we have raw data.  Note that
19376    the response variable can also be a matrix.  If a matrix name is
19377    encountered, a probability plot will be drawn for all values in
19378    the matrix.
19379
19380Syntax 2:
19381    <dist> CENSORED PROBABILITY PLOT <y> <x>
19382                      <SUBSET/EXCEPT/FOR/qualification>
19383    where <y> is the variable of raw data values under analysis;
19384          <x> is the censoring variable;
19385          <dist> is one of the distributions listed above;
19386    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
19387
19388    This syntax is used for the case where we have censored data.
19389    A value of 1 indicates a failure time and a value of 0 indicates
19390    a censoring time.
19391
19392    Censoring is not supported for discrete disributions or grouped data.
19393
19394Syntax 3:
19395    <dist> PROBABILITY PLOT <y> <x>
19396                      <SUBSET/EXCEPT/FOR/qualification>
19397    where <y> is the variable of pre-computed frequencies;
19398          <x> is the variable of distinct values for the variable under
19399              analysis;
19400          <dist> is one of the distributions listed above;
19401    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
19402
19403    This syntax is used for the case where we have frequency
19404    (binned) data.  The bins are defined by their mid-points.
19405
19406Syntax 4:
19407    <dist> CENSORED PROBABILITY PLOT <y> <censor> <x>
19408                      <SUBSET/EXCEPT/FOR/qualification>
19409    where <y> is the variable of pre-computed frequencies;
19410          <censor> is a censoring variable;
19411          <x> is the variable of distinct values for the variable under
19412              analysis;
19413          <dist> is one of the distributions listed above;
19414    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
19415
19416    This syntax is used for the case where we have frequency (binned)
19417    data with censoring.  The bins are defined by their mid-points.
19418    When a particular bin has both censored and uncensored data,
19419    there will be 2 rows with the same value for <x>.
19420
19421    A value of 1 indicates a failure time and a value of 0 indicates
19422    a censoring time for the censoring variable.
19423
19424    Censoring is not supported for discrete disributions or grouped data.
19425
19426Syntax 5:
19427    <dist> PROBABILITY PLOT <y> <xlow> <xhigh>
19428                      <SUBSET/EXCEPT/FOR/qualification>
19429    where <y> is the variable of pre-computed frequencies;
19430          <xlow> is the variable containing the bin lower limit
19431              values;
19432          <xhigh> is the variable containing the bin upper limit
19433              values;
19434          <dist> is one of the distributions listed above;
19435    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
19436
19437    This syntax is used for the case where we have frequency
19438    (binned) data.  The bins are defined by their lower and upper
19439    limits.  This syntax allows bins with unequal widths.
19440
19441Syntax 6:
19442    <dist> CENSORED PROBABILITY PLOT <y> <censor> <xlow> <xhigh>
19443                      <SUBSET/EXCEPT/FOR/qualification>
19444    where <y> is the variable of pre-computed frequencies;
19445          <censor> is a censoring variable;
19446          <xlow> is the variable containing the bin lower limit
19447              values;
19448          <xhigh> is the variable containing the bin upper limit
19449              values;
19450          <dist> is one of the distributions listed above;
19451    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
19452
19453    This syntax is used for the case where we have frequency (binned)
19454    data with censoring.  The bins are defined by their lower and upper
19455    limits.  This syntax allows bins with unequal widths.
19456    When a particular bin has both censored and uncensored data,
19457    there will be 2 rows with the same values for <xlow> and <xhigh>.
19458
19459    A value of 1 indicates a failure time and a value of 0 indicates
19460    a censoring time for the censoring variable.
19461
19462    Censoring is not supported for discrete disributions or grouped data.
19463
19464Syntax 7:
19465    <dist>  MULTIPLE PROBABILITY PLOT  <y1> ... <yk>
19466                                       <SUBSET/EXCEPT/FOR/qualification>
19467    where <y1> ... <yk> is a list of response variables;
19468          <dist> is one of the supported distributions (see syntax 1);
19469    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
19470
19471    Note that response variables can also be matrices.  If a matrix
19472    name is encountered, a probability plot  will be drawn for
19473    all the values in the matrix.  For multiple response variables,
19474    the probability plots will be overlaid on the same plot.
19475
19476Syntax 8:
19477    <dist>  REPLICATED PROBABILITY PLOT  <y>  <x1> ... <xk>
19478                                   <SUBSET/EXCEPT/FOR/qualification>
19479    where <y> is a response variable;
19480          <x1> .... <xk> is a list of one to six group-id variables;
19481          <dist> is one of the supported distributions (see syntax 1);
19482    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
19483
19484    The group-id variables are cross-tabulated and a probability
19485    plot will be generated for each distinct combination of values
19486    for the group-id variables.  These plots will be overlaid on the
19487    same plot.
19488
19489Syntax 9:
19490    <dist>  REPLICATED CENSORED PROBABILITY PLOT <y> <x> <x1>  ... <xk>
19491                                <SUBSET/EXCEPT/FOR/qualification>
19492    where <y> is a response variable;
19493          <x> is a censoring variable;
19494          <x2> is a group-id variable;
19495          <x1> .... <xk> is a list of one to six group-id variables;
19496          <dist> is one of the supported distributions (see syntax 1);
19497    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
19498
19499    The group-id variables are cross-tabulated and a probability
19500    plot will be generated for each distinct combination of values
19501    for the group-id variables.  These plots will be overlaid on the
19502    same plot.
19503
19504    This syntax is used for the case where we have censored data
19505    in addition to replication.  A value of 1 indicates a failure time
19506    and a value of 0 indicates a censoring time.
19507
19508    Censoring is not supported for discrete disributions or grouped data.
19509
19510Syntax 10:
19511    <dist>  SUBSET PROBABILITY PLOT  <y> <x1> ... <xk>
19512                                     <SUBSET/EXCEPT/FOR/qualification>
19513    where <y> is a response variable;
19514          <x1> ... <xk> is a list of one to two group-id variables;
19515          <dist> is one of the supported distributions (see syntax 1);
19516    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
19517
19518    The SUBSET option is similar to but distinct from the REPLICATED
19519    option.  For the REPLICATED option, separate probability plots
19520    are generated for the distinct groups.  For the SUBSET option, a
19521    single probability is generated.  However, the different groups
19522    in the data can be drawn with separate attributes.
19523
19524Examples:
19525    NORMAL PROBABILITY PLOT X
19526    CAUCHY PROBABILITY PLOT X
19527    TUKEY LAMBDA PROBABILITY PLOT X
19528    LOGNORMAL PROBABILITY PLOT X
19529    WEIBULL PROBABILITY PLOT X
19530    EXTREME VALUE TYPE 1 PROBABILITY PLOT X
19531    POISSON PROBABILITY PLOT X
19532    NORMAL PROBABILITY PLOT F X
19533    CAUCHY PROBABILITY PLOT F X
19534    TUKEY LAMBDA PROBABILITY PLOT F X
19535    LOGNORMAL PROBABILITY PLOT F X
19536    WEIBULL PROBABILITY PLOT F X
19537    EXTREME VALUE TYPE 1 PROBABILITY PLOT F X
19538    POISSON PROBABILITY PLOT F X
19539
19540Note:
19541    The PROBABILITY PLOT command automatically saves the following
19542    parameters:
19543
19544        PPCC       - the correlation coeffcient of the points on
19545                     the probability plot
19546        PPA0       - the intercept of the line fitted to the probability
19547                     plot (estimate of the location parameter)
19548        PPA1       - the slope of the line fitted to the probability
19549                     plot (estimate of the scale parameter)
19550        SDPPA0     - the standard deviation of PPA0
19551        SDPPA1     - the standard deviation of PPA1
19552        PPRESSD    - the residual standard deviation of the line fitted
19553                     to the probability plot
19554        PPRESDF    - the residual degrees of freedom of the line fitted
19555                     to the probability plot
19556        PPA0BW     - the intercept of the line fitted to the probability
19557                     plot with biweight weighting of the residuals
19558        PPA1BW     - the slope of the line fitted to the probability
19559                     plot with biweight weighting of the residuals
19560
19561    The PPCC value provides a measure of the linearity of the
19562    probability plot.
19563
19564    The PPA0 and PPA1 provides estimates of the location and scale
19565    parameters.
19566
19567    For some distributions with heavy tails (e.g., Cauchy, slash),
19568    there can be extreme variability in the first few and last few
19569    points in the probability plot.  This can distort the estimates
19570    of location and scale.  Two iterations of biweight weighting of
19571    the residuals are applied to obtain PPA0BW and PPA1BW.  In most
19572    cases, using PPA0 and PPA1 are preferred.  However, in cases
19573    where there is extreme non-linearity in the tails, using
19574    PPA0BW and PPA1BW may be preferred as the location and scale
19575    estimates.
19576
19577Note:
19578    For uncensored data, Dataplot uses the uniform order statistic
19579    medians to determine the plotting positions.  This needs to be
19580    modified somewhat for censored data.
19581
19582    For singly censored data (i.e., all the censored data have
19583    the same censoring time), we can use the N from the full sample
19584    to compute the uniform order statistics.  However, we only plot
19585    the failure times.
19586
19587    An alternative that works with both singly and multiply (the
19588    censoring times are not necessarily the same) is to base the
19589    plotting positions on the Kaplan-Meier statistic.  That is,
19590
19591    p(i) = ((n+0.7)/(n+0.4))*PRODUCT[k=1 to i][((n-k+0.7)/(n-k+1.7)]
19592
19593    with n denoting the full sample size. Again, only plotting
19594    positiions corresponding to failure times are plotted.
19595    The percent point function is computed on the p(i) values.
19596
19597    This method for censored probability plots is discussed in
19598    more detail on pp. 43-46 of the Bury book (see the References
19599    section below).
19600
19601    To specify which method to use, enter the command
19602
19603          SET CENSORED PROBABILITY PLOT
19604              <KAPLAN-MEIER/UNIFORM ORDER STATISTIC MEDIANS>
19605
19606Note:
19607    An alternative to binning data is to use the command
19608
19609         SET PROBABILITY PLOT DATA POINTS <value>
19610
19611    When this command is entered, Dataplot will compute <value>
19612    equally spaced percentiles and compute the probability plot
19613    on these percentiles.  This option can be useful when generating
19614    probability plots on large data sets for distributions with
19615    expensive percent point functions.
19616
19617Note:
19618    For discrete distributions, the data will typicall consist of
19619    integers.  In this case, it is helpful to group the data based
19620    on these integer values.  The following code shows the
19621    recommended way for doing this:
19622
19623      LET YLOW = MINIMUM Y
19624      LET YUPP = MAXIMUM Y
19625      LET YLOW = YLOW - 0.5
19626      CLASS LOWER YLOW
19627      LET YUPP = YUPP + 0.5
19628      CLASS UPPER YUPP
19629      CLASS WIDTH = 1
19630      LET Y2 X2 = BINNED Y
19631      LET LAMBDA = 4.2
19632      POISSON PROBABILITY PLOT Y2 X2
19633
19634    This will center the bins around the integer values and will
19635    cover the first and last class.
19636
19637Note:
19638    By default, the theoretical distribution is plotted for the
19639    standard form (i.e., location = 0, scale = 1).  The slope
19640    and intercept of the line fit to points on the probability
19641    plot provide estimates for the location and scale parameters.
19642
19643    However, if the location/scale parameters are estimated by
19644    some other method (e.g., maximum likelihood), it may be
19645    desirable to fix the location/scale parameters on the
19646    probability plot.  To do this, enter the commands
19647
19648        LET PPLOC = <value>
19649        LET PPSCALE = <value>
19650
19651Note:
19652    The TO syntax is supported for the PROBABILITY PLOT command.
19653    It is most useful for the MULTIPLE version of the command.
19654
19655Default:
19656    None
19657
19658Synonyms:
19659    EV2 and FRECHET are synonyms for EXTREME VALUE TYPE 2.
19660    EV1 and GUMBEL are synonyms for EXTREME VALUE TYPE 1.
19661    FATIGUE LIFE is a synonym for FL.
19662    RECIPROCAL INVERSE GAUSSIAN is a synonym for RIG.
19663    IG is a synonym for INVERSE GAUSSIAN.
19664    SKEW LAPLACE is a synonym for SKEW DOUBLE EXPONENTIAL
19665    ASYMMETRIC LAPLACE is a synonym for ASYMMETRIC DOUBLE EXPONENTIAL
19666    HIGHLIGHT PROBABILITY PLOT is a synonym for SUBSET PROBABILITY PLOT
19667
19668Related Commands:
19669    FREQUENCY PLOT     = Generates a frequency plot.
19670    HISTOGRAM          = Generates a histogram.
19671    PIE CHART          = Generates a pie chart.
19672    PERCENT POINT PLOT = Generates a percent point plot.
19673    PPCC PLOT          = Generates probability plot correlation
19674                         coefficient plot.
19675    PLOT               = Generates a data or function plot.
19676
19677References:
19678    "The Probability Plot Correlation Coefficient Test for Normality",
19679    James J. Filliben,  Technometrics, Vol. 17, No. 1, February 1975.
19680
19681    "Graphical Methods of Data Analysis", Chambers, Cleveland, Kleiner,
19682    and Tukey,  Wadsworth, 1983.
19683
19684    "Statistical Distributions in Engineering", Karl Bury, Cambridge
19685    University Press, 1999.
19686
19687Applications:
19688    Distributional Analysis
19689
19690Implementation Date:
19691    Pre-1987
19692       1990/5: WALD, FL, RIG, INVERSE GAUSSIAN
19693       1993/12: GENERALIZED PARETO
19694       1994/9: DISCRETE UNIFORM, NON-CENTRAL T,
19695               NON-CENTRAL F, NON-CENTRAL CHI-SQUARE,
19696               NON-CENTRAL BETA, DOUBLY NON-CENTRAL T,
19697               DOUBLY NON-CENTRAL F, HYPERGEOMETRIC
19698       1994/10: VON-MISES
19699       1995/5: POWER LOGNORMAL, POWER NORMAL, COSINE,
19700               ALPHA, POWER FUNCTION, CHI,
19701               LOGARITHMIC SERIES, LOG LOGISTIC,
19702               GENERALIZED GAMMA, WARING
19703       1995/9: ANGLIT, ARCSIN, FOLDED NORMAL, TRUNCATED NORMAL
19704       1995/10: LOG GAMMA, HYPERBOLIC SECANT, GOMPERTZ
19705       1995/12: PARETO SECOND KIND, DOUBLE WEIBULL,
19706                WRAPPED UP CAUCHY, EXPONENTIATED WEIBULL,
19707                TRUNCATED EXPONENTIAL
19708                GENERALIZED LOGISTIC, EXPONENTIAL POWER
19709       1996/1: DOUBLE GAMMA, BETA-KAPPA, FOLDED CAUCHY
19710       1996/5: BETA BINOMIAL, GENERALIZED EXPONENTIAL
19711       1998/5: RECIPROCAL, NORMAL MIXTURE, INVERTED GAMMA
19712       2001/10: GENERALIZED LAMBDA, JOHNSON SU,
19713                JOHNSON SB, INVERTED WEIBULL,
19714                LOG DOUBLE EXPONENTIAL
19715       2002/5: TWO-SIDED POWER, BI-WEIBULL
19716       2003/5: ERROR
19717       2004/1: TRAPEZOID, GENERALIZED TRAPEZOID, FOLDED T,
19718               SKEWED T, SKEWED NORMAL, SLASH, INVERTED BETA,
19719               G AND H
19720       2004/5: Implemented the automatic computation of the
19721               biweight fit (PPA0BW and PPA1BW)
19722       2004/5: LOG SKEW NORMAL, LOG SKEW T, HERMITE, YULE
19723       2004/5: Fixed a number of bugs for various distributions
19724       2004/6: SKEW DOUBLE EXPONENTIAL, ASYMMETRIC DOUBLE EXPONENTIAL,
19725               MAXWELL, RAYLEIGH
19726       2004/8: Meeker reparameterization of GOMPERTZ MAKEHAM,
19727               GENERALIZED ASYMMETRIC LAPLACE,
19728               GENERALIZED INVERSE GAUSSIAN
19729       2004/9: MCLEISH, GENERALIZED MCLEISH, BESSEL I FUNCTION,
19730               BESSEL K FUNCTION
19731       2004/10: SET PROBABILITY DATA POINTS
19732       2004/10: Support for censored data
19733       2005/5: Support unequal bin widths for frequency data
19734       2009/9: Support for TO syntax and matrix arguments
19735       2009/9: Support for MULTIPLE and REPLICATION options
19736       2010/1: Support for HIGHLIGHT/SUBSET option
19737
19738Program:
19739    MULTIPLOT 2 2; MULTIPLOT CORNER COORDINATES 0 0 100 100
19740    TITLE AUTOMATIC; X1LABEL THEORETICAL VALUE; Y1LABEL DATA VALUE
19741    .
19742    LET Y = NORMAL RANDOM NUMBERS FOR I = 1 1 100
19743    NORMAL PROBABILITY PLOT Y
19744    .
19745    LET NU = 5
19746    LET Y = CHI-SQUARE RANDOM NUMBERS FOR I = 1 1 100
19747    CHI-SQUARE PROBABILITY PLOT Y
19748    .
19749    LET Y = EXPONENTIAL RANDOM NUMBERS FOR I = 1 1 100
19750    EXPONENTIAL PROBABILITY PLOT Y
19751    .
19752    LET Y = CAUCHY RANDOM NUMBERS FOR I = 1 1 1000
19753    LEGEND 1 CAUCHY RANDOM NUMBERS
19754    NORMAL PROBABILITY PLOT Y
19755    END OF MULTIPLOT
19756
19757-----PROBABILITY WEIGHTED MOMENTS (LET)----------------------------
19758
19759PROBABILITY WEIGHTED MOMENTS
19760
19761Name:
19762    PROBABILITY WEIGHTED MOMENTS (LET)
19763
19764Type:
19765    Let Subcommand
19766
19767Purpose:
19768    Compute the probability weighted moments of a variable.
19769
19770Description:
19771    Given a random variable X with a cumulative distribution
19772    function F, the probability weighted moments are defined
19773    to be:
19774
19775        M(p,r,s) = E[X**p{F(X)}**r{1 - F(X)}**s]
19776
19777    Two special cases are
19778
19779        alpha(r) = M(1,0,r) = E[X{1 - F(X)}**r]
19780        beta(r)  = M(1,r,0) = E[X{F(X)}**r]
19781
19782    For an ordered sample x(1:n) <= x(2:n) <= ... <= x(n:n),
19783    unbiased estimators of alpha(r) and beta(r) are:
19784
19785        a(r) = (1/n)*SUM[j=1 to n][(n-j)*(n-j-1)* ... *(n-j-r+1)/
19786               ((n-1)*(n-2)* ... *(n-r))]*xj:n
19787
19788        b(r) = (1/n)*SUM[j=1 to n][(j-1)*(j-2)* ... *(j-r)/
19789               ((n-1)*(n-2)* ,,,*(n-r))]*xj:n
19790
19791     The primary use of probability weighted moments (and the
19792     related L-moments) is in the estimation of parameters for
19793     a probability distribution.  For a more detailed description
19794     of probability weighted moments and L-moments, see the papers
19795     listed in the References section below (in particular, the
19796     papers by Hoskings).  Estimates based on probability
19797     weighted moments are often considered to be superior to
19798     standard moment-based estimates.  They are sometimes used
19799     when maximum likelihood estimates are unavailable or
19800     difficult to compute.  They may also be used as starting
19801     values for maximum likelihood estimates.  Estimation methods
19802     based on probability weighted moments are discussed
19803     in the papers listed in the Reference section below
19804     (Dataplot generates L-moment based estimates for the
19805     maximum likelihood estimates for the generalized Pareto and
19806     the generalized extreme value distributions).
19807
19808Syntax 1:
19809    LET <y> = PROBABILITY WEIGHTED MOMENTS <x> <nmom>
19810              <SUBSET/EXCEPT/FOR qualification>
19811    where <x> is the response variable;
19812          <nmom> is the number of probability weighted moments
19813              that will be generated;
19814          <y> is a variable where the computed probability
19815              weighted moments are saved;
19816    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
19817
19818    This syntax computes the alpha probability weighted moments.
19819
19820Syntax 2:
19821    LET <y> = BETA PROBABILITY WEIGHTED MOMENTS <x> <nmom>
19822              <SUBSET/EXCEPT/FOR qualification>
19823    where <x> is the response variable;
19824          <nmom> is the number of probability weighted moments
19825              that will be generated;
19826          <y> is a variable where the computed probability
19827              weighted moments are saved;
19828    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
19829
19830    This syntax computes the beta probability weighted moments.
19831
19832Examples:
19833    LET PWM = PROBABILITY WEIGHTED MOMENTS Y 5
19834    LET PWM = PROBABILITY WEIGHTED MOMENTS Y 4  SUBSET Y > 0
19835
19836Note:
19837    Dataplot computes probability weighted moments using the
19838    SAMPWM routine written by Hoskings and documented in
19839    "Research Report: Fortran Routines for use with the Method
19840    of L-Moments" (see the Reference section below).
19841
19842    This routine is available from the statlib archive
19843    (http://lib.stat.cmu.edu/) at the following URL
19844
19845        http://lib.stat.cmu.edu/general/lmoments
19846
19847Note:
19848    L-moments   are  linear combinations  of  probability weighted
19849    moments  and are frequently used  in the application of probability
19850    weighted moments.
19851
19852Default:
19853    If the <nmom> parameter is omitted from the command, the
19854    first four sample probability weighted moments are computed.
19855
19856    By default, Dataplot computes the alpha probability weighted
19857    moments.
19858
19859Synonyms:
19860    None
19861
19862Related Commands:
19863    L MOMENTS           = Compute the sample L-moments of a
19864                          variable.
19865    MAXIMUM LIKELIHOOD  = Compute maximum likelihood estimates for
19866                          a probability distribution.
19867
19868References:
19869    "Research Report: Fortran Routines for use with the Method
19870    of L-Moments", J. R. M. Hosking, IBM Research Division,
19871    T. J. Watson Research Center, Yorktown Heights, NY 10598,
19872    6/2000.
19873
19874    "Probability Weighted Moments: Definition and Relation to
19875    Parameters of Several Distributions Expressable in Inverse
19876    Form", Greenwood, Landwehr, Matalas, and Wallis, Water
19877    Resources Research, 15, 1079, 1049-1054.
19878
19879    "Estimation of the Generalized Extreme Value Distribution
19880    by the Method of Probability-Weighte Moments", Hosking,
19881    Wallis, and Wood, Technometrics, 27, 1985, 251-261.
19882
19883    "Probability Weighted Moments Compared with Some Traditional
19884    Techniques in Estimating Gumbel Parameters and Quantiles",
19885    Landwehr, Matalas, Wallis, Water Resources Research,
19886    15, (1979a), 1055-1064.
19887
19888Applications:
19889    Distributional Modeling
19890
19891Implementation Date:
19892    2005/12
19893
19894Program:
19895    LET GAMMA = -0.3
19896    LET Y = GENERALIZED PARETO RANDOM NUMBERS FOR I = 1 1 100
19897    LET Y = 5*Y + 2
19898    LET PROBMOME = PROBABILITY WEIGHTED MOMENTS Y
19899
19900-----PROBE---------------------------------------------
19901
19902PROBE
19903
19904Name:
19905    PROBE
19906
19907Type:
19908    Support Command
19909
19910Purpose:
19911    Dumps (prints out) the contents of certain internal underlying
19912    Fortran variables.
19913
19914Description:
19915    This command provides information which may assist in
19916    implementation and debugging.  Hence it is normally only used by
19917    the service group which implements DATAPLOT on your computer.
19918
19919Syntax:
19920    PROBE   <name>
19921    where <name> is the underlying Fortran variable to print.
19922
19923Examples:
19924    PROBE NUMCOL
19925    PROBE NUMNAM
19926    PROBE IBUGSU
19927
19928Note:
19929    The list of the variables that can probed is documented under
19930    the SET command.  Enter HELP SET to examine the list.
19931
19932Note:
19933    The PROBE command is used to return the values of certain
19934    internal parameters and strings.  This command was updated
19935    so that the returned value is automatically saved.  If the
19936    returned value is an integer or real number, then the value
19937    is stored in the internal parameter PROBEVAL.  If the
19938    returned value is a string, then the value is stored in the
19939    internal string PROBESTR.  PROBESTR and PROBEVAL can then be
19940    used in the same way as other parameters and strings.
19941
19942    This feature is typically used in macros.  For example, you
19943    might want to use the machine maximum value as a "missing
19944    value" indicator.  A host independent way of using this value
19945    would now be:
19946
19947       PROBE CPUMAX
19948       LET MACHMAX = PROBVAL
19949
19950    You could then use the parameter MACHMAX wherever you wanted
19951    to define a missing value.
19952
19953    This feature was implemented 1998/8.
19954
19955Default:
19956    None
19957
19958Synonyms:
19959    None
19960
19961Related Commands:
19962    SET   = Specify the value for an underlying Fortran variable.
19963
19964Applications:
19965    Implementation and debugging
19966
19967Implementation Date:
19968    Pre-1987
19969
19970Program:
19971    XX
19972
19973-----PROCESS ID---------------------------------------------------
19974
19975PROCESS ID
19976
19977Name:
19978    PROCESS ID
19979
19980Type:
19981    Support Command
19982
19983Purpose:
19984    The PROCESS ID command returns the process id and stores it
19985    in the internal Dataplot parameter PID.
19986
19987Description:
19988    This command is compiler dependent.  Dataplot currently
19989    supports this command on the following compilers/platforms:
19990
19991       1. INTEL Fortran compiler (Windows 2000/XP)
19992       2. g77 (Linux, cygwin, Sun Solaris)
19993
19994    The primary use of this command is to generate unique
19995    file names (for an example, see the Program example below).
19996
19997Syntax:
19998    PROCESS ID
19999
20000Example:
20001    PROCESS ID
20002
20003Default:
20004    None
20005
20006Synonyms:
20007    PID
20008
20009Related Commands:
20010    SYSTEM        = Issue an operating system command.
20011    SLEEP         = Pause for <n> seconds.
20012    CD            = Change the current directory
20013
20014Applications:
20015    Utility Command
20016
20017Implementation Date:
20018    2006/3
20019
20020Program:
20021    LET STRING BASENAME = dppl1f.dat
20022    PROCESS ID
20023    LET STRING PLOTNAME = ^basename.^pid
20024    SET IPL1NA ^PLOTNAME
20025    DEVICE 2 POSTSCRIPT
20026    PLOT X**2 FOR X = 1 1 9
20027    DEVICE 2 CLOSE
20028    SYSTEM lpr ^PLOTNAME
20029
20030-----PRODUCT (LET)---------------------------------------------------
20031
20032PRODUCT
20033
20034Name:
20035    PRODUCT (LET)
20036
20037Type:
20038    Let Subcommand
20039
20040Purpose:
20041    Compute the product of the elements in a variable.
20042
20043Syntax:
20044    LET <par> = PRODUCT <x1>  <SUBSET/EXCEPT/FOR qualification>
20045    where <x1> is the variable for which the product will be computed;
20046          <par> is a parameter where the computed product is saved;
20047    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
20048
20049Examples:
20050    LET PROD = PRODUCT Y1
20051    LET PROD = PRODUCT Y1  SUBSET TAG > 2
20052
20053Default:
20054    None
20055
20056Synonyms:
20057    None
20058
20059Related Commands:
20060    SEQUENCE       = Generate a sequence of numbers.
20061    PATTERN        = Generate numbers with a specific pattern.
20062    SUM            = Compute the sum of the elements in a variable.
20063    INTEGRAL       = Compute the integral of the elements in a variable.
20064    PRODUCT PLOT   = Generate a products (versus subsets) plot.
20065
20066Applications:
20067    Rare Usage
20068
20069Implementation Date:
20070    XX
20071
20072Program:
20073    .  THIS EXAMPLE COMPUTES FACTORIALS
20074    LET N = 10
20075    LOOP FOR K = 1 1 N
20076       LET Y1 = SEQUENCE 1 1 K
20077       LET A = PRODUCT Y1
20078       PRINT K A
20079    END OF LOOP
20080
20081-----PRODUCT PLOT---------------------------------------------------
20082
20083PRODUCT PLOT
20084
20085Name:
20086    PRODUCT PLOT
20087
20088Type:
20089    Graphics Command
20090
20091Purpose:
20092    Generates a product plot.
20093
20094Description:
20095    A product plot is a plot consisting of subsample products versus
20096    subsample index.  The subsample product is the product of the data
20097    in the subsample.  The product plot is used to answer the
20098    question-- "Does the subsample product change over different
20099    subsamples?".  The plot consists of:
20100       Vertical   axis = subsample product;
20101       Horizontal axis = subsample index.
20102    The PRODUCT PLOT yields 2 traces--
20103       1. a subsample product trace; and
20104       2. a full-sample product reference line.
20105    Like usual, the appearance of these 2 traces is
20106    controlled by the first 2 settings of the LINES,
20107    CHARACTERS, SPIKES, BARS, and similar attributes.
20108
20109Syntax:
20110    PRODUCT PLOT   <y>   <x>    <SUBSET/EXCEPT/FOR qualification>
20111    where <y> is the response (= dependent) variable;
20112          <x> is the subsample identifier variable (this variable
20113              appears on the horizontal axis);
20114    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
20115
20116Examples:
20117    PRODUCT PLOT Y X
20118    PRODUCT PLOT Y X1  SUBSET X1 < 22
20119
20120Default:
20121    None
20122
20123Synonyms:
20124    None
20125
20126Related Commands:
20127    CHARACTERS         = Sets the type for plot characters.
20128    LINES              = Sets the type for plot lines.
20129    SUM PLOT           = Generates a sum plot.
20130    PLOT               = Generates a data or function plot.
20131
20132Applications:
20133    Rare Usage
20134
20135Implementation Date:
20136    88/9
20137
20138Program:
20139    LET Y = DATA 2 4 5 10 4 10 8 2 3
20140    LET X = DATA 1 1 1 2 2 3 3 3 3
20141    LINE BLANK DASH
20142    CHARACTER X BLANK
20143    XLIMITS 0.5 3.5
20144    YLIMITS 0 500
20145    Y1LABEL PRODUCT
20146    X1LABEL GROUP ID
20147    PRODUCT PLOT Y X
20148
20149-----PROFICIENCY TEST --------------------------------------------
20150
20151PROFICIENCY TEST
20152
20153Name:
20154    PROFICIENCY TEST
20155
20156Type:
20157    Analysis Command
20158
20159Purpose:
20160    Generate the tables for either a one-sample or a two-sample
20161    proficiency test as defined by the ASTM E 2489 - 06 standard.
20162
20163Description:
20164    The following document
20165
20166        "Standard Practice for Statistical Analysis of One-Sample
20167        and Two-Sample Proficiency Testing Programs", ASTM
20168        International, 100 Barr Harbor Drive, PO BOX C700,
20169        West Conshohoceken, PA 19428-2959, USA.
20170
20171    describes a methodology for performing either a one-sample or
20172    a two-sample proficiency test.
20173
20174    Proficiency testing is the use of interlaboratory
20175    comparisons for the determination of laboratory testing
20176    or measurement performance.  The methods in the E 2489- 06
20177    standard provide direction for assessing and categorizing
20178    the performances of individual laboratories based on the
20179    relative likelihood of occurence of their test results.
20180
20181    The standard recommends a minimum of 10 laboratories and states
20182    that it is desirable to have 30 or more participating
20183    laboratories.
20184
20185    Proficiency testing programs typically have a larger number
20186    of participants than an interlaboratory test.  This results
20187    in a wider variation of test conditions, so a proficiency
20188    test can provide more information regarding the precision
20189    of test results that may be expected when a test method
20190    is used in the general testing community.
20191
20192    In this standard, the median is used as the consensus value.
20193    The measure of variablility is the interquartile range.  In
20194    this standard, the interquartile range is defined as the difference
20195    between the upper hinge and the lower hinge (this is slightly
20196    different than the standard definition of the interquartile range
20197    as the difference between the 75th percentile and the 25th
20198    percentile).
20199
20200    The lower hinge is the median of the points less than or
20201    equal to the median and the upper hinge is the median of the
20202    points greater than or equal to the median.
20203
20204    The inner fence is the value equal to the upper (lower)
20205    hinge of the data set plus (upper) or minus (lower)
20206    1.5 times the interquartile range.
20207
20208    The outer fence is the value equal to the upper (lower)
20209    hinge of the data set plus (upper) or minus (lower)
20210    3.0 times the interquartile range.
20211
20212    A test result that is between the lower inner fence and
20213    upper inner fence is labeled as "typical".  A test result
20214    that is between the inner and outer fence values is labeled
20215    as "unusual".  A test result that is beyond the outer fence
20216    values is labeled as "extremely unusual".
20217
20218    These statistics are used because they are both simple and robust.
20219    Note that the above values are used in generating a box plot.
20220
20221Description of One-Sample Proficiency Test:
20222    The data consists of:
20223
20224        1. A response variable containing measurements on a sample
20225        2. A lab-id variable
20226
20227    For a one-sample proficiency analysis, each lab reports a
20228    single test result.
20229
20230    This E 2489 one-sample proficiency analysis generates the three
20231    tables documented in the above document:
20232
20233       1) The test results sorted by lab-id.
20234
20235          The purpose of this table is to make it easy to
20236          identify the results for a given laboratory.
20237
20238       2) The test results sorted in descending order with the
20239          median and lower and upper hinges marked.  Each lab's
20240          result is categorized as "extremely unusual", "unusual",
20241          or typical.
20242
20243          The purpose of this table is to show the range and
20244          distribution of the test results.
20245
20246       3) The test results sorted in descending order (as in
20247          table 2).  However, the data are divided into bins.
20248
20249          The purpose of this table is to show the range and
20250          distribution of the test results.
20251
20252    In addition to the tables, the standard also recommends
20253    complementing the tables with a dot plot.  These are also
20254    known as dot diagrams or strip plots.  In Dataplot, these are
20255    referred to as strip plots.  Enter the command HELP STRIP PLOT
20256    for details on generating these plots in Dataplot.  The first
20257    program example below demonstrates this plot.
20258
20259    A strip plot is an alternative to a histogram for displaying
20260    univariate data.  The x-axis contains the value of the test result
20261    and the y-axis is simply a constant value.  If two or more test
20262    results have the same value, the points are stacked vertically.
20263    You can draw the points are drawn as filled circles.  Alternatively,
20264    you can draw the points drawn as the lab-id (this is useful for
20265    identifying outlying labs).
20266
20267    You can also generate the strip plot with the data divided
20268    into bins (you can specify the bin width and the starting
20269    and ending bin limits).  In this form, the vertical axis
20270    will represent the number of occurences.  This form
20271    of the strip plot is essentially a histogram.
20272
20273    Although the E 2489 - 06 standard does not explicitly talk about
20274    box plots, these can also be a useful complement to the tables since
20275    the box plot is a graphical representation of table 2.
20276
20277Description of Two-Sample Proficiency Test:
20278    The data consists of:
20279
20280        1. A response variable containing measurements on the
20281           first sample
20282        2. A response variable containing measurements on the
20283           second sample
20284        3. A lab-id variable
20285
20286    For a two-sample proficiency analysis, each lab reports exactly
20287    two test results (i.e., a single measurement on each sample).
20288
20289    The random error quantity is defined as
20290
20291        (X - Y) - (Xmed -Ymed)
20292
20293    where X and Y denote the test results for sample one and sample two,
20294    respectively, and Xmed and Ymed denote the medians of sample one and
20295    sample two, respectively.
20296
20297    This E 2489 two-sample proficiency analysis generates the three
20298    tables documented in the above document:
20299
20300       1) The test results for both samples sorted by lab-id.
20301
20302          The purpose of this table is to make it easy to
20303          identify the results for a given laboratory.
20304
20305       2) The test results sorted in descending order of the
20306          random error quantity with the median and lower and upper
20307          hinges marked.  The random error quantity for each lab's
20308          result is categorized as "extremely unusual", "unusual",
20309          or "typical".
20310
20311          The purpose of this table is to show the range and
20312          distribution of the random error quantities.
20313
20314       3) The test results sorted in descending order of sample
20315          two with the median and lower and upper hinges marked.
20316          The test results for each sample are categorized as
20317          "extremely unusual", "unusual", or "typical".
20318
20319          The purpose of this table is to show the range and
20320          distribution of the test results for each sample.
20321
20322    The standard also recommends complementing the tables with a
20323    Youden plot. This is demonstrated in the second program
20324    example below.
20325
20326Syntax 1:
20327    ONE SAMPLE PROFICIENCY TEST <y> <labid>
20328                                <SUBSET/EXCEPT/FOR qualification>
20329    where <y> is a response variable;
20330          <labid> is a lab id variable;
20331    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
20332
20333Syntax 2:
20334    TWO SAMPLE PROFICIENCY TEST <y1> <y2> <labid>
20335                                <SUBSET/EXCEPT/FOR qualification>
20336    where <y1> is the first response variable;
20337          <y2> is the second response variable;
20338          <labid> is a lab id variable;
20339    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
20340
20341Examples:
20342    ONE SAMPLE PROFICIENCY TEST Y  LABID
20343    TWO SAMPLE PROFICIENCY TEST Y1  Y2  LABID
20344
20345Note:
20346    You can use the CAPTURE HTML command to generate these tables in
20347    HTML format.  You can use the CAPTURE LATEX command to generate
20348    these tables in Latex format.  You can use the CAPTURE RTF command
20349    to generate these tables in Rich Text Format (RTF).
20350
20351Note:
20352    In table 2 of the one sample proficiency test, if multiple
20353    laboratories have the same value, only the first laboratory id is
20354    printed along with the number of occurrences of that value.
20355
20356    For the "Unusual" and "Extremely Unusual" categories, it may be
20357    desirable to print the individual laboratory id's in the table.
20358
20359    To specify that for both the "Unusual" and "Extremely Unusual"
20360    categories all laborotories will be identified, enter
20361
20362        SET ONE SAMPLE PROFICIENCY TEST IDENTIFY LAB UNUSUAL
20363
20364    To specify that for only the "Extremely Unusual" category all
20365    laborotories will be identified, enter
20366
20367        SET ONE SAMPLE PROFICIENCY TEST IDENTIFY LAB EXTREMELY UNUSUAL
20368
20369    To reset the default, enter
20370
20371        SET ONE SAMPLE PROFICIENCY TEST IDENTIFY LAB DEFAULT
20372
20373Default:
20374    None
20375
20376Synonyms:
20377    None
20378
20379Related Commands:
20380    E691 INTERLAB      = Perform an E691 interlaboratory analysis.
20381    STRIP PLOT         = Generate a strip plot.
20382    BOX PLOT           = Generate a box plot.
20383    YOUDEN PLOT        = Generate a Youden plot.
20384    CAPTURE HTML       = Generate output in HTML format.
20385    CAPTURE LATEX      = Generate output in Latek format.
20386    CAPTURE RTF        = Generate output in RTF format.
20387
20388Reference:
20389    "Standard Practice for Statistical Analysis of One-Sample
20390    and Two-Sample Proficiency Testing Programs", ASTM
20391    International, 100 Barr Harbor Drive, PO BOX C700,
20392    West Conshohoceken, PA 19428-2959, USA.
20393
20394Applications:
20395    Interlaboratory Studies
20396
20397Implementation Date:
20398    2009/01
20399    2019/08: Added the SET ONE SAMPLE PROFICIENCY TEST IDENTIFY LAB
20400             command
20401
20402Program 1:
20403    .
20404    .  Read the data
20405    .
20406    SKIP 25
20407    READ E2489A.DAT LABID Y
20408    .
20409    .  Generate the tables to the screen
20410    .
20411    ONE SAMPLE PROFICIENCY TEST Y LABID
20412    .
20413    .  Now generate the tables in RTF format (for import into Word)
20414    .
20415    CAPTURE RTF ONE.RTF
20416    ONE SAMPLE PROFICIENCY TEST Y LABID
20417    END OF CAPTURE
20418    .
20419    .  Generate the strip plot for the raw (unbinned) data
20420    .
20421    LABEL CASE ASIS
20422    TITLE CASE ASIS
20423    TITLE OFFSET 2
20424    Y1LABEL Number of Occurences
20425    X1LABEL Data Values
20426    TITLE Dot Diagram for Original Data
20427    Y1TIC MARKS OFF
20428    Y1TIC MARK LABELS OFF
20429    Y2FRAME OFF
20430    X2FRAME OFF
20431    YLIMITS 0 2
20432    MAJOR YTIC MARK NUMBER 3
20433    MINOR YTIC MARK NUMBER 0
20434    SET STRIP PLOT STYLE STACK
20435    SET STRIP PLOT INCREMENT 0.1
20436    LET STRING SYMBL = CIRCLE
20437    IF SYMBL = CIRCLE
20438       CHARACTER CIRCLE ALL
20439       CHARACTER FILL ON ALL
20440       CHARACTER HW 1 0.75 ALL
20441    END OF IF
20442    IF SYMBL = LABID
20443       CHARACTER AUTOMATIC LABIDSRT
20444    END OF IF
20445    LINE BLANK ALL
20446    .
20447    STRIP PLOT Y
20448    .
20449    Y1TIC MARKS ON
20450    Y1TIC MARK LABELS ON
20451    .
20452    .  Generate the strip plot for the binned data
20453    .
20454    CLASS LOWER 0.5
20455    CLASS UPPER 5
20456    CLASS WIDTH 0.1
20457    FRAME CORNER COORDINATES 15 40 85 70
20458    Y1LABEL Number of Occurences
20459    X1LABEL Data Values
20460    TITLE Dot Diagram for Binned Data
20461    Y2FRAME OFF
20462    X2FRAME OFF
20463    LET MAXFREQ = MAXIMUM Y2
20464    LET NUMTIC = MAXFREQ + 1
20465    YLIMITS 0 MAXFREQ
20466    MAJOR YTIC MARK NUMBER NUMTIC
20467    MINOR YTIC MARK NUMBER 0
20468    Y1TIC OFFSET 1 1
20469    SET STRIP PLOT STYLE STACK
20470    SET STRIP PLOT INCREMENT 1
20471    CHARACTER CIRCLE ALL
20472    CHARACTER FILL ON ALL
20473    CHARACTER HW 1 0.75 ALL
20474    LINE BLANK ALL
20475    Y1TIC OFFSET 0 0
20476    .
20477    STRIP PLOT Y2 X2
20478    .
20479    FRAME CORNER COORDINATES
20480    CHAR FILL OFF ALL
20481    CHAR BLANK ALL
20482    CHAR HW
20483    LINE SOLID ALL
20484    LIMITS
20485    FRAME ON
20486    MAJOR TIC MARK NUMBER
20487    MINOR TIC MARK NUMBER
20488    .
20489    .  Now generate a box plot
20490    .
20491    Y1LABEL Test Results
20492    X1LABEL
20493    TITLE Box Plot for Proficiency Data
20494    XLIMITS 0 2
20495    XTIC MARKS OFF
20496    XTIC MARK LABELS OFF
20497    CHARACTER BOX PLOT
20498    LINE BOX PLOT
20499    FENCES ON
20500    .
20501    BOX PLOT Y
20502    XLIMITS
20503    X1TIC MARKS ON
20504    X1TIC MARK LABELS ON
20505
20506Program 2:
20507    .
20508    .  Read the data
20509    .
20510    SKIP 25
20511    READ E2489B.DAT LABID Y1 Y2
20512    .
20513    .  Generate the tables to the screen
20514    .
20515    TWO SAMPLE PROFICIENCY TEST Y1 Y2 LABID
20516    .
20517    .  Now generate the tables in RTF format (for import into Word)
20518    .
20519    CAPTURE RTF TWO.RTF
20520    TWO SAMPLE PROFICIENCY TEST Y1 Y2 LABID
20521    END OF CAPTURE
20522    .
20523    .  Generate the Youden plot
20524    .
20525    LET STRING SYMBL = LABID
20526    IF SYMBL = CIRCLE
20527       CHARACTER CIRCLE ALL
20528       CHARACTER FILL ON ALL
20529       CHARACTER HW 1 0.75 ALL
20530    END OF IF
20531    IF SYMBL = BOX
20532       CHARACTER BOX ALL
20533       CHARACTER FILL ON ALL
20534       CHARACTER HW 1 0.75 ALL
20535    END OF IF
20536    IF SYMBL = DIAMOND
20537       CHARACTER DIAMOND ALL
20538       CHARACTER FILL ON ALL
20539       CHARACTER HW 1 0.75 ALL
20540    END OF IF
20541    IF SYMBL = LABID
20542       LET LABIDSRT = LABID
20543       LET YSORT = SORTC Y LABIDSRT
20544       CHARACTER HW 2 1.50 ALL
20545       CHARACTER AUTOMATIC LABIDSRT
20546    END OF IF
20547    LINE BLANK ALL
20548    .
20549    LABEL CASE ASIS
20550    TITLE CASE ASIS
20551    TITLE OFFSET 2
20552    X1LABEL Test Results for Sample One
20553    Y1LABEL Test Results for Sample Two
20554    TITLE Youden Plot of Test Results
20555    .
20556    LIMITS 0 5
20557    TIC OFFSET UNITS DATA
20558    TIC MARK OFFSET 0 0.5
20559    .
20560    YOUDEN PLOT Y2 Y1 LABID
20561    .
20562    PROBE FX1MIN
20563    LET AX1 = PROBEVAL
20564    PROBE FX1MAX
20565    LET AX2 = PROBEVAL
20566    PROBE FY1MIN
20567    LET AY1 = PROBEVAL
20568    PROBE FY1MAX
20569    LET AY2 = PROBEVAL
20570    .
20571    LINE SOLID
20572    DRAWDATA AX1 MEDX AX2 MEDX
20573    DRAWDATA MEDY AY1 MEDY AY2
20574    LINE DASH
20575    DRAWDATA AX1 AY1 AX2 AY2
20576    LINE SOLID
20577
20578-----PROFILE PLOT------------------------------------------------
20579
20580PROFILE PLOT
20581
20582Name:
20583    PROFILE PLOT
20584
20585Type:
20586    Graphics Command
20587
20588Purpose:
20589    Generates a profile plot.
20590
20591Description:
20592    A profile plot is a graphical data analysis technique for examining
20593    the relative behavior of all variables in a multivariate data set.
20594    The profile plot consists of a sequence of equi-spaced vertical
20595    spikes with each spike representing a different variable in the
20596    multivariate data set.  An individual profile plot examines the
20597    behavior of all such variables but only for a specified subset of
20598    the data (e.g., looking at all the attributes of car performance,
20599    but only for a particular car, such as Chevrolet).  The total length
20600    of a given spike is uniformly set to unity for sake of reference.
20601    The "data length" of a given spike is proportional to the magnitude
20602    of the variable for the subset relative to the maximum magnitude
20603    of the variable across all subsets.  (Thus we are looking at the
20604    ratio of the "local" value of the variable to the "global" maximum
20605    of the variable.) An interconnecting line cutting across each spike
20606    at the "data length" gives the profile plot its unique appearance
20607    and name.
20608
20609Syntax:
20610    PROFILE PLOT <y1> <y2> ... <yk> <SUBSET/EXCEPT/FOR qualification>
20611    where <y1> ... <yk> are the response variables;
20612    and where the <SUBSET/EXCEPT/FOR qualification> must be given.  It
20613            is not optional for this command as it is for most other
20614            DATAPLOT commands.
20615
20616Examples:
20617    PROFILE PLOT Y1 Y2 Y3 Y4 Y5 SUBSET AUTO 4
20618    PROFILE PLOT Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8 Y9 SUBSET STATE 25
20619
20620Note:
20621    A few variations of the profile plot exist, all of which DATAPLOT
20622    can easily generate by judicious use of the components in the LINE,
20623    CHARACTER, SPIKE, and BAR commands (and their attribute setting
20624    commands).  For example, suppose there are k variables in the
20625    profile plot (and so k spikes), then
20626       1) element 1 of LINES controls the appearance of the
20627          interconnecting line (this is usually SOLID);
20628       2) element 1 of SPIKE and SPIKE LINE controls the
20629          existence and appearance of the spikes from the base
20630          out to the interconnecting line (some analysts prefer
20631          this to be SOLID, others prefer this to be DOTTED).
20632    When using the SPIKE and SPIKE LINES commands in this context, note
20633    that both must be used if you want spikes to appear.  The SPIKE
20634    (ON/OFF) command sets whether spikes will appear or not while the
20635    SPIKE LINES command sets the desired line type (SOLID, DOTTED,
20636    DASHED, etc.).  Thus SPIKE ON and SPIKE LINES SOLID would for a
20637    profile plot turn the spikes on and set them to solid, respectively.
20638
20639Note:
20640    The generation of multiple profile plots per page is typical (one
20641    profile plot for each subset of interest).  This is easily done in
20642    DATAPLOT by using the PROFILE PLOT command in conjunction with the
20643    MULTIPLOT and LOOP commands, as in the following which would
20644    generate 50 profile plots on the same page, where each profile plot
20645    would consist of 6 variables (spikes):
20646       MULTIPLOT 5 10
20647       LOOP FOR K = 1 1 50
20648           PROFILE PLOT Y1 Y2 Y3 Y4 Y5 Y6 SUBSET STATE K
20649       END OF LOOP
20650
20651Default:
20652    None
20653
20654Synonyms:
20655    None
20656
20657Related Commands:
20658    STAR PLOT     = Generates a (multivariate) star plot.
20659    ANDREWS PLOT  = Generates an Andrews (multivariate) plot.
20660    LINES         = Sets the type for plot lines.
20661    SPIKES        = Sets the type for plot spikes.
20662    MULTIPLOT     = Allows multiple plots per page.
20663    LOOP          = Starts a loop (iteration).
20664    END OF LOOP   = Terminates a loop.
20665    ^             = Allows string and value substitution.
20666
20667Reference:
20668    "Graphical Methods of Data Analysis", Chambers, Cleveland, Kleiner,
20669    and Tukey.  Wadsworth, 1983 (pp. 162-163).
20670
20671Applications:
20672    Multivariate Analysis
20673
20674Implementation Date:
20675    88/3
20676
20677Program:
20678    READ CITY Y1 TO Y6
20679    1 18 8 307 130 3504 12
20680    2 15 7 350 165 3693 11.5
20681    3 13 8 318 150 3436 11.0
20682    4 16 6 304 134 3433 111.6
20683    END OF DATA
20684    READ STRING S1 S2 S3 S4
20685    BOSTON PHILADELPHIA CHICAGO DENVER
20686    LINES SO DO DO DO DO DO DO BL BL BL BL BL BL
20687    MULTIPLOT 2 2; MULTIPLOT CORNER COORDINATES 0 0 100 100
20688    LOOP FOR K = 1 1 4
20689    XLABEL ^S^K
20690    PROFILE PLOT Y1 Y2 Y3 Y4 Y5 Y6 SUBSET CITY K
20691    END OF LOOP
20692    END OF MULTIPLOT
20693
20694-----SET PROMPT ADVANCE (SET)--------------------------------------------
20695
20696PROMPT ADVANCE
20697
20698Name:
20699    SET PROMPT ADVANCE (SET)
20700
20701Type:
20702    Set Subcommand
20703
20704Purpose:
20705    Specify the name of the directory where DATAPLOT's auxiliary files
20706    are stored.
20707
20708Description:
20709    When expecting a new command, Dataplot writes a prompt character
20710    (by default, a ">").  With Fortran I/O, this write is automatically
20711    followed by a carriage return/line feed so that the input is actually
20712    entered on the next line.
20713
20714    Fortran 90 provides for an "ADVANCE" option for WRITE commands.
20715    Specifying an ADVANCE='NO' suppresses this carriage return/line feed
20716    so that the input is entered on the same line as the prompt.
20717
20718    Entering the command
20719
20720        SET PROMPT ADVANCE ON
20721
20722    will utilize this option to suppress the carriage return/line feed
20723    after printing the prompt character.
20724
20725    This feature is compiler dependent.  Some Fortran compilers do not
20726    support the ADVANCE option when writing to standard output.
20727    Specifcally, the Intel Fortran compiler used for the Microsoft
20728    Windows implementation does not support this (note that earlier
20729    versions of this compiler did support support this).  The gfortran
20730    compiler used for Linux/Unix and Mac OS X implementations does support
20731    this feature.
20732
20733Syntax:
20734    SET PROMPT ADVANCE <ON/OFF>
20735    where <ON> specifies that the carriage return/line feed will be
20736               suppressed while <OFF> specifies that it will not.
20737
20738Examples:
20739    SET PROMPT ADVANCE ON
20740    SET PROMPT ADVANCE OFF
20741    PROBE PROMPT ADVANCE
20742
20743Note:
20744    The SET PROMPT ADVANCE ON will be ignored when running the graphical
20745    user interface (GUI) is running.
20746
20747Default:
20748    OFF
20749
20750Synonyms:
20751    None
20752
20753Related Commands:
20754    PROMPT     = Specify whether the prompt will be printed.
20755
20756Applications:
20757    Terminal usage
20758
20759Implementation Date:
20760    2009/07
20761
20762Program:
20763    SET PROMPT ADVANCE ON
20764
20765-----PROMPT-------------------------------------------------------
20766
20767PROMPT
20768
20769Name:
20770    PROMPT
20771
20772Type:
20773    Support Command
20774
20775Purpose:
20776    Specifies that after the execution of a command is completed, a
20777    prompt character will appear as an indication to the analyst to
20778    enter another command.
20779
20780Syntax:
20781    PROMPT   <ON or OFF>
20782    where ON specifies that the prompt will appear after subsequent
20783             commands while OFF specifies that it will not.
20784
20785Examples:
20786    PROMPT ON
20787    PROMPT OFF
20788    PROMPT
20789
20790Note:
20791    The PROMPT command with no arguments is equivalent to PROMPT ON.
20792
20793Default:
20794    At sign-on, the default is a prompt (i.e., ON).
20795
20796Synonyms:
20797    None
20798
20799Related Commands:
20800    ECHO     = Allows/suppresses command echoing.
20801    FEEDBACK = Allows/suppresses feedback messages.
20802    PRINTING = Allows/suppresses analysis output.
20803    SET      = Sets the value of an internal variable (e.g., IPR).
20804    PROBE    = Displays the value of an internal variable (e.g., IPR).
20805
20806Applications:
20807    XX
20808
20809Implementation Date:
20810    Pre-1987
20811
20812Program:
20813    XX
20814
20815-----PROPORTION CONFIDENCE LIMITS--------------------------------------
20816
20817PROPORTION CONFIDENCE LIMITS
20818
20819Name:
20820    PROPORTION CONFIDENCE LIMITS
20821
20822Type:
20823    Analysis Command
20824
20825Purpose:
20826    Generates a confidence interval for proportions.
20827
20828Description:
20829    Given a set of N observations in a variable X, we can compute the
20830    proportion of successes.  The PROPORTION CONFIDENCE LIMITS command
20831    computes a confidence interval for the proportion of successes.
20832
20833    In Dataplot, you define a success by entering the command
20834
20835        ANOP LIMITS <lower limit>  <upper limit>
20836
20837    before entering the PROPORTION CONFIDENCE LIMITS command.  That is,
20838    you specify the lower and upper values that define a success.  Then
20839    the estimate for the proportion of successes is simply the number of
20840    points in the success region divided by the total number of points.
20841    In most applications, successes are defined by 1's and failures by
20842    0's.  The default limits are 0.5 and 1.5, so if your data is defined
20843    by 0 and 1 values the ANOP LIMITS command can be omitted.
20844
20845    Several methods have been proposed for the confidence limits for a
20846    binomial proportion.  The following methods are currently supported
20847    in Dataplot
20848
20849    NORMAL APPROXIMATION
20850
20851    The normal approximation interval is
20852
20853        phat +/- NORPPF(1 - alpha/2)*SQRT(phat*(1 - phat)/n)
20854
20855    where
20856
20857        X      = the number of successes
20858        phat   = X/n
20859        NORPPF = the percent point function of the normal distribution
20860
20861    Due to its simplicity, the method is commonly used.  However, its
20862    use should be restricted to cases with relatively large sample sizes
20863    where phat is not near 0 or 1.
20864
20865    ADJUSTED WALD
20866
20867    The adjusted Wald interval is
20868
20869         p' +/- NORPPF(1-alpha/2)*SQRT(p'*(1-p'))/SQRT(n')
20870
20871    where
20872
20873         X' = X + NORPPF(1-alpha/2)**2/2     (X is the number of success)
20874         n' = n + NORPPF(1-alpha/2)**2
20875         p' = X'/n'
20876         NORPPF is the percent point function of the normal distribution
20877
20878    This method improves upon the normal approximation.
20879
20880    WILSON
20881
20882    This method was originally proposed by Wilson in 1927.  Papers
20883    by Agresti and Coull and also by Brown, Cai and DasGupta
20884    recommended this interval and provided comparisons of this
20885    method to the adjusted Wald and other methods.
20886
20887    This method solves for the two values of p0 (say,
20888    p(upper) and p(lower) that result from setting z = z(alpha/2)
20889    and solving for p(0) = p(upper), and then setting
20890    z = -z(alpha/2) and solving for p(0) = p(lower) where
20891    z(alpha/2) denotes the variate value from the standard normal
20892    distribution such that the area to the right of the value is
20893    alpha/2.  The solution for the two values of p(0) results in
20894    the following confidence intervals:
20895
20896       U. L. = {phat + z(alpha/2)**(2)/(2n) +
20897               z(alpha/2/(sqrt[(phat*(1-phat))/n +
20898               z(alpha/2)**(2)/(4n**2)]}/
20899               {1 + z(alpha/2)**(2)/n}
20900
20901       L. L. = {phat + z(alpha/2)**(2)/(2n) -
20902               z(alpha/2/(sqrt[(phat*(1-phat))/n +
20903               z(alpha/2)**(2)/(4n**2)]}/
20904               {1 + z(alpha/2)**(2)/n}
20905
20906    This approach can be justified on the grounds that it is the
20907    exact algebraic counterpart to the (large-sample) hypothesis test
20908    and is also supported by the research of Agresti and Coull.  One
20909    advantage of this procedure is that its worth does not strongly
20910    depend upon the value of <i>n</i> and/or <i>p</i>, and indeed was
20911    recommended by Agresti and Coull for virtually all combinations of
20912    <i>n</i> and <i>p</i>.  Simulations by Agresti and Coull and
20913    by Brown, Cai and DasGupta show that this method does a better
20914    job of maintaining the nomial coverage than does the adjusted
20915    Wald and normal approximation methods.  Another advantage is
20916    that the limits are in the (0,1) interval.
20917
20918    JEFFREYS
20919
20920    The Jeffreys interval (the derivation for this interval is given in
20921    the Brown, Cai, DasGupta paper) is
20922
20923        LCL = BETPPF(alpha/2,X + 0.5)
20924        UCL = BETPPF(1 - alpha/2,n - X + 0.5)
20925
20926    where BETPPF is the percent point function of the beta distribution
20927    and X is the number of successes.
20928
20929    EXACT BINOMIAL (or CLOPPER-PEARSON)
20930
20931    Exact binomial intervals are obtained by
20932
20933       1) Solve the equation
20934
20935             BINCDF(x;p(u),N) = alpha/2
20936
20937          where BINCDF is the cumulative distribution function of the
20938          binomial distribution, x is the number of successes, and
20939          n is the number of trials.
20940
20941       2) Next solve the equation
20942
20943             BINCDF(x;p(l),n) = 1 - alpha/2
20944
20945          for p(l) to obtain the lower 100(1 - alpha)% limit for p.
20946
20947    Although this method is called "exact", it is not more
20948    accurate than the adjusted Wald or Wilson method.  The
20949    "exact" terminology is based on the use of the binomial
20950    CDF function.  However, since the binomial is a discrete
20951    distribution, the use of the CDF function does not
20952    result in "exact" 95% confidence intervals.  The Agresti
20953    and Coull paper gives arguments to justify why the
20954    "approximate" Wilson and adjusted Wald methods can often be
20955    more accurate than the "exact" method.
20956
20957    To specify the method to use, enter the command
20958
20959       SET BINOMIAL METHOD <WILSON/ADJUSTED WALD/JEFFREYS/NORMAL/EXACT>
20960
20961    The default is the Wilson method.  The Brown, Cai, and DasGupta paper
20962    studied the coverage properties of various methods.  They specifically
20963    recommend the Wilson, the adjusted Wald, and the Jeffreys method as
20964    having the best coverage properties.  Specifically, they recommend the
20965    Wilson and Jeffreys methods for n <= 40.  For n > 40, these three
20966    methods have comparable performance.  Although the normal
20967    approximation and exact binomial methods are not typically
20968    recommended, Dataplot provides them since they are still used in
20969    practice.
20970
20971    Dataplot computes this inverval for a number of different
20972    probability levels.
20973
20974Syntax:
20975    PROPORTION CONFIDENCE LIMITS   <y>
20976                          <SUBSET/EXCEPT/FOR qualification>
20977    where <y> is the response variable;
20978    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
20979
20980Examples:
20981    ANOP LIMITS 0.50 1.5
20982    PROPORTION CONFIDENCE LIMITS Y
20983
20984    SET BINOMIAL METHOD ADJUSTED WALD
20985    PROPORTION CONFIDENCE LIMITS Y SUBSET TAG = 1 TO 3
20986
20987Note:
20988    A table of confidence intervals is printed for alpha levels of
20989    50.0, 75.0, 90.0, 95.0, 99.0, 99.9, 99.99, and 99.999.  The sample
20990    size, sample number of successes, and sample proportion of
20991    successes are also printed.
20992
20993Note:
20994    Prior versions of Dataplot used the following method for the
20995    confidence interval
20996
20997       (BINPPF(ALPHA/2,P,N)/N, BINPPF(1-ALPHA/2,P,N)/N)
20998
20999    where BINPPF is the percent point function of the binomial
21000    distribution.
21001
21002    This method is no longer supported.
21003
21004Default:
21005    None
21006
21007Synonyms:
21008    None
21009
21010Related Commands:
21011    AGRESTI COULL             = Compute either the lower or upper
21012                                confidence limit for either a one-sided or
21013                                a two-sided binomial proportion of a
21014                                variable (Wilson, adjusted Wald, or
21015                                Jeffreys method).
21016    EXACT BINOMIAL            = Compute either the lower or upper exact
21017                                binomial confidence limit for either a
21018                                one-sided or a two-sided binomial
21019                                proportion of a variable.
21020    ANOP LIMITS               = Specify success region for proportions.
21021    DIFFERENCE OF PROPORTION  = Compute the confidence interval for
21022         CONFIDENCE LIMITS      the difference of proportions.
21023    ANOP PLOT                 = Generate an analysis of proportions
21024                                plot.
21025    CONFIDENCE LIMITS         = Generate the confidence limits for
21026                                the mean.
21027
21028Reference:
21029    Agresti, A. and Coull, B. A. (1998), "Approximate is better than
21030    "exact" for interval estimation of binomial proportions",
21031    The American Statistician, 52(2), 119-126.
21032
21033    Brown, L. D. Cai, T. T. and DasGupta, A. (2001), "Interval estimation
21034    for a binomial proportion," Statistical Science, 16(2), 101-133.
21035
21036    Wilson (1927), "Probable inference, the law of succession, and
21037    statistical inference," Journal of the American Statistical
21038    Association, Vol. 22, pp. 209-212.
21039
21040    "Statistical Methods", Eigth Edition, Snedecor and Cochran,
21041    1989, Iowa State University Press, pp. 121-124.
21042
21043    NIST/SEMATECH e-Handbook of Statistical Methods,
21044    http://www.itl.nist.gov/div898/handbook/prc/section2/prc241.htm.
21045
21046Applications:
21047    Confirmatory Data Analysis
21048
21049Implementation Date:
21050    1999/05
21051    2017/11: Change method for determining the confidence interval
21052
21053Program:
21054    .           Create a binary variable with 30 rows
21055    .           with 8 successes.
21056    .
21057    let n = 30
21058    let nsuc = 8
21059    let y = 0 for i = 1 1 n
21060    let y = 1 for i = 1 1 nsuc
21061    .
21062    .          Now do proportions confidence interval
21063    .
21064    set write decimals 6
21065    set binomial method wilson
21066    proportion confidence interval y
21067    set binomial method adjusted wald
21068    proportion confidence interval y
21069    set binomial method jeffreys
21070    proportion confidence interval y
21071    set binomial method exact
21072    proportion confidence interval y
21073    set binomial method normal
21074    proportion confidence interval y
21075
21076-----PROPORTION LIMITS--------------------------------------
21077
21078PROPORTION LIMITS
21079
21080Name:
21081    PROPORTION LIMITS
21082
21083Type:
21084    Support Command
21085
21086Purpose:
21087    Define the upper and lower bounds for counting a response a success
21088    or failure in a subsequent analysis of proportions plot (values
21089    between these two numbers are counted as "successes" while values
21090    outside the two points are counted as "failures").
21091
21092Syntax:
21093    PROPORTION LIMITS <lower>  <upper>
21094    where <lower> is a decimal number or parameter that specifies the
21095              lower bound;
21096    and <upper> is a decimal number or parameter that specifies the
21097              upper bound.
21098
21099Examples:
21100    PROPORTION LIMITS 0.2 0.7
21101    PROPORTION LIMITS YLOW YHIGH
21102
21103    LET YLOW = Y(1) - 0.5
21104    LET YHIGH = Y(1) + 0.5
21105    PROPORTION LIMITS YLOW YHIGH
21106
21107Default:
21108    None
21109
21110Synonyms:
21111    ANOP LIMITS
21112
21113Related Commands:
21114    ANOP PLOT      = Generate an analysis of proportions plot.
21115
21116Applications:
21117    Analysis of Proportions
21118
21119Implementation Date:
21120    XX
21121
21122Program:
21123    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
21124    LET TAG = PATTERN 1 2 3 4 5 FOR I = 1 1 100
21125    PROPORTION LIMITS 0.2 0.7
21126    CHARACTER CIRCLE BLANK
21127    LINE BLANK SOLID
21128    ANOP PLOT Y1 TAG
21129
21130-----PROPORTION PLOT---------------------------------------------------
21131
21132PROPORTION PLOT
21133
21134Name:
21135    PROPORTION PLOT
21136
21137Type:
21138    Graphics Command
21139
21140Purpose:
21141    Generates a proportion plot.
21142
21143Description:
21144    A proportion plot is a plot consisting of subsample proportions
21145    versus subsample index.  The subsample proportion is the percentage
21146    (0 to 100%) of the data in the subsample which falls in a
21147    pre-specified region of interest (see the PROPORTION LIMITS
21148    command).  The proportion plot is used to answer the question--
21149    "Does the proportion of data falling in a given region of interest
21150    change over different subsamples?".   Note that the "region of
21151    interest" is frequently the upper or lower 10% of the data, the
21152    upper or lower 25% of the data, or some other extreme region of the
21153    data.  The proportion plot consists of:
21154       Vertical   axis = subsample proportion;
21155       Horizontal axis = subsample index.
21156    The PROPORTION PLOT yields 2 traces:
21157       1. a subsample proportion trace; and
21158       2. a full-sample proportion reference line.
21159    Like usual, the appearance of these 2 traces is
21160    controlled by the first 2 settings of the LINES,
21161    CHARACTERS, SPIKES, BARS, and similar attributes.
21162
21163Syntax:
21164    PROPORTION PLOT   <y>   <x>    <SUBSET/EXCEPT/FOR qualification>
21165    where <y> is the response (= dependent) variable;
21166          <x> is the subsample identifier variable (this variable
21167              appears on the horizontal axis);
21168    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
21169
21170Examples:
21171    PROPORTION PLOT Y X
21172    PROPORTION PLOT Y X1
21173
21174Default:
21175    None
21176
21177Synonyms:
21178    ANOP PLOT
21179
21180Related Commands:
21181    CHARACTERS         = Sets the type for plot characters.
21182    LINES              = Sets the type for plot lines.
21183    MEAN   PLOT        = Generates a mean plot.
21184    RANGE PLOT         = Generates a range plot.
21185    UPPER QUARTILE PLOT= Generates an upper quartile plot
21186    LOWER QUARTILE PLOT= Generates a  lower quartile plot
21187    BOX PLOT           = Generates a box plot.
21188    XBAR CHART         = Generates a xbar control chart.
21189    PLOT               = Generates a data or function plot.
21190
21191Applications:
21192    Exploratory Data Analysis
21193
21194Implementation Date:
21195    88/9
21196
21197Program:
21198    LET Y =  NORMAL RANDOM NUMBERS FOR I = 1 1 100
21199    LET X =  SEQUENCE 1 10 1 10
21200    PROPORTION LIMITS 1 10000
21201    PROPORTION PLOT Y X
21202
21203-----PSEUDO INVERSE (LET)----------------------------------------
21204
21205PSEUDO INVERSE
21206
21207Name:
21208    PSEUDO INVERSE (LET)
21209
21210Type:
21211    Let Subcommand
21212
21213Purpose:
21214    Compute the transpose of the Moore-Penrose pseudo inverse of a
21215    matrix.
21216
21217Description:
21218    If A is a square matrix of full rank, then the inverse of A
21219    exists (A is referred to as an invertible matrix) and
21220
21221        A*x = b
21222
21223    has the solution
21224
21225       x = A**(-1)*b
21226
21227    The Moore-Penrose pseudo inverse is a generalization of the
21228    matrix inverse when the matrix may not be invertible.  If A is
21229    invertible, then the Moore-Penrose pseudo inverse is equal to
21230    the matrix inverse.  However, the Moore-Penrose pseudo inverse
21231    is defined even when A is not invertible.
21232
21233    More formally, the Moore-Penrose pseudo inverse, A+, of an m-by-n
21234    matrix is defined by the unique n-by-m matrix satisfying the
21235    following four criteria (we are only considering the case where A
21236    consists of real numbers).
21237
21238       1) A*A+*A = A
21239
21240       2) A+*A*A+ = A+
21241
21242       3) (A*A+)' = A*A+
21243
21244       4) (A+*A)' = A+*A
21245
21246    If A is an mxn matrix where m > n and A is of full rank (= n),
21247    then
21248
21249        A+ = (A'*A)**(-1)*A'
21250
21251    and the solution of A*x = b is x = A+*b.  In this case, the
21252    solution is not exact.  It finds the solution that is
21253    closest in the least squares sense.
21254
21255Syntax:
21256    LET <mat2> = PSEUDO INVERSE <mat1>
21257                 <SUBSET/EXCEPT/FOR qualification>
21258    where <mat1> is a matrix for which the pseudo inverse is to be
21259                 computed;
21260          <mat2> is a matrix where the resulting transpose of the pseudo
21261                 inverse is saved;
21262    and where the <SUBSET/EXCEPT/FOR qualification> is optional (and
21263                 rarely used in this context).
21264
21265Examples:
21266    LET C = PSEUDO INVERSE A
21267
21268Note:
21269    The pseudo inverse is also referred to as the generalized
21270    inverse.
21271
21272Note:
21273    A pseudo inverse can be used for any operator pinv satisfying
21274
21275       M*pinv(M)*M = M
21276
21277    Dataplot specifically computes the Moore-Penrose pseudo inverse.
21278    Other formulations are not currently supported.
21279
21280Note:
21281    Dataplot computes the pseudo inverse using the MATMPI routine
21282    written by Charles Reeve while he was a member of the NIST
21283    Statistical Engineering Division.  This routine is available at
21284
21285       http://www.itl.nist.gov/div898/software/reeves/homepage.htm
21286
21287    The MATMPI routine is based on the singular value decomposition.
21288    The singular value decomposition of A is
21289
21290        A=U*S*V'
21291
21292    where U and V are both nxn orthogonal matrices and S is an
21293    mxn diagonal matrix with singular values sigma(i) for
21294    i = 1, ..., n.   Then
21295
21296       A+ = V*(S'*S)**(-1)*S'*U'
21297
21298    If the rank r of A is less than n, the inverse of S'*S does
21299    not exist and we use only the first r singular values.  S
21300    is then a rxr matrix and U and V are shrunk accordingly.
21301
21302Note:
21303    Matrices are created with the READ MATRIX, CREATE MATRIX and
21304    MATRIX DEFINITION commands.
21305
21306Note:
21307    The columns of a matrix are accessible as variables by appending an
21308    index to the matrix name.  For example, the 4x4 matrix C has
21309    columns C1, C2, C3, and C4.  These columns can be operated on like
21310    any other DATAPLOT variable.
21311
21312Note:
21313    The maximum size matrix that DATAPLOT can handle is set when
21314    DATAPLOT is built on a particular site.  Enter HELP DIMENSION
21315    and HELP MATRIX DIMENSION for details.
21316
21317Default:
21318    None
21319
21320Synonyms:
21321    None
21322
21323Related Commands:
21324    MATRIX INVERSE       = Compute the inverse of a nxn matrix.
21325    MATRIX DEFINITION    = Set a matrix definition.
21326    MATRIX DETERMINANT   = Compute a matrix determinant.
21327    MATRIX EUCLID NORM   = Compute the matrix Euclidean norm.
21328    MATRIX MULTIPLICAT   = Perform a matrix multiplication.
21329    MATRIX SOLUTION      = Solve a system of linear equations.
21330    MATRIX TRANSPOSE     = Compute a matrix transpose.
21331    SINGULAR VALUE DECOM = Compute the singular value decomposition of
21332                           a matrix.
21333    DIMENSION            = Specify the maximum number of rows and
21334                           columns in the internal Dataplot storage.
21335    MATRIX DIMENSION     = Specify the row and column dimensions for
21336                           matrix operations.
21337
21338Reference:
21339    Penrose (1956), "On Best Approximate Solution of Linear
21340    Matrix Equations", Proceedings of the Cambridge Philosophical
21341    Society, 52, pp. 17-19.
21342
21343    Dongarra, Bunch, Moler, Stewart (1979), "LINPACK User's Guide",
21344    Siam.
21345
21346Applications:
21347    Linear Algebra
21348
21349Implementation Date:
21350    2009/1
21351
21352Program:
21353    DIMENSION 100 COLUMNS
21354    READ MATRIX X
21355    16 16 19 21
21356    14 17 15 22
21357    24 23 21 24
21358    18 17 16 15
21359    18 11  9 18
21360    END OF DATA
21361    LET A = PSEUDO INVERSE X
21362    PRINT A
21363
21364-----PSIFN (LET)--------------------------------
21365
21366PSIFN
21367
21368Name:
21369    PSIFN (LET)
21370
21371Type:
21372    Library Function
21373
21374Purpose:
21375    Compute the scaled kth derivative of the digamma (or psi)
21376    function.
21377
21378Description:
21379    The psifn function is defined as:
21380        psifn(x,k) = ((-1)**(K+1)/GAMMA(K+1))*PSI(X,K)
21381    where GAMMA is the gamma function and PSI(X,K) is the
21382    kth derivative of the digamma function.  Enter
21383    HELP DIGAMMA for details on the digamma function.
21384
21385    Note that this is the kth derivative of the digamma
21386    function, not the log gamma function.  That is, for k=1, the
21387    trigamma function is computed, not the digamma function.
21388
21389Syntax:
21390    LET <y> = PSIFN(<x>)  <SUBSET/EXCEPT/FOR qualification>
21391    where <x> is a number, variable or a parameter;
21392          <y> is a variable or a parameter (depending on what <x>
21393               is) where the computed psifn values are stored;
21394    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
21395
21396Examples:
21397    LET A = PSIFN(1,2)
21398    LET X2 = PSIFN(X1,K)
21399
21400Note:
21401    DATAPLOT uses the routine PSIFN from the SLATEC Common Mathematical
21402    Library to compute this function.  SLATEC is a large set of high
21403    quality, portable, public domain Fortran routines for various
21404    mathematical capabilities maintained by seven federal laboratories.
21405
21406Note:
21407    Library functions are distinguished from let subcommands
21408    in the following ways.
21409    1) Functions enclose the input value in parenthesis.  Let
21410       subcommands use spaces.
21411    2) Functions can accept (and return) either parameters
21412       (i.e., single values) or variables (i.e., an array of
21413       values) while let subcommands are specific in which they
21414       accept as input and what they return as output.
21415    3) Functions can accept expressions while let subcommands
21416       do not.  For example, the following is legal:
21417           LET Y2 = ABS(Y1-INT(Y1))
21418       For let subcommands, you typically have to do something
21419       like the following:
21420           LET YTEMP = Y**2 + 8
21421           LET A = SUM YTEMP
21422
21423Default:
21424    None
21425
21426Synonyms:
21427    None
21428
21429Related Commands:
21430    GAMMA      = Compute the gamma function.
21431    DIGAMMA    = Compute the digamma function.
21432    LOGGAMMA   = Compute the log (to base e) gamma function.
21433    GAMMAI     = Compute the incomplete Gamma function.
21434    GAMMAIP    = Compute an alternate form of the incomplete gamma
21435                 function.
21436    GAMMAIC    = Compute the complementary incomplete Gamma function.
21437    GAMMAR     = Compute the reciprocal gamma function.
21438    TRICOMI    = Compute Tricomi's incomplete gamma function.
21439    BETA       = Compute the Beta function.
21440
21441Reference:
21442    "Handbook of Mathematical Functions, Applied Mathematics Series,
21443    Vol. 55", Abramowitz and Stegun, National Bureau of Standards,
21444    1964 (chapter 6).
21445
21446Applications:
21447    Special Functions
21448
21449Implementation Date:
21450    1998/5
21451
21452Program:
21453    YLIMITS 0 100
21454    MULTIPLOT 2 2
21455    MULTIPLOT CORNER COORDINATES 5 5 95 95
21456    TITLE AUTOMATIC
21457    PLOT PSIFN(X,1) FOR X = 0.1 0.1 3
21458    PLOT PSIFN(X,2) FOR X = 0.1 0.1 3
21459    PLOT PSIFN(X,3) FOR X = 0.1 0.1 3
21460    PLOT PSIFN(X,4) FOR X = 0.1 0.1 3
21461    END OF MULTIPLOT
21462    MOVE 50 97
21463    JUSTIFICATION CENTER
21464    TEXT SCALED PSI FUNCTIONS
21465
21466-----PSVIEW-------------------------------------------------------
21467
21468PSVIEW
21469
21470Name:
21471    PSVIEW
21472
21473Type:
21474    Support Command
21475
21476Purpose:
21477    View the most recent plot in a Postscript viewer.
21478
21479Description:
21480    DEVICE 3 (in file DPPL2F.DAT, the name may vary on some systems)
21481    output is closed and re-opened at the beginning of a plot command,
21482    so only the most recent plot is in the graphics file.
21483
21484    This command will view this Postscript file using a Postscript
21485    viewer.  This command is currently supported for Windows and
21486    Unix/Linux systems.
21487
21488    For both Windows and Unix/Linux systems, the default viewer is
21489    ghostview.  To specify a different viewer, enter the command
21490
21491          SET POSTSCRIPT VIEWER  <viewer>
21492
21493    On Unix/Linux systems, <viewer> is case sensitive.
21494
21495    This command is useful when you want to view the Postscript
21496    version of the plot without leaving the Dataplot session.
21497    The Postscript version of the plot is typically of higher
21498    quality than the screen version of the plot.
21499
21500    The October, 2016 version of Dataplot made the following updates
21501    to this command.
21502
21503        1. You can now view the contents of the DEVICE 2 output (see
21504           Syntax 2 below).
21505
21506        2. You can view an arbitrary Postscript file (see Syntax 3 below).
21507    The December, 2019 version of Dataplot made the following updates
21508    to this command.
21509
21510        1. The default Postscript viewer for Linux is "xdg-open" and
21511           the default viewer for MacOS is "open".  These applications
21512           will select the default Postscript viewer for files that
21513           have a ".ps" or ".eps" extension.  You can use the
21514           SET POSTSCRIPT VIEWER command to request a specific
21515           Postscript viewer.
21516
21517           One issue is that the default names for DEVICE 2 and
21518           DEVICE 3 have a ".dat" extension rather than a ".ps"
21519           extension.  For this reason, Dataplot added the command
21520
21521               SET BACKUP VIEWER <viewer>
21522
21523           The viewer specified by this command will be used when
21524           the given file name does not have a recognized extension.
21525
21526        2. You can now view PDF files.  To specify the application
21527           that will be used to view the PDF file, enter the command
21528
21529               SET PDF VIEWER <viewer>
21530
21531           The PDF VIEWER will be used when the file has a
21532           ".pdf" extension.
21533
21534           The default viewer will be the Adobe Acrobat reader under
21535           Windows.  For Linux systems, the default is to use "xdg-open"
21536           and for MacOS systems the default is to use "open".  These
21537           applications will select the default PDF viewer for the
21538           local platform.
21539
21540        3. You can now view image files (e.g., PNG, JPG and GIF files).
21541           To specify the application that will be used to view the
21542           image file, enter the command
21543
21544               SET IMAGE VIEWER <viewer>
21545
21546           The IMAGE VIEWER will be used when the file has a
21547           ".png", ".jpg", ".jpeg", ".gif", ".tif",".tiff",
21548           ".bmp" or ".svg" extension.  There are a large number of
21549           image file extensions.  When an unrecognized file extension
21550           is found, Dataplot will use the viewer specified by the
21551           SET BACKUP VIEWER command.
21552
21553           For Windows, the default is to simply specify the file
21554           name and let the operating system select the appropriate
21555           application (this is determined by the "file association").
21556           For Linux systems, the default is to use "xdg-open" and for
21557           MacOS systems the default is to use "open".  These
21558           applications will select the default image viewer for the
21559           local platform based on the file extension.
21560
21561        4. This command will issue the following commands before
21562           invoking the viewer application
21563
21564               SET SYSTEM HIDDEN ON
21565               SET SYSTEM PERSIST OFF
21566               SET COMMAND LINE EXECUTE WAIT OFF
21567
21568           Enter HELP SYSTEM for details on the effect of these
21569           commands.  These settings will be reset to their previous
21570           values after the viewer is invoked.
21571
21572    Although the default viewers will typically work well, you may
21573    prefer to specify the specific application to use.  You can
21574    use the SET POSTSCRIPT VIEWER, SET PDF VIEWER, and SET IMAGE
21575    VIEWER commands to use specific applications rather than selecting
21576    system defaults (i.e., "xdg-open" or "open").  These commands can
21577    be added to your dplogf.tex file to make them your personal
21578    defaults.
21579
21580Syntax 1:
21581    PSVIEW
21582
21583    This syntax displays the most recent plot (i.e., the dppl2f.dat file).
21584
21585Syntax 2:
21586    PSVIEW DEVICE 2
21587
21588    This syntax displays the plots in the DEVICE 2 file (i.e., the
21589    dppl1f.dat file).
21590
21591Syntax 3:
21592    PSVIEW <file-name>
21593
21594    This syntax displays the plot or imgage specified by <file-name>.
21595    An appropriate viewer (Postscript, PDF, image) is selected based on
21596    the file name extension.  Dataplot does not check for the existence
21597    of the file before invoking the application.
21598
21599Examples:
21600    SET POSTSCRIPT VIEWER evince
21601    PSVIEW
21602
21603    SET POSTSCRIPT VIEWER "C:\Program Files\GHOSTGUM\GSVIEW32.EXE"
21604    PSVIEW
21605
21606    PSVIEW DEVICE 2
21607
21608    PSVIEW PLOTS.PS
21609    PSVIEW PLOTS.PDF
21610
21611    SET IMAGE VIEWER gimp
21612    PSVIEW PLOTS.PNG
21613
21614Note:
21615    By default, the PSVIEW DEVICE 2 command will close the plot file
21616    before invoking the Postscript viewer.  This is so that the last plot
21617    in the file is complete.  However, this can be problematic if you
21618    want to generate additional plots.  Specifically, you need to enter
21619    a DEVICE 2 POSTSCRIPT command to resume generating plots to this file.
21620    However, this new DEVICE 2 command will erase the files that previously
21621    existed in the file.
21622
21623    There are a several possible solutions to this.
21624
21625    You can request that the plot file not be close by entering the command
21626
21627        SET PSVIEW FILE CLOSE OFF
21628
21629    This will suppress closing the file.  The disadvantage of this is that
21630    the last plot in the file may not be complete.  A warning will be
21631    printed that the last file may not be complete.  However, the
21632    advantage is that you can continue generating plots to the current
21633    plot file.
21634
21635    Alternatively, you can do something like
21636
21637        PSVIEW DEVICE 2
21638        SET IPL1NA PLOT_NEW.PS
21639        DEVICE 2 POSTSCRIPT
21640
21641    The SET IPL1NA command allows you to specify the name of the plot
21642    file (this should come before the DEVICE 2 POSTSCRIPT command).  The
21643    advantage of this approach is that the last plot will be complete.
21644    The disadvantage is that you will create multiple plot files.
21645
21646Note:
21647    If a Dataplot command starts with a file name, Dataplot interprets
21648    this as a CALL command.  For example, entering
21649
21650        test.dp
21651
21652    is equivalent to entering
21653
21654        call test.dp
21655
21656    Dataplot will now check the extension on the file name.
21657    Specifically if the file has a ".ps", ".PS", ".eps", ".EPS", ".jpg",
21658    ".JPG", ".jpeg", ".JPEG", ".png", ".PNG", ".gif", ".GIF", ".tif",
21659    ".TIF", ".tiff", or ".TIFF" extension, the following command will
21660    be executed
21661
21662       PSVIEW  <file-name>
21663
21664    As discussed above, the appropriate viewer (Postscript, PDF or
21665    image) will be selected based on the file extension.
21666
21667Default:
21668    For Linux, the default viewer is "ghostview".  For Windows, the
21669    default viewer is "C:\Program Files\GHOSTGUM\GSVIEW\GSVIEW32.EXE".
21670
21671Synonyms:
21672    SHOW is a synonym for PSVIEW
21673
21674Related Commands:
21675    PP           = Print the most recent plot.
21676    SET IPL1NA   = Specify the name of the plot file for DEVICE 2.
21677    SYSTEM       = Invoke an operating system command.
21678    LIST         = List the contents of a file.
21679
21680Applications:
21681    Interactive Usage
21682
21683Implementation Date:
21684    2011/09
21685    2016/10: Support for PSVIEW DEVICE 2
21686    2016/10: Support for arbitrary Postscript files
21687    2018/04: Added SHOW as a synonym
21688    2019/12: Support for PDF and image files
21689
21690Program 1:
21691    .  Generate a plot and use the "evince" program (Linux) to view the
21692    .  Postscript version of the graph.
21693    .
21694    SET POSTSCRIPT VIEWER evince
21695    PLOT X**2 FOR X = 1 1 9
21696    PSVIEW
21697
21698Program 2:
21699    device 2 postscript
21700    .
21701    char X
21702    line blank
21703    y1label Y
21704    x1label X
21705    title automatic
21706    title offset 2
21707    .
21708    plot x for x = 1 1 9
21709    plot x**2 for x = 1 1 9
21710    plot x**3 for x = 1 1 9
21711    .
21712    set psview file close off
21713    psview device 2
21714    .
21715    plot x**4 for x = 1 1 9
21716
21717-----PWD-------------------------------------------------------
21718
21719PWD
21720
21721Name:
21722    PWD
21723
21724Type:
21725    Support Command
21726
21727Purpose:
21728    This command returns the current working directory.
21729
21730Description:
21731    There are times when it is convenient to be able to retrieve
21732    the current working directory.   The PWD command will print
21733    the current working directory.  In addition, it will save
21734    the returned directory name in the string CURDIR.  This
21735    string can be used to label plots.
21736
21737Syntax:
21738    PWD
21739
21740Examples:
21741    PWD
21742
21743Default:
21744    None
21745
21746Synonyms:
21747    GETCWD
21748    CURRENT DIRECTORY
21749
21750Note:
21751    If the name CURDIR has already been defined for a non-string
21752    (i.e., a parameter or a variable name), then the CURDIR string
21753    will not be created.
21754
21755Note:
21756    The returned working directory name will be truncated at 255
21757    characters (both in the printed feedback and for the CURDIR
21758    string).
21759
21760Note:
21761    The PWD command is implemented using the library function
21762    GETCWD.  This is not part of the Fortran standard, so the
21763    PWD command may not be supported on all platforms.  It should
21764    be available on Unix/Linux systems.  It is also supported
21765    on Windows implementations built with the Intel compiler.
21766
21767Related Commands:
21768    CD            = Change the current working directory.
21769    SYSTEM        = Enter an operating system command within a
21770                    Dataplot session.
21771
21772Applications:
21773    Interactive Usage
21774
21775Implementation Date:
21776    2011/1
21777
21778Program:
21779    PWD
21780    PRINT CURDIR
21781
21782-----PYRAMID-------------------------------------------------------
21783
21784PYRAMID
21785
21786Name:
21787    PYRAMID
21788
21789Type:
21790    Diagrammatic Graphics Command
21791
21792Purpose:
21793    Draws a pyramid.
21794
21795Description:
21796    The 3 pairs of coordinates define the (x,y) values for the
21797    vertices of the triangle that form the front of the pyramid.
21798
21799Syntax:
21800    PYRAMID  <x1>   <y1>   <x2>   <y2>  <x3>   <y3>
21801    where <x1> is a decimal number or parameter in the range 0 to 100
21802              that specifies the x coordinate for the first vertex;
21803          <y1> is a decimal number or parameter in the range 0 to 100
21804              that specifies the y coordinate for the first vertex;
21805          <x2> is a decimal number or parameter in the range 0 to 100
21806              that specifies the x coordinate for the second vertex;
21807          <y2> is a decimal number or parameter in the range 0 to 100
21808              that specifies the y coordinate for the second vertex;
21809          <x3> is a decimal number or parameter in the range 0 to 100
21810              that specifies the x coordinate for the third vertex;
21811    and   <y3> is a decimal number or parameter in the range 0 to 100
21812              that specifies the y coordinate for the third vertex;
21813
21814Examples:
21815    PYRAMID 20 20 50 20 35 60
21816
21817Note:
21818    The line style (i.e., solid, dash), color, and thickness are
21819    controlled by the LINE, LINE COLOR, and LINE THICKNESS commands.
21820    The REGION FILL ON command can be used to generate solid filled
21821    pyramids.  The REGION PATTERN can be used to do a hatch pattern
21822    fill.  Other REGION commands can be used to control how the fill
21823    is done.
21824
21825Note:
21826    If you use a software font, pyramids can be embedded in text (e.g.,
21827    the LEGEND or TEXT command) by entering the string PYRA().
21828    Pyramids can also be used as plot characters (e.g., CHARACTERS
21829    PYRAMID), in which case the attributes are set with the various
21830    CHARACTER commands.
21831
21832Note:
21833    The keywords DATA and RELATIVE were added to the TRIANGLE
21834    command 7/1997.  These keywords are independent and can
21835    be used separately or together.  For example,
21836    TRIANGLE DATA, TRIANGLE RELATIVE, or TRIANGLE DATA RELATIVE.
21837    The word DATA should come before the word RELATIVE if both
21838    appear.
21839
21840    DATA means that the coordinates are specified in terms of
21841    the data units of the most recent plot rather than Dataplot
21842    0 to 100 screen units.
21843
21844    RELATIVE means that the coordinates of the first point
21845    are drawn in absolute coordinates an all subsequent points
21846    in the figure are relative to that first point.
21847
21848Default:
21849    None
21850
21851Synonyms:
21852    None
21853
21854Related Commands:
21855    POINT            = Draws a point.
21856    ARROW            = Draws an arrow.
21857    TRIANGLE         = Draws a triangle.
21858    BOX              = Draws a box.
21859    HEXAGON          = Draws a hexagon.
21860    CIRCLE           = Draws a circle.
21861    SEMI-CIRCLE      = Draws a semi-circle.
21862    ARC              = Draws an arc.
21863    ELLIPSE          = Draws an ellipse.
21864    OVAL             = Draws an oval.
21865    DIAMOND          = Draws a diamond.
21866    CUBE             = Draws a cube.
21867    DRAW             = Draws a line.
21868    MOVE             = Moves to a point.
21869    LINES            = Sets the line type for figures and plot lines.
21870    LINE THICKNESSES = Sets the line thickness for figures and  plot
21871                       lines.
21872    LINE COLOR       = Sets the line colors for figures and plot lines.
21873    CROSS-HAIR       = Activates and reads the cross-hair.
21874    TEXT             = Writes a text string.
21875    REGION FILL      = Specifies whether a figure is filled or not.
21876    REGION PATTERN   = Sets the type of fill pattern to use for
21877                       figures.
21878
21879Applications:
21880    Presentation Graphics
21881
21882Implementation Date:
21883    Pre-1987
21884
21885Program:
21886    PYRAMID 10 10 20 10 15 20
21887    PYRAMID 60 10 80 3 65 30
21888    .
21889    THICKNESS 0.5
21890    PYRAMID 10 30 20 21 13 43
21891    THICKNESS 0.2
21892    .
21893    LINE DASH
21894    PYRAMID 10 50 20 50 15 60
21895    LINE SOLID
21896    .
21897    LINE COLOR G50
21898    THICKNESS 0.5
21899    PYRAMID 10 80 20 75 12 93
21900    THICKNESS 0.2
21901    LINE COLOR BLACK
21902    .
21903    REGION FILL ON
21904    PYRAMID 30 30 40 25 33 44
21905    REGION FILL COLOR G50
21906    PYRAMID 50 50 70 45 55 63
21907    REGION FILL COLOR BLACK
21908    REGION FILL ONTS
21909    PYRAMID 40 70 55 62 48 84
21910    REGION FILL ONF
21911    REGION PATTERN D1D2
21912    PYRAMID 85 10 95 3 88 19
21913    REGION PATTERN BLANK
21914    .
21915    FONT SIMPLEX; HEIGHT 6
21916    MOVE 40 85
21917    TEXT PYRA() DRAW A PYRAMID WITH THE TEXT COMMAND
21918
21919-----PYTHON MEAN (LET)----------------------------------
21920
21921PYTHON MEAN
21922
21923Name:
21924    PYTHON MEAN (LET)
21925
21926Type:
21927    Let Subcommand
21928
21929Purpose:
21930    Compute the mean for a variable using Python.
21931
21932Description:
21933    This command is primarily a proof of concept command as the mean
21934    of a variable can be computed using the MEAN command.
21935
21936    This command works as follows:
21937
21938       1. It is assumed that Python and any needed Python packages
21939          (e.g., numpy) are already installed on the local platform.
21940          This specific command does not require any additional Python
21941          packages.
21942
21943       2. The Python script, mean.py, that computes the mean is stored in
21944          the "scripts" subdirectory of the Dataplot auxiliary files.
21945
21946          The default Linux/Unix location is "/usr/local/lib/dataplot" and
21947          the default Windows location is
21948          "C:\Program Files (x86)\NIST\DATAPLOT".  However, the location on
21949          your local platform may vary.
21950
21951       3. The values for the variable for which the mean is to be computed
21952          are written to the file "dpst1f.dat" in the current directory.
21953
21954       4. The following command is executed
21955
21956             SYSTEM python <path>/script/mean.py > dpst2f.dat
21957
21958          with <path> denoting the the location of the Dataplot auxiliary
21959          files.  The file "dpst2f.dat" will contain the computed mean
21960          value.
21961
21962       5. The computed mean will be saved in a user specified Dataplot
21963          parameter.
21964
21965    This initial PYTHON command was designed to create the basic structure
21966    for incorporating Python-based commands into Dataplot.  It  is
21967    anticipated that additional non-trivial Python-based commands will be
21968    added in subsequent Dataplot releases.
21969
21970Syntax:
21971    LET <par> = PYTHON MEAN <y>   <SUBSET/EXCEPT/FOR qualification>
21972    where <y> is the response variable;
21973          <par> is a parameter where the computed mean is stored;
21974    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
21975
21976Examples:
21977    LET A = PYTHON MEAN Y1
21978    LET A = PYTHON MEAN Y1 SUBSET TAG > 2
21979
21980Note:
21981    If Python is not in your search path, you can use the command
21982
21983        SET PYTHON PATH  <path>
21984
21985    to specify the directory where the Python executable is located.  For
21986    example
21987
21988        SET PYTHON PATH /usr/local/bin
21989
21990Note:
21991    Both Python 2 and Python 3 are currently actively supported.  If both
21992    Python 2 and Python 3 are installed on your local platform, you can
21993    use the following command to specify which version to run
21994
21995        SET PYTHON VERSION <2/3/DEFAULT>
21996
21997    Specifying "2" will run "python2", specifying "3" will run "python3"
21998    and specifying "DEFAULT" will run "python" (i.e., the default on your
21999    local platform).
22000
22001    The Dataplot written scripts will be written to the Python 3
22002    standard.  However, if you only have Python 2 on your system, you can
22003    modify the "mean.py" script to be compatible with Python 2 (for this
22004    command, only the "print" commands should need to be changed).  We do
22005    not anticipate providing both Python 2 and Python 3 versions of the
22006    scripts.
22007
22008Note:
22009    You can use the CAPTURE SCRIPT command to create Python scripts from
22010    within a Dataplot macro.  You can then use the SYSTEM command to
22011    execute that script.  That is, something like
22012
22013       CAPTURE SCRIPT file.py
22014           ...   Python commands here ...
22015       END OF CAPTURE
22016       SYSTEM  file.py
22017
22018Default:
22019    None
22020
22021Synonyms:
22022    None
22023
22024Related Commands:
22025    MEAN     = Compute the mean of a variable.
22026    SYSTEM   = Execute an operating system command.
22027
22028Applications:
22029    Data Analysis
22030
22031Implementation Date:
22032    2019/03
22033
22034Program:
22035    SKIP 25
22036    READ ZARR13.DAT Y
22037    LET YMEAN = PYTHON MEAN Y
22038
22039-----PYTHON-------------------------------------------------------
22040
22041PYTHON
22042
22043Name:
22044    PYTHON
22045
22046Type:
22047    Support Command
22048
22049Purpose:
22050    Run a Python script within a Dataplot session.
22051
22052Description:
22053    It may on occassion be useful to run a Python script within a Dataplot
22054    session.  Dataplot assumes that Python is already installed on your
22055    local system.  Also, any Python packages that your script needs should
22056    already be installed.  Dataplot does not initiate an install of Python
22057    or of any Python packages if it not already installed.
22058
22059    If Python is not installed on your default path, you can specify it
22060    using the SET PYTHON PATH command.  For example, the following is
22061    for the Anaconda installation of Python 3 under Windows (where
22062    Anaconda is installed for the single user heckert)
22063
22064       set python path c:\Users\heckert\AppData\Local\Continum\anaconda3\
22065
22066    There are several different Python distributions.  The appropriate
22067    Python path will depend on the specific distribution you used to
22068    install Python and whether you choose to install it for a single
22069    user or for all users.
22070
22071    If you need to specify that you want to run version 3 of Python, you
22072    can enter
22073
22074       set python version 3
22075
22076    If you need to specify that you want to run version 2 of Python, you
22077    can enter
22078
22079       set python version 2
22080
22081    On Windows platforms, the PYTHON command is equivalent to entering
22082
22083        set system persist off
22084        set system hidden on
22085        system <python-path>\python.exe <python-script-file>  <arg-list>
22086
22087    Note that if either the Python path or the <python-script-file>
22088    contains spaces (and so will be quoted), then "set system hidden" will
22089    be set to "off".
22090
22091    On Linux platforms, the PYTHON command is equivalent to entering
22092
22093        system <python-path>/python  <python-script-file>  <arg-list>
22094
22095Syntax:
22096    PYTHON <script-file> <arg-list>
22097    where <script-file> contains the name of a file containing a Python
22098          script;
22099    and where <arg-list> is an optional list of arguments to the script.
22100
22101Examples:
22102    PYTHON  plot.py
22103
22104Note:
22105    This command is host dependent.  It has been tested on Windows
22106    and Linux systems.  Note that the SYSTEM command must be activated
22107    for this command to work.
22108
22109Note:
22110    Dataplot does no error checking on the specified script file.  It
22111    is passed as is to Python command.
22112
22113Note:
22114    The CAPTURE SCRIPT command can be used to generate the Python script
22115    within a Dataplot macro.  This is demonstrated in the Program
22116    example below.
22117
22118Note:
22119    The name of the script file is case sensitive on Linux and MacOS
22120    systems.  It is not case sensitive on Windows systems.
22121
22122    If Dataplot does not find the Python script file, it will search for
22123    it in the "scripts" sub-directory in the Dataplot auxiliary
22124    directory.  Currently (2019/12), there are no Python scripts in that
22125    directory, although this may change in future releases of Dataplot.
22126
22127Default:
22128    None
22129
22130Synonyms:
22131    None
22132
22133Related Commands:
22134    SYSTEM          = Issue an operating system command within Dataplot.
22135    RSCRIPT         = Run a R script within Dataplot.
22136    CAPTURE SCRIPT  = Create a script file within Dataplot.
22137
22138Applications:
22139    Run Python scripts
22140
22141Implementation Date:
22142    2019/12
22143
22144Program 1:
22145    . Step 1:   Create the Python script using "capture script"
22146    .
22147    .           This example is just meant to demostrate the
22148    .           mechanics of calling Python scripts.
22149    .
22150    rm output.txt
22151    rm test.py
22152    .
22153    capture script test.py
22154    # Step 1:   Open the output file
22155    #
22156    fout = open('output.txt', 'w')
22157    #
22158    # Step 2:   Now write some output lines
22159    #
22160    line1 = "Line 1\n"
22161    line2 = "Line 2\n"
22162    line3 = "Line 3\n"
22163    fout.write(line1)
22164    fout.write(line2)
22165    fout.write(line3)
22166    #
22167    # Step 3:   Now close the file
22168    #
22169    fout.close()
22170    #
22171    end of capture
22172    .
22173    list test.py
22174    pause
22175    .
22176    . Step 2:   Determine if running on Windows or Linux and set
22177    .           Python path and version
22178    .
22179    let computer = 1
22180    probe iopsy1
22181    if probeval = 1
22182       let computer = 2
22183    end of if
22184    .
22185    if computer = 1
22186       . Following should be modified for your system
22187       set python path c:\Users\heckert\AppData\Local\Continum\anaconda3\
22188       set python version 3
22189    else
22190      .
22191      .  On my CentOS Linux box, I need to do the following to invoke
22192      .  version 3 of Python
22193      .
22194      .        scl enable rh-python36 csh
22195      .
22196      set python version 3
22197    end of if
22198    .
22199    . Step 3:   Run the Python script
22200    .
22201    python  test.py
22202    .
22203    . Step 4:   Display the results
22204    .
22205    list output.txt
22206
22207Program 2:
22208    . Purpose:  Use Python script to extract Excel file to a CSV
22209    .           file.  From this, create a space separeated file with a
22210    .           descriptive header for subsequent Dataplot use.  Finally,
22211    .           generate a Dataplot macro tha will read the space
22212    .           delimited file.
22213    .
22214    .           This macro demonstrates the use of the PYTHON and
22215    .           the WRITE1 and WRITE2 commands.
22216    .           extract the Excel file to a CSV file.
22217    .
22218    . Step 0:   Define some basic strings and file names
22219    .
22220    probe path
22221    let string ipath = probestr
22222    probe iopsy1
22223    if probeval = 2
22224       let string islash = \
22225    else
22226       let string islash = /
22227    end of if
22228    let string subdir = data
22229    let ipath = string concatenate ipath subdir
22230    .
22231    let string base = CORONA_VIRUS_COUNTRY_RANKINGS_042920
22232    let base = string concatenate ipath base
22233    let string ext1 = .CSV
22234    let string ext2 = .TXT
22235    let string ext3 = .DP
22236    let string ext4 = .XLSX
22237    let fname1 = string concatenate base ext1
22238    let fname2 = string concatenate base ext2
22239    let fname3 = string concatenate base ext3
22240    let fname4 = string concatenate base ext4
22241    .
22242    . Step 1:   Use Python to create the CSV file
22243    .
22244    capture script read_corona.py
22245    #  This Python script will read an Excel file and write the in
22246    #  contents as a CSV file".  This script is specific to the Corona
22247    #  virus Excel file, so omit the error checking code.
22248    #
22249    #  Step 1: Import needed packages
22250    #
22251    import pandas as pd
22252    from pandas import ExcelWriter
22253    from pandas import ExcelFile
22254    #
22255    #  Step 2: Read the Corona virus Excel file file with Pandas
22256    #
22257    df = pd.read_excel("^fname4")
22258
22259    #
22260    #  Step 3: Now use Pandas to write the Excel file
22261    df.to_csv("^fname1")
22262    #
22263    end of capture
22264    .
22265    .           May need to use SET PYTHON PATH command
22266    .
22267    python read_corona.py
22268    .
22269    . Step 2:   Read Original File
22270    .
22271    set convert character categorical
22272    set read delimiter ,
22273    set read missing value -9999
22274    .
22275    skip 5
22276    read ^fname1 rowindex fileno country pop popurban medage areakm2 ...
22277                 areami2 denstkm2 denstmi2 junk cumcases cumdeath
22278    skip 0
22279    delete rowindex junk
22280    .
22281    let ig = character code string country
22282    let ntemp = size cumdeath
22283    .
22284    . Step 2:   Now create new output file
22285    .
22286    .           First generate the header
22287    .
22288    write1 ^fname2 "Name:        ^fname2"
22289    write1 ^fname2 "Description: Corona virus country rankings"
22290    write1 ^fname2 "Source:      xxxx"
22291    write1 ^fname2 "Data:        Column  1: Country"
22292    write1 ^fname2 "             Column  2: Population (millions)"
22293    write1 ^fname2 "             Column  3: Urban Population (millions)"
22294    write1 ^fname2 "             Column  4: Median Age"
22295    write1 ^fname2 "             Column  5: Area (1000 kilometers**2)"
22296    write1 ^fname2 "             Column  6: Area (1000 miles**2)"
22297    write1 ^fname2 "             Column  7: Population Density (1000 kilometers**2)"
22298    write1 ^fname2 "             Column  8: Population Density (1000 miles**2)"
22299    write1 ^fname2 "             Column  9: Cumulative Cases"
22300    write1 ^fname2 "             Column 10: Cumulative Deaths"
22301    write1 ^fname2 " "
22302    write1 ^fname2 " "
22303    write1 ^fname2 " "
22304    write1 ^fname2 " "
22305    write1 ^fname2 " "
22306    write1 ^fname2 " "
22307    write1 ^fname2 " "
22308    write1 ^fname2 " "
22309    write1 ^fname2 " "
22310    write1 ^fname2 " "
22311    write1 ^fname2 "COUNTRY  POP POPURBAN MEDAGE AREAKM2 AREAMI2 DENSTKM2 DENSTMI2 CUMCASES CUMDEATH"
22312    write1 ^fname2 "--------------------------------------------------------------------------------"
22313    .
22314    .           Now write the data
22315    .
22316    set write format F5.0,3F10.1,4F10.0,2F12.0
22317    write1 ^fname2 country pop popurban medage areakm2 ...
22318                   areami2 denstkm2 denstmi2 cumcases cumdeath
22319    set write format
22320    .
22321    . Step 3:   Now create Dataplot macro to read the new file
22322    .
22323    write2 ^fname3  ". Name:    ^fname3"
22324    write2 ^fname3  ". Purpose: Read ^fname2"
22325    write2 ^fname3  "."
22326    write2 ^fname3  "skip 25"
22327    write2 ^fname3  "set read format F5.0,3F10.1,4F10.0,2F12.0"
22328    write2 ^fname3  "read ^fname2 country pop popurban medage areakm2 areami2 denstkm2 denstmi2 cumcases cumdeath"
22329    write2 ^fname3  "skip 0"
22330    write2 ^fname3  "set read format"
22331    write2 ^fname3  "."
22332    loop for k = 1 1 ntemp
22333    write2 ^fname3  "let string cntry^k = ^ig^k"
22334    end of loop
22335    write2 ^fname3  "."
22336    .
22337
22338-------------------------------------------------------------
22339
22340
22341
22342
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353
22354
22355
22356
22357
22358
22359
22360
22361
22362
22363
22364
22365
22366
22367
22368
22369
22370
22371
22372
22373
22374
22375
22376
22377
22378
22379
22380
22381
22382
22383
22384
22385
22386
22387
22388
22389
22390
22391
22392
22393
22394
22395
22396
22397
22398
22399
22400-------------------------  *Q*  ZZZZZ--------------------
22401
22402-----Q QUANTILE RANGE (LET)-------------------------------
22403
22404Q QUANTILE RANGE
22405
22406Name:
22407    Q QUANTILE RANGE (LET)
22408
22409Type:
22410    Let Subcommand
22411
22412Purpose:
22413    Compute the q quantile range for a variable.
22414
22415Description:
22416    The q quantile  range is:
22417
22418        QQ = X(1-q) - X(q)
22419
22420    where q defines a quantile between 0 and 0.5 and X(q)
22421    denotes the q-th quantile of the data.
22422
22423    For example, if q = 0.20, then the q quantile range is
22424    the difference between the 80th and 20th quantiles of
22425    the data.  The interquartile range is a special case of
22426    the q quantile range with q = 0.25.
22427
22428    The q quantile range is used as a robust measure of scale.
22429
22430    You can also compute the difference of the q quantile range
22431    for two response variables.
22432
22433Syntax 1:
22434    LET <par> = Q QUANTILE RANGE <y>
22435                <SUBSET/EXCEPT/FOR qualification>
22436    where <y> is the response variable;
22437          <par> is a parameter where the computed q quantile range
22438               is stored;
22439    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
22440
22441Examples:
22442    LET A = Q QUANTILE RANGE Y1
22443    LET A = Q QUANTILE RANGE Y1 SUBSET TAG > 2
22444    LET A = Q QUANTILE RANGE Y1 Y2
22445
22446Note:
22447    The desired quantile is specified with the following
22448    command
22449
22450        LET QUANT = <value>
22451
22452    If <value> is between 1 and 100, it is interpreted as as
22453    percentile (i.e., the quantile will be determined by
22454    dividing by 100).  If <value> is between 0.5 and 1,
22455    then 1 - <value>  will be used.  If <value> is less than
22456    or equal to 0 or greater than or equal to 100, an error
22457    message will be printed.
22458
22459Note:
22460    Dataplot statistics can be used in a number of commands.  For
22461    details, enter
22462
22463         HELP STATISTICS
22464
22465Default:
22466    None
22467
22468Synonyms:
22469    QQUANTILE RANGE is a synonym for Q QUANTILE RANGE.
22470
22471Related Commands:
22472    INTERQUARTILE RANGE        = Compute the interquartile range of a
22473                                 variable.
22474    RANGE                      = Compute the range of a variable.
22475    QUANTILE                   = Compute a specified quantile of a
22476                                 variable.
22477    STANDARD DEVIATION         = Compute the standard deviation of a
22478                                 variable.
22479    AVERAGE ABSOLUTE DEVIATION = Compute the average absolute
22480                                 deviation of a variable.
22481    MEDIAN ABSOLUTE DEVIATION  = Compute the median absolute
22482                                 deviation of a variable.
22483
22484Reference:
22485    Rand Wilcox (1997), "Introduction to Robust Estimations and
22486    Hypothesis Testing," Academic Press, pp. 24-25.
22487
22488Applications:
22489    Robust Data Analysis
22490
22491Implementation Date:
22492    2012/9
22493
22494Program 1:
22495    LET Y1 = LOGISTIC RANDOM NUMBERS FOR I = 1 1 1000
22496    LET Y2 = DOUBLE EXPONENTIAL RANDOM NUMBERS FOR I = 1 1 1000
22497    LET Y3 = NORMAL RANDOM NUMBERS FOR I = 1 1 1000
22498    LET QUANT = 0.10
22499    LET A1 = Q QUANTILE RANGE Y1
22500    LET A2 = Q QUANTILE RANGE Y2
22501    LET A3 = Q QUANTILE RANGE Y3
22502    PRINT A1 A2 A3
22503
22504Program 2:
22505    SKIP 25
22506    READ GEAR.DAT DIAMETER BATCH
22507    TITLE AUTOMATIC
22508    TITLE CASE ASIS
22509    XLIMITS 1 10
22510    MAJOR XTIC MARK NUMBER 10
22511    MINOR XTIC MARK NUMBER 0
22512    XTIC OFFSET 1 1
22513    X1LABEL BATCH
22514    X2LABEL Q = 0.20
22515    Y1LABEL Q QUANTILE RANGE OF DIAMETER
22516    CHARACTER CIRCLE
22517    CHARACTER FILL ON
22518    CHARACTER HW 2 1.5
22519    LINE BLANK
22520    LET QUANT = 0.20
22521    Q QUANTILE RANGE PLOT DIAMETER BATCH
22522
22523-----QBICDF (LET)--------------------------------
22524
22525QBICDF
22526
22527Name:
22528    QBICDF (LET)
22529
22530Type:
22531    Library Function
22532
22533Purpose:
22534    Compute the quasi-binomial type I cumulative distribution
22535    function.
22536
22537Description:
22538    The quasi-binomial type I distribution has the
22539    following probability mass function:
22540
22541        p(x;p,phi,m)=
22542            (m  x)*p*(p+x*phi)**(x-1)*(1-p-x*phi)**(m-x)
22543            x = 0, 1, 2, 3, ,..., m;
22544            0 <= p <= 1; -p/m < phi < (1-p)/m
22545
22546    with p, phi, and m denoting the shape parameters and
22547    (a  b} denoting the binomial coefficient:
22548
22549      (a  b) = a!/(b!(a-b)!}
22550
22551    The cumulative distribution function is computed using
22552    the following recurrence relation given by Consul and
22553    Famoye:
22554
22555       p(x+1) = {(m-x)*(p+x*phi)/((x+1)*(1-p-x*phi))}*
22556                (1 + phi/(p+x*phi))**x*
22557                (1 - phi/(1-p-x*phi))**(m-x-1)*p(x)
22558
22559Syntax:
22560    LET <y> = QBICDF(<x>,<p>,<theta>,<beta>)
22561               <SUBSET/EXCEPT/FOR qualification>
22562    where <x> is a positive integer variable, number, or parameter;
22563          <p> is a number, parameter, or variable in the range
22564               (0,1) that specifies the first shape parameter;
22565          <phi> is a number, parameter, or variable that
22566               specifies the second shape parameter;
22567          <m> is a number, parameter, or variable that
22568               specifies the third shape parameter;
22569          <y> is a variable or a parameter (depending on what <x>
22570               is) where the computed quasi binomial type I
22571               cdf value is stored;
22572    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
22573
22574Examples:
22575    LET A = QBICDF(10,0.5,0.005,20)
22576    LET Y = QBICDF(X,0.7,0.01,20)
22577    PLOT QBICDF(X,0.3,0.005,20) FOR X = 0  1  20
22578
22579Note:
22580    Library functions are distinguished from let subcommands
22581    in the following ways.
22582    1) Functions enclose the input value in parenthesis.  Let
22583       subcommands use spaces.
22584    2) Functions can accept (and return) either parameters
22585       (i.e., single values) or variables (i.e., an array of
22586       values) while let subcommands are specific in which they
22587       accept as input and what they return as output.
22588    3) Functions can accept expressions while let subcommands
22589       do not.  For example, the following is legal:
22590           LET Y2 = ABS(Y1-INT(Y1))
22591       For let subcommands, you typically have to do something
22592       like the following:
22593           LET YTEMP = Y**2 + 8
22594           LET A = SUM YTEMP
22595
22596Default:
22597    None
22598
22599Synonyms:
22600    None
22601
22602Related Commands:
22603    QBIPDF                   = Compute the quasi-binomial type I
22604                               probability mass function.
22605    QBIPPF                   = Compute the quasi-binomial type I
22606                               percent point function.
22607    BINPDF                   = Compute the binomial probability
22608                               mass function.
22609    BBNPDF                   = Compute the beta-binomial
22610                               probability mass function.
22611    NBPDF                    = Compute the negative binomial
22612                               probability mass function.
22613
22614Reference:
22615    Consul and Famoye (2006), "Lagrangian Probability
22616    Distribution", Birkhauser, pp. 70-80.
22617
22618Applications:
22619    Distributional Modeling
22620
22621Implementation Date:
22622    2006/8
22623
22624Program:
22625    title size 3
22626    tic label size 3
22627    label size 3
22628    legend size 3
22629    height 3
22630    x1label displacement 12
22631    y1label displacement 15
22632    .
22633    multiplot corner coordinates 0 0 100 95
22634    multiplot scale factor 2
22635    label case asis
22636    title case asis
22637    case asis
22638    tic offset units screen
22639    tic offset 3 3
22640    title displacement 2
22641    y1label Probability
22642    x1label X
22643    .
22644    ylimits 0 1
22645    major ytic mark number 6
22646    minor ytic mark number 3
22647    xlimits 0 20
22648    line blank
22649    spike on
22650    .
22651    multiplot 2 2
22652    .
22653    title P = 0.3, Phi = 0.01, M = 20
22654    plot qbicdf(x,0.3,0.01,20) for x = 1 1 20
22655    .
22656    title P = 0.3, Phi = -0.01, M = 20
22657    let phi = -0.01
22658    plot qbicdf(x,0.3,phi,20) for x = 1 1 20
22659    .
22660    title P = 0.7, Phi = 0.01, M = 20
22661    plot qbicdf(x,0.7,0.01,20) for x = 1 1 20
22662    .
22663    title P = 0.7, Phi = -0.01, M = 20
22664    let phi = -0.01
22665    plot qbicdf(x,0.7,phi,20) for x = 1 1 20
22666    .
22667    end of multiplot
22668    .
22669    justification center
22670    move 50 97
22671    text Cumulative Distribution Functions for Quasi Binomial Type I
22672
22673-----QBIPDF (LET)--------------------------------
22674
22675QBIPDF
22676
22677Name:
22678    QBIPDF (LET)
22679
22680Type:
22681    Library Function
22682
22683Purpose:
22684    Compute the quasi-binomial type I probability mass
22685    function.
22686
22687Description:
22688    The quasi-binomial type I distribution has the
22689    following probability mass function:
22690
22691        p(x;p,phi,m)=
22692            (m  x)*p*(p+x*phi)**(x-1)*(1-p-x*phi)**(m-x)
22693            x = 0, 1, 2, 3, ,..., m;
22694            0 <= p <= 1; -p/m < phi < (1-p)/m
22695
22696    with p, phi, and m denoting the shape parameters and
22697    (a  b} denoting the binomial coefficient:
22698
22699      (a  b) = a!/(b!(a-b)!}
22700
22701    The quasi-binomial type I distribution is used to model
22702    Bernoulli trials.  The parameter p denotes the initial
22703    probability of success, m denotes the number of Bernoulli
22704    trials, and phi denotes how the probability of success
22705    increases or decreases with the number of successes.
22706    Specificially, when phi = 0, the quasi-binomial type I
22707    distribution reduces to the binomial distribution.  When
22708    phi <> 0, the probability of success in the xth trial
22709    becomes
22710
22711       p + x*phi
22712
22713Syntax:
22714    LET <y> = QBIPDF(<x>,<p>,<phi>,<m>)
22715              <SUBSET/EXCEPT/FOR qualification>
22716    where <x> is a positive integer variable, number, or parameter;
22717          <p> is a number, parameter, or variable in the range
22718               (0,1) that specifies the first shape parameter;
22719          <phi> is a number, parameter, or variable that
22720               specifies the second shape parameter;
22721          <m> is a number, parameter, or variable that
22722               specifies the third shape parameter;
22723          <y> is a variable or a parameter (depending on what <x>
22724               is) where the computed quasi binomial type I
22725               pdf value is stored;
22726    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
22727
22728Examples:
22729    LET A = QBIPDF(10,0.5,0.005,20)
22730    LET Y = QBIPDF(X,0.7,0.01,20)
22731    PLOT QBIPDF(X,0.3,0.005,20) FOR X = 0  1  20
22732
22733Note:
22734    For a number of commands utilizing the quasi-binomial type I
22735    distribution, it is convenient to bin the data.  There are
22736    two basic ways of binning the data.
22737
22738      1) For some commands (histograms, maximum likelihood
22739         estimation), bins with equal size widths are
22740         required.  This can be accomplished with the
22741         following commands:
22742
22743            LET AMIN = MINIMUM Y
22744            LET AMAX = MAXIMUM Y
22745            LET AMIN2 = AMIN - 0.5
22746            LET AMAX2 = AMAX + 0.5
22747            CLASS MINIMUM AMIN2
22748            CLASS MAXIMUM AMAX2
22749            CLASS WIDTH 1
22750            LET Y2 X2 = BINNED
22751
22752      2) For some commands, unequal width bins may be
22753         helpful.  In particular, for the chi-square goodness
22754         of fit, it is typically recommended that the minimum
22755         class frequency be at least 5.  In this case, it may
22756         be helpful to combine small frequencies in the tails.
22757         Unequal class width bins can be created with the
22758         commands
22759
22760            LET MINSIZE = <value>
22761            LET Y3 XLOW XHIGH = INTEGER FREQUENCY TABLE Y
22762
22763         If you already have equal width bins data, you can
22764         use the commands
22765
22766            LET MINSIZE = <value>
22767            LET Y3 XLOW XHIGH = COMBINE FREQUENCY TABLE Y2 X2
22768
22769         The MINSIZE parameter defines the minimum class
22770         frequency.  The default value is 5.
22771
22772Note:
22773    You can generate quasi-binomial type I random numbers,
22774    probability plots, and chi-square goodness of fit
22775    tests with the following commands:
22776
22777       LET M = VALUE
22778       LET P = <value>
22779       LET PHI = <value>
22780       LET Y = QUASI BINOMIAL TYPE I RANDOM NUMBERS FOR I = 1 1 N
22781
22782       QUASI BINOMIAL TYPE I PROBABILITY PLOT Y
22783       QUASI BINOMIAL TYPE I PROBABILITY PLOT Y2 X2
22784       QUASI BINOMIAL TYPE I PROBABILITY PLOT Y3 XLOW XHIGH
22785
22786       QUASI BINOMIAL TYPE I CHI-SQUARE GOODNESS OF FIT Y
22787       QUASI BINOMIAL TYPE I CHI-SQUARE GOODNESS OF FIT Y2 X2
22788       QUASI BINOMIAL TYPE I CHI-SQUARE ..
22789                   GOODNESS OF FIT Y3 XLOW XHIGH
22790
22791    In fitting the quasi-binomial type I distribution to data,
22792    we typically assume that the number of trials, m, is
22793    fixed and known and we then estimate p and phi.
22794
22795    To obtain the maximum likelihood estimates of p and phi,
22796    enter the command
22797
22798        QUASI BINOMIAL TYPE I MAXIMUM LIKELIHOOD Y
22799        QUASI BINOMIAL TYPE I MAXIMUM LIKELIHOOD Y2 X2
22800
22801    The maximum likelihood estimates are the solutions to the
22802    equations (for unbinned data):
22803
22804        SUM[i=1 to N][(m-X(i))/(1 - P - X(i)*PHI] - M*N = 0
22805
22806        SUM[i=1 to N][(X(i)*(X(i) - 1)/(p + X(i)*PHI) -
22807        SUM[i=1 to N][(M - X(i))/(1 - P - X(i)*PHI)] = 0
22808
22809    For binned data, the equations become
22810
22811        SUM[i=1 to k][n(i)*(i-1)*i/(p+i*phi)] -
22812        SUM[i=1 to k][n(i)*(m-1)*i/(1-p-i*phi)] = 0
22813
22814        (n/p) + SUM[i=1 to k][n(i)*(i-1)/(p+i*phi)] -
22815        SUM[i=1 to k][n(i)*(m-1)/(1-p-i*phi)] = 0
22816
22817    with k, n, and n(x) denoting the number of classes, the
22818    total sample size, and the frequency of the xth class,
22819    respectively.
22820
22821    These equations are known to have multiple solutions,
22822    so good starting values are required.  By default, we use
22823    the starting values recommended by Consul and Famoye
22824
22825        p = 1 - (f0/n)**(1/m)
22826        phi = (1/(2*(m-2))*(-1 +
22827              SQRT(1 + 4*(m-2)*(-1+xbar/(m*p))/(m-1)))
22828
22829    with f0 denoting the frequency of the class x = 0 and
22830    xbar denoting the sample mean.
22831
22832    Alternatively, you can specify your own starting values
22833    by entering the commands
22834
22835       LET PSTART = <value>
22836       LET PHISTART = <value>
22837
22838    Consul and Famoye give formulas for the Fisher information
22839    matrix (the inverse of the parameter variance-covariance
22840    matrix).
22841
22842    You can generate estimates of p and phi based on the
22843    maximum ppcc value or the minimum chi-square goodness of fit
22844    with the commands
22845
22846        LET P1 = <value>
22847        LET P2 = <value>
22848        LET PHI1  = <value>
22849        LET PHI2  = <value>
22850        QUASI BINOMIAL TYPE I KS PLOT Y
22851        QUASI BINOMIAL TYPE I KS PLOT Y2 X2
22852        QUASI BINOMIAL TYPE I KS PLOT Y3 XLOW XHIGH
22853        QUASI BINOMIAL TYPE I PPCC PLOT Y
22854        QUASI BINOMIAL TYPE I PPCC PLOT Y2 X2
22855        QUASI BINOMIAL TYPE I PPCC PLOT Y3 XLOW XHIGH
22856
22857    The default values of p1 and p2 are 0.05 and 0.95,
22858    respectively.  The default values for phi1 and phi2 are
22859    phi1 = -p1/m and phi2 = (1-p1)/m.  Due to the discrete nature
22860    of the percent point function for discrete distributions, the
22861    ppcc plot will not be smooth.  For that reason, if there is
22862    sufficient sample size the KS PLOT (i.e., the minimum
22863    chi-square value) is typically preferred.  However, it may
22864    sometimes be useful to perform one iteration of the PPCC PLOT
22865    to obtain a rough idea of an appropriate neighborhood for the
22866    shape parameters since the minimum chi-square statistic can
22867    generate extremely large values for non-optimal values of the
22868    shape parameters.  Also, since the data is integer values, one
22869    of the binned forms is preferred for these commands.
22870
22871Note:
22872    Library functions are distinguished from let subcommands
22873    in the following ways.
22874    1) Functions enclose the input value in parenthesis.  Let
22875       subcommands use spaces.
22876    2) Functions can accept (and return) either parameters
22877       (i.e., single values) or variables (i.e., an array of
22878       values) while let subcommands are specific in which they
22879       accept as input and what they return as output.
22880    3) Functions can accept expressions while let subcommands
22881       do not.  For example, the following is legal:
22882           LET Y2 = ABS(Y1-INT(Y1))
22883       For let subcommands, you typically have to do something
22884       like the following:
22885           LET YTEMP = Y**2 + 8
22886           LET A = SUM YTEMP
22887
22888Default:
22889    None
22890
22891Synonyms:
22892    None
22893
22894Related Commands:
22895    QBICDF                   = Compute the quasi-binomial type I
22896                               cumulative distribution function.
22897    QBIPPF                   = Compute the quasi-binomial type I
22898                               percent point function.
22899    BINPDF                   = Compute the binomial probability
22900                               mass function.
22901    BBNPDF                   = Compute the beta-binomial
22902                               probability mass function.
22903    NBPDF                    = Compute the negative binomial
22904                               probability mass function.
22905    INTEGER FREQUENCY TABLE  = Generate a frequency table at
22906                               integer values with unequal bins.
22907    COMBINE FREQUENCY TABLE  = Convert an equal width frequency
22908                               table to an unequal width frequency
22909                               table.
22910    KS PLOT                  = Generate a minimum chi-square plot.
22911    PPCC PLOT                = Generate a ppcc plot.
22912    PROBABILITY PLOT         = Generate a probability plot.
22913    MAXIMUM LIKELIHOOD       = Perform maximum likelihood
22914                               estimation for a distribution.
22915
22916Reference:
22917    Consul and Famoye (2006), "Lagrangian Probability
22918    Distribution", Birkhauser, pp. 70-80.
22919
22920Applications:
22921    Distributional Modeling
22922
22923Implementation Date:
22924    2006/8
22925
22926Program 1:
22927    title size 3
22928    tic label size 3
22929    label size 3
22930    legend size 3
22931    height 3
22932    x1label displacement 12
22933    y1label displacement 15
22934    .
22935    multiplot corner coordinates 0 0 100 95
22936    multiplot scale factor 2
22937    label case asis
22938    title case asis
22939    case asis
22940    tic offset units screen
22941    tic offset 3 3
22942    title displacement 2
22943    y1label Probability Mass
22944    x1label X
22945    .
22946    ylimits 0 1
22947    major ytic mark number 6
22948    minor ytic mark number 3
22949    xlimits 0 20
22950    line blank
22951    spike on
22952    .
22953    multiplot 2 2
22954    .
22955    title P = 0.3, Phi = 0.01, M = 20
22956    plot qbipdf(x,0.3,0.01,20) for x = 1 1 20
22957    .
22958    title P = 0.3, Phi = -0.01, M = 20
22959    let phi = -0.01
22960    plot qbipdf(x,0.3,phi,20) for x = 1 1 20
22961    .
22962    title P = 0.7, Phi = 0.01, M = 20
22963    plot qbipdf(x,0.7,0.01,20) for x = 1 1 20
22964    .
22965    title P = 0.7, Phi = -0.01, M = 20
22966    let phi = -0.01
22967    plot qbipdf(x,0.7,phi,20) for x = 1 1 20
22968    .
22969    end of multiplot
22970    .
22971    justification center
22972    move 50 97
22973    text Probability Mass Functions for Quasi Binomial Type I
22974
22975Program 2:
22976    let p = 0.7
22977    let phi = 0.01
22978    let m = 20
22979    let psave = p
22980    let phisave = phi
22981    let y = quasi binomial type I rand numb for i = 1 1 500
22982    .
22983    let y3 xlow xhigh = integer frequency table y
22984    class lower -0.5
22985    class width 1
22986    class upper 20.5
22987    let y2 x2 = binned y
22988    .
22989    relative hist y2 x2
22990    limits freeze
22991    pre-erase off
22992    line color blue
22993    plot qbipdf(x,p,phi,m) for x = 0 1 20
22994    limits
22995    pre-erase on
22996    line color black
22997    .
22998    quasi binomial type I mle y
22999    let p = pml
23000    let phi = phiml
23001    .
23002    quasi binomial type I chi-square goodness of fit y3 xlow xhigh
23003    .
23004    char x
23005    line bl
23006    quasi binomial type I probability plot y3 xlow xhigh
23007    .
23008    char bl
23009    line so
23010    let p1 = 0.5
23011    let p2 = 0.9
23012    let a1 = (1 - p1)/m
23013    let a2 = (1 - p2)/m
23014    let phi1 = 0
23015    let phi2 = max(a1,a2)
23016    quasi binomial type I ks plot y3 xlow xhigh
23017    let p = shape1
23018    let phi = shape2
23019    quasi binomial type I chi-square goodness of fit y3 xlow xhigh
23020
23021-----QBIPPF (LET)--------------------------------
23022
23023QBIPPF
23024
23025Name:
23026    QBIPPF (LET)
23027
23028Type:
23029    Library Function
23030
23031Purpose:
23032    Compute the quasi-binomial type I percent point function.
23033
23034Description:
23035    The quasi-binomial type I distribution has the
23036    following probability mass function:
23037
23038        p(x;p,phi,m)=
23039            (m  x)*p*(p+x*phi)**(x-1)*(1-p-x*phi)**(m-x)
23040            x = 0, 1, 2, 3, ,..., m;
23041            0 <= p <= 1; -p/m < phi < (1-p)/m
23042
23043    with p, phi, and m denoting the shape parameters and
23044    (a  b} denoting the binomial coefficient:
23045
23046      (a  b) = a!/(b!(a-b)!}
23047
23048    The cumulative distribution function is computed using
23049    the following recurrence relation given by Consul and
23050    Famoye:
23051
23052       p(x+1) = {(m-x)*(p+x*phi)/((x+1)*(1-p-x*phi))}*
23053                (1 + phi/(p+x*phi))**x*
23054                (1 - phi/(1-p-x*phi))**(m-x-1)*p(x)
23055
23056    The percent point function is computed by summing the
23057    cumulative distribution function until the appropriate
23058    probability is obtained.
23059
23060Syntax:
23061    LET <y> = QBIPPF(<x>,<p>,<phi>,<m>)
23062               <SUBSET/EXCEPT/FOR qualification>
23063    where <x> is a positive integer variable, number, or parameter
23064               in the interval (0,1);
23065          <p> is a number, parameter, or variable in the range
23066               (0,1) that specifies the first shape parameter;
23067          <phi> is a number, parameter, or variable that
23068               specifies the second shape parameter;
23069          <m> is a number, parameter, or variable that
23070               specifies the third shape parameter;
23071          <y> is a variable or a parameter (depending on what <x>
23072               is) where the computed quasi binomial type I
23073               ppf value is stored;
23074    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
23075
23076Examples:
23077    LET A = QBIPPF(0.95,0.5,0.005,20)
23078    LET Y = QBIPPF(P,0.7,0.01,20)
23079    PLOT QBIPPF(P,0.3,0.005,20) FOR P = 0  0.01  1
23080
23081Note:
23082    Library functions are distinguished from let subcommands
23083    in the following ways.
23084    1) Functions enclose the input value in parenthesis.  Let
23085       subcommands use spaces.
23086    2) Functions can accept (and return) either parameters
23087       (i.e., single values) or variables (i.e., an array of
23088       values) while let subcommands are specific in which they
23089       accept as input and what they return as output.
23090    3) Functions can accept expressions while let subcommands
23091       do not.  For example, the following is legal:
23092           LET Y2 = ABS(Y1-INT(Y1))
23093       For let subcommands, you typically have to do something
23094       like the following:
23095           LET YTEMP = Y**2 + 8
23096           LET A = SUM YTEMP
23097
23098Default:
23099    None
23100
23101Synonyms:
23102    None
23103
23104Related Commands:
23105    QBICDF                   = Compute the quasi-binomial type I
23106                               cumulative distribution function.
23107    QBIPDF                   = Compute the quasi-binomial type I
23108                               probability mass function.
23109    BINPDF                   = Compute the binomial probability
23110                               mass function.
23111    BBNPDF                   = Compute the beta-binomial
23112                               probability mass function.
23113    NBPDF                    = Compute the negative binomial
23114                               probability mass function.
23115
23116Reference:
23117    Consul and Famoye (2006), "Lagrangian Probability
23118    Distribution", Birkhauser, pp. 70-80.
23119
23120Applications:
23121    Distributional Modeling
23122
23123Implementation Date:
23124    2006/8
23125
23126Program:
23127    title size 3
23128    tic label size 3
23129    label size 3
23130    legend size 3
23131    height 3
23132    x1label displacement 12
23133    y1label displacement 15
23134    .
23135    multiplot corner coordinates 0 0 100 95
23136    multiplot scale factor 2
23137    label case asis
23138    title case asis
23139    case asis
23140    tic offset units screen
23141    tic offset 3 3
23142    title displacement 2
23143    x1label Probability
23144    y1label X
23145    .
23146    xlimits 0 1
23147    major xtic mark number 6
23148    minor xtic mark number 3
23149    .
23150    multiplot 2 2
23151    .
23152    title P = 0.3, Phi = 0.01, M = 20
23153    plot qbippf(x,0.3,0.01,20) for x = 0  0.01  1
23154    .
23155    title P = 0.3, Phi = -0.01, M = 20
23156    let phi = -0.01
23157    plot qbippf(x,0.3,phi,20) for x = 0  0.01  1
23158    .
23159    title P = 0.7, Phi = 0.01, M = 20
23160    plot qbippf(x,0.7,0.01,20) for x = 0  0.01  1
23161    .
23162    title P = 0.7, Phi = -0.01, M = 20
23163    let phi = -0.01
23164    plot qbippf(x,0.7,phi,20) for x = 0  0.01  1
23165    .
23166    end of multiplot
23167    .
23168    justification center
23169    move 50 97
23170    text Percent Point Functions for Quasi Binomial Type I
23171
23172-----QMS-------------------------------------------------------
23173
23174QMS
23175
23176Name:
23177    QMS
23178
23179Type:
23180    Output Device Command
23181
23182Purpose:
23183    Direct graphical output to a QMS laser printer using the QUIC
23184    protocol.
23185
23186Syntax 1:
23187    QMS
23188
23189    This form directs the QMS output to the terminal screen.
23190
23191Syntax 2:
23192    DEVICE <1/2/3> QMS
23193
23194    This  form designates one of DATAPLOT's 3 devices (it will
23195    typically be device 2) to be a QMS device.
23196
23197Examples:
23198    QMS
23199    DEVICE 2 QMS
23200    DEVICE 3 QMS
23201
23202Note:
23203    QMS fonts (for hardware generated characters) can be specified
23204    with the following command:
23205        SET QMS FONT <font id>
23206    where <font id> is one of the following:
23207        10   - EDP font
23208        104  - Standard Roman Medium
23209        124  - Standard Roman Bold
23210        144  - Standard Roman Italic
23211        16   - Simplex Roman
23212        204  - Apollo Medium
23213        328  - Complex Roman Bold
23214        404  - Q-Typewriter
23215        444  - Q-Typewriter Italic
23216        532  - Union
23217        521  - Tektronix small
23218        522  - Tektronix medium
23219        523  - Tektronix large
23220        524  - Tektronix largest
23221        904  - Q-Gothic
23222        924  - Q-Gothic Italic
23223        536  - Q-Greek
23224        517  - Q-Greek
23225        664  - Special Math
23226    Fonts 10, 104, 124, 144, 16, 204, 328, 404, and 444 are supported
23227    on all QMS printers using QUIC.  The others are downloadable fonts
23228    that may or may not be available on a given QMS.  Additional
23229    information on QMS fonts can be found in the QMS Programmer's
23230    Manual for Quic.  In addition the following SET commands can be
23231    used to specify the margins and resolution of the particular QMS
23232    printer (these should normally not be required):
23233        SET QMS PPI <number> sets the resolution (in points per inch).
23234           The default is 300.
23235        SET QMS [LANDSCAPE/PORTRAIT] LEFT    MARGIN sets the left
23236           margin (in dots).
23237        SET QMS [LANDSCAPE/PORTRAIT] RIGHT   MARGIN sets the right
23238           margin (in dots).
23239        SET QMS [LANDSCAPE/PORTRAIT] BOTTOM  MARGIN sets the bottom
23240           margin (in dots).
23241        SET QMS [LANDSCAPE/PORTRAIT] TOP     MARGIN sets the top
23242            margin (in dots).
23243
23244Default:
23245    Off
23246
23247Synonyms:
23248    QUIC
23249DEVICE NOTES
23250    1) HARDWARE TEXT - QMS provides numerous hardware fonts.  QMS fonts
23251       are fixed size and orientation fonts.  Several are typeset
23252       quality fonts.
23253    2) COLOR - This device does not support color or gray scale.
23254    3) HARDWARE FILL - All area fills in software (although QMS
23255       provides a hardware fill, it is not reliable).
23256    4) DASH PATTERNS - Each dash specification generates a different
23257       type of dash pattern.
23258    5) LINE WIDTH - The QMS performs line width in hardware.
23259    6) GRAPHICS INPUT - The CROSS-HAIR command is ignored for this
23260       device.
23261
23262Related Commands:
23263    POSTSCRIPT         = Direct graphical output to a Postscript
23264                         device.
23265    CALCOMP            = Direct graphical output to a Calcomp device.
23266    HPGL               = Direct graphical output to an HPGL device.
23267    TEKTRONIX          = Direct graphical output to a Tektronix device.
23268    X11                = Direct graphical output to an X11 device.
23269    DEVICE             = Specify certain actions for the graphics
23270                         output.
23271    SET QMS FONT       = Specify the font to use on the QMS device.
23272    SET QMS PPI        = Set the resolution of the QMS device.
23273    SET QMS ... MARGIN = Set the margin for the QMS device.
23274
23275Applications:
23276    XX
23277
23278Implementation Date:
23279    89/2
23280
23281Program:
23282    XX
23283
23284-----QN SCALE (LET)-------------------------------
23285
23286QN SCALE
23287
23288Name:
23289    QN SCALE (LET)
23290
23291Type:
23292    Let Subcommand
23293
23294Purpose:
23295    Compute the Qn scale estimate for a variable.
23296
23297Description:
23298    Mosteller and Tukey (see Reference section below) define
23299    two types of robustness:
23300
23301      1) resistance means that changing a small part, even by a
23302         large amount, of the data does not cause a large change
23303         in the estimate
23304
23305      2) robustness of efficiency means that the statistic has
23306         high efficiency in a variety of situations rather than
23307         in any one situation.  Efficiency means that the estimate
23308         is close to optimal estimate given that we know what
23309         distribution that the data comes from.  A useful measure
23310         of efficiency is:
23311
23312              Efficiency = (lowest variance feasible)/
23313                           (actual variance)
23314
23315    Many statistics have one of these properties.  However,
23316    it can be difficult to find statistics that are both
23317    resistant and have robustness of efficiency.
23318
23319    The most common estimate of scale, the standard deviation,
23320    is the most efficient estimate of scale if the data come from
23321    a normal distribution.  However, the standard deviation is
23322    not robust in the sense that changing even one value can
23323    dramatically change the computed value of the standard deviation
23324    (i.e., poor resistance).  In addition, it does not have
23325    robustness of efficiency for non-normal data.
23326
23327    The median absolute deviation (MAD) and interquartile range are
23328    the two most commonly used robust alternatives to the standard
23329    deviation.  The MAD in particular is a very robust scale
23330    estimator.  However, the MAD has the following limitations:
23331
23332       1) It does not have particularly high efficiency for
23333          data that is in fact normal (37%).  In comparison, the
23334          median has 64% efficiency for normal data.
23335
23336       2) The MAD statistic also has an implicit assumption of
23337          symmetry.  That is, it measures the distance from a
23338          measure of central location (the median).
23339
23340    Rousseeuw and Croux proposed the Qn estimate of scale as an
23341    alternative to the MAD.  It shares desirable robustness
23342    properties with MAD (50% breakdown point, bounded influence
23343    function).  In addition, it has significantly better normal
23344    efficiency (82%) and it does not depend on symmetry.
23345
23346    The Qn scale estimate is motivated by the Hodges-Lehmann
23347    estimate of location:
23348
23349        HL = MEDIAN{(x(i) + x(j))/2; i < j}
23350
23351    An analogous scale estimate can be obtained by replacing
23352    pairwise averages with pairwised distances:
23353
23354        MEDIAN{|x(i) - x(j)|; i < j}
23355
23356    This estimate has high efficiency for normal data (86%),
23357    but a breakdown point of only 29%.  Rousseeuw and Croux
23358    proposed the following variation of this statistic:
23359
23360        Qn = d{|x(i) - x(j)|; i < j}(k)
23361
23362    where d is a constant factor and k = (h choose 2) which is
23363    approximately (n choose 2)/4.   The value of h is [n/2]+1
23364    (i.e., roughly half the number of obserations).  In words,
23365    we take kth order statistic of the (n choose 2) interpoint
23366    distances.  The value of d is choosen to make Qn a
23367    consistent estimator of scale.  We use the value 2.2219
23368    since this is the value that makes Qn a consistent estimator
23369    for normal data.
23370
23371    The Rousseeuw and Croux article (see the Reference section
23372    below) discusses the properties of the Qn estimate in
23373    detail.
23374
23375Syntax:
23376    LET <par> = QN SCALE <y>    <SUBSET/EXCEPT/FOR qualification>
23377    where <y> is the response variable;
23378          <par> is a parameter where the computed Qn estimate is
23379              stored;
23380    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
23381
23382Examples:
23383    LET A = QN SCALE Y1
23384    LET A = QN SCALE Y1 SUBSET TAG > 2
23385
23386Note:
23387    Dataplot uses code provided by Rousseeuw and Croux to compute
23388    the Qn estimate.  This algorithm uses an efficient computational
23389    method for computing Qn.
23390
23391Note:
23392    The Rousseeuw and Croux article also proposes the Sn scale
23393    estimate.  The article discusses the properties of both
23394    estimators in detail.
23395
23396Note:
23397    In addition, the Qn statistic is supported for the following
23398    plots and commands
23399
23400       QN SCALE PLOT Y X
23401       CROSS TABULATE QN SCALE PLOT Y X1 X2
23402       BOOTSTRAP QN SCALE PLOT Y
23403       JACKNIFE QN SCALE PLOT Y
23404       DEX QN SCALE PLOT Y X1 ... XK
23405       QN SCALE BLOCK PLOT Y X1 ... XK
23406       QN SCALE INFLUENCE CURVE Y
23407       QN SCALE INTERACTION PLOT Y X1 X2
23408
23409       TABULATE QN SCALE Y X
23410       CROSS TABULATE SN Y X1 X2
23411       LET Z = CROSS TABULATE QN SCALE Y X1 X2
23412       LET Y = MATRIX COLUMN QN SCALE M
23413       LET Y = MATRIX ROW QN SCALE M
23414
23415
23416Default:
23417    None
23418
23419Synonyms:
23420    None
23421
23422Related Commands:
23423    SN SCALE                   = Compute the Sn scale estimate of a
23424                                 variable.
23425    MEDIAN ABSOLUTE DEVIATION  = Compute the median absolute
23426                                 deviation of a variable.
23427    INTERQUARTILE RANGE        = Compute the interquartile range of
23428                                 a variable.
23429    STANDARD DEVIATION         = Compute the standard deviation of a
23430                                 variable.
23431    DIFFERENCE OF SN           = Compute the difference of the Sn
23432                                 scale estimates between two variables.
23433    STATISTIC PLOT             = Generate a statistic versus subset
23434                                 plot.
23435    CROSS TABULATE PLOT        = Generate a statistic versus subset
23436                                 plot (two subset variables).
23437    BOOTSTRAP PLOT             = Generate a bootstrap plot for a
23438                                 statistic.
23439
23440Reference:
23441    "Alternatives to the Median Absolute Deviation",
23442    Peter J. Rousseuw and Christophe Croux, Journal of the American
23443    Statistical Association, December, 1993, Vol. 88, No. 424,
23444    pp. 1273-1283.
23445
23446    "Data Analysis and Regression: A Second Course in Statistics",
23447    Mosteller and Tukey, Addison-Wesley, 1977, pp. 203-209.
23448
23449Applications:
23450    Data Analysis
23451
23452Implementation Date:
23453    2003/4
23454
23455Program:
23456    MULTIPLOT 2 2
23457    MULTIPLOT CORNER COORDINATES 0 0 100 100
23458    MULTIPLOT SCALE FACTOR 2
23459    X1LABEL DISPLACEMENT 12
23460    .
23461    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 200
23462    LET SIGMA = 1
23463    LET Y2 = LOGNORMAL RANDOM NUMBERS FOR I = 1 1 200
23464    .
23465    BOOTSTRAP SAMPLES 500
23466    BOOTSTRAP QN SCALE PLOT Y1
23467    X1LABEL B025 = ^B025, B975=^B975
23468    HISTOGRAM YPLOT
23469    X1LABEL
23470    .
23471    BOOTSTRAP QN SCALE PLOT Y2
23472    X1LABEL B025 = ^B025, B975=^B975
23473    HISTOGRAM YPLOT
23474    .
23475    END OF MULTIPLOT
23476    JUSTIFICATION CENTER
23477    MOVE 50 96
23478    TEXT QN SCALE BOOTSTRAP: NORMAL
23479    MOVE 50 46
23480    TEXT QN SCALE BOOTSTRAP: LOGNORMAL
23481
23482-----QUADE TEST-----------------------------------------
23483
23484QUADE TEST
23485
23486Name:
23487    QUADE TEST
23488
23489Type:
23490    Analysis Command
23491
23492Purpose:
23493    Perform a Quade test that k treatments have identical effects.
23494
23495Description:
23496    The Quade test is a non-parametric test for analyzing randomized
23497    complete block designs.
23498
23499    The Quade test assumes that there are k experimental
23500    treatments (k >= 2).  The observations are arranged in
23501    b blocks, that is
23502
23503                     Treatment
23504    Block  1    2      ...      k
23505      1   X11  X12     ...     X1k
23506      2   X21  X22     ...     X2k
23507      3   X31  X32     ...     X3k
23508     ...  ...  ...     ...     ...
23509      b   Xb1  Xb2     ...     Xbk
23510
23511    Let R(Xij) be the rank assigned to Xij within block i (i.e.,
23512    ranks within a given row).  Average ranks are used in the case
23513    of ties.
23514
23515    Compute the range in each block (the maximum value - the minimum
23516    value for the original data) and then rank these:
23517
23518         Q(i) = rank of the range for the i-th block
23519
23520    Then let
23521
23522         S(ij) = Q(i)*[R(X(ij)) - (k+1)/2]
23523
23524    and
23525
23526         S(j) = SUM[i=1 to b][S(ij)]     j = 1, 2, ..., k
23527
23528    Then the Quade test is
23529
23530        H0: The treatment effects have identical effects
23531        HA: At least one treatment is different from at least
23532            one other treatment
23533        Test Statistic:
23534
23535               T3 = (b-1)*B/(A2 - B)
23536
23537            where
23538
23539               A2 = SUM[i=1 to b][SUM[j=1 to k][S(ij)**2]]
23540
23541               B = (1/b)*SUM[j=1 to k][S(j)**2]
23542
23543             The T3 statistic is equivalent to performing a two-way
23544             analysis of variance of the S(ij).  The A2 term is equivalent
23545             to the total sum of squares and B is equivalent to the
23546             treatment sum of squares.
23547        Significance Level: ALPHA
23548        Critical Region:
23549            The critical region can be approximated with an F
23550            distribution:
23551
23552               T3 > FPPF(ALPHA,k-1,(b-1)*(k-1)) where FPPF is the F
23553                    percent point function.
23554
23555        Conclusion: Reject the null hypothesis if the test
23556                    statistic is in the critical region.
23557
23558    If the hypothesis of identical treatment effects is rejected,
23559    it is often desirable to determine which treatments are
23560    different (i.e., multiple comparisons).  Treatments i and j
23561    are considered different if
23562
23563       |S(i) - S(j)| > TPPF(1-alpha/2,(k-1)*(b-1))*
23564                       SQRT[2*b*(A2 - B)/((b-1)*(k-1))]
23565
23566    This is equivalent to the Fisher least significant difference
23567    computed on the S(ij) rather than the data.
23568
23569Syntax:
23570    QUADE TEST  <y>  <block> <treat>
23571                        <SUBSET/EXCEPT/FOR qualification>
23572    where <y> is the response variable;
23573          <block> is a variable that identifies the block;
23574          <treat> is a variable that identifies the treatment;
23575    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
23576
23577Examples:
23578    QUADE TEST Y BLOCK TREATMENT
23579    QUADE TEST Y X1 X2
23580    QUADE TEST Y BLOCK TREATMENT  SUBSET BLOCK > 2
23581
23582Note:
23583    In Dataplot, the variables should be given as:
23584
23585        Y   BLOCK   TREAT
23586       X11    1      1
23587       X12    1      2
23588       ...    1     ...
23589       X1k    1      k
23590       X21    2      1
23591       X22    2      2
23592       ...    2     ...
23593       X2k    2      k
23594
23595       ...   ...    ...
23596
23597
23598       Xb1    b      1
23599       Xb2    b      2
23600       ...    b     ...
23601       Xb3    b      k
23602
23603    If your data are in a format similar to that given in the
23604    DESCRIPTION section (i.e., you have colums Y1 to Yk, each
23605    with b rows), you can convert it to the format required by
23606    Dataplot with the commands:
23607
23608       LET NBLOCK = SIZE Y1
23609       LET BLOCKID = SEQUENCE 1 1 NBLOCK
23610       LET Y BLOCK TREAT = REPLICATED STACK Y1 Y2 Y3 Y4 Y5 BLOCKID
23611       QUADE TEST Y BLOCK TREAT
23612
23613Note:
23614    The response, ranked response, block, and treatment are
23615    written to the file dpst1f.dat in the current directory.
23616
23617    The treatment ranks and multiple comparisons are written to
23618    the file dpst2f.dat in the current directory.  Comparisons
23619    that are statistically significant at the 95% level are
23620    flagged with a single asterisk while comparisons that are
23621    statistically significant at the 99% level are flagged with
23622    two asterisks.
23623
23624Note:
23625    The Quade test is based on the following assumptions:
23626
23627       1) The b rows are mutually independent.  That means that
23628          the results within one block (row) do not affect
23629          the results within other blocks.
23630
23631       2) The data can be meaningfully ranked.
23632
23633       3) The data have at least interval scale so that the sample
23634          range may be determined within each block.
23635
23636Note:
23637    The following statistics are also supported:
23638
23639        LET A = QUADE TEST         Y X1 X2
23640        LET A = QUADE TEST CDF     Y X1 X2
23641        LET A = QUADE TEST PVALUE  Y X1 X2
23642
23643    Enter HELP STATISTICS to see what commands can use these
23644    statistics.
23645
23646Note:
23647    The Quade test is similar to the Friedman test.  A few distinctions:
23648
23649        1) For k = 2, the Friedman test is equivalent to a sign test while
23650           the Quade test is equivalent to a signed rank test.
23651
23652        2) According to Conover, the Quade test is typically more powerful
23653           for k < 5 while the Friedman test tends to become more powerful
23654           for k >= 5.
23655
23656        3) The Friedman test only requires ordinal scale data (i.e., the
23657           data can be ranked) while the Quade test requires at least
23658           interval scale data (the range within a block can be computed).
23659
23660Default:
23661    None
23662
23663Synonyms:
23664    None
23665
23666Related Commands:
23667    FRIEDMAN              = Perform a Friedman test.
23668    ANOVA                 = Perform an analysis of variance.
23669    DURBIN                = Perform a Durbin test for two-way
23670                            incomplete balanced block designs.
23671    COCHRAN               = Perform a Cochran test for two-way
23672                            complete block designs (binary data).
23673    KRUSKAL WALLIS        = Perform a Kruskall Wallis test.
23674    SIGN TEST             = Perform a sign test.
23675    MEDIAN POLISH         = Carries out a robust ANOVA.
23676    T TEST                = Carries out a t test.
23677    RANK SUM TEST         = Perform a rank sum test.
23678    SIGNED RANK TEST      = Perform a signed rank test.
23679    DEX ... PLOT          = Generates a dex plot for a statistic.
23680
23681Reference:
23682    W. J. Conover, (1999).  "Practical Nonparameteric Statistics",
23683    Third Edition, Wiley, pp. 373-380.
23684
23685Applications:
23686    Analysis of Variance
23687
23688Implementation Date:
23689    2011/7
23690
23691Program:
23692    SKIP 25
23693    READ QUADE2.DAT Y X1 X2
23694    SET WRITE DECIMALS 5
23695    .
23696    LET A1 = QUADE TEST        Y X1 X2
23697    LET A2 = QUADE TEST CDF    Y X1 X2
23698    LET A3 = QUADE TEST PVALUE Y X1 X2
23699    PRINT A1 A2 A3
23700    .
23701    QUADE TEST Y X1 X2
23702
23703-----QUADRATIC FORM (LET)----------------------------------------
23704
23705QUADRATIC FORM
23706
23707Name:
23708    QUADRATIC FORM (LET)
23709
23710Type:
23711    Let Subcommand
23712
23713Purpose:
23714    Compute the quadratic form of a matrix and a vector.
23715
23716Description:
23717    The quadratic form of a matrix M and a vector X is defined as:
23718
23719         A=X'MX
23720
23721    where X' is the transpose of X.  If the vector X has n
23722    rows, then M must be an nxn matrix.
23723
23724    Quadratic forms are common in statistics, particularly in
23725    linear models and multivariate analysis.  In Dataplot
23726    applications, the QUADRATIC FORM command is most typically
23727    used as an intermediate calculation in a larger macro.
23728
23729Syntax:
23730    LET <mat2> = QUADRATIC FORM <mat1>  <x>
23731    where <mat1> is a matrix for which the quadratic form is to
23732              be computed;
23733          <x> is a vector for which the quadratic form is to
23734              be computed;
23735    and where <mat2> is a matrix where the resulting quadratic
23736             form is saved.
23737
23738Examples:
23739    LET A = QUADRATIC FORM M X
23740
23741Note:
23742    Matrices are created with either the READ MATRIX command or the
23743    MATRIX DEFINITION command.  Enter HELP MATRIX DEFINITION and HELP
23744    READ MATRIX for details.
23745
23746Default:
23747    None
23748
23749Synonyms:
23750    None
23751
23752Related Commands:
23753    READ MATRIX               = Read a matrix.
23754    MATRIX COLUMN DIMENSION   = Dimension maximum number of columns
23755                                for Dataplot matrices.
23756
23757    MATRIX MEAN               = Compute the overall mean for a matrix.
23758    MATRIX COLUMN STATISTIC   = Compute column statistics for a
23759                                matrix.
23760    MATRIX ROW STATISTIC      = Compute row statistics for a matrix.
23761    LINEAR COMBINATION        = Compute a linear combination of a
23762                                matrix and a vector.
23763
23764Reference:
23765    Any standard text on linear algebra.
23766
23767Applications:
23768    Multivariate Analysis
23769
23770Implementation Date:
23771    1998/8
23772
23773Program:
23774    .  Perform a Fisher's dsicriminant analysis on Iris data.
23775    .
23776    .  READ DATA,  3 GROUPS (N1=N2=N3=3), 2 VARIABLES
23777    FEEDBACK OFF
23778    DIMENSION 200 COLUMNS
23779    SKIP 25
23780    READ IRIS.DAT SEPLENG SEPWIDTH PETLENG PETWIDTH TAG
23781    SKIP 0
23782    LET NTOT = SIZE SEPLENG
23783    LET X = MATRIX DEFINITION SEPLENG NTOT 4
23784    LET P = MATRIX NUMBER OF COLUMNS X
23785    .
23786    LET GROUPID = DISTINCT TAG
23787    LET NG = SIZE GROUPID
23788    LET XMGRAND = MATRIX COLUMN MEANS X
23789    .
23790    .  CALCULATE B0 = SUM (I=1,NG) (XBARi - XBARALL)(XBARi-XBARALL)'
23791    .
23792    LET DIAG = 0 FOR I = 1 1 P
23793    LET B0 = DIAGONAL MATRIX DIAG
23794    .
23795    LOOP FOR K = 1 1 NG
23796       LET N^K = SIZE TAG SUBSET TAG = K
23797       LET XMEANI = MATRIX COLUMN MEANS X SUBSET TAG = K
23798       LET XMEANI= XMEANI - XMGRAND
23799       LET B0TEMP = VECTOR TIMES TRANSPOSE XMEANI
23800       LET B0 = MATRIX ADDITION B0 B0TEMP
23801    END OF LOOP
23802    .
23803    .  CALCULATE Spooled = (N1-1)S1 + .. + (Ng-1)Sg)/(N1+ .. + Ng - g)
23804    LET SPOOL = POOLED VARIANCE-COVARIANCE MATRIX X TAG
23805    LET DENOM = NTOT - NG
23806    LET WINVB = MATRIX MULTIPLICATION SPOOL DENOM
23807    LET WINVB = MATRIX INVERSE WINVB
23808    LET WINVB = MATRIX MULTIPLICATION WINVB B0
23809    .
23810    .  COMPUTE EIGENVALUES AND SORT IN DECREASING ORDER
23811    .  COMPUTE EIGENVECTORS, ONLY KEEP REAL COMPONENT, SORT
23812    .
23813    LET E = MATRIX EIGENVALUES WINVB
23814    LET EV = MATRIX EIGENVECTORS WINVB
23815    LET INDX = SEQUENCE 1 1 P
23816    RETAIN E FOR I = 1 1 P
23817    LET ESORT = SORTC E INDX
23818    LET REVERSE = SEQUENCE P 1 1
23819    LET REVERSE = SORTC REVERSE ESORT INDX
23820    LET EVECT = DIAGONAL MATRIX DIAG
23821    .  NORMALIZE L'SpooledL =1
23822    .  DIST = L'SpooledL, MULTIPLY EIGENVECTOR BY 1/SQRT(DIST)
23823    LOOP FOR K = 1 1 P
23824        LET LTAG = INDX(K)
23825        RETAIN EV^K  FOR I = 1 1 P
23826        LET EVECT^LTAG = EV^K
23827        LET DIST = QUADRATIC FORM SPOOL EVECT^LTAG
23828        LET EVECT^LTAG = (1/SQRT(DIST))*EVECT^LTAG
23829    END OF LOOP
23830    .  PLOT FIRST 2 DISCRIMINANTS
23831    LET ZY = LINEAR COMBINATION X EVECT1
23832    LET ZX = LINEAR COMBINATION X EVECT2
23833    DEVICE 1 OFF
23834    MEAN PLOT ZY TAG
23835    LET GMEANY = YPLOT
23836    MEAN PLOT ZX TAG
23837    LET GMEANX = YPLOT
23838    RETAIN GMEANX GMEANY SUBSET TAGPLOT = 1
23839    DEVICE 1 ON
23840    Y1LABEL FIRST DISCRIMINANT
23841    X1LABEL SECOND DISCRIMINANT
23842    CHARACTER CIRCLE SQUARE TRIANGLE
23843    LINE BLANK ALL
23844    LEGEND 1 CIRC() - SPECIES 1
23845    LEGEND 2 SQUA() - SPECIES 2
23846    LEGEND 3 TRIA() - SPECIES 3
23847    LEGEND FONT DUPLEX
23848    LEGEND SIZE 1.2
23849    TITLE PLOT FIRST 2 DISCRIMINANT FUNCTIONS
23850    PLOT ZY ZX TAG
23851    PRINT "FISHER's DISCRIMINANT ANALYSIS"
23852    PRINT " "
23853    PRINT " "
23854    PRINT "B0 MATRIX (= between group sums of cross-products):"
23855    PRINT B0
23856    PRINT " "
23857    PRINT " "
23858    PRINT "POOLED VARIANCE-COVARIANCE MATRIX:"
23859    PRINT SPOOL
23860    PRINT " "
23861    PRINT " "
23862    PRINT "EIGENVALUES:"
23863    PRINT ESORT
23864    PRINT " "
23865    PRINT " "
23866    PRINT "COLUMNS ARE THE DISCRIMINANT FUNCTIONS:"
23867    PRINT EVECT
23868    PRINT " "
23869    PRINT " "
23870    PRINT "GROUP MEANS:"
23871    PRINT GMEANX GMEANY
23872
23873-----QUANTILE (LET)-----------------------------------------
23874
23875QUANTILE
23876
23877Name:
23878    QUANTILE (LET)
23879
23880Type:
23881    Let Subcommand
23882
23883Purpose:
23884    Compute a user specified quantile for a variable.
23885
23886Description:
23887    The qth quantile of a data set is defined as that value
23888    where a q fraction of the data is below that value and (1-q)
23889    fraction of the data is above that value.  For example, the
23890    0.5 quantile is the median.
23891
23892    Dataplot supports two methods for computing the quantile.
23893
23894    The first method is based on the order statistic.  The
23895    formula is:
23896
23897       X(q) = (1 - r)*X(NI1) + r*X(NI2)
23898
23899   where
23900
23901       X are the observations sorted in ascending order
23902       NI1 = INT(Q*(N+1))
23903       NI2 = NI1 + 1
23904       r = Q*(N+1) - INT(Q*(N+1))
23905
23906   If q is < 1/(N+1), then X(1) is returned.  If q > N/(N+1), then X(N)
23907   is returned.
23908
23909   An alternative method is called the Herrell-Davis
23910   estimate.  This method attempts to provide a lower standard
23911   error for X(q) by utilizing all the order statistics rather
23912   than a single (or a weighted average of two) order statistic.
23913   Note that there are cases where the Herrell-Davis has a
23914   substantially smaller standard error than the order statistic
23915   method.  However, there are also cases where the reverse is
23916   true.
23917
23918   To compute the Herrell-Davis estimate, do the following:
23919
23920      1. Sort the X in ascending order.
23921
23922      2. A = (N+1)*q - 1
23923
23924      3. B = (N+1)*(1-q) - 1
23925
23926      4. W(i) = BETCDF(i/n, A, B) - BETCDF((i-1)/n, A, B)
23927
23928         where BETCDF is the beta cumulative distribution
23929         function with shape parameters A and B.
23930
23931      5. X(q) = SUM[i=1 to n][W(i)*X(i)]
23932
23933   Note: The computations for A and B were modifed 2/2003 to:
23934
23935         A = (N+1)*q
23936         B = (N+1)*(1-q)
23937
23938   The original form was from the text in the Wilcox book.  However,
23939   checking his S+ macros and verifying against the original
23940   Herrell and Davis article indicated that the new formulas are
23941   the correct ones.
23942
23943Syntax:
23944    LET <par> = <quan> QUANTILE <y>
23945                       <SUBSET/EXCEPT/FOR qualification>
23946    where <y> is the response variable;
23947          <quan> is a number or parameter in the range (0,1) that
23948              specifies the desired quantile;
23949          <par> is a parameter where the computed quantile
23950              is stored;
23951    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
23952
23953Examples:
23954    LET A = 0.20 QUANTILE Y
23955
23956    LET XQ = 0.50
23957    LET A = XQ QUANTILE Y SUBSET TAG > 2
23958
23959Note:
23960    The PERCENTILE command is equivalent to the QUANTILE command
23961    using the order statistic method.  The only difference is
23962    that the requested percentile is given as a percentage
23963    between 0 and 100% rather than as a fraction.
23964
23965Note:
23966    Note that there are a number of other ways of calculating percentiles
23967    in common use.  Hyndman and Fan (1996) in an American Statistician
23968    article evaluated nine different methods (we will refer to these as R1
23969    through R9) for computing percentiles relative to six desirable
23970    properties. Their goal was to advocate a "standard" definition for
23971    percentiles that would be implemented in statistical software. Although
23972    this has not in fact happened, the article does provide a useful
23973    summary and evaluation of various methods for computing percentiles.
23974    Most statistical and spreadsheet software use one of the methods
23975    described in Hyndman and Fan.
23976
23977    The default method used by Dataplot described above is equivalent
23978    to method R6 of Hyndman and Fan.
23979
23980    The method advocated by Hyndman and Fan is R8. For the R8 method,
23981
23982       X(q) = X(NI1) + r*(X(NI2) - X(NI1))
23983
23984    where
23985
23986       X are the observations sorted in ascending order
23987       NI1 = INT(Q*(N+(1/3)) + (1/3))
23988       NI2 = NI1 + 1
23989       r = Q*(N+1) - INT(Q*(N+1))
23990
23991    If q ≤ (2/3)/(N+(1/3)) the minimum value will be returned and if
23992    q ≥ (N-(1/3))/(N+(1/3)) the maximum value will be returned.
23993
23994    Method R7 (this is the default method in R and Excel) is calculated by
23995
23996       X(q) = X(NI1) + r*(X(NI2) - X(NI1))
23997
23998    where
23999
24000       X are the observations sorted in ascending order
24001       NI1 = INT(Q*(N-1) + 1)
24002       NI2 = NI1 + 1
24003       r = Q*(N+1) - INT(Q*(N+1))
24004
24005    If q = 1, then X(N) is returned.
24006
24007    The R6, R7, and R8 methods give fairly similar, but not exactly the
24008    same (particularly for small samples), results.  For most purposes,
24009    any of these three methods should be acceptable.
24010
24011Note:
24012    The following command is used to determine which method
24013    is used to compute the quantile:
24014
24015         SET QUANTILE METHOD <ORDER/HERRELL-DAVIS/R6/R7/R8>
24016
24017    R6 is equivalent to ORDER.  ORDER is the default.
24018
24019Note:
24020    Dataplot statistics can be used in 20+ commands.  For details, enter
24021
24022         HELP STATISTICS
24023
24024    When using these commands, the specific quantile to compute is
24025    specified by entering the following command (before the plot command):
24026
24027       LET XQ = <value>
24028
24029    where <value> is a number in the interval (0,1) that specifies
24030    the desired quantile.
24031
24032Default:
24033    The default is to use the order statistic method to
24034    compute the quantile.
24035
24036Synonyms:
24037    None
24038
24039Related Commands:
24040    PERCENTILE                  = Compute a percentile of a variable.
24041    MEDIAN                      = Compute the median of a variable.
24042    LOWER QUARTILE              = Compute the lower quartile of a
24043                                  variable.
24044    UPPER QUARTILE              = Compute the upper quartile of a
24045                                  variable.
24046    FIRST DECILE                = Compute the first decile (the 10th
24047                                  quantile) of a variable.
24048    STATISTIC PLOT              = Generate a statistic versus subset
24049                                  plot for numerous statistics.
24050    CROSS TABULATE PLOT         = Generate a statistic versus subset
24051                                  plot (two group variables) for a
24052                                  given statistics.
24053    BOOTSTRAP PLOT              = Generate a bootstrap plot for a
24054                                  given statistic.
24055
24056References:
24057    Hyndman and Fan (November 1996), "Sample Quantiles in Statistical
24058    Packages", The American Statistician, Vol. 50, No. 4, pp. 361-365.
24059
24060    Rand Wilcox (1997), "Introduction to Robust Estimation and Hypothesis
24061    Testing", Academic Press.
24062
24063    Frank Herrell and C. E. Davis, (1982), "A New Distribution-Free Quantile
24064    Estimator", Biometrika, 69(3), 635-640.
24065
24066Applications:
24067    Data Analysis
24068
24069Implementation Date:
24070    2002/07
24071    2003/02: Correction in Herrell-Davis formulation.
24072    2015/02: Support for R7 and R8 methods
24073
24074Program 1:
24075    LET Y1 = LOGISTIC RANDOM NUMBERS FOR I = 1 1 100
24076    LET Q05A = 0.05 QUANTILE Y1
24077    LET Q95A = 0.95 QUANTILE Y1
24078    SET QUANTILE METHOD HERRELL DAVIS
24079    LET Q05B = 0.05 QUANTILE Y1
24080    LET Q95B = 0.95 QUANTILE Y1
24081    LET Q95B = XQ QUANTILE Y1
24082    LET Q05A = ROUND(Q05A,4)
24083    LET Q95A = ROUND(Q95A,4)
24084    LET Q05B = ROUND(Q05B,4)
24085    LET Q95B = ROUND(Q95B,4)
24086    PRINT "R6 METHOD: 0.05 Quantile = ^Q05A"
24087    PRINT "R6 METHOD: 0.95 Quantile = ^Q95A"
24088    PRINT "HD METHOD: 0.05 Quantile = ^Q05B"
24089    PRINT "HD METHOD: 0.95 Quantile = ^Q95B"
24090
24091Program 2:
24092    . Step 1:   Read the data
24093    .
24094    read y
24095    95.1772
24096    95.1567
24097    95.1937
24098    95.1959
24099    95.1442
24100    95.0610
24101    95.1591
24102    95.1195
24103    95.1065
24104    95.0925
24105    95.1990
24106    95.1682
24107    end of data
24108    .
24109    . Step 2:   Compute the quantiles using different methods
24110    .
24111    let xq = 0.90
24112    .
24113    let xqr6 = quantile y
24114    let xpr6 = round(xpr6,4)
24115    .
24116    set quantile method r7
24117    let xqr7 = quantile y
24118    let xqr7 = round(xqr7,4)
24119    .
24120    set quantile method r8
24121    let xqr8 = quantile y
24122    let xqr8 = round(xqr8,4)
24123    .
24124    . Step 3:   Print the results
24125    .
24126    print "Quantile with R6 method:  ^xqr6"
24127    print "Quantile with R7 method:  ^xqr7"
24128    print "Quantile with R8 method:  ^xqr8"
24129
24130-----QUANTILE-QUANTILE PLOT--------------------------------------
24131
24132QUANTILE QUANTILE PLOT
24133
24134Name:
24135    QUANTILE-QUANTILE PLOT
24136
24137Type:
24138    Graphics Command
24139
24140Purpose:
24141    Generates a quantile-quantile plot.
24142
24143Description:
24144    A quantile-quantile plot (or q-q plot) is a graphical data analysis
24145    technique for comparing the distributions of 2 data sets.  The
24146    quantile-quantile plot is a graphical alternative for the various
24147    classical 2-sample tests (e.g., t for location, F for dispersion).
24148    The plot consists of the following:
24149
24150       Vertical axis   = estimated quantiles from data set 1;
24151       Horizontal axis = estimated quantiles from data set 2.
24152
24153    The "quantiles" of a distribution are the distribution's "percent
24154    points" (e.g., .5 quantile = 50% point = median).  The advantage of
24155    the quantile-quantile plot is 2-fold:
24156
24157       1) the sample sizes do not need to be identical;
24158       2) many distributional aspects can be simultaneously tested.
24159          For example, shifts in location, shifts in dispersion,
24160          changes in symmetry/skewness, outliers, etc.
24161
24162    The quantile-quantile plot has 3 components:
24163
24164       1) the quantile points themselves;
24165       2) a 45 degree reference line.
24166       3) a least squares line fit to the quantile points.
24167
24168    If the two data sets come from similar distributions, then the
24169    points of the q-q plot should lie along the 45 degree reference
24170    line.
24171
24172    Like usual, the appearance of these 2 components is controlled by
24173    the first 2 settings of the CHARACTERS and LINES commands.  It is
24174    typical for the quantile points to be represented as, say, X's with
24175    no connecting line, and the reference line to have no plot
24176    characters but to be solid.  This is demonstrated in the sample
24177    program below.
24178
24179Syntax 1:
24180    QUANTILE-QUANTILE PLOT <y1> <y2>  <SUBSET/EXCEPT/FOR qualification>
24181    where <y1> is the first  response variable;
24182          <y2> is the second response variable;
24183    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
24184
24185Syntax 2:
24186    HIGHLIGHT QUANTILE-QUANTILE PLOT <y1> <y2> <tag>
24187                                     <SUBSET/EXCEPT/FOR qualification>
24188    where <y1> is the first  response variable;
24189          <y2> is the second response variable;
24190          <tag> is a group-id variable that defines the highlighting;
24191    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
24192
24193    This syntax can be used to plot different plot points with
24194    different attributes.  For example, it can used to highlight
24195    groups in the data or to emphasize the extremes.
24196
24197Examples:
24198    QUANTILE-QUANTILE PLOT Y1 Y2
24199    QUANTILE-QUANTILE PLOT RUN1 RUN2
24200    QUANTILE-QUANTILE PLOT BATCH1 BATCH2
24201    QUANTILE-QUANTILE PLOT Y1 Y2 SUBSET AUTO 4
24202    QUANTILE-QUANTILE PLOT Y1 Y2 SUBSET STATE 25
24203
24204Note:
24205    One of the distributions can be a theoretical distribution.  For
24206    example, the following program generates a quantile-quantile plot
24207    of a data set against a normal distribution (this is called a
24208    normal quantile plot).
24209
24210        LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
24211        LET X = SEQUENCE .01 .01 .99
24212        LET Y2 = NORPPF(X)
24213        QUANTILE-QUANTILE PLOT Y1 Y2
24214
24215    This same technique can be used other distributions (use the proper
24216    PPF function).  This is also fairly close to what a probability
24217    plot does (DATAPLOT has a PROBABILITY PLOT command for over 25
24218    distributions).
24219
24220Note:
24221    For large data sets, it may be impractical to generate the plot for
24222    each individual point.  As an alternative, you can generate the plot
24223    for a user specified number of quantiles.  To do this, enter the
24224    command
24225
24226        SET QUANTILE QUANTILE PLOT NUMBER OF PERCENTILES <value>
24227
24228    where <value> specifies the desired number of quantiles.  This is
24229    demonstrated in the Program 2 example below.
24230
24231Note:
24232    If the two data sets have similar distribution, then the points on
24233    the plot should fall along the 45 degree reference line.  For
24234    example, if you enter a QUANTILE QUANTILE PLOT Y Y command, then the
24235    points will lie exactly on the reference line.  This means that if
24236    a line is fit to the points on the plot and the two data sets come
24237    from similar distributions, then the itercept and the slope of the
24238    fitted line should be close to zero and one, respectively.  In
24239    addition, the correlation coefficient of the fitted line should be
24240    close to one.
24241
24242    The parameters containing the intercept, slope, and correlation
24243    coefficient are automatically saved in the parameters PPA0, PPA1,
24244    and PPCC, respectively.  This can be useful in labeling q-q plots.
24245
24246Note:
24247    If you have more than two data sets, you can generate a matrix plot
24248    of the pairwise q-q plots with the SCATTER PLOT MATRIX command.  This
24249    is demonstrated in the Program 3 example.
24250
24251Default:
24252    None
24253
24254Synonyms:
24255    None
24256
24257Related Commands:
24258    TUKEY MEAN DIFFERENCE PLOT  = Generates a Tukey mean difference plot.
24259    BOX PLOT                    = Generates a box plot.
24260    PLOT                        = Generates a data or function plot.
24261    BIHISTOGRAM                 = Generates a bihistogram.
24262    PROBABILITY PLOT            = Generates a probability plot.
24263    PERCENTILE PLOT             = Generates a percentile plot.
24264    T-TEST                      = Carries out a 2-sample t test.
24265    ANOVA                       = Carries out an ANOVA.
24266    MULTIPLOT                   = Allows multiple plots per page.
24267    CHARACTERS                  = Sets the type for plot characters.
24268    LINES                       = Sets the type for plot lines.
24269
24270Reference:
24271    Chambers, Cleveland, Kleiner, and Tukey (1983), "Graphical Methods
24272    of Data Analysis", Wadsworth, pp. 48-57.
24273
24274Applications:
24275    Exploratory Data Analysis
24276
24277Implementation Date:
24278    1988/03
24279    2011/02: Support for highlight option
24280    2016/06: Support for SET QUANTILE QUANTILE PLOT NUMBER OF PERCENTILES
24281    2016/06: Generate a fitted line to the quantile points
24282    2016/06: Automatically save PPA0, PPA1, and PPCC
24283
24284Program 1:
24285    SKIP 25
24286    READ AUTO83B.DAT Y1 Y2
24287    DELETE Y2 SUBSET Y2 < 0
24288    .
24289    LINE BLANK SOLID DASHED
24290    CHARACTER CIRCLE BLANK BLANK
24291    CHARACTER FILL ON OFF OFF
24292    CHARACTER HW 0.5 0.375
24293    TITLE AUTOMATIC
24294    TITLE OFFSET 2
24295    LABEL CASE ASIS
24296    Y1LABEL MPG for US Cars
24297    X1LABEL MPG for Japanese Cars
24298    .
24299    QUANTILE-QUANTILE PLOT Y1 Y2
24300    .
24301    LET PPA0 = ROUND(PPA0,3)
24302    LET PPA1 = ROUND(PPA1,3)
24303    LET PPCC = ROUND(PPCC,3)
24304    JUSTIFICATION LEFT
24305    MOVE 20 87; TEXT A0: ^PPA0
24306    MOVE 20 85; TEXT A1: ^PPA1
24307    MOVE 20 83; TEXT PPCC: ^PPCC
24308
24309Program 2:
24310    LET Y1 = NORMAL RANDOM NUMBER FOR I = 1 1 1000000
24311    LET Y2 = DOUBLE EXPONENTIAL RANDOM NUMBER FOR I = 1 1 1000000
24312    .
24313    LINE BLANK SOLID DASH
24314    CHARACTER CIRCLE BLANK BLANK
24315    CHARACTER FILL ON OFF
24316    CHARACTER HW 0.5 0.375
24317    TITLE AUTOMATIC
24318    TITLE OFFSET 2
24319    LABEL CASE ASIS
24320    Y1LABEL Normal Random Numbers
24321    X1LABEL Double Exponential Random Numbers
24322    .
24323    SET QUANTILE QUANTILE PLOT NUMBER OF PERCENTILES 1000
24324    QUANTILE-QUANTILE PLOT Y1 Y2
24325    .
24326    LET PPA0 = ROUND(PPA),3)
24327    LET PPA1 = ROUND(PPA1,3)
24328    LET PPCC = ROUND(PPCC,3)
24329    JUSTIFICATION LEFT
24330    MOVE 20 87; TEXT A0: ^PPA0
24331    MOVE 20 85; TEXT A1: ^PPA1
24332    MOVE 20 83; TEXT PPCC: ^PPCC
24333
24334Program 3:
24335    SKIP 25
24336    READ AUTO83B.DAT Y1 Y2
24337    DELETE Y2 SUBSET Y2 < 0
24338    .
24339    LINE BLANK BLANK SOLID DASH
24340    CHARACTER CIRCLE CIRCLE BLANK BLANK
24341    CHARACTER FILL ON ON
24342    CHARACTER HW 0.5 0.375 ALL
24343    CHARACTER COLOR BLACK RED
24344    TITLE AUTOMATIC
24345    TITLE OFFSET 2
24346    .
24347    LET N2 = SIZE Y2
24348    LET TAG = 1 FOR I = 1 1 N2
24349    LET TAG = 2 SUBSET Y2 > 32
24350    .
24351    HIGHLIGHT QUANTILE QUANTILE PLOT Y2 Y1 TAG
24352
24353Program 4:
24354    . Step 1:   Read the data
24355    .
24356    skip 25
24357    read exp.dat      y1
24358    read weibbury.dat y2
24359    read gamma.dat    y3
24360    read frechet.dat  y4
24361    skip 0
24362    .
24363    variable label y1 exp.dat
24364    variable label y2 weibbury.dat
24365    variable label y3 gamma.dat
24366    variable label y4 frechet.dat
24367    .
24368    . Step 2:   Set some plot control features
24369    .
24370    case asis
24371    label case asis
24372    title case asis
24373    title offset 2
24374    tic mark offset units screen
24375    tic mark offset 5 5
24376    multiplot scale factor 4
24377    multiplot corner coordinates 10 10 90 90
24378    .
24379    line blank solid blank blank
24380    character circle blank blank blank
24381    character fill on
24382    character hw 0.5 0.375 all
24383    .
24384    . Step 3:   Scatter plot matrix of quantile-quantile plot
24385    .
24386    label displacement 18
24387    set scatter plot matrix type quantile quantile
24388    scatter plot matrix y1 y2 y3 y4
24389    .
24390    justification center
24391    move 50 97
24392    text Quantile-Quantile Plots of Four Data Sets
24393
24394-----QUANTILE STANDARD ERROR (LET)------------------------------------
24395
24396QUANTILE STANDARD ERROR
24397
24398Name:
24399    QUANTILE STANDARD ERROR (LET)
24400
24401Type:
24402    Let Subcommand
24403
24404Purpose:
24405    Compute the standard error for a user specified quantile for
24406    a variable.
24407
24408Description:
24409    The qth quantile of a data set is defined as that value
24410    where a q fraction of the data is below that value and (1-q)
24411    fraction of the data is above that value.  For example, the
24412    0.5 quantile is the median.
24413
24414    Dataplot supports two methods for computing the quantile.
24415    The first method is the conventional method based on the order
24416    statistic.  The second method, called the Herrell-Davis method,
24417    is based on using all the order statistics.  The standard error
24418    methods given here only apply to the first method.
24419
24420    Two methods for obtaining the standard errors for the quantiles
24421    are supported.
24422
24423    The first method, called the Maritz-Jarrett method, is computed
24424    for the variable X and the desired quantile q as follows:
24425
24426      1. Sort the X in ascending order.
24427
24428      2. Let m = [q**n + 0.5]
24429
24430      3. A = m - 1
24431
24432      4. B = n - m
24433
24434      5. W(i) = BETCDF(i/n, A, B) - BETCDF((i-1)/n, A, B)
24435
24436         where BETCDF is the beta cumulative distribution
24437         function with shape parameters A and B.
24438
24439      6. C(k) = SUM[i=1 to n][W(i)*X(i)**k]
24440
24441      7. MJ = SQRT(C(2) - C(1)**2)
24442
24443    The second method, based on the kernel density, is computed for
24444    a variable X as follows:
24445
24446      1. Let h = 1.2*(Xhat(0.75) - Xhat(0.25))/n**(1/5).  Xhat is
24447         the estimated quantile.
24448
24449      2. Compute the number of observations of X contained in the
24450         interval X +/- h.  Call this NINT.
24451
24452      3. fhat(x) = NINT/(2*n*h)
24453
24454      4. The stanard error of Xhat(q) = 1/[2*SQRT(n)*fhat(Xhat(q))]
24455
24456Syntax:
24457    LET <par> = <quant> QUANTILE STANDARD ERROR <y>
24458                <SUBSET/EXCEPT/FOR qualification>
24459    where <y> is the response variable;
24460          <quant> is a number or parameter in the range (0.1) that
24461              specifies the desired quantile;
24462          <par> is a parameter where the computed quantile standard
24463              error is stored;
24464    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
24465
24466    In order to specify the desired quantile, enter the command
24467
24468        LET XQ = <value>
24469
24470    where <value> is a number in the interval (0,1).
24471
24472Examples:
24473    SET QUANTILE STANDARD ERROR MARITZ-JARRETT
24474    LET A = 0.20 QUANTILE STANDARD ERROR Y
24475
24476    SET QUANTILE STANDARD ERROR KERNEL DENSITY
24477    LET XQ = 0.20
24478    LET A = XQ QUANTILE STANDARD ERROR Y
24479
24480    SET QUANTILE STANDARD ERROR KERNEL DENSITY
24481    LET XQ = 0.20
24482    LET A = XQ QUANTILE STANDARD ERROR Y  SUBSET TAG > 1
24483
24484Note:
24485    The following command is used to determine which method
24486    is used to compute the quantile standard error:
24487
24488         SET QUANTILE STANDARD ERROR <KERNEL DENSITY/MARITZ JARRETT>
24489
24490Note:
24491    Dataplot statistics can be used in 20+ commands.  For details, enter
24492
24493         HELP STATISTICS
24494
24495    The specific quantile for which the standard error is to be
24496    computed is specified by entering the following command (before
24497    the plot command):
24498
24499       LET XQ = <value>
24500
24501    where <value> is a number in the interval (0,1) that specifies
24502    the desired quantile.
24503
24504Note:
24505  To obtain standard errors and confidence limits for the
24506  Herrell-Davis method, use the BOOTSTRAP PLOT command.  For
24507  example,
24508
24509      LET XQ = 0.95
24510      SET QUANTILE METHOD HERRELL DAVIS
24511      BOOTSTRAP SAMPLES 500
24512      BOOTSTRAP QUANTILE STANDARD ERROR PLOT Y
24513      LET LCL = B025
24514      LET UCL = B975
24515
24516   The bootstrap method can also be applied to quantile estimated
24517   using the order statistic method.
24518
24519Default:
24520    The default is to use the Maritz-Jarrett method to
24521    compute the quantile standard error.
24522
24523Synonyms:
24524    None
24525
24526Related Commands:
24527    QUANTILE                    = Compute a quantile of a variable.
24528    MEDIAN                      = Compute the median of a variable.
24529    LOWER QUARTILE              = Compute the lower quartile of a
24530                                  variable.
24531    UPPER QUARTILE              = Compute the upper quartile of a
24532                                  variable.
24533    FIRST DECILE                = Compute the first decile (the 10th
24534                                  quantile) of a variable.
24535    STATISTIC PLOT              = Generate a statistic versus subset
24536                                  plot for numerous statistics.
24537    CROSS TABULATE PLOT         = Generate a statistic versus subset
24538                                  plot (two group variables) for a
24539                                  given statistics.
24540    BOOTSTRAP PLOT              = Generate a bootstrap plot for a
24541                                  given statistic.
24542    INFLUENCE CURVE             = Generate an influence curve for a
24543                                  given statistic.
24544    DEX PLOT                    = Generate a dex plot for a given
24545                                  statistic.
24546    INTERACTION STATISTIC PLOT  = Generate a dex plot for a given
24547                                  statistic.
24548
24549Reference:
24550    Rand Wilcox (1997), "Introduction to Robust Estimation and Hypothesis
24551    Testing", Academic Press.
24552
24553    Frank Herrell and C. E. Davis, (1982), "A New Distribution-Free
24554    Quantile Estimator", Biometrika, 69(3), 635-640.
24555
24556    Hyndman and Fan (November 1996), "Sample Quantiles in Statistical
24557    Packages", The American Statistician, Vol. 50, No. 4, pp. 361-365.
24558
24559Applications:
24560    Data Analysis
24561
24562Implementation Date:
24563    2002/7
24564
24565Program:
24566    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
24567    LET XQ = 0.05
24568    LET P05 = XQ QUANTILE Y1
24569    LET P05SE = XQ QUANTILE STANDARD ERROR Y1
24570
24571-----QUARTILE COEFFICIENT OF DISPERSION (LET)---------------------------
24572
24573QUARTILE COEFFICIENT OF DISPERSION
24574
24575Name:
24576    QUARTILE COEFFICIENT OF DISPERSION (LET)
24577
24578Type:
24579    Let Subcommand
24580
24581Purpose:
24582    Compute the quartile coefficient of dispersion of a variable.
24583
24584Description:
24585    The sample quartile coefficient of dispersion is defined as
24586
24587         QCD = (Q3 - Q1)/(Q1 + Q3)
24588
24589    where Q1 is the lower quartile (25-th percentile) and Q3 is the
24590    upper quartile (75-th percentile).
24591
24592    This statistic has been suggested as a robust alternative to the
24593    coefficient of variation.
24594
24595Syntax 1:
24596    LET <par> = QUARTILE COEFFICIENT OF DISPERSION <y>
24597                <SUBSET/EXCEPT/FOR qualification>
24598    where <y> is a response variable;
24599          <par> is a parameter where the quartile coefficient of
24600              dispersion value is saved;
24601    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
24602
24603Syntax 2:
24604    LET <par> = DIFFERENCE OF QUARTILE COEFFICIENT OF DISPERSION
24605                <y1> <y2>   <SUBSET/EXCEPT/FOR qualification>
24606    where <y1> is the first response variable;
24607          <y2> is the second response variable;
24608          <par> is a parameter where the difference of the quartile
24609              coefficient of dispersion values are saved;
24610    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
24611
24612Examples:
24613    LET QCD = QUARTILE COEFFICIENT OF DISPERSION Y1
24614    LET QCD = QUARTILE COEFFICIENT OF DISPERSION Y1 SUBSET TAG > 2
24615
24616    LET QCD = DIFFERENCE OF QUARTILE COEFFICIENT OF DISPERSION Y1 Y2
24617
24618Note:
24619    Dataplot statistics can be used in a number of commands.  For
24620    details, enter
24621
24622         HELP STATISTICS
24623
24624Default:
24625    None
24626
24627Synonyms:
24628    QCD
24629
24630Related Commands:
24631    COEFFICIENT OF VARIATION  = Compute the coefficient of variation of
24632                                a variable.
24633    COEFFICIENT OF DISPERSION = Compute the coefficient of dispersion of
24634                                a variable.
24635    SIGNAL TO NOISE RATIO     = Compute the signal to noise ratio of a
24636                                variable.
24637    RELATIVE STANDARD DEVI    = Compute the standard deviation of a
24638                                variable.
24639    MEAN                      = Compute the mean of a variable.
24640    STANDARD DEVIATION        = Compute the standard deviation of a
24641                                variable.
24642
24643Reference:
24644    Bonett, D. G. (2006). "Confidence interval for a coefficient of
24645    quartile variation", Computational Statistics & Data Analysis,
24646    50 (11): 2953–2957.
24647
24648Applications:
24649    Data Analysis
24650
24651Implementation Date:
24652    2017/01
24653    2017/06: Added QUARTILE COEFFICIENT OF DISPERSION
24654
24655Program 1:
24656    SKIP 25
24657    READ ZARR13.DAT Y
24658    LET QCD = QUARTILE COEFFICIENT OF DISPERSION Y
24659
24660Program 2:
24661    . Step 1:   Create the data
24662    .
24663    skip 25
24664    read gear.dat y x
24665    skip 0
24666    set write decimals 6
24667    .
24668    . Step 2:   Define plot control
24669    .
24670    title case asis
24671    title offset 2
24672    label case asis
24673    .
24674    y1label Quartile Coefficient of Dispersion
24675    x1label Group
24676    title Quartile Coefficient of Dispersion for GEAR.DAT
24677    let ngroup = unique x
24678    xlimits 1 ngroup
24679    major x1tic mark number ngroup
24680    minor x1tic mark number 0
24681    tic mark offset units data
24682    x1tic mark offset 0.5 0.5
24683    .
24684    character X
24685    line blank
24686    .
24687    set statistic plot reference line average
24688    quartile coefficient of dispersion plot y x
24689    .
24690    set write decimals 5
24691    tabulate quartile coefficient of dispersion y x
24692
24693Program 3:
24694    SKIP 25
24695    READ IRIS.DAT Y1 TO Y4 X
24696    .
24697    LET A = DIFFERENCE OF QUARTILE COEFFICIENT OF DISPERSION Y1 Y2
24698    SET WRITE DECIMALS 4
24699    TABULATE DIFFERENCE OF QUARTILE COEFFICIENT OF DISPERSION Y1 Y2 X
24700    .
24701    XTIC OFFSET 0.2 0.2
24702    X1LABEL GROUP ID
24703    Y1LABEL DIFFERENCE OF QUARTILE COEFFICIENT OF DISPERSION
24704    CHAR X
24705    LINE BLANK
24706    DIFFERENCE OF COEFFICIENT OF DISPERSION PLOT Y1 Y2 X
24707    CHAR X ALL
24708    LINE BLANK ALL
24709    BOOTSTRAP DIFFERENCE OF QUARTILE COEFFICIENT OF DISPERSION PLOT ...
24710              Y1 Y2 X
24711
24712-----QUARTILE PLOT---------------------------------------------------
24713
24714QUARTILE PLOT
24715
24716Name:
24717    QUARTILE PLOT
24718
24719Type:
24720    Graphics Command
24721
24722Purpose:
24723    Generates a quartile plot.
24724
24725Description:
24726    A quartile plot is a plot consisting of subsample quartiles versus
24727    subsample index.  The subsample quartile is the quartile of the
24728    data in the subsample.  The quartile plot is used to answer the
24729    question-- "Does the subsample spread change over different
24730    subsamples?".  It consist of:
24731       Vertical   axis = subsample quartile;
24732       Horizontal axis = subsample index.
24733    The quartile plot yields 2 traces:
24734       1. a subsample quartile trace; and
24735       2. a full-sample quartile reference line.
24736    Like usual, the appearance of these 2 traces is controlled by
24737    the first 2 settings of the LINES, CHARACTERS, SPIKES, BARS,
24738    and similar attributes.
24739
24740Syntax:
24741    <UPPER/LOWER> QUARTILE PLOT  <y>  <x>
24742                 <SUBSET/EXCEPT/FOR qualification>
24743    where <y> is the response (= dependent) variable;
24744          <x> is the subsample identifier variable (this variable
24745              appears on the horizontal axis);
24746          LOWER specifies a lower quartile plot and UPPER specifies an
24747              upper quartile plot;
24748    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
24749
24750Examples:
24751    UPPER QUARTILE PLOT Y X
24752    LOWER QUARTILE PLOT Y X1  SUBSET X1 < 12
24753
24754Default:
24755    None
24756
24757Synonyms:
24758    None
24759
24760Related Commands:
24761    CHARACTERS         = Sets the type for plot characters.
24762    LINES              = Sets the type for plot lines.
24763    MEAN   PLOT        = Generates a mean plot.
24764    SD   PLOT          = Generates a standard deviation plot.
24765    BOX PLOT           = Generates a box plot.
24766    XBAR CHART         = Generates a xbar control chart.
24767    PLOT               = Generates a data or function plot.
24768
24769Applications:
24770    Exploratory Data Analysis
24771
24772Implementation Date:
24773    88/2
24774
24775Program:
24776    .  PURPOSE--GENERATE A QUARTILE PLOT OF POINT BARROW FREON-11 DATA
24777    SKIP 50
24778    SET READ FORMAT 3F4.0,F5.0,F6.0,F3.0,2F9.0
24779    READ PBF11.DAT YEAR DAY BOT SD F11 FLAG WV CO2
24780    .
24781    RETAIN YEAR DAY BOT SD F11 WV CO2 FLAG SUBSET FLAG 0
24782    LET MONTH=INT(DAY/30.25)+1
24783    .
24784    TITLE QUARTILE PLOT
24785    XLIMITS 0 15
24786    YLIMITS 1 1.01
24787    CHARACTER U U
24788    LINE BLANK SOLID
24789    UPPER QUARTILE PLOT WV MONTH
24790    PRE-ERASE OFF
24791    CHARACTER L L
24792    LOWER QUARTILE PLOT WV MONTH
24793
24794-----QUERY-------------------------------------------------------
24795
24796QUERY
24797
24798Name:
24799    QUERY
24800
24801Type:
24802    Support Command
24803
24804Purpose:
24805    Sends a message to the DATAPLOT service group.  This message is
24806    placed in a file which can be scanned periodically by members of
24807    the DATAPLOT service group.
24808
24809Syntax:
24810    QUERY   <message>
24811
24812Examples:
24813    QUERY HAVE MODELING QUESTION
24814    QUERY PLEASE CALL J. SMITH (EXT. 3862)
24815
24816Note:
24817    This command is essentially obsolete since most operating systems
24818    have sophisticated electronic mail capabilities.
24819
24820Default:
24821    None
24822
24823Synonyms:
24824    MESSAGE
24825
24826Related Commands:
24827    MAIL    = Lists the mail file.
24828    HELP    = Lists portions of the help file.
24829    NEWS    = Lists the news file.
24830    BUGS    = Lists the bugs file.
24831
24832Applications:
24833    XX
24834
24835Implementation Date:
24836    XX
24837
24838Program:
24839    XX
24840
24841-----QUIC-------------------------------------------------------
24842
24843QUIC
24844
24845Name:
24846    QUIC
24847
24848Type:
24849    Output Device Command
24850
24851Purpose:
24852    Direct graphical output to a QMS laser printer using the QUIC
24853    protocol.
24854
24855Syntax 1:
24856    QUIC
24857
24858    This form directs the QUIC output to the terminal screen.
24859
24860Syntax 2:
24861    DEVICE <1/2/3> QUIC
24862
24863    This  form designates one of DATAPLOT's 3 devices (it will
24864    typically be device 2) to be a QUIC device.
24865
24866Examples:
24867    QUIC
24868    DEVICE 2 QUIC
24869    DEVICE 3 QUIC
24870
24871Note:
24872    QUIC fonts (for hardware generated characters) can be specified
24873    with the following command:
24874        SET QUIC FONT <font id>
24875    where <font id> is one of the following:
24876        10   - EDP font
24877        104  - Standard Roman Medium
24878        124  - Standard Roman Bold
24879        144  - Standard Roman Italic
24880        16   - Simplex Roman
24881        204  - Apollo Medium
24882        328  - Complex Roman Bold
24883        404  - Q-Typewriter
24884        444  - Q-Typewriter Italic
24885        532  - Union
24886        521  - Tektronix small
24887        522  - Tektronix medium
24888        523  - Tektronix large
24889        524  - Tektronix largest
24890        904  - Q-Gothic
24891        924  - Q-Gothic Italic
24892        536  - Q-Greek
24893        517  - Q-Greek
24894        664  - Special Math
24895    Fonts 10, 104, 124, 144, 16, 204, 328, 404, and 444 are supported
24896    on all QMS printers using QUIC.  The others are downloadable fonts
24897    that may or may not be available on a given QMS.  Additional
24898    information on QMS fonts can be found in the QMS Programmer's
24899    Manual for Quic.  In addition the following SET commands can be
24900    used to specify the margins and resolution of the particular QMS
24901    printer (these should normally not be required):
24902        SET QMS PPI <number> sets the resolution (in points per inch).
24903           The default is 300.
24904        SET QMS [LANDSCAPE/PORTRAIT] LEFT    MARGIN sets the left
24905           margin (in dots).
24906        SET QMS [LANDSCAPE/PORTRAIT] RIGHT   MARGIN sets the right
24907           margin (in dots).
24908        SET QMS [LANDSCAPE/PORTRAIT] BOTTOM  MARGIN sets the bottom
24909           margin (in dots).
24910        SET QMS [LANDSCAPE/PORTRAIT] TOP     MARGIN sets the top
24911            margin (in dots).
24912
24913Default:
24914    Off
24915
24916Synonyms:
24917    QMS
24918DEVICE NOTES
24919    1) HARDWARE TEXT - QMS provides numerous hardware fonts.  QMS fonts
24920       are fixed size and orientation fonts.  Several are typeset
24921       quality fonts.
24922    2) COLOR - This device does not support color or gray scale.
24923    3) HARDWARE FILL - All area fills in software (although QMS
24924       provides a hardware fill, it is not reliable).
24925    4) DASH PATTERNS - Each dash specification generates a different
24926       type of dash pattern.
24927    5) LINE WIDTH - The QMS performs line width in hardware.
24928    6) GRAPHICS INPUT - The CROSS-HAIR command is ignored for this
24929       device.
24930
24931Related Commands:
24932    POSTSCRIPT         = Direct graphical output to a Postscript
24933                         device.
24934    CALCOMP            = Direct graphical output to a Calcomp device.
24935    HPGL               = Direct graphical output to an HPGL device.
24936    TEKTRONIX          = Direct graphical output to a Tektronix device.
24937    X11                = Direct graphical output to an X11 device.
24938    DEVICE             = Specify certain actions for the graphics
24939                         output.
24940    SET QMS FONT       = Specify the font to use on the QMS device.
24941    SET QMS PPI        = Set the resolution of the QMS device.
24942    SET QMS ... MARGIN = Set the margin for the QMS device.
24943
24944Applications:
24945    XX
24946
24947Implementation Date:
24948    89/2
24949
24950Program:
24951    XX
24952
24953-----QUIT-------------------------------------------------------
24954
24955QUIT
24956
24957Name:
24958    QUIT
24959
24960Type:
24961    Support Command
24962
24963Purpose:
24964    Terminates a DATAPLOT run.
24965
24966Syntax:
24967    QUIT
24968
24969Examples:
24970    QUIT
24971
24972Default:
24973    None
24974
24975Related Commands:
24976    XX
24977
24978Synonyms:
24979    EXIT, END, HALT, STOP, BYE
24980
24981Applications:
24982    XX
24983
24984Implementation Date:
24985    Pre-1987
24986
24987Program:
24988    XX
24989
24990-----QWIN-------------------------------------------------------
24991
24992QWIN
24993
24994Name:
24995    QWIN
24996
24997Type:
24998    Output Device Command
24999
25000Purpose:
25001    Direct graphical output to a the screen when using the version of
25002    Dataplot on the IBM-PC under the Windows operating system built
25003    using the Intel Fortran compiler.
25004
25005Description:
25006    The production version of Dataplot is currently built under the
25007    Windows operating system (as of 2016/04 Windows XP, Windows 7,
25008    and Windows 8 are supported) using the Intel Visual Fortran
25009    Composer XE (2013, SP1 version) compiler.
25010
25011    Dataplot is built as a QuickWin application.  QuickWin provides
25012    access to some, but not all, parts of the Windows API.  QuickWin is
25013    intermediate between a console application and a full blown
25014    Windows application and provides the QuickWin graphics library to
25015    generate graphics on the screen.  The command
25016
25017         DEVICE 1 QWIN
25018
25019    is used to activate the Dataplot QuickWin device driver.  The
25020    default DPLOGF.TEX provided in the standard Dataplot installation
25021    for Windows will have this command, so typically you do not need to
25022    enter it.
25023
25024Syntax 1:
25025    DEVICE 1 QWIN
25026
25027    This form directs the graphics output to the terminal screen.
25028
25029Syntax 2:
25030    DEVICE 1 QWIN  <width> <height>
25031
25032    This form of the command allows you to specify the width and
25033    height of the graphics window in pixel units.
25034
25035Examples:
25036    DEVICE 1 QWIN
25037    DEVICE 1 QWIN  500 350
25038
25039Note:
25040    The Dataplot executable built as a QuickWin application is run
25041    as a stand alone program (we refer to this as the command line
25042    version).  For the Tcl/Tk based graphical user interface (GUI)
25043    for Dataplot, a console executable is built that does not support
25044    the QWIN device driver.  The QuickWin executable is not
25045    compatible with the Tcl/Tk scripts.
25046
25047Note:
25048    A few notes on the QWIN screen driver.
25049
25050       1) There are 3 distinct windows when running the QuickWin version
25051          of Dataplot under Windows.  The largest window is called the
25052          frame window.  Upon starting Dataplot, a child window is
25053          automatically started for generating the alphanumeric input
25054          and output (this is called the text window).  These two windows
25055          can be resized by the user with standard Windows mouse
25056          operations.  When you enter the
25057
25058               DEVICE 1 QWIN
25059
25060          command, a graphics window is opened.
25061
25062          There are some menu items available on each of these windows.
25063          These are standard Windows menu items, not Dataplot specified
25064          menu options (the Help menu has been customized, but otherwise
25065          these are the default QuickWin menus).
25066
25067          In Windows, either the text or graphics window has the
25068          "focus".  The window with focus will be the window on top
25069          and this is the window that recieves I/O.  The default
25070          Dataplot behaviour is that when a graph is generated,
25071          focus switches to the graphics window and remains there
25072          after the plot is completed.  This leaves the graphics
25073          window over the text window.  To type a new command, click
25074          the mouse in the text window.  Clicking the mouse on a
25075          window switches the focus to that window.  Ideally, we
25076          would like to leave the graphics window on top and have the
25077          I/O switch to the text window.  However, this doesn't
25078          seem possible at the moment.
25079
25080          The 11/18/96 version added the command:
25081
25082              SET QWIN FOCUS <TEXT/GRAPHICS>
25083
25084          to allow the user to specify which window gets the focus
25085          after the completion of a plot.  Specifying TEXT returns
25086          the focus to the text window while specifying GRAPHICS
25087          leaves the focus on the graphics window.  The default value
25088          is TEXT.
25089
25090          If the text and graphics windows are tiled, there is less need
25091          to set the focus to the graphics window.
25092
25093          One other quirk is that sometimes the text window does not
25094          scroll properly when Dataplot is first initiated.  You can
25095          scroll the window manually via the mouse and scroll bar.  Also,
25096          the buffer for scrolling backward in the text window is rather
25097          limited (a few screens worth, but not much further).
25098
25099          Note: The number of scroll lines in the buffer has been
25100                increased to 500 lines.  Also, the scrolling
25101                when Dataplot is first initiated now works better.
25102
25103       2) This device driver supports color.  Enter the command
25104          SHOW COLORS VGA for a list of available colors.  Also,
25105          output sent to a black and white Postscript printer is
25106          NOT affected by the choice of colors for the screen.  This
25107          means you can chose foregrand and background colors that
25108          work well on the screen without harming your Postscript
25109          output.
25110
25111          The initial version of the QWIN driver only supports the
25112          15 VGA colors.  A probable future enhancement is to
25113          extend the full range of Dataplot colors to super VGA
25114          and direct color monitors.
25115
25116          Note: The QWIN device now supports the full range of
25117                colors supported in Dataplot.
25118
25119       3) Hardware characters are supported.  Dataplot requests a
25120          fixed size font at the user specified size.  The QuickWin
25121          library returns the closest match to the requested font.
25122
25123          The screen characters may seem smaller than characters
25124          generated with a software font.  This is due to the fact
25125          that the QWIN library will match to a smaller size rather
25126          than a larger size.  You can specify a software font to the
25127          screen while leaving the hardware font for the file
25128          devices by entering the command:
25129
25130             DEVICE 1 FONT SIMPLEX
25131
25132          We will probably add more complete support for the fonts
25133          provided by the QuickWin library in later releases.
25134          Specifically, this means allowing the user to specify the
25135          desired type face (e.g., Helvetica, Times Roman) and
25136          providing support for proportional spaced fonts.
25137
25138       4) Dashed lines and software line thickness is supported for
25139          the QuickWin device.  The CROSS-HAIR command (for graphical
25140          input) is also supported.
25141
25142       5) The Intel Fortran Compiler has trouble if the monitor
25143          is set to "True Color" mode.  The sympton is that the
25144          text window does not appear to show any characters
25145          (i.e., it is simply a blank screen).  True color is
25146          set from the Windows 95/98/NT control panel.
25147
25148          If your monitor is set to true color mode, enter the
25149          following commands in the "C:\Dataplot\DPLOGF.TEX"
25150          start-up file (the drive name may differ on your system):
25151
25152               SET QWIN COLOR DIRECT
25153               DEVICE 1 QWIN
25154
25155          Note that in this case, the order of the commands is
25156          critical.  That is, the color mode must be set when
25157          the QWIN device is initialized, not after.  The
25158          command SET QWIN COLOR COLOR VGA resets the default.
25159
25160          For true color, the QWIN device driver supports the
25161          full range of color supported by Dataplot (enter
25162          HELP COLORS for a description of the Dataplot color
25163          model).  The default VGA mode only supports 16 colors.
25164
25165          The foreground and background colors for the text
25166          window can be set for both standard VGA and the true
25167          color mode by entering the following commands after
25168          the SET QWIN COLOR <DIRECT/VGA> command but before the
25169          DEVICE 1 QWIN command:
25170
25171               SET QWIN TEXT BACKGROUND COLOR <index>
25172               SET QWIN TEXT FOREGROUND COLOR <index>
25173
25174          where <index> is an integer identifying the desired
25175          color (HELP COLOR gives the index to color mapping).
25176          For the default VGA mode, <index> is limtited to
25177          0 to 15.  For direct mode, <index> is between 0 and 88.
25178          The default is a white foreground on a black background.
25179
25180          The colors for the graphics window are set with the
25181          normal Dataplot COLOR commands (e.g., LINE COLOR YELLOW).
25182
25183          Note: The above section was relevant for older versions
25184                of the Intel compiler and older versions of the
25185                Windows operating systems.  You should no longer need
25186                to enter any of these commands.
25187
25188Note:
25189    The following command line options are now supported:
25190
25191    a) The size of the initial frame window (in pixels) can be set by
25192       selecting one of the following options:
25193
25194          -svga  -large -extrawide
25195
25196       where "-svga" sets a size of 950 by 700, -large sets a size of
25197       1150 by 1000, and -extrawide sets a size of 1600 by 1000.  These
25198       values are the number of pixels.  If none of these is entered,
25199       the -svga settings will be used.
25200
25201       Alternatively, you can enter explicit values for the height and
25202       width of the frame window with the -w and -h options.  For example,
25203       to set the width and height to 1150 and 1000, respectively, enter
25204
25205            -w1150  -h1000
25206
25207       The recommended choice is basically a matter of taste and the
25208       resolution you have set for your monitor.
25209
25210    b) You can use the following option to set "true color" mode:
25211
25212          -true
25213
25214       This is not preferred over the SET QWIN COLOR DIRECT as it
25215       will show the initial sign-on message.
25216
25217       Note: This option is no longer needed and should not be used.
25218
25219    c) By default, Dataplot overlaps the text and graphics windows.
25220       You can specify tiled mode with the following option:
25221
25222           -tile
25223
25224       You can also enter
25225
25226           -notile
25227
25228       to specify the non-tiled mode.
25229
25230       Tile mode has the advantage that the text and graphics windows
25231       do not overlap.  The advantage of non-tiled mode is that the
25232       graphics window has a landscape orientation which is more similar
25233       to what the printed graphics will have.
25234
25235    The order for these options does not matter.
25236
25237Note:
25238    The menus accessible on the frame window are the default menus
25239    generated by the Intel compiler.
25240
25241    As of the 11/2002 version, the menu items under the Help menu
25242    now access Dataplot help rather than help for the compiler.
25243
25244Note:
25245    The handling of text with hardware fonts was upgraded for the
25246    2016/04 version.
25247
25248    The following two commands were added:
25249
25250         SET QWIN FONT WEIGHT <BOLD/NORMAL>
25251         SET QWIN FONT STYLE <ITALIC/NORMAL>
25252
25253    These commands allow you to request bold and italic appearance
25254    for fonts.
25255
25256    The SET QWIN FONT command was updated to support the following
25257    specific fonts
25258
25259       SET QWIN FONT ARIAL
25260       SET QWIN FONT TIMES NEW ROMAN
25261       SET QWIN FONT SYMBOL
25262       SET QWIN FONT ROMAN
25263       SET QWIN FONT MODERN
25264       SET QWIN FONT SCRIPT
25265       SET QWIN FONT COURIER
25266       SET QWIN FONT HELVETICA
25267       SET QWIN FONT PALATINO
25268       SET QWIN FONT TERMINAL
25269       SET QWIN FONT SYSTEM
25270       SET QWIN FONT VERDANA
25271       SET QWIN FONT GEORGIA
25272
25273    The fonts installed on a given system may vary on specific
25274    platforms.  The above fonts were chosen because they are
25275    relatively common and should be available on most systems.
25276    However, it is possible that you may not have one or more of
25277    these fonts on your system.
25278
25279    Note that when Dataplot requests a font (the font family, the
25280    height and width, the use of bold or italic), the QuickWin
25281    library will try to match to the closest available font (the
25282    priority order is height, font family, width, and fixed or
25283    proportional font).
25284
25285    The SYMBOL font can be used to print Greek characters using
25286    hardware text.
25287
25288Note:
25289    The QuickWin library was originally part of the MicroSoft Fortran
25290    compiler.  The Microsoft Fortran compiler became the Compaq Fortran
25291    compiler and then the Digital Visual Fortrtan compiler before being
25292    merged into the Intel Fortran compiler.
25293
25294Default:
25295    None
25296
25297Synonyms:
25298    None
25299
25300DEVICE NOTES
25301    1) HARDWARE TEXT - limited support.  Dataplot requests a fixed
25302       space font at the user requested size.  The QuickWin library
25303       returns the closest matching font.
25304    2) COLOR - the QWIN driver supports the full range of colors
25305       supported by Dataplot.
25306    3) HARDWARE FILL - Solid fills are generated in software.
25307    4) DASH PATTERNS - Dash patterns are supported.
25308    5) LINE WIDTH - Thick lines are generated in software as multiple
25309       lines.
25310    6) GRAPHICS INPUT - The CROSS-HAIR command is supported for this
25311       device.
25312
25313Related Commands:
25314    HPGL                  = Direct graphical output to an HPGL device.
25315    DEVICE                = Specify certain actions for the graphics
25316                            output.
25317    POSTSCRIPT            = Direct graphical output to a Postscript
25318                            device.
25319
25320Applications:
25321    Screen Graphics
25322
25323Implementation Date:
25324    11/1996
25325    2002/11: Added the "-tile" option
25326    2002/11: The "Help" menus modified to access Dataplot (rather than
25327             the compiler) help
25328    2014/12: Increase the size of the buffer in the text window and
25329             fix the initial scrolling
25330    2015/10: Check if graphics window is already open when a
25331             DEVICE 1 QWIN command is entered
25332    2016/04: Updated handling of text with hardware fonts
25333    2016/04: Added SET QWIN FONT WEIGHT
25334    2016/04: Added SET QWIN FONT STYLE
25335
25336Program:
25337    DEVICE 1 QWIN
25338    PLOT SIN(X) FOR X = -6 0.1 6
25339
25340-----QWIN SYSTEM (SET)---------------------------------------
25341
25342QWIN SYSTEM
25343
25344Name:
25345    QWIN SYSTEM (SET)
25346
25347Type:
25348    Set Subcommand
25349
25350Purpose:
25351    For the version of Dataplot built with the Visual Fortran compiler,
25352    it specifies whether operating system commands are invoked with
25353    the SYSTEMQQ library function or the WinExec library function.
25354
25355Description:
25356    The Dataplot command SYSTEM is used to invoke an operating system
25357    command or an external program (e.g., a web browser).  In addition,
25358    several other Dataplot commands (e.g., WEB HELP) invoke external
25359    programs.  Note that invoking operating system commands and
25360    external programs is not part of the Fortran standard, so this
25361    capability in Dataplot is operating system and compiler dependent.
25362
25363    The command line version of Dataplot is built using the Visual
25364    Fortran (previously the Microsoft) compiler as a QuickWin (QWIN)
25365    application.  By default, the SYSTEMQQ library routine is used to
25366    invoke operating system commands and external programs.  The
25367    primary drawback of this option is that control does not return to
25368    Dataplot until the operating system command completes execution.
25369
25370    Alternatively, the WinExec function can be used.  The advantage of
25371    this method is that control passes back to Dataplot after the
25372    command is issued (i.e., it doesn't wait for the command to
25373    complete).  However, the drawback is that DOS type commands do not
25374    work.
25375
25376    The basic recommendation is that if you want to execute a Windows
25377    application (e.g., the browser, notepad, Word, etc.), then set this
25378    option to WINEXEC.  However, to issue a DOS type command via the
25379    Dataplot SYSTEM command, you should set this option to SYSTEMQQ (the
25380    default).
25381
25382    In particular, I recommend setting this option to WINEXEC before
25383    using the WEB HELP (or any other command starting with WEB) command.
25384    This allows you to enter additional Dataplot commands without
25385    exiting the browser.
25386
25387Syntax:
25388    SET QWIN SYSTEM <SYSTEMQQ/WINEXEC>
25389    where SYSTEMQQ specifies that calls to the operating system are
25390          invoked with SYSTEMQQ and WINEXEC specificies that calls to
25391          to the operating system are invoked with WinExec.
25392
25393Examples:
25394    SET QWIN SYSTEM WINEXEC
25395    SET QWIN SYSTEM SYSTEMQQ
25396
25397Note:
25398    This command only applies tom the command line version of Dataplot
25399    under Microsoft Windows (i.e., the executable built with the
25400    Visual Fortran (previously the Microsoft) compiler.  It is
25401    ignored on all other systems.
25402
25403Default:
25404    The default is SYSTEMQQ.
25405
25406Synonyms:
25407    None
25408
25409Related Commands:
25410    WEB HELP      = View the Dataplot online Reference Manual.
25411    SYSTEM        = Enter an operating system command.
25412
25413Applications:
25414    Interacting with Microsoft Windows
25415
25416Implementation Date:
25417    2002/11
25418
25419Program:
25420    SET QWIN SYSTEM WINEXEC
25421    WEB HELP PLOT
25422    SET QWIN SYSTEM SYSTEMQQ
25423    SYSTEM  DIR C:\DATAPLOT\DATA | MORE
25424
25425---------------------------------------------------------
25426
25427
25428
25429
25430
25431
25432
25433
25434
25435
25436
25437
25438
25439
25440
25441
25442
25443
25444
25445
25446
25447
25448
25449
25450
25451
25452
25453
25454
25455
25456
25457
25458
25459
25460
25461
25462
25463
25464
25465
25466
25467
25468
25469
25470
25471
25472
25473
25474
25475
25476
25477
25478
25479
25480
25481
25482
25483
25484
25485
25486
25487
25488
25489
25490
25491
25492
25493
25494
25495
25496
25497
25498
25499
25500-------------------------  *R*  ZZZZZ--------------------
25501
25502-----R CHART-------------------------------------------------------
25503
25504R CHART
25505
25506Name:
25507    R CHART
25508
25509Type:
25510    Graphics Command
25511
25512Purpose:
25513    Generates a range control chart.
25514
25515Description:
25516    A range control chart is a data analysis analysis technique for
25517    determining if a measurement process has gone out of statistical
25518    control.  The R chart is sensitive to changes in variation in the
25519    measurement process.  It consist of:
25520      Vertical   axis = the range  for each sub-group;
25521      Horizontal axis = sub-group designation.
25522    In addition, horizontal lines are drawn at the mean range value
25523    and at the upper and lower control limits.
25524
25525Syntax:
25526    R CHART   <y>   <x>    <SUBSET/EXCEPT/FOR qualification>
25527    where <y> is the response (= dependent) variable (containing the
25528              raw data values);
25529          <x> is an independent variable (containing the sub-group
25530              identifications);
25531    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
25532
25533Examples:
25534    R CHART Y X
25535
25536Note:
25537    The distribution of the response variable is assumed to be normal.
25538    This assumption is the basis for calculating the upper and lower
25539    control limits.
25540
25541Note:
25542    The attributes of the 4 traces can be controlled by the standard
25543    LINES, CHARACTERS, BARS, and SPIKES commands.  Trace 1 is the
25544    response variable, trace2 is the mean line, and traces 3 and 4 are
25545    the control limits.  Some analysts prefer to draw the response
25546    variable as a spike or character rather than a connected line.
25547
25548Default:
25549    None
25550
25551Synonyms:
25552    RANGE CHART for R CHART
25553    R CONTROL CHART for R CHART
25554    RANGE CONTROL CHART for R CHART
25555
25556Related Commands:
25557    X CHART             = Generates a mean control chart.
25558    S CHART             = Generates a standard deviation control chart.
25559    P CHART             = Generates a p control chart.
25560    NP CHART            = Generates a Np control chart.
25561    U CHART             = Generates a U control chart.
25562    C CHART             = Generates a C control chart.
25563    CHARACTERS          = Sets the types for plot characters.
25564    LINES               = Sets the types for plot lines.
25565    SPIKES              = Sets the on/off switches for plot spikes.
25566    BARS                = Sets the on/off switches for plot bars.
25567    PLOT                = Generates a data or function plot.
25568    LAG PLOT            = Generates a lag plot.
25569    4-PLOT              = Generates 4-plot univariate analysis.
25570    RANGE PLOT          = Generates a range (vs subset) plot.
25571
25572Applications:
25573    Quality Control
25574
25575Implementation Date:
25576    88/2
25577
25578Program:
25579    SKIP 25
25580    READ GEAR.DAT DIAMETER BATCH
25581    .
25582    LINE SOLID SOLID DOT DOT
25583    TITLE AUTOMATIC
25584    X1LABEL GROUP-ID
25585    Y1LABEL RANGE
25586    RANGE CONTROL CHART DIAMETER BATCH
25587
25588-----RADIANS-------------------------------------------------------
25589
25590RADIANS
25591
25592Name:
25593    RADIANS
25594
25595Type:
25596    Support Command
25597
25598Purpose:
25599    Specifies that all subsequent trigonometric calculations (e.g.,
25600    LET Y = SIN(X) and ANGLE 1.570746) be carried out in radians (as
25601    opposed to degrees or grads).
25602
25603Syntax:
25604    RADIANS   <ON or OFF>
25605    where ON specifies that radian units will be used while OFF
25606             reverts the units to degrees.
25607
25608Examples:
25609    RADIANS
25610    RADIANS ON
25611    RADIANS OFF
25612
25613Note:
25614    Entering the RADIANS command without any arguments is equivalent
25615    to entering RADIANS ON.
25616
25617Default:
25618    Radians
25619
25620Synonyms:
25621    None
25622
25623Related Commands:
25624    TEXT        = Writes a text string.
25625    DEGREES     = Sets the angle units to degrees.
25626    GRADS       = Sets the angle units to grads.
25627    ANGLE UNITS = Sets the angle units (to degrees/radians/grads).
25628    ANGLE       = Sets the angle for TEXT string.
25629    FONT        = Sets the font for TEXT characters.
25630
25631Applications:
25632    Trigonometry
25633
25634Implementation Date:
25635    Pre-1987
25636
25637Program:
25638    RADIANS
25639    PLOT SIN(X) FOR X = -6  0.1 6
25640
25641-----RANDOM COMPOSITION (LET)-----------------------------------------
25642
25643RANDOM COMPOSITION
25644
25645Name:
25646    RANDOM COMPOSITION (LET)
25647
25648Type:
25649    Let Subcommand
25650
25651Purpose:
25652    Generate a random composition.
25653
25654Description:
25655    Given positive integers n and k, a composition of n into k parts
25656    is defined as
25657
25658       n = r1 + r2 + ... + rk  (r(i) >= 0, i = 1,k)
25659
25660    The number of compositions is given by
25661
25662        (n+k-1   n)  = (n+k-1)!/[(n!*(k-1)!]
25663
25664    This command generates a single random composition.
25665
25666    The output is an array of size k.
25667
25668Syntax:
25669    LET <y> = RANDOM COMPOSITION FOR I =  1  1  <k>
25670    where <k> is a number or parameter that specifies the size of
25671              the composition;
25672    and   <y> is a variable where the random composition is saved.
25673
25674    This command must be preceeded with the command
25675
25676        LET N = <value>
25677
25678Examples:
25679    LET N = 5
25680    LET K = 3
25681    LET Y = RANDOM COMPOSITION FOR I = 1 1 K
25682
25683Note:
25684    Dataplot implements this command using the RANCOM algorithm
25685    described in Nijenhuis and Wilf (see Reference section
25686    below).
25687
25688Note:
25689    Dataplot supports a number of different random number
25690    generators.  Enter HELP RANDOM NUMBER GENERATOR for details.
25691
25692    The SEED command can be used to specify a seed for the random
25693    number generator.
25694
25695Default:
25696    None
25697
25698Synonyms:
25699    None
25700
25701Related Commands:
25702    LET                          = Generate data transformations.
25703    RANDOM PERMUTATION           = Generate a random permutation.
25704    RANDOM SUBSET                = Generate a random subset.
25705    RANDOM K-SET OF N-SET        = Generate a random k-set of n-set.
25706    RANDOM PARTITION             = Generate a random partition.
25707    RANDOM EQUIVALENCE RELATION  = Generate a random equivalence relation.
25708    NEXT SUBSET                  = Generate the next subset of a set.
25709    NEXT PERMUTATION             = Generate the next permutation.
25710    NEXT K-SET OF N-SET          = Generate the next k-set of n-set.
25711    NEXT COMPOSITION             = Generate the next composition.
25712    NEXT PARTITION               = Generate the next partition.
25713    NEXT EQUIVALENCE RELATION    = Generate the next composition.
25714
25715References:
25716    Nijenhuis and Wilf (1978), "Combinatorial Algorithms",
25717    Second Edition, Academic Press, Chapter 6.
25718
25719Applications:
25720    Combinatorial Analysis
25721
25722Implementation Date:
25723    2008/4
25724
25725Program:
25726    LET N = 8
25727    LET K = 3
25728    LET Y = RANDOM COMPOSITION FOR I =  1  1  K
25729    PRINT Y
25730
25731-----RANDOM EQUIVALENCE RELATION (LET)-------------------------------
25732
25733RANDOM EQUIVALENCE RELATION
25734
25735Name:
25736    RANDOM EQUIVALENCE RELATION (LET)
25737
25738Type:
25739    Let Subcommand
25740
25741Purpose:
25742    Generate a random equivalence relation of an n-element set.
25743
25744Description:
25745    Given a set S = {1, 2, ..., n}, a random partition of S
25746    is defined as a collection of sets T1, T2, ... , Tk
25747    satisfying
25748
25749        1) The intersection of T(i) and T(j) is the empty
25750           set for i not equal j.
25751
25752        2) The union of all k sets contains all the elements
25753           of S.
25754
25755    For example, if n = 3, then there are 5 possible partitions:
25756
25757        {1, 2, 3}
25758        {1,2} {3}
25759        {1, 3} {2}
25760        {2, 3} {1}
25761        {1} {2} {3}
25762
25763    The output of this command is an array of size n where
25764    the ith element identifies the class which i belongs to.
25765    For example, the following array (for n = 5)
25766
25767        3  3  1  2  2
25768
25769    identifies the partition
25770
25771       {3}  {4, 5}  {1, 2}
25772
25773Syntax:
25774    LET <y> = RANDOM EQUIVALENCE RELATION
25775    where <y> is a variable where the random equivalence relation
25776              is saved.
25777
25778    This command must be preceeded with the command
25779
25780        LET N = <value>
25781
25782Examples:
25783    LET N = 5
25784    LET Y = RANDOM EQUIVALENCE RELATION
25785
25786Note:
25787    Dataplot implements this command using the RANEQU algorithm
25788    described in Nijenhuis and Wilf (see Reference section
25789    below).
25790
25791Note:
25792    Dataplot supports a number of different random number
25793    generators.  Enter HELP RANDOM NUMBER GENERATOR for details.
25794
25795    The SEED command can be used to specify a seed for the random
25796    number generator.
25797
25798Default:
25799    None
25800
25801Synonyms:
25802    None
25803
25804Related Commands:
25805    LET                          = Generate data transformations.
25806    RANDOM PERMUTATION           = Generate a random permutation.
25807    RANDOM SUBSET                = Generate a random subset.
25808    RANDOM K-SET OF N-SET        = Generate a random k-set of n-set.
25809    RANDOM COMPOSITION           = Generate a random composition.
25810    RANDOM PARTITION             = Generate a random partition.
25811    NEXT SUBSET                  = Generate the next subset of a set.
25812    NEXT PERMUTATION             = Generate the next permutation.
25813    NEXT K-SET OF N-SET          = Generate the next k-set of n-set.
25814    NEXT COMPOSITION             = Generate the next composition.
25815    NEXT PARTITION               = Generate the next partition.
25816    NEXT EQUIVALENCE RELATION    = Generate the next composition.
25817
25818References:
25819    Nijenhuis and Wilf (1978), "Combinatorial Algorithms",
25820    Second Edition, Academic Press, Chapter 12.
25821
25822Applications:
25823    Combinatorial Analysis
25824
25825Implementation Date:
25826    2008/6
25827
25828Program:
25829    LET N = 8
25830    LET Y = RANDOM EQUIVALENCE RELATION
25831    PRINT Y
25832
25833-----RANDOM ERROR QUANTITY (LET)-----------------------------------------
25834
25835RANDOM ERROR QUANTITY
25836
25837Name:
25838    RANDOM ERROR QUANTITY (LET)
25839
25840Type:
25841    Let Subcommand
25842
25843Purpose:
25844    Compute the random error quantity.
25845
25846Description:
25847    In a two sample proficiency study, a laboratory measures two
25848    samples.  We refer to these as sample X and sample Y.  The
25849    random error quantity is then defined as
25850
25851       REQ = [(X(i) - Y(i)) - (Xmed - Ymed)]
25852
25853    with Xmed and Ymed denoting the medians of samples X and Y,
25854    respectively.
25855
25856    The ASTM E 2489 - 06 standard gives the following rationale for the
25857    random error quantity.
25858
25859       1. The medians for each sample define consensus values
25860          for each sample.
25861
25862       2. For a given laboratory, X(i) contains variation from the
25863          consensus value (the median value) due to random error
25864          (within-laboratory error) and systematic error (bias).
25865          Likewise for Y(i).
25866
25867       3. It is assumed that the systematic error is the same for sample X
25868          and sample Y for a given laboratory.  Based on this, X(i) - Y(i)
25869          will subtract out the systematic error leaving only random
25870          error.
25871
25872       4. Subtracting Xmed - Ymed removes any difference that appears
25873          for the medians of sample X and sample Y.
25874
25875       5. The random error quantity should then contain only the
25876          laboratories random error.  These values can be used to
25877          compare the within-laboratory performance of the various
25878          laboratories.
25879
25880Syntax:
25881    LET <yout> = RANDOM ERROR QUANTITY <x> <y>
25882                                      <SUBSET/EXCEPT/FOR qualification>
25883    where <x> is the variable containing the measurements for sample X;
25884          <y> is the variable containing the measurements for sample Y;
25885          <yout> is a variable where the computed random error quantities
25886              are saved;
25887    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
25888
25889    Note that <x> and <y> are paired so they must be of the same length.
25890
25891Examples:
25892    LET RANERR = RANDOM ERROR QUANTITY X Y
25893
25894Default:
25895    None
25896
25897Synonyms:
25898    None
25899
25900Related Commands:
25901    TWO SAMPLE PROFICIENCY TEST = Perform a two sample proficiency test
25902                                  based on ASTM E 2489.
25903    MEDIAN                      = Compute the median of a variable.
25904
25905Reference:
25906    "Standard Practice for Statistical Analysis of One-Sample
25907    and Two-Sample Proficiency Testing Programs", ASTM
25908    International, 100 Barr Harbor Drive, PO BOX C700,
25909    West Conshohoceken, PA 19428-2959, USA.
25910
25911Applications:
25912    Proficiency Testing
25913
25914Implementation Date:
25915    2014/12
25916
25917Program:
25918    skip 25
25919    read e2489b.dat lab y1 y2
25920    .
25921    let ranerr = random error quantity y1 y2
25922    set write decimals 2
25923    print lab ranerr
25924
25925-----RANDOM K-SET OF N-SET (LET)-----------------------------------------
25926
25927RANDOM K-SET OF N-SET
25928
25929Name:
25930    RANDOM K-SET OF N-SET (LET)
25931
25932Type:
25933    Let Subcommand
25934
25935Purpose:
25936    Generate a random k-set of a an n-set.
25937
25938Description:
25939    Given a set of n elements {1, 2, ..., n}, a basic
25940    combinatorial problem is the combination of n things
25941    taken k at a time.  For a given n and k, there are
25942
25943        (n k)  = n!/[k!*(n-k)!]
25944
25945    k-sets of the original n-set.
25946
25947    This command generates a single random k-set.
25948
25949    The output is an array of size k that identifies the
25950    elements included in the k-set.
25951
25952Syntax:
25953    LET <y> = RANDOM K-SET OF N-SET FOR I =  1  1  <k>
25954    where <k> is a number or parameter that specifies the size of
25955              the k-set;
25956    and where <y> is a variable where the random k-set is saved.
25957
25958    This command must be preceeded with the command
25959
25960        LET N = <value>
25961
25962Examples:
25963    LET N = 5
25964    LET K = 3
25965    LET Y = RANDOM K-SET OF N-SET FOR I = 1 1 K
25966
25967Note:
25968    Dataplot implements this command using the algorithm
25969    RANKSB described in Nijenhuis and Wilf (see Reference section
25970    below).
25971
25972Note:
25973    Dataplot supports a number of different random number
25974    generators.  Enter HELP RANDOM NUMBER GENERATOR for details.
25975
25976    The SEED command can be used to specify a seed for the random
25977    number generator.
25978
25979Default:
25980    None
25981
25982Synonyms:
25983    None
25984
25985Related Commands:
25986    LET                          = Generate data transformations.
25987    RANDOM PERMUTATION           = Generate a random permutation.
25988    RANDOM SUBSET                = Generate a random subset.
25989    RANDOM COMPOSITION           = Generate a random composition.
25990    RANDOM PARTITION             = Generate a random partition.
25991    RANDOM EQUIVALENCE RELATION  = Generate a random equivalence relation.
25992    NEXT SUBSET                  = Generate the next subset of a set.
25993    NEXT PERMUTATION             = Generate the next permutation.
25994    NEXT K-SET OF N-SET          = Generate the next k-set of n-set.
25995    NEXT COMPOSITION             = Generate the next composition.
25996    NEXT PARTITION               = Generate the next partition.
25997    NEXT EQUIVALENCE RELATION    = Generate the next composition.
25998
25999References:
26000    Nijenhuis and Wilf (1978), "Combinatorial Algorithms",
26001    Second Edition, Academic Press, Chapter 4.
26002
26003Applications:
26004    Combinatorial Analysis
26005
26006Implementation Date:
26007    2008/4
26008
26009Program:
26010    LET N = 8
26011    LET K = 3
26012    LET Y = RANDOM K-SET OF N-SET FOR I =  1  1  K
26013    PRINT Y
26014
26015-----RANDOM PARTITION (LET)-----------------------------------------
26016
26017RANDOM PARTITION
26018
26019Name:
26020    RANDOM PARTITION (LET)
26021
26022Type:
26023    Let Subcommand
26024
26025Purpose:
26026    Generate a random partition of a positive integer.
26027
26028Description:
26029    Given a positive integer n, a partition of n is defined as
26030
26031        n = r1 + r2 + ... + rk  (r1 >= r2 >= ... >= rk)
26032
26033    where r1, r2, ...., rk are positive integers.
26034
26035    For example, if n = 6, then there are 3 partitions:
26036
26037        6 = 4 + 1 + 1
26038          = 3 + 2 + 1
26039          = 2 + 2 + 2
26040
26041Syntax:
26042    LET <y> = RANDOM PARTITION
26043    where <y> is a variable where the random partition is saved.
26044
26045    This command must be preceeded with the command
26046
26047        LET N = <value>
26048
26049Examples:
26050    LET N = 5
26051    LET Y = RANDOM PARTITION
26052
26053Note:
26054    Dataplot implements this command using the RANPAR algorithm
26055    described in Nijenhuis and Wilf (see Reference section
26056    below).
26057
26058Note:
26059    Dataplot supports a number of different random number
26060    generators.  Enter HELP RANDOM NUMBER GENERATOR for details.
26061
26062    The SEED command can be used to specify a seed for the random
26063    number generator.
26064
26065Default:
26066    None
26067
26068Synonyms:
26069    None
26070
26071Related Commands:
26072    LET                          = Generate data transformations.
26073    RANDOM PERMUTATION           = Generate a random permutation.
26074    RANDOM SUBSET                = Generate a random subset.
26075    RANDOM K-SET OF N-SET        = Generate a random k-set of n-set.
26076    RANDOM COMPOSITION           = Generate a random composition.
26077    RANDOM EQUIVALENCE RELATION  = Generate a random equivalence relation.
26078    NEXT SUBSET                  = Generate the next subset of a set.
26079    NEXT PERMUTATION             = Generate the next permutation.
26080    NEXT K-SET OF N-SET          = Generate the next k-set of n-set.
26081    NEXT COMPOSITION             = Generate the next composition.
26082    NEXT PARTITION               = Generate the next partition.
26083    NEXT EQUIVALENCE RELATION    = Generate the next composition.
26084
26085References:
26086    Nijenhuis and Wilf (1978), "Combinatorial Algorithms",
26087    Second Edition, Academic Press, Chapter 10.
26088
26089Applications:
26090    Combinatorial Analysis
26091
26092Implementation Date:
26093    2008/4
26094
26095Program:
26096    LET N = 8
26097    LET Y = RANDOM PARTITION
26098    PRINT Y
26099
26100-----RANDOM PERMUTATION (LET)-----------------------------------------
26101
26102RANDOM PERMUTATION
26103
26104Name:
26105    RANDOM PERMUTATION (LET)
26106
26107Type:
26108    Let Subcommand
26109
26110Purpose:
26111    Generate a set of random permutations.
26112
26113Description:
26114    For a given size N, the integers from 1 to N are randomly sampled
26115    (without replacement) until all elements have been selected.
26116
26117    This command is useful for randomly assigning a list of items (to
26118    groups, treatments, etc.).
26119
26120Syntax:
26121    LET <resp> = RANDOM PERMUTATION FOR I = <start> <inc> <stop>
26122    where <start> is a number or parameter that identifies the first
26123              row of <resp> in which the permutated values are saved
26124             (typically it has a value of 1);
26125          <inc> is a number or parameter that identifies the row
26126              increment of <resp> in which the permutated values are
26127              saved (typically it has a value of 1);
26128          <stop> is a number or parameter that identifies the last row
26129              of <resp> in which the permutated values are saved;
26130          <resp> is a variable where the permutated values are saved.
26131
26132Examples:
26133    LET RP = RANDOM PERMUTATION FOR I = 1 1 100
26134
26135Note:
26136    The following are similar:
26137         LET Y1 = RANDOM PERMUTATION FOR I = 1 1 N
26138    and
26139         LET N = 100
26140         LET Y2 = DISCRETE UNIFORM RANDOM NUMBERS FOR I = 1 1 N
26141    The distinction is that the first command (RANDOM PERMUTATIONS)
26142    does the sampling without replacement while the second command does
26143    the sampling with replacement (so you can have repeat values).
26144
26145Note:
26146    The SEED command can be used to specify a seed for the random
26147    number generation.
26148
26149Default:
26150    None
26151
26152Synonyms:
26153    None
26154
26155Related Commands:
26156    LET                 = Generate data transformations.
26157    BOOTSTRAP SAMPLE    = Generate a bootstrap sample.
26158    BOOTSTRAP INDEX     = Generate a bootstrap index.
26159    JACKNIFE INDEX      = Generate a jacknife index.
26160    BOOTSTRAP PLOT      = Generate a bootstrap plot.
26161    JACKNIFE PLOT       = Generate a jacknife plot.
26162
26163Applications:
26164    Experimental Design
26165
26166Implementation Date:
26167    Pre-1987
26168
26169Program:
26170    LET N = 35
26171    LET Y = RANDOM PERMUTATION FOR I = 1 1 N
26172    PRINT Y
26173
26174-----RANDOM NUMBER GENERATOR (SET)------------------------------------
26175
26176RANDOM NUMBER GENERATOR
26177
26178Name:
26179    RANDOM NUMBER GENERATOR (SET)
26180
26181Type:
26182    Set Subcommand
26183
26184Purpose:
26185    Specify which uniform random number generator to use.
26186
26187Description:
26188    Random numbers for all supported probability distributions
26189    are ultimately based on an underlying uniform (0,1) distribution.
26190
26191    Much research has been devoted to developing good uniform
26192    random number generators.  Dataplot now supports a number of
26193    alternative uniform random number generators.
26194
26195    Note that the default generator (i.e., the one that has been in
26196    Dataplot for many years) is based on Fibonacci sequence as
26197    defined by Marsagalia.  Note that this is equivalent to the
26198    generator UNI of Jim Blue, David Kahaner, and George Marsagalia
26199    that is in the NIST CMLIB library.
26200
26201    Support is now provided for a linear congruential generator
26202    written by Fullerton (NIST CMLIB routine RUNIF) and a multiplicative
26203    congruential generator (ACM algorithm 599).  In addition,
26204    two generators based on the generalized feedback shift
26205    register (GFSR) methods are supported.  The first is based on the
26206    original algorithm of Lewis and Payne (Journal of the ACM,
26207    Volume 20, pp. 456-468).  The second is an alternative
26208    implementation given by Fushimi and Tezuka (Journal of the
26209    ACM, Volume 26, pp. 516-523).  Both are based on codes
26210    given by Monohan (2000) in "Numerical Methods of Statistics".
26211    Support is also provided for the Applied Statistics algorithm
26212    183.  AS183 is based on the fractional part of the sum of 3
26213    multiplicative congruential generators.  It requires 3 integers
26214    be specified initially.  Dataplot uses the multiplicative
26215    congruenetial generator (which depends on the SEED command)
26216    to randomly generate these 3 integers.
26217
26218    These 6 generators are used to generate uniform random numbers.
26219    Random numbers for other distributions are then derived from
26220    these uniform random numbers.
26221
26222    Note that you can use the SEED command to change the random numbers
26223    generated as well.  The SEED does not apply to the 2 GFSR
26224    generators (these each have their own initialization routines).
26225
26226Syntax:
26227    SET RANDOM NUMBER GENERATOR <generator>
26228    where <generator> is one of the following:
26229
26230        FIBONACCI
26231        LINEAR CONGRUENTIAL
26232        MULTIPLICATIVE CONGRUENTIAL
26233        GFSR
26234        FUSHIMI
26235        AS183
26236        GENZ
26237        LUXURY
26238        FIBONACCI CONGRUENTIAL
26239        MERSENNE TWISTER
26240
26241Examples:
26242    SET RANDOM NUMBER GENERATOR FIBONACCI
26243    SET RANDOM NUMBER GENERATOR LINEAR CONGRUENTIAL
26244    SET RANDOM NUMBER GENERATOR MULTIPLICATIVE CONGRUENTIAL
26245    SET RANDOM NUMBER GENERATOR GFSR
26246    SET RANDOM NUMBER GENERATOR FUSHIMI
26247    SET RANDOM NUMBER GENERATOR AS183
26248    SET RANDOM NUMBER GENERATOR GENZ
26249    SET RANDOM NUMBER GENERATOR LUXURY
26250    SET RANDOM NUMBER GENERATOR FIBONACCI CONGRUENTIAL
26251    SET RANDOM NUMBER GENERATOR MERSENNE TWISTER
26252
26253Note:
26254    The following additional random number generators have been
26255    added:
26256
26257       1) GENZ - Alan Genz implementation of Pierre L'Ecuyer
26258          generator described in "Combined Multiple Recursive
26259          Random Number Generators" (see Reference section below).
26260
26261        2) LUXURY - based on the Marsagalia and Zaman
26262           borrow-and-carry generator.  Uses a code written
26263           by F. James and incorporating improvements by
26264           M. Luscher.
26265
26266        3) FIBONNACI CONGRUENTIAL - combines the Fibonnaci generator
26267           with a congruential generator.  Method from Kahander and
26268           Marsagalia in "Numerical Methods and Software".
26269
26270        4) MERSENNE TWISTER - original C algorithm coded by
26271           Takuji Nishimura.  Dataplot uses the Fortran 90
26272           translation provided by Hiroshi Takano.  This generator
26273           may not work as intended on versions of Dataplot compiled
26274           with Fortran 77 compilers.  It uses some intrinsic
26275           functions that are part of the Fortran 90 standard,
26276           but not the Fortran 77 standard.  Some Fortran 77
26277           compilers may support these functions, but this support
26278           is optional.
26279
26280Default:
26281    FIBONACCI
26282
26283Synonyms:
26284    None
26285
26286Related Commands:
26287    RANDOM NUMBERS     = Generate random numbers for 60+ distributions.
26288    PROBABILITY PLOT   = Generate a probability plot.
26289    HISTOGRAM          = Generate a histogram.
26290    RUNS TEST          = Generate a runs test.
26291
26292Reference:
26293    "Applied Statistics Algorithms", P. Griffiths and I. D. Hill,
26294    Ellis Horwood Limited, 1985.
26295
26296    "Numerical Analysis for Statistics", John Monohan,
26297    Oxford University Press, 2000.
26298
26299    "Combined Multiple Recursive Random Number Generators",
26300    Pierre L'Ecuyer, Operations Research 44, 1996, pp. 816-822.
26301
26302    M. Luscher, Computer Physics Communications, 79 (1994) 100.
26303
26304    F. James, Computer Physics Communications, 79 (1994) 111.
26305
26306    "Numerical Methods and Software", David Kahaner, Cleve Moler,
26307    and Stephen Nash, Prentice-Hall, 1989.
26308
26309Applications:
26310    Random number generation
26311
26312Implementation Date:
26313    2002/5
26314    2003/5: Added support for the Alan Genz and Luxury random number
26315            generators
26316    2003/10: Added support for the Fibonnaci-Congruential and
26317             Mersenne twister random number generators
26318
26319Program:
26320    title case asis
26321    case asis
26322    .
26323    multiplot corner coordinates 0 0 100 100
26324    multiplot scale factor 2
26325    multiplot 2 2
26326    .
26327    let y = uniform random numbers for i = 1 1 1000
26328    title Dataplot (Fibonacci) Random Numbers
26329    uniform prob plot y
26330    move 50 8
26331    just center
26332    text PPCC = ^ppcc
26333    .
26334    set random number generator linear congruential
26335    let y2 = uniform random numbers for i = 1 1 1000
26336    title Linear Congruential Random Numbers
26337    uniform prob plot y2
26338    move 50 8
26339    just center
26340    text PPCC = ^ppcc
26341    .
26342    set random number generator multiplicative congruential
26343    let y3 = uniform random numbers for i = 1 1 1000
26344    title Multiplicative Congruential Random Numbers
26345    uniform prob plot y3
26346    move 50 8
26347    just center
26348    text PPCC = ^ppcc
26349    .
26350    end of multiplot
26351
26352-----RANDOM SUBSET (LET)-----------------------------------------
26353
26354RANDOM SUBSET
26355
26356Name:
26357    RANDOM SUBSET (LET)
26358
26359Type:
26360    Let Subcommand
26361
26362Purpose:
26363    Generate a random subset.
26364
26365Description:
26366    A basic combinatorial problem is to generate the 2**n subsets
26367    of the set {1, 2, ..., n}.
26368
26369    This command generates a single random subset among the
26370    2**n possible subsets.
26371
26372    The output is an array of zero and one values where zero
26373    for the ith element of the set indicates the element is not
26374    present and a value of one indicates the ith element is
26375    present.  For example, if n = 5 an output array of
26376
26377        1 0 0 1 1
26378
26379    specifies that elements 1, 4, and 5 are present while
26380    elements 2 and 3 are not.
26381
26382Syntax:
26383    LET <y> = RANDOM SUBSET FOR I =  1  1  <n>
26384    where <n> is a number or parameter that specifies the size of
26385              the set;
26386    and   <y> is a variable where the random subset is saved.
26387
26388Examples:
26389    LET N = 5
26390    LET Y1 = RANDOM SUBSET FOR I = 1 1 N
26391
26392Note:
26393    Dataplot implements this command using the algorithm
26394    described in Nijenhuis and Wilf (see Reference section
26395    below).
26396
26397Note:
26398    Dataplot supports a number of different random number
26399    generators.  Enter HELP RANDOM NUMBER GENERATOR for details.
26400
26401    The SEED command can be used to specify a seed for the random
26402    number generator.
26403
26404Default:
26405    None
26406
26407Synonyms:
26408    None
26409
26410Related Commands:
26411    LET                          = Generate data transformations.
26412    RANDOM PERMUTATION           = Generate a random permutation.
26413    RANDOM K-SET OF N-SET        = Generate a random k-set of n-set.
26414    RANDOM COMPOSITION           = Generate a random composition.
26415    RANDOM PARTITION             = Generate a random partition.
26416    RANDOM EQUIVALENCE RELATION  = Generate a random equivalence relation.
26417    NEXT SUBSET                  = Generate the next subset of a set.
26418    NEXT PERMUTATION             = Generate the next permutation.
26419    NEXT K-SET OF N-SET          = Generate the next k-set of n-set.
26420    NEXT COMPOSITION             = Generate the next composition.
26421    NEXT PARTITION               = Generate the next partition.
26422    NEXT EQUIVALENCE RELATION    = Generate the next composition.
26423
26424References:
26425    Nijenhuis and Wilf (1978), "Combinatorial Algorithms",
26426    Second Edition, Academic Press, Chapter 2.
26427
26428Applications:
26429    Combinatorial Analysis
26430
26431Implementation Date:
26432    2008/4
26433
26434Program:
26435    LET N = 10
26436    LET Y = RANDOM SUBSET FOR I =  1  1  N
26437    PRINT Y
26438
26439-----RANGE (LET)---------------------------------------------------
26440
26441RANGE
26442
26443Name:
26444    RANGE (LET)
26445
26446Type:
26447    Let Subcommand
26448
26449Purpose:
26450    Compute the range of a variable.
26451
26452Description:
26453    The range is the difference between the largest and smallest value.
26454
26455Syntax:
26456    LET <par> = RANGE <y1>  <SUBSET/EXCEPT/FOR qualification>
26457    where <y1> is the variable for which the range is to be computed;
26458          <par> is a parameter where the computed range is saved;
26459    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
26460
26461Examples:
26462    LET A = RANGE Y1
26463    LET A = RANGE Y1 SUBSET TAG > 2
26464
26465Default:
26466    None
26467
26468Synonyms:
26469    None
26470
26471Related Commands:
26472    MEAN (LET)               = Compute the mean of a variable.
26473    STANDARD DEVIATION (LET) = Compute the standard deviation of
26474                               a variable.
26475
26476Applications:
26477    Exploratory Data Analysis
26478
26479Implementation Date:
26480    XX
26481
26482Program:
26483    LET X1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
26484    LET A = RANGE Y1
26485
26486-----RANGE PLOT--------------------------------------------------
26487
26488RANGE PLOT
26489
26490Name:
26491    RANGE PLOT
26492
26493Type:
26494    Graphics Command
26495
26496Purpose:
26497    Generates a range plot.
26498
26499Description:
26500    A range plot is a plot consisting of subsample ranges versus
26501    subsample index.  The subsample range is the difference between the
26502    maximum and minimum of the data in the subsample.  The range plot
26503    is used to answer the question-- "Does the subsample variation
26504    change over different subsamples?".  It consists of:
26505       Vertical   axis = subsample range;
26506       Horizontal axis = subsample index.
26507    The range plot yields 2 traces:
26508       1. a subsample range trace; and
26509       2. a full-sample range reference line.
26510    Like usual, the appearance of these 2 traces is
26511    controlled by the first 2 settings of the LINES,
26512    CHARACTERS, SPIKES, BARS, and similar attributes.
26513
26514Syntax:
26515    RANGE PLOT   <y>   <x>    <SUBSET/EXCEPT/FOR qualification>
26516    where <y> is the response (= dependent) variable;
26517          <x> is the subsample identifier variable (this variable
26518              appears on the horizontal axis);
26519    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
26520
26521Examples:
26522    RANGE PLOT Y X
26523    RANGE PLOT Y X1
26524
26525Default:
26526    None
26527
26528Synonyms:
26529    R PLOT
26530
26531Related Commands:
26532    CHARACTERS              = Sets the type for plot characters.
26533    LINES                   = Sets the type for plot lines.
26534    STANDARD DEVIATION PLOT = Generates a standard deviation plot.
26535    VARIANCE  PLOT          = Generates a variance plot.
26536    MEAN PLOT               = Generates a mean plot.
26537    MEDIAN PLOT             = Generates a median plot.
26538    BOX PLOT                = Generates a box plot.
26539    RANGE CHART             = Generates a range control chart.
26540    S CHART                 = Generates a standard deviation control
26541                              chart.
26542    PLOT                    = Generates a data or function plot.
26543
26544Applications:
26545    Quality Control
26546
26547Implementation Date:
26548    88/2
26549
26550Program:
26551    SKIP 25
26552    READ GEAR.DAT Y X
26553    LINE BLANK DASH
26554    CHARACTER X BLANK
26555    XTIC OFFSET 0.2 0.2
26556    Y1LABEL RANGE
26557    X1LABEL SAMPLE ID
26558    TITLE AUTOMATIC
26559    RANGE PLOT Y X
26560
26561-----RANK2 (LET)---------------------------------------------------
26562
26563RANK2
26564
26565Name:
26566    RANK2 (LET)
26567
26568Type:
26569    Let Subcommand
26570
26571Purpose:
26572    Rank the elements of a response variable when there are one,
26573    two, or three group-id variables.
26574
26575Description:
26576    The RANK command is used to rank a response variable.  However,
26577    there may be cases where you want to rank the data withing
26578    groups.  The RANK2, RANK3, and RANK4 commands let you perform
26579    the ranking for the cases with one, two, or three group-id
26580    variables, respectively.
26581
26582    Nonparameteric analysis is often based on ranked data rather
26583    than the original data.  This command may be helpful in implementing
26584    nonparameteric methods that are not directly supported by Dataplot.
26585
26586Syntax 1:
26587    LET <y2> = RANK2 <y1> <x1>
26588                    <SUBSET/EXCEPT/FOR qualification>
26589    where <y1> is a response variable to be ranked;
26590          <x1> is a group-id variable;
26591          <y2> is a variable where the ranked <y1> values are saved;
26592    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
26593
26594    This syntax is used for the case where we are ranking based
26595    on one group-id variable.
26596
26597Syntax 2:
26598    LET <y2> = RANK3 <y1> <x1> <x2>
26599                    <SUBSET/EXCEPT/FOR qualification>
26600    where <y1> is a response variable to be ranked;
26601          <x1> is the first group-id variable;
26602          <x2> is the second group-id variable;
26603          <y2> is a variable where the ranked <y1> values are saved;
26604    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
26605
26606    This syntax is used for the case where we are ranking based
26607    on two group-id variables.
26608
26609Examples:
26610    LET Y2 = RANK2 Y X1
26611    LET Y2 = RANK2 Y X1 X2
26612    LET Y2 = RANK2 Y X1  SUBSET X1 > 2
26613
26614Note:
26615    The response values are ranked in ascending order.
26616
26617Note:
26618    The groups in the data do not need to be pre-sorted or
26619    contiguous.  The ranked response variable will be in the
26620    same order as the original response variable (i.e., the
26621    groups are not sorted on output).
26622
26623    If you want to extract the rankings for a specific group,
26624    you can do something like the following
26625
26626       LET Y2 = RANK3 Y X1 X2
26627       LET ZY2 = Y2
26628       LET ZY  = Y
26629       RETAIN ZY2 ZY SUBSET X1 =2 SUBSET X2 = 3
26630
26631Default:
26632    None
26633
26634Synonyms:
26635    None
26636
26637Related Commands:
26638    RANK         = Rank the elements of a variable.
26639    SORT         = Sort the elements of a variable.
26640    SORTC        = Sort the elements of a variable and carry one or
26641                   more variables along.
26642    COCODE       = Generate a cocoded variable.
26643    CODE         = Generate a coded variable.
26644    SEQUENCE     = Generate a sequence of numbers.
26645    PATTERN      = Generate numbers with a specific pattern.
26646
26647Applications:
26648    Data Management
26649
26650Implementation Date:
26651    2008/12
26652
26653Program 1:
26654    skip 25
26655    read gear.dat y x
26656    .
26657    let y2 = rank2 y x
26658    .
26659    set write decimals 3
26660    print x y y2
26661
26662Program 2:
26663    skip 25
26664    read ripken.dat y x1 x2 x3 x4
26665    .
26666    let y2 = rank3 y x1 x2
26667    .
26668    set write decimals 3
26669    print x1 x2 y y2
26670
26671-----RANK INDEX (LET)---------------------------------------------
26672
26673RANK INDEX
26674
26675Name:
26676    RANK INDEX (LET)
26677
26678Type:
26679    Let Subcommand
26680
26681Purpose:
26682    Compute the ranks of a variable where each rank will be a unique
26683    integer value.
26684
26685Description:
26686    When the RANK command encouters ties in the response variable,
26687    all tied values are given the same average rank.  For example,
26688    if ranks 5 and 6 denote the same value, then each would be
26689    assinged a rank of 5.5.
26690
26691    The RANK INDEX command performs ranking.  However, it handles
26692    ties differently.  For example, if ranks 5 and 6 denote the same
26693    value, this command will return 5 and 6 as the ranks rather than
26694    5.5 for both.
26695
26696    This command is useful when you want to use the rank as an index
26697    to another variable.  An example is given in the program example
26698    below.
26699
26700Syntax:
26701    LET <y> = RANK INDEX <x>    <SUBSET/EXCEPT/FOR qualification>
26702    where <x> is the variable for which the ranks are to be computed;
26703          <y> is a variable where the computed ranks are saved;
26704    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
26705
26706Examples:
26707    LET Y = RANK INDEX X
26708
26709Default:
26710    None
26711
26712Synonyms:
26713    None
26714
26715Related Commands:
26716    RANK (LET)      = Rank the elements in a variable.
26717    RANK2 (LET)     = Rank the elements in a variable where there is
26718                      grouping in the data.
26719    SORT (LET)      = Sort the elements in a variable.
26720    SORTC (LET)     = Sort the elements in a variable and carry one or
26721                      more variables along.
26722
26723Applications:
26724    Nonparametric statistics
26725
26726Implementation Date:
26727    2010/6
26728
26729Program:
26730    skip 25
26731    read splett2.dat y x
26732    let string s1 = Tinius1
26733    let string s2 = Tinius2
26734    let string s3 = Satec
26735    let string s4 = Tokyo
26736    .
26737    let xsort iindx = sort by median y x
26738    set let cross tabulate collapse
26739    let y2 = cross tabulate median y x
26740    let x2 = rank index y2
26741    loop for k = 1 1 4
26742        let ival = x2(k)
26743        let string t^ival = ^s^k
26744    end of loop
26745    x1tic mark label case asis
26746    x1tic mark label format alpha
26747    x1tic mark label content ^t1 ^t2 ^t3 ^t4
26748    .
26749    char box plot
26750    line box plot
26751    fences on
26752    .
26753    xlimits 1 4
26754    major xtic mark number 4
26755    minor xtic mark number 0
26756    xtic offset 0.5 0.5
26757    .
26758    title case asis
26759    title offset 2
26760    title Charpy V-NIST Notch Testing
26761    label case asis
26762    x1label Machine Manufacturer
26763    y1label Absorbed Energy
26764    .
26765    box plot y xsort
26766
26767-----RANK (LET)---------------------------------------------------
26768
26769RANK
26770
26771Name:
26772    RANK (LET)
26773
26774Type:
26775    Let Subcommand
26776
26777Purpose:
26778    Compute the ranks of a variable.
26779
26780Syntax:
26781    LET <resp> = RANK <y1>  <SUBSET/EXCEPT/FOR qualification>
26782    where <y1> is the variable for which the ranks are to be computed;
26783          <resp> is a variable where the computed ranks are saved;
26784    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
26785
26786Examples:
26787    LET A = RANK Y1
26788
26789Note:
26790    Ties are assigned an average rank.  For example, if the 2nd and 3rd
26791    highest values are equal, each is assigned a rank of 2.5.
26792
26793Note:
26794    Many nonparametric statistical methods are based on ranks.  The
26795    program sample shows the use of ranks in computing the
26796    Kruskal-Wallis test for one-way ANOVA.
26797
26798Default:
26799    None
26800
26801Synonyms:
26802    None
26803
26804Related Commands:
26805    SORT (LET)      = Sort the elements in a variable.
26806    SORTC (LET)     = Sort the elements in a variable and carry one or
26807                      more variables along.
26808
26809Applications:
26810    Nonparametric statistics
26811
26812Implementation Date:
26813    XX
26814
26815Program:
26816    .  Perform a Kruskal-Wallis non-parametric 1-way ANOVA
26817    .  Data from "Probability and Statistics for Engineers and
26818    .  Scientists" by Walpole and Myers.
26819    LET P = 3
26820    LET X1 = DATA 24.0 16.7 22.8 19.8 18.9
26821    LET X2 = DATA 23.2 19.8 18.1 17.6 20.2 17.8
26822    LET X3 = DATA 18.4 19.1 17.3 17.3 19.7 18.9 18.8 19.3
26823    .
26824    LOOP FOR K = 1 1 P
26825       LET N^K = SIZE X^K
26826       LET TAG^K = K FOR I = 1 1 N^K
26827    END OF LOOP
26828    LOOP FOR L = 2 1 P
26829       LET TEMP = X^L
26830       EXTEND X1 TEMP
26831       LET TEMP = TAG^L
26832       EXTEND TAG1 TEMP
26833       DELETE TEMP
26834    END OF LOOP
26835    .
26836    LET N = SIZE X1
26837    LET R = RANK X1
26838    LET SUM1 = 0
26839    LOOP FOR K = 1 1 P
26840       LET R^K = SUM R SUBSET TAG1 = K
26841       LET SUM1 = SUM1 + (R^K)**2/N^K
26842    END OF LOOP
26843    .
26844    LET H = SUM1*(12/(N*(N+1))) - 3*(N+1)
26845    LET ALPHA = 0.95
26846    LET DF = P - 1
26847    LET CRITICAL = CHSPPF(ALPHA,DF)
26848    .
26849    CAPTURE KRUSKAL_WALLIS_OUT.DAT
26850    PRINT " "
26851    PRINT "H0: ^P INDEPENDENT SAMPLES ARE FROM IDENTICAL POPULATIONS"
26852    PRINT "HA: ^P INDEPENDENT SAMPLES ARE FROM DIFFERENT POPULATIONS"
26853    PRINT "KRUSKAL-WALLIS H STATISTIC = ^H"
26854    PRINT "CHI-SQUARE CRITICAL VALUE = ^CRITICAL"
26855    IF H <= CRITICAL
26856      PRINT "ACCEPT NULL HYPOTHESIS"
26857    END OF IF
26858    IF H > CRITICAL
26859      PRINT "REJECT NULL HYPOTHESIS"
26860    END OF IF
26861    END OF CAPTURE
26862
26863-----RANK COMOVEMENT (LET)--------------------------------
26864
26865RANK COMOVEMENT
26866
26867Name:
26868    RANK COMOVEMENT (LET)
26869
26870Type:
26871    Let Subcommand
26872
26873Purpose:
26874    Compute the rank Leigh-Perlman comovement coefficient for a
26875    variable.
26876
26877Description:
26878    The comovement coefficient is the sum of cross products divided by
26879    N-1.  It is computed as:
26880          COMOVE = SUMXY/(SQRT(SUMX)*SQRT(SUMY))
26881    where
26882          SUMXY = SUM ((X(i)-X(i-1))*(Y(i)-Y(I-1)))
26883          SUMX  = SUM(X(i)-X(i-1))
26884          SUMY  = SUM(Y(i)-Y(i-1))
26885    and the summations are done from 2 to N.  The computed coefficient
26886    has a value between -1 and +1.
26887
26888    The rank comovement coefficient is computed from the ranks of the
26889    data rather than the original data.  However, it uses the same
26890    computational formula given above.
26891
26892Syntax:
26893    LET <par> = RANK COMOVEMENT <y1> <y2>
26894               <SUBSET/EXCEPT/FOR qualification>
26895    where <y1> is the first  response variable;
26896          <y2> is the second response variable;
26897          <par> is a parameter where the computed rank comovement is
26898               stored;
26899    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
26900
26901Examples:
26902    LET A = RANK COMOVEMENT Y1 Y2
26903    LET A = RANK COMOVEMENT Y1 Y2 SUBSET TAG > 2
26904
26905Note:
26906    The two variables must have the same number of elements.
26907
26908Default:
26909    None
26910
26911Synonyms:
26912    None
26913
26914Related Commands:
26915    COMOVEMENT       = Compute the comovement of two variables.
26916    CORRELATION      = Compute the correlation of a variable.
26917    RANK CORRELATION = Compute the rank correlation of a variable.
26918    COVARIANCE       = Compute the covariance between two variables.
26919    VARIANCE         = Compute the variance of a variable.
26920
26921Reference:
26922    "An Index for Comovement of Time Sequences with Geophysical
26923    Applications: A Working Paper", Penn State Interface Conference on
26924    Astronomy, August, 1991.
26925
26926Applications:
26927    XX
26928
26929Implementation Date:
26930    91/8
26931
26932Program:
26933    LET Y1 = EXPONENTIAL RANDOM NUMBERS FOR I = 1 1 100
26934    LET Y2 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
26935    LET A1 = RANK COMOVEMENT Y1 Y2
26936
26937-----RANK CORRELATION (LET)--------------------------------
26938
26939RANK CORRELATION
26940
26941Name:
26942    RANK CORRELATION (LET)
26943
26944Type:
26945    Let Subcommand
26946
26947Purpose:
26948    Compute the Spearman rank correlation between two variables.
26949
26950Description:
26951    If the measurements in the two samples are replaced with their ranks
26952    (and average ranks in the case of ties) and the Pearson correlation
26953    coefficient (HELP CORRELATION for details) is computed, the result is
26954    the Spearman rho correlation coefficient.
26955
26956    The rank correlation is recommended in the following cases:
26957      1) When the underlying data does not have a meaningful numerical
26958         measure, but it can be ranked;
26959      2) When the relationship between the two variables is not
26960         linear;
26961      3) When the normality assumption for two variables is not
26962         valid.
26963
26964Syntax:
26965    LET <par> = RANK CORRELATION <y1> <y2>
26966               <SUBSET/EXCEPT/FOR qualification>
26967    where <y1> is the first response variable;
26968          <y2> is the second response variable;
26969          <par> is a parameter where the computed rank correlation is
26970               stored;
26971    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
26972
26973Examples:
26974    LET A = RANK CORRELATION Y1  Y2
26975    LET A = RANK CORRELATION Y1 Y2 SUBSET TAG > 2
26976
26977Note:
26978    The two variables must have the same number of elements.
26979
26980Default:
26981    None
26982
26983Synonyms:
26984    None
26985
26986Related Commands:
26987    CORRELATION (LET)      = Compute the Pearson correlation
26988                             coefficient between two variables.
26989    AUTOCORRELATION (LET)  = Compute the autocorrelation of a variable.
26990    RANK COVARIANCE (LET)  = Compute the rank covariance between two
26991                             variables.
26992
26993Applications:
26994    Exploratory Data Analysis
26995
26996Implementation Date:
26997    Pre-1987
26998
26999Program:
27000    LET Y1 = DATA 14 17 28 17 16 13 24 25 18 31
27001    LET Y2 = DATA 0.9 1.1 1.6 1.3 1.0 0.8 1.5 1.4 1.2 2.0
27002    LET A1 = RANK CORRELATION Y1 Y2
27003
27004-----RANK CORRELATION INDEPENDENCE TEST--------------------------------------
27005
27006RANK CORRELATION INDEPENDENCE TEST
27007
27008Name:
27009    RANK CORRELATION INDEPENDENCE TEST
27010
27011Type:
27012    Analysis Command
27013
27014Purpose:
27015    Perform a Spearman rho rank correlation test for whether two samples
27016    are independent (i.e., not correlated).
27017
27018Description:
27019    If the measurements in the two samples are replaced with their ranks
27020    (and average ranks in the case of ties) and the Pearson correlation
27021    coefficient (HELP CORRELATION for details) is computed, the result is
27022    the Spearman rho correlation coefficient.
27023
27024    A value of +1 indicates perfect positive correlation, a value
27025    of -1 indicates perfect negative correlation, and a value of 0
27026    indicates no relation (i.e., independence).
27027
27028    The rank correlation independence test is a test whether the
27029    rank correlation coefficient is equal to zero.
27030
27031    For larger n (e.g., n > 30) or the case where there are many ties,
27032    the p-th upper quantile of the rank correlation statistic can be
27033    approximated by
27034
27035        w(p) = z(p)/SQRT(n-1)
27036
27037    with z(p) and n denoting the p-th quantile of the standard
27038    normal distribution and the sample size, respectively.  The
27039    lower quantile is the negative of the upper quantile.
27040
27041    For a two-sided test, the p-value is computed as twice the
27042    minimum of the lower tailed and upper tailed quantiles.
27043
27044    For n <= 30, tabulated quantiles (from Table A10 on p. 542 of
27045    Conover) are used.  These quantiles are exact when there are
27046    no ties in the data.
27047
27048Syntax 1:
27049    <LOWER TAILED/UPPER TAILED> RANK CORRELATION INDEPENDENCE TEST
27050                                <y1>  <y2>
27051                                <SUBSET/EXCEPT/FOR qualification>
27052    where <LOWER TAILED/UPPER TAILED> is an optional keyword that
27053               specifies either a lower tailed or an upper tailed
27054               test;
27055          <y1> is the first response variable;
27056          <y2> is the second response variable;
27057    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
27058
27059    If neither LOWER TAILED or UPPER TAILED is specified, a two-tailed
27060    test is performed.
27061
27062    Lower tailed tests are used to test for negative correlation and
27063    upper tailed tests are used to test for positive correlation).
27064
27065Syntax 2:
27066    <LOWER TAILED/UPPER TAILED> RANK CORRELATION INDEPENDENCE TEST
27067                                <y1>  ... <yk>
27068                                <SUBSET/EXCEPT/FOR qualification>
27069    where <LOWER TAILED/UPPER TAILED> is an optional keyword that
27070               specifies either a lower tailed or an upper tailed
27071               test;
27072          <y1> ... <yk> is a list of 1 to 30 response variables;
27073    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
27074
27075    This syntax will perform all the pair-wise tests for the <y1> ...
27076    <yk> response variables.  For example,
27077
27078         RANK CORRELATION INDEPENDENCE TEST Y1 TO Y4
27079
27080    is equivalent to
27081
27082         RANK CORRELATION INDEPENDENCE TEST Y1 Y2
27083         RANK CORRELATION INDEPENDENCE TEST Y1 Y3
27084         RANK CORRELATION INDEPENDENCE TEST Y1 Y4
27085         RANK CORRELATION INDEPENDENCE TEST Y2 Y3
27086         RANK CORRELATION INDEPENDENCE TEST Y2 Y4
27087         RANK CORRELATION INDEPENDENCE TEST Y3 Y4
27088
27089Examples:
27090    RANK CORRELATION INDEPENDENCE TEST Y1 Y2
27091    RANK CORRELATION INDEPENDENCE TEST Y1 TO Y5
27092    LOWER TAILED RANK CORRELATION INDEPENDENCE TEST Y1 Y2
27093    UPPER TAILED RANK CORRELATION INDEPENDENCE TEST Y1 Y2
27094
27095Note:
27096    This command can be used to test for trend in a univariate
27097    variable.  For example
27098
27099       LET N = SIZE Y
27100       LET X = SEQUENCE 1 1 N
27101       RANK CORRELATION INDEPENDENCE TEST Y X
27102
27103    According to Conover, this test is more powerful than the
27104    Cox and Stuart test.  However, it is not as widely applicable
27105    as the Cox and Stuart test.
27106
27107    This test for trend is referred to as the Daniels test for trend.
27108
27109Note:
27110    The KENDALL TAU INDEPENDENCE TEST can be used to perform
27111    a test for independence based on the Kendall tau statistic.
27112
27113    The CORRELATION CONFIDENCE LIMITS command can be used to generate
27114    a confidence interval for the Pearson correlation coefficient.
27115    This can be used for a parametric test for independence (i.e.,
27116    does the confidence interval contain zero?).
27117
27118Note:
27119    By default, critical values are based on tabulated values for
27120    n <= 30.  The command
27121
27122        SET RANK CORRELATION CRITICAL VALUES NORMAL APPROXIMATION
27123
27124    can be used to specify that they should be based on the normal
27125    approximation given above.  This may be preferred if there are
27126    ties in the data.  To reset the default, enter the command
27127
27128        SET RANK CORRELATION CRITICAL VALUES TABLE
27129
27130Note:
27131    The RANK CORRELATION INDEPENDENCE TEST will accept matrix arguments.
27132    If a matrix is given, the data elements in the matrix will be collected
27133    in column order to form a vector before performing the test.
27134
27135Note:
27136    Dataplot saves the following internal parameters after a
27137    rank correlation independence test:
27138
27139        STATVAL   = the value of the test statistic
27140        STATCDF   = the CDF of the test statistic
27141        PVALUE    = the p-value for the two-sided test
27142        PVALUELT  = the p-value for the lower tailed test
27143        PVALUEUT  = the p-value for the upper tailed test
27144        CUTLOW90  = the 90% lower tailed critical value
27145        CUTUPP90  = the 90% upper tailed critical value
27146        CUTLOW95  = the 95% lower tailed critical value
27147        CUTUPP95  = the 95% upper tailed critical value
27148        CTLOW975  = the 97.5% lower tailed critical value
27149        CTUPP975  = the 97.5% upper tailed critical value
27150        CUTLOW99  = the 99% lower tailed critical value
27151        CUTUPP99  = the 99% upper tailed critical value
27152        CTLOW995  = the 99.5% lower tailed critical value
27153        CTUPP995  = the 99.5% upper tailed critical value
27154        CTLOW999  = the 99.9% lower tailed critical value
27155        CTUPP999  = the 99.9% upper tailed critical value
27156
27157Note:
27158    The following statistics can also be computed
27159
27160        LET A = RANK CORRELATION Y1 Y2
27161        LET A = RANK CORRELATION CDF Y1 Y2
27162        LET A = RANK CORRELATION PVALUE Y1 Y2
27163        LET A = RANK CORRELATION LOWER TAILED PVALUE Y1 Y2
27164        LET A = RANK CORRELATION UPPER TAILED PVALUE Y1 Y2
27165
27166    The cdf and p-values are based on the normal approximation
27167    given above.
27168
27169    To see a list of commands in which these statistics can be
27170    used, enter
27171
27172        HELP STATISTICS
27173
27174Note:
27175    The run sequence plot can be used to graphically assess
27176    whether or not there is trend in the data.  The 4-plot can
27177    be used to assess the more general assumption of
27178    "independent, identically distributed" data.
27179
27180    The paired data can also be analyzed using other techniques for
27181    comparing two response variables (e.g., t-test, bihistogram,
27182    quantile-quantile plot).
27183
27184Default:
27185    None
27186
27187Synonyms:
27188    None
27189
27190Related Commands:
27191    KENDALL TAU INDEPENDENCE TEST  = Compute an independence test
27192                                     based on the Kendall tau statistic.
27193    CORRELATION CONFIDENCE LIMITS  = Generate confidence limits for the
27194                                     Pearson correlation coefficient.
27195    COX AND STUART TEST            = Compute a Cox and Stuart trend test.
27196    T-TEST                         = Compute a t-test.
27197    4-PLOT                         = Generate a 4-plot.
27198    RUN SEQUENCE PLOT              = Generate a run sequence plot.
27199    BIHISTOGRAM                    = Generates a bihistogram.
27200    QUANTILE-QUANTILE PLOT         = Generate a quantile-quantile plot.
27201
27202Reference:
27203    Conover (1999), "Practical Nonparametric Statistics",
27204    Third Edition, Wiley, pp. 319-327.
27205
27206Applications:
27207    Confirmatory Data Analysis
27208
27209Implementation Date:
27210    2013/3
27211
27212Program:
27213    skip 25
27214    read kendall.dat y1 y2
27215    set write decimals 5
27216    .
27217    let statval  = rank correlation y1 y2
27218    let statcdf  = rank correlation cdf y1 y2
27219    let pvalue   = rank correlation pvalue y1 y2
27220    let pvallt   = rank correlation lower tailed pvalue y1 y2
27221    let pvalut   = rank correlation upper tailed pvalue y1 y2
27222    print statval statcdf pvalue pvallt pvalut
27223    .
27224    rank correlation independence test y1 y2
27225    .
27226    upper tailed rank correlation independence test y1 y2
27227    .
27228    set rank correlation critical values normal approximation
27229    upper tailed rank correlation independence test y1 y2
27230
27231-----RANK COVARIANCE (LET)--------------------------------
27232
27233RANK COVARIANCE
27234
27235Name:
27236    RANK COVARIANCE (LET)
27237
27238Type:
27239    Let Subcommand
27240
27241Purpose:
27242    Compute the rank covariance between two variables.
27243
27244Description:
27245    The covariance is computed as:
27246        cov(x,y) = sum(x-xmean)*sum(y-ymean)/(N-1)
27247    The rank covariance uses the above formula on the ranks of the
27248    data rather than the original data.
27249
27250    The rank covariance is recommended in the following cases:
27251      1) When the underlying data does not have a meaningful numerical
27252         measure, but it can be ranked;
27253      2) When the relationship between the two variables is not linear;
27254      3) When the normality assumption for two variables is not valid.
27255
27256Syntax:
27257    LET <par> = RANK COVARIANCE <y1> <y2>
27258               <SUBSET/EXCEPT/FOR qualification>
27259    where <y1> is the first response variable;
27260          <y2> is the second response variable;
27261          <par> is a parameter where the computed rank covariance is
27262               stored;
27263    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
27264
27265Examples:
27266    LET A = RANK COVARIANCE Y1  Y2
27267    LET A = RANK COVARIANCE Y1 Y2 SUBSET TAG > 2
27268
27269Default:
27270    None
27271
27272Synonyms:
27273    None
27274
27275Related Commands:
27276    CORRELATION (LET)      = Compute the Pearson correlation
27277                             coefficient between two variables.
27278    AUTOCORRELATION (LET)  = Compute the autocorrelation of a variable.
27279    RANK CORRELATION (LET) = Compute the rank correlation between two
27280                             variables.
27281
27282Applications:
27283    Exploratory Data Analysis
27284
27285Implementation Date:
27286    XX
27287
27288Program:
27289    LET Y1 = DATA 14 17 28 17 16 13 24 25 18 31
27290    LET Y2 = DATA 0.9 1.1 1.6 1.3 1.0 0.8 1.5 1.4 1.2 2.0
27291    LET A1 = RANK COVARIANCE Y1 Y2
27292
27293-----RANK SUM TEST--------------------------------------
27294
27295RANK SUM TEST
27296
27297Name:
27298    RANK SUM TEST
27299
27300Type:
27301    Analysis Command
27302
27303Purpose:
27304    Perform a two sample rank sum test.
27305
27306Description:
27307    The t-test is the standard test for testing that the
27308    difference between population means for two non-paired
27309    samples are equal.  If the populations are non-normal,
27310    particularly for small samples, then the t-test may not
27311    be valid.  The rank sum test is an alternative that can
27312    be applied when distributional assumptions are suspect.
27313    However, it is not as powerful as the t-test when the
27314    distributional assumptions are in fact valid.
27315
27316    The rank sum test is also commonly called the Mann-Whitney
27317    rank sum test or simply the Mann-Whitney test.  Note that
27318    even though this test is commonly called the Mann-Whitney
27319    test, it was in fact developed by Wilcoxon.
27320
27321    To form the rank sum test, rank the combined samples.
27322    Then compute the sum of the ranks for sample one, T1, and
27323    the sum of the ranks for sample two, T2.  If the sample
27324    sizes are equal, the rank sum test statistic is the minimum
27325    of T1 and T2.  If the sample sizes are unequal, then
27326    find T1 equal the sum of the ranks for the smaller sample.
27327    Then compute T2 = N1(N1 + N2 + 1) - T1.  T is the minimum
27328    of T1 and T2.  Sufficiently small values of T cause
27329    rejection of the null hypothesis that the sample means
27330    are equal.
27331
27332    Significance levels have been tabulated for small values of
27333    N1 and N2.  For sufficiently large N1 and N2, the following
27334    normal approximation is used:
27335
27336         Z = (ABS(u - T) - 0.5)/sigma
27337
27338    where
27339
27340         u = N1*(N1 + N2 + 1)/2
27341         sigma = SQRT(N2*u/6)
27342
27343Syntax:
27344    RANK SUM TEST  <y1>  <y2>    <SUBSET/EXCEPT/FOR qualification>
27345    where <y1> is the first response variable;
27346          <y2> is the second response variable;
27347    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
27348
27349Examples:
27350    RANK SUM TEST Y1  Y2
27351    RANK SUM TEST Y1  Y2  SUBSET TAG > 2
27352
27353Note:
27354    Dataplot saves the following internal parameters after a
27355    sign test:
27356
27357        STATVAL   = The rank sum test statistic
27358        STATCD2   = the normal cdf value of T (only applies for
27359                    sufficiently large N1 and N2)
27360        CUTLOW90  = 0.05 critical value
27361        CUTUPP90  = 0.95 critical value
27362        CUTLOW95  = 0.025 critical value
27363        CUTUPP95  = 0.975 critical value
27364        CUTLOW99  = 0.005 critical value
27365        CUTUPP99  = 0.995 critical value
27366
27367    Note that the above critical values are the lower and upper
27368    tails for two sided tests (i.e., each tail is alpha/2.  For
27369    example, CUTLOW90 is the lower 5% of the normal percent point
27370    function (adjusted for the mean and standard deviation).  This
27371    is the critical regions for alpha = 0.10, so there is 0.05 in
27372    each tail.
27373
27374Note:
27375    The following statistics are also supported:
27376
27377        LET A = MANN WHITNEY RANK SUM TEST                 Y1 Y2
27378        LET A = MANN WHITNEY RANK SUM TEST CDF             Y1 Y2
27379        LET A = MANN WHITNEY RANK SUM TEST PVALUE          Y1 Y2
27380        LET A = MANN WHITNEY RANK SUM LOWER TAILED PVALUE  Y1 Y2
27381        LET A = MANN WHITNEY RANK SUM UPPER TAILED PVALUE  Y1 Y2
27382
27383    In addition to the above LET command, built-in statistics are
27384    supported for about 20+ different commands (enter HELP STATISTICS
27385    for details).
27386
27387Default:
27388    None
27389
27390Synonyms:
27391    The following are synonyms for RANK SUM TEST:
27392
27393        MANN WHITNEY RANK SUM TEST
27394        MANN WHITNEY RANK SUM
27395        MANN WHITNEY TEST
27396        MANN WHITNEY
27397        RANK SUM
27398
27399Related Commands:
27400    T-TEST                     = Compute a t-test.
27401    SIGN TEST                  = Compute a sign test.
27402    SIGNED RANK TEST           = Compute a signed rank test.
27403    CHI-SQUARED 2 SAMPLE TEST  = Compute a two sample chi-square
27404                                 test.
27405    BIHISTOGRAM                = Generates a bihistogram.
27406    QUANTILE-QUANTILE PLOT     = Generate a quantile-quantile plot.
27407    BOX PLOT                   = Generates a box plot.
27408
27409Reference:
27410    "Statistical Methods", Eigth Edition, Snedecor and Cochran,
27411    1989, Iowa State University Press, pp. 142-144.
27412
27413Applications:
27414    Confirmatory Data Analysis
27415
27416Implementation Date:
27417    1999/5
27418
27419Program:
27420    SKIP 25
27421    READ NATR323.DAT Y1 Y2
27422    RETAIN Y2 SUBSET Y2 > -90
27423    RANK SUM TEST Y1 Y2
27424
27425    The following output is generated.
27426
27427
27428                      MANN WHITNEY RANK SUM TEST
27429                         (2-SAMPLE)
27430     HYPOTHESIS BEING TESTING--POPULATION MEANS MU1 = MU2
27431     SAMPLE SIZE FOR VARIABLE 1              =       13
27432     SAMPLE SIZE FOR VARIABLE 2              =        8
27433     RANK SUM FOR VARIABLE 1                 =    180.0000
27434     RANK SUM FOR VARIABLE 2                 =    51.00000
27435     RANK SUM TEST STATITIC (U)              =    51.00000
27436
27437     HYPOTHESIS     ACCEPTANCE INTERVAL      CONCLUSION
27438     MU1 = MU2      U  >    60.00000         REJECT
27439
27440-----RATIO (LET)-------------------------------------------
27441
27442RATIO
27443
27444Name:
27445    RATIO (LET)
27446
27447Type:
27448    Let Subcommand
27449
27450Purpose:
27451    Compute the ratio of the sum of two variables.
27452
27453Description:
27454    This statistic computes
27455
27456        SUM[i=1 to n][Y1(i)]/SUM[i=1 to n][Y2(i)]
27457
27458    In the current implementation, Y1 and Y2 are assumed to
27459    have the same number of elements.
27460
27461    In the typical use of this command, Y2 denotes the
27462    number of cases or number of trials while Y1 denotes
27463    the corresponding number of successes or failures (e.g.,
27464    the number of successes might be the number of false
27465    negatives or false positives).  This statistic then computes
27466    the success rate over all groups.
27467
27468Syntax:
27469    LET <par> = RATIO <y1> <y2>  <SUBSET/EXCEPT/FOR qualification>
27470    where <y1> is the first  response variable;
27471          <y2> is the second response variable;
27472          <par> is a parameter where the computed ratio is
27473               stored;
27474    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
27475
27476Examples:
27477    LET A = RATIO Y1 Y2
27478    LET A = RATIO Y1 Y2 SUBSET TAG > 2
27479
27480Note:
27481    The following additional commands are supported
27482
27483        TABULATE RATIO  Y1 Y2 X
27484        CROSS TABULATE RATIO Y1 Y2 X1 X2
27485
27486        RATIO PLOT Y1 Y2 X
27487        RATIO CROSS TABULATE PLOT Y1 Y2 X1 X2
27488
27489        BOOTSTRAP RATIO PLOT Y1 Y2
27490        JACKNIFE RATIO PLOT Y1 Y2
27491
27492Default:
27493    None
27494
27495Synonyms:
27496    None
27497
27498Related Commands:
27499    TABULATE            = Compute a statistic for data with a
27500                          single grouping variable.
27501    CROSS TABULATE      = Compute a statistic for data with
27502                          two grouping variables.
27503    STATISTIC PLOT      = Generate a plot of a statistic for data
27504                          with a single grouping variable.
27505    CROSS TABULATE PLOT = Generate a plot of a statistic for data
27506                          with two grouping variables.
27507    BOOTSTRAP PLOT      = Generate a bootstrap plot for a given
27508                          statistic.
27509
27510Applications:
27511    Linear Regression
27512
27513Implementation Date:
27514    12/2005
27515
27516Program:
27517    LET Y1 = DATA 2 4 0 1 8 5 5 5 2 2
27518    LET Y2 = 10 FOR I = 1 1 10
27519    LET A = RATIO Y1 Y2
27520
27521-----RATIO OF MEANS CONFIDENCE INTERVAL--------------------------
27522
27523RATIO OF MEANS CONFIDENCE INTERVAL
27524
27525Name:
27526    RATIO OF MEANS CONFIDENCE INTERVAL
27527
27528Type:
27529    Analysis Command
27530
27531Purpose:
27532    Generates a confidence interval for the ratio of two means
27533    for paired samples.
27534
27535Description:
27536    There are cases where a measurement is actually the ratio of
27537    two different measurements.  That is,
27538
27539         R(i) = Y(i)/X(i)
27540
27541    It is often desired to generate the confidence interval for
27542    this ratio.  Note that computing a standard confidence interval
27543    for R does not generate satisfactory results.  This is due to
27544    the fact that, assuming Y and X are independent,
27545
27546            E[Rhat] = E[Yhat/Xhat]
27547                    = E[Yhat]*E[1/Xhat]
27548
27549    However, E[1/Xhat] is not equal to 1/E[Xhat].
27550
27551    There have been a number of approaches to this problem.  This
27552    command supports three different methods.
27553
27554    Fieller derived confidence intervals for the case where Y and X are
27555    distributed as bivariate normal.  Define the quantities
27556
27557        Xbar                = mean of X
27558        Ybar                = mean of Y
27559        sigmahat**2(Xbar)   = variance of Xbar
27560                            = 1/(N*(N-1))*SUM[i=1 to N][(X(i)-Xbar)**2]
27561        sigmahat**2(Ybar)   = variance of Ybar
27562                            = 1/(N*(N-1))*SUM[i=1 to N][(Y(i)-Ybar)**2]
27563        sigmahat(Ybar,Xbar) = 1/(N*(N-1))*
27564                              SUM[i=1 to N][X(i) - Xbar)*(Y(i)-Ybar)]
27565        t(q)                = t percent point value with N - 1 degrees of
27566                              freedom
27567
27568    The test statistic is
27569
27570          Rhat = Ybar/Xbar
27571
27572    For Fieller's confidence limits, we first compute
27573
27574          Xbar**2/sigmahat(Xbar)**2
27575
27576    If this quantity is less than or equal to t**2(q), then an unbounded
27577    interval results and Dataplot will not generate the confidence
27578    interval.  Basically, this results if the confidence interval for X
27579    contains zero.
27580
27581    If this quantity is less than or equal to t**2(q), then the following
27582    confidence interval is obtained
27583
27584       Lower Limit = {(Xbar*Ybar - t**2(q)*sigmahat(Xbar,Ybar)) -
27585                      SQRT[(Xbar*Ybar - t**2(q)*sigmahat(Xbar,Ybar))**2 -
27586                      (Xbar**2 - t**2(q)*sigmahat**2(Xbar)*
27587                      (Ybar**2 - t**2(q)*sigmahat**2(Ybar)]}/
27588                      (Xbar**2 - t**2(q)*sigmahat(Xbar))
27589
27590       Upper Limit = {(Xbar*Ybar - t**2(q)*sigmahat(Xbar,Ybar)) +
27591                      SQRT[(Xbar*Ybar - t**2(q)*sigmahat(Xbar,Ybar))**2 -
27592                      (Xbar**2 - t**2(q)*sigmahat**2(Xbar)*
27593                      (Ybar**2 - t**2(q)*sigmahat**2(Ybar)]}/
27594                      (Xbar**2 - t**2(q)*sigmahat(Xbar))
27595
27596    The large sample approximation method (this is called the Taylor or
27597    delta-method in the Franz paper) generates the following confidence
27598    interval
27599
27600        Lower Limit = Rhat - t(alpha/2,n-1)*Rhat*
27601                      SQRT{C(Ybar,Ybar) + C(Xbar,Xbar) - 2*C(Ybar,Xbar)}
27602
27603        Upper Limit = Rhat + t(alpha/2,n-1)*Rhat*
27604                      SQRT{C(Ybar,Ybar) + C(Xbar,Xbar) - 2*C(Ybar,Xbar)}
27605
27606    where
27607
27608        C(Ybar,Ybar) = (1/N)*s**2(Y)/Ybar**2
27609        C(Xbar,Xbar) = (1/N)*s**2(X)/Xbar**2
27610        C(Ybar,Xbar) = (1/N)*s(Y,X))/(Xbar*Ybar)
27611
27612    with s(Y), s(X), and s(Y,X) denoting the standard deviation of X,
27613    the standard deviation of Y and the covariance between Y and X,
27614    respectively.
27615
27616    The log ratio method generates the following confidence interval
27617
27618        Lower Limit = Rhat*EXP{-t(alpha/2,n-1)*
27619                      SQRT{C(YBAR,YBAR) + C(XBAR,XBAR) - 2*C(YBAR,XBAR)}
27620        Upper Limit = Rhat*EXP{t(alpha/2,n-1)*
27621                      SQRT{C(YBAR,YBAR) + C(XBAR,XBAR) - 2*C(YBAR,XBAR)}
27622
27623    The large sample approximation and the log ratio method do not
27624    generate unbounded intervals.  Also, the log ratio method can
27625    generate asymmetric intervals.
27626
27627    Note that there is some disagreement in the literature about the
27628    appropriateness of these methods.  For example, Franz argues that
27629    the unbounded intervals are a result of the denominator being close
27630    to zero with the consequence that the ratio can assume arbitrarily
27631    large values.  Therefore any method that does not allow for unbounded
27632    intervals is not valid.  On the other hand, Sherman argues that the
27633    unbounded Fieler intervals are simply nonsensical and advocates the
27634    use of the large sample approximation and log ratio methods.
27635
27636    To specify the method to use, enter the command
27637
27638        SET RATIO OF MEANS METHOD <FIELER/LOG RATIO/LARGE SAMPLE>
27639
27640Syntax:
27641    RATIO OF MEANS CONFIDENCE INTERVAL  <y1>  <y2>
27642                                        <SUBSET/EXCEPT/FOR qualification>
27643    where <y1> is the first (numerator) response variable;
27644          <y2> is the second (denominator) response variable;
27645    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
27646
27647    The variables <y1> and <y2> must be of the same length and are assumed
27648    to be paired.
27649
27650Examples:
27651    RATIO OF MEANS CONFIDENCE INTERVAL Y X
27652    RATIO OF MEANS CONFIDENCE INTERVAL Y X  SUBSET TAG > 2
27653    RATIO OF MEANS CONFIDENCE INTERVAL Y1 Y2  SUBSET Y1 > 0
27654
27655Note:
27656    A table of confidence intervals is printed for alpha levels of
27657    50.0, 75.0, 90.0, 95.0, 99.0, 99.9, 99.99, and 99.999.  The sample
27658    sizes, sample means, sample standard deviations, and the standard
27659    error are also printed.  The t-value and t-value X standard
27660    error are printed in the table.
27661
27662Note:
27663    The RATIO OF MEANS CONFIDENCE LIMIT command automatically saves the
27664    following parameters:
27665
27666       CUTLOW90   = the lower 90% confidence limit
27667       CUTUPP90   = the upper 90% confidence limit
27668       CUTLOW95   = the lower 95% confidence limit
27669       CUTUPP95   = the upper 95% confidence limit
27670       CUTLOW99   = the lower 99% confidence limit
27671       CUTUPP99   = the upper 99% confidence limit
27672       CTLOW999   = the lower 99.9% confidence limit
27673       CTUPP999   = the upper 99.9% confidence limit
27674
27675Note:
27676    In addition to the RATIO OF MEANS CONFIDENCE LIMIT command, the
27677    following commands can also be used:
27678
27679        LET A = RATIO OF MEANS Y X
27680
27681        LET ALPHA = <value>
27682        LET A = RATIO OF MEANS LOWER CONFIDENCE LIMIT Y X
27683        LET A = RATIO OF MEANS UPPER CONFIDENCE LIMIT Y X
27684
27685    These statistics can be used in a number of commands.  For
27686    details, enter
27687
27688         HELP STATISTICS
27689
27690Default:
27691    None
27692
27693Synonyms:
27694    None
27695
27696Related Commands:
27697    CONFIDENCE LIMITS                   = Generate a confidence interval
27698                                          for the mean.
27699    DIFFERENCE OF MEANS CONF LIMIT      = Generate a confidence interval
27700                                          for the difference of two means.
27701    T-TEST                              = Perform a two sample t-test.
27702    BIHISTOGRAM                         = Generate a bihistogram.
27703    QUANTILE-QUANTILE PLOT              = Generate a quantile-quantile
27704                                          plot.
27705    KOLMOGOROV-SMIRNOV TWO SAMPLE TEST  = Generate a Kolmogorov-
27706                                          Smirnov two sample test.
27707
27708Reference:
27709    V. H. Franz ((2007), "Ratios: A Short Guide to Confidence Limits and
27710    Proper Use," arXiv:0710.2024 [stat.AP].
27711
27712    E. C. Fieler (1940), "The Biological Standardization of Insulin,"
27713    Supplement to the Journal of the Royal Statistical Society, Vol. 7,
27714    No. 1, pp. 1-64.
27715
27716    E. C. Fieler (1940), "A Fundamental Formula in the Statistics of
27717    Biological Assays and Some Applications", Quarterly Journal of
27718    Pharmacy and Pharmacology, Vol. 17, pp. 117-123.
27719
27720    E. C. Fieler (1940), "Some Problems in Interval Estimation," Journal
27721    of the Royal Statistical Society (B), Vol. 16, No. 2, pp. 175-185.
27722
27723    Sherman, Maity, and Wang (2011), "Inferences for the Ratio: Fieller's
27724    Interval, Log Ratio, and Large Sample Based Confidence Intervals",
27725    AStA Adv Stat Anal 95:313–323.
27726
27727    Cochran (1977), "Sampling Techniques," Wiley, New York.
27728
27729    Lohr (2009), "Sampling: Design and Analysis," Second Edition,
27730    Brooks/Cole, Pacific Grove.
27731
27732Applications:
27733    Confirmatory Data Analysis
27734
27735Implementation Date:
27736    2019/09
27737
27738Program 1:
27739    . Step 1:   Define data (taken from Sherman article, original source
27740    .
27741    .           Lehtonen and Pahkinen (2004), "Practical Methods for
27742    .           Design and Analysis of Complex Surveys," 2nd Edition,
27743    .           New York: Wiley.
27744    .
27745    read y x
27746     4123   26881
27747      760    4896
27748      721    3730
27749      142     556
27750      187    1463
27751      331    1946
27752      127     834
27753      219     932
27754    end of data
27755    .
27756    . Step 2:   Large sample interval
27757    .
27758    let alpha = 0.95
27759    set write decimals 4
27760    set ratio of means method large sample
27761    let r1   = ratio of means y x
27762    let r1ll = ratio of means lower confidence limit y x
27763    let r1ul = ratio of means upper confidence limit y x
27764    .
27765    ratio of means confidence limit y x
27766    pause
27767    .
27768    set ratio of means method log ratio
27769    let r2   = ratio of means y x
27770    let r2ll = ratio of means lower confidence limit y x
27771    let r2ul = ratio of means upper confidence limit y x
27772    .
27773    ratio of means confidence limit y x
27774    pause
27775    .
27776    set ratio of means method fieler
27777    let r3   = ratio of means y x
27778    let r3ll = ratio of means lower confidence limit y x
27779    let r3ul = ratio of means upper confidence limit y x
27780    .
27781    ratio of means confidence limit y x
27782
27783Program 2:
27784    . Step 1:   Define data
27785    .
27786    read y x
27787      0.1268825E+10  0.1246669E+10
27788      0.1295448E+10  0.1246669E+10
27789      0.1295448E+10  0.1268825E+10
27790      0.1168487E+08  0.1014325E+08
27791      0.1141398E+08  0.1014325E+08
27792      0.1168487E+08  0.1141398E+08
27793      0.3298360E+06  0.2902920E+06
27794      0.3298360E+06  0.1718490E+06
27795      0.2902920E+06  0.1718490E+06
27796      0.2415666E+07  0.1637297E+07
27797      0.2415666E+07  0.1347629E+07
27798      0.1637297E+07  0.1347629E+07
27799      0.9904356E+08  0.9530938E+08
27800      0.1049126E+09  0.9530938E+08
27801      0.1049126E+09  0.9904356E+08
27802      0.4930919E+08  0.4662120E+08
27803      0.4934958E+08  0.4662120E+08
27804      0.4934958E+08  0.4930919E+08
27805      0.1278483E+08  0.1232513E+08
27806      0.1286868E+08  0.1232513E+08
27807      0.1286868E+08  0.1278483E+08
27808      0.7029193E+07  0.4878485E+07
27809      0.7029193E+07  0.3244763E+07
27810      0.4878485E+07  0.3244763E+07
27811      0.1490000E+07  0.1040000E+07
27812      0.1860000E+07  0.1040000E+07
27813      0.1860000E+07  0.1490000E+07
27814      0.2680523E+07  0.2601516E+07
27815      0.2724237E+07  0.2601516E+07
27816      0.2724237E+07  0.2680523E+07
27817      0.8905137E+07  0.8303097E+07
27818      0.8905137E+07  0.8271071E+07
27819      0.8303097E+07  0.8271071E+07
27820      0.6956520E+06  0.6798450E+06
27821      0.6921780E+06  0.6798450E+06
27822      0.6956520E+06  0.6921780E+06
27823      0.3290000E+09  0.2890000E+09
27824      0.3300000E+09  0.2890000E+09
27825      0.3300000E+09  0.3290000E+09
27826      0.7091179E+05  0.6553055E+05
27827      0.7443393E+05  0.6553055E+05
27828      0.7443393E+05  0.7091179E+05
27829      0.8031739E+08  0.5416613E+08
27830      0.8031739E+08  0.4975062E+08
27831      0.5416613E+08  0.4975062E+08
27832      0.6830980E+07  0.6738330E+07
27833      0.6973430E+07  0.6738330E+07
27834      0.6973430E+07  0.6830980E+07
27835      0.2010000E+07  0.1980000E+07
27836      0.2600000E+07  0.2010000E+07
27837      0.2600000E+07  0.1980000E+07
27838      0.3193846E+08  0.3059341E+08
27839      0.3222820E+08  0.3059341E+08
27840      0.3222820E+08  0.3193846E+08
27841      0.1784258E+08  0.1460987E+08
27842      0.1784258E+08  0.1099276E+08
27843      0.1460987E+08  0.1099276E+08
27844      0.3150562E+09  0.3052555E+09
27845      0.3150562E+09  0.2994084E+09
27846      0.3052555E+09  0.2994084E+09
27847      0.7998000E+08  0.7574000E+08
27848      0.8017000E+08  0.7574000E+08
27849      0.8017000E+08  0.7998000E+08
27850      0.3983000E+08  0.3886000E+08
27851      0.4086000E+08  0.3886000E+08
27852      0.4086000E+08  0.3983000E+08
27853      0.2334030E+07  0.1387010E+07
27854      0.2544590E+07  0.2334030E+07
27855      0.2544590E+07  0.1387010E+07
27856      0.3126721E+09  0.2310785E+09
27857      0.2490103E+09  0.2310785E+09
27858      0.3126721E+09  0.2490103E+09
27859      0.1000900E+03  0.9977000E+02
27860      0.1255000E+03  0.9977000E+02
27861      0.1255000E+03  0.1000900E+03
27862      0.9860323E+04  0.9400626E+04
27863      0.9882525E+04  0.9400626E+04
27864      0.9882525E+04  0.9860323E+04
27865      0.2548997E+04  0.2482806E+04
27866      0.2640000E+08  0.2510000E+08
27867      0.2680000E+08  0.2510000E+08
27868      0.2680000E+08  0.2640000E+08
27869    end of data
27870    .
27871    set write decimals 4
27872    .
27873    . Step 2:   Large sample interval
27874    .
27875    set ratio of means method large sample
27876    ratio of means confidence limit y x
27877    .
27878    . Step 3:   Log Ratio interval
27879    .
27880    set ratio of means method log ratio
27881    ratio of means confidence limit y x
27882    .
27883    . Step 4:   Fieler interval
27884    .
27885    set ratio of means method fieler
27886    ratio of means confidence limit y x
27887
27888-----RAYCDF (LET)--------------------------------
27889
27890RAYCDF
27891
27892Name:
27893    RAYCDF (LET)
27894
27895Type:
27896    Library Function
27897
27898Purpose:
27899    Compute the Rayleigh cumulative distribution function.
27900
27901Description:
27902    The Rayleigh distribution is a special case of the
27903    chi distribution with degrees of freedom parameter = 2 and
27904    scale parameter sigma.  It is also a special case of the
27905    Weibull distribution with shape parameter = 2 and scale
27906    parameter = SQRT(2).  Note that some sources may define the
27907    Rayleigh distribution as a Weibull with shape parameter = 2
27908    and scale parameter = 1.
27909
27910    The Rayleigh distribution has the following cumulative
27911    disribution function:
27912
27913       F(x,mu,sigma)=1 - EXP(-(1/2)**(x-mu)/sigma)**2)
27914                    x > mu, sigma > 0
27915
27916    with mu and sigma denoting the location and scale parameters,
27917    respectively.
27918
27919    The standard Rayleigh distribution is the case with
27920    mu = 0 and sigma = 1.
27921
27922Syntax:
27923    LET <y> = RAYCDF(<x>,<loc>,<scale>)
27924                                <SUBSET/EXCEPT/FOR qualification>
27925    where <x> is a variable or a parameter;
27926          <loc> is an optional number or parameter that specifies the
27927              value of the location parameter;
27928          <scale> is an optional positive number or parameter that
27929              specifies the value of the scale parameter;
27930          <y> is a variable or a parameter (depending on what <x> is)
27931               where the computed Rayleigh cdf value
27932               is stored;
27933    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
27934
27935Examples:
27936    LET Y = RAYCDF(3)
27937    LET Y = RAYCDF(X1,0,SIGMA)
27938    PLOT RAYCDF(X,0,SIGMA) FOR X = 0.01  0.01  5
27939
27940Note:
27941    Library functions are distinguished from let subcommands
27942    in the following ways.
27943    1) Functions enclose the input value in parenthesis.  Let
27944       subcommands use spaces.
27945    2) Functions can accept (and return) either parameters
27946       (i.e., single values) or variables (i.e., an array of
27947       values) while let subcommands are specific in which they
27948       accept as input and what they return as output.
27949    3) Functions can accept expressions while let subcommands
27950       do not.  For example, the following is legal:
27951           LET Y2 = ABS(Y1-INT(Y1))
27952       For let subcommands, you typically have to do something
27953       like the following:
27954           LET YTEMP = Y**2 + 8
27955           LET A = SUM YTEMP
27956
27957Default:
27958    None
27959
27960Synonyms:
27961    None
27962
27963Related Commands:
27964    RAYPDF = Compute the Rayleigh probability density function.
27965    RAYPPF = Compute the Rayleigh percent point function.
27966    MAXPDF = Compute the Maxwell probability density function.
27967    CHPDF  = Compute the chi probability density function.
27968    WEIPDF = Compute the Weibull probability density function.
27969    NORPDF = Compute the normal probability density function.
27970    LGNPDF = Compute the lognormal probability density function.
27971
27972Reference:
27973    "Continuous Univariate Distributions: Volume I", Second Edition,
27974    Johnson, Kotz, and Balakrishnan, Wiley, 1994, pp. 453, 686.
27975
27976Applications:
27977    Distributional Modeling, Statistical Physics
27978
27979Implementation Date:
27980    6/2004
27981
27982Program:
27983    Y1LABEL Probability
27984    X1LABEL X
27985    LABEL CASE ASIS
27986    TITLE CASE ASIS
27987    TITLE Rayleigh Cumulative Disribution
27988    PLOT RAYCDF(X) FOR X = 0  0.01  5
27989
27990-----RAYPDF (LET)--------------------------------
27991
27992RAYPDF
27993
27994Name:
27995    RAYPDF (LET)
27996
27997Type:
27998    Library Function
27999
28000Purpose:
28001    Compute the Rayleigh probability density function.
28002
28003Description:
28004    The Rayleigh distribution is a special case of the
28005    chi distribution with degrees of freedom parameter = 2 and
28006    scale parameter sigma.  It is also a special case of the
28007    Weibull distribution with shape parameter = 2 and scale
28008    parameter = SQRT(2).  Note that some sources may define the
28009    Rayleigh distribution as a Weibull with shape parameter = 2
28010    and scale parameter = 1.
28011
28012    The Rayleigh distribution has the following probability
28013    density function:
28014
28015       f(x,mu,sigma)=((x-mu)/sigma**2)*EXP(-(1/2)*(x-mu)**2/(sigma**2))
28016                    x > mu, sigma > 0
28017
28018    with mu and sigma denoting the location and scale parameters,
28019    respectively.
28020
28021    The standard Rayleigh distribution is the case with
28022    mu = 0 and sigma = 1.
28023
28024Syntax:
28025    LET <y> = RAYPDF(<x>,<loc>,<scale>)
28026                                <SUBSET/EXCEPT/FOR qualification>
28027    where <x> is a variable or a parameter;
28028          <loc> is an optional number or parameter that specifies the
28029              value of the location parameter;
28030          <scale> is an optional positive number or parameter that
28031              specifies the value of the scale parameter;
28032          <y> is a variable or a parameter (depending on what <x> is)
28033               where the computed Rayleigh pdf value
28034               is stored;
28035    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
28036
28037Examples:
28038    LET Y = RAYPDF(3)
28039    LET Y = RAYPDF(X1,0,SIGMA)
28040    PLOT RAYPDF(X,0,SIGMA) FOR X = 0.01  0.01  5
28041
28042Note:
28043    To generate Rayleigh random numbers, enter the command
28044
28045        LET Y = RAYLEIGH RANDOM NUMBERS FOR I = 1 1 N
28046
28047    To generate a Rayleigh probability plot or a Rayleigh
28048    Kolmogorov-Smirnov or chi-square goodness of fit test,
28049    enter the following commands
28050
28051        RAYLEIGH PROBABILITY PLOT Y
28052        RAYLEIGH KOLMOGOROV SMIRNOV GOODNESS OF FIT Y
28053        RAYLEIGH CHI-SQUARE GOODNESS OF FIT Y
28054
28055    The location and scale parameters for the Rayleigh distribution
28056    can be estimated by generating the Rayleigh probability
28057    plot (the intercept and slope of the line fit to the probability
28058    plot, PPA0 and PPA1, are estimates of location and scale).
28059
28060    Alternatively, you can estimate the location and scale
28061    parameters using maximum likelihood:
28062
28063        RAYLEIGH MAXIMUM LIKELIHOOD Y
28064
28065    The maximum likelihood estimate of the scale parameter is:
28066
28067     sigmahat = SQRT(SUM[i=1 to n][X(i)**2]/(2*n))
28068
28069    with X containing the data and n denoting the sample size.
28070    By default, Dataplot will use the sample minimum as the
28071    estimate of location (and subtract this value from X before
28072    computing the maximum likelihood estimate of sigma).  If you
28073    want to specify a different estimate of location, enter the
28074    command
28075
28076         LET RAYLOC = <value>
28077
28078Note:
28079    Library functions are distinguished from let subcommands
28080    in the following ways.
28081    1) Functions enclose the input value in parenthesis.  Let
28082       subcommands use spaces.
28083    2) Functions can accept (and return) either parameters
28084       (i.e., single values) or variables (i.e., an array of
28085       values) while let subcommands are specific in which they
28086       accept as input and what they return as output.
28087    3) Functions can accept expressions while let subcommands
28088       do not.  For example, the following is legal:
28089           LET Y2 = ABS(Y1-INT(Y1))
28090       For let subcommands, you typically have to do something
28091       like the following:
28092           LET YTEMP = Y**2 + 8
28093           LET A = SUM YTEMP
28094
28095Default:
28096    None
28097
28098Synonyms:
28099    None
28100
28101Related Commands:
28102    RAYCDF = Compute the Rayleigh cumulative distribution function.
28103    RAYPPF = Compute the Rayleigh percent point function.
28104    MAXPDF = Compute the Maxwell cumulative distribution function.
28105    CHPDF  = Compute the chi probability density function.
28106    WEIPDF = Compute the Weibull probability density function.
28107    NORPDF = Compute the normal probability density function.
28108    LGNPDF = Compute the lognormal probability density function.
28109
28110Reference:
28111    "Continuous Univariate Distributions: Volume I", Second Edition,
28112    Johnson, Kotz, and Balakrishnan, Wiley, 1994, pp. 453, 686.
28113
28114Applications:
28115    Distributional Modeling, Statistical Physics
28116
28117Implementation Date:
28118    6/2004
28119
28120Program:
28121    Y1LABEL Probability
28122    X1LABEL X
28123    TITLE Rayleigh Probability Density
28124    LABEL CASE ASIS
28125    TITLE CASE ASIS
28126    PLOT RAYPDF(X) FOR X = 0  0.01  5
28127
28128-----RAYPPF (LET)--------------------------------
28129
28130RAYPPF
28131
28132Name:
28133    RAYPPF (LET)
28134
28135Type:
28136    Library Function
28137
28138Purpose:
28139    Compute the Rayleigh percent point function.
28140
28141Description:
28142    The Rayleigh distribution is a special case of the
28143    chi distribution with degrees of freedom parameter = 2 and
28144    scale parameter sigma.  It is also a special case of the
28145    Weibull distribution with shape parameter = 2 and scale
28146    parameter = SQRT(2).  Note that some sources may define the
28147    Rayleigh distribution as a Weibull with shape parameter = 2
28148    and scale parameter = 1.
28149
28150    The Rayleigh distribution has the following percent point
28151    function:
28152
28153       G(x,mu,sigma) = mu + sigma*SQRT(2*LOG(1/(1-P)))
28154                    0 <= p < 1; sigma > 0
28155
28156    with mu and sigma denoting the location and scale parameters,
28157    respectively.
28158
28159    The standard Rayleigh distribution is the case with
28160    mu = 0 and sigma = 1.
28161
28162Syntax:
28163    LET <y> = RAYPPF(<p>,<loc>,<scale>)
28164                                <SUBSET/EXCEPT/FOR qualification>
28165    where <p> is a variable,number, or a parameter in the interval
28166              [0,1);
28167          <loc> is an optional number or parameter that specifies the
28168              value of the location parameter;
28169          <scale> is an optional positive number or parameter that
28170              specifies the value of the scale parameter;
28171          <y> is a variable or a parameter (depending on what <x> is)
28172               where the computed Rayleigh ppf value
28173               is stored;
28174    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
28175
28176Examples:
28177    LET Y = RAYPPF(0.95)
28178    LET Y = RAYPPF(P1,0,SIGMA)
28179    PLOT RAYPPF(P,0,SIGMA) FOR P = 0  0.01  0.99
28180
28181Note:
28182    Library functions are distinguished from let subcommands
28183    in the following ways.
28184    1) Functions enclose the input value in parenthesis.  Let
28185       subcommands use spaces.
28186    2) Functions can accept (and return) either parameters
28187       (i.e., single values) or variables (i.e., an array of
28188       values) while let subcommands are specific in which they
28189       accept as input and what they return as output.
28190    3) Functions can accept expressions while let subcommands
28191       do not.  For example, the following is legal:
28192           LET Y2 = ABS(Y1-INT(Y1))
28193       For let subcommands, you typically have to do something
28194       like the following:
28195           LET YTEMP = Y**2 + 8
28196           LET A = SUM YTEMP
28197
28198Default:
28199    None
28200
28201Synonyms:
28202    None
28203
28204Related Commands:
28205    RAYCDF = Compute the Rayleigh cumulative distribution function.
28206    RAYPDF = Compute the Rayleigh probability density function.
28207    MAXPDF = Compute the Maxwell cumulative distribution function.
28208    CHPDF  = Compute the chi probability density function.
28209    WEIPDF = Compute the Weibull probability density function.
28210    NORPDF = Compute the normal probability density function.
28211    LGNPDF = Compute the lognormal probability density function.
28212
28213Reference:
28214    "Continuous Univariate Distributions: Volume I", Second Edition,
28215    Johnson, Kotz, and Balakrishnan, Wiley, 1994, pp. 453, 686.
28216
28217Applications:
28218    Distributional Modeling
28219
28220Implementation Date:
28221    6/2004
28222
28223Program:
28224    X1LABEL Probability
28225    Y1LABEL X
28226    TITLE Rayleigh Percent Point
28227    LABEL CASE ASIS
28228    TITLE CASE ASIS
28229    PLOT RAYPPF(P) FOR P = 0  0.01  0.99
28230
28231-----RC (LET)----------------------------------------------
28232
28233RC
28234
28235Name:
28236    RC (LET)
28237
28238Type:
28239    Library Function
28240
28241Purpose:
28242    Compute Carlson's degenrate elliptic integral.
28243
28244Description:
28245    Carlson's degenerate elliptic integral is defined as:
28246        RC(x,y)=0.5*INTEGRAL[1/SQRT((t+x)*(t+y)**2)]dt
28247    where INTEGRAL is the integral from 0 to infinity.  The parameters
28248    x and y must all be non-negative.
28249
28250Syntax:
28251    LET <a> = RC(<x>,<y>,<z>)  <SUBSET/EXCEPT/FOR qualification>
28252    where <x> is a non-negative number, parameter, or variable;
28253          <y> is a non-negative number, parameter, or variable;
28254          <a> is a variable or a parameter (depending on what <x>,
28255               <y>, and <z> are) where the computed values are stored;
28256    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
28257
28258Examples:
28259    LET A = RC(2,1)
28260    LET A = RC(X,4)
28261    LET X2 = RC(1,Y)
28262
28263Note:
28264    The Carlson elliptic integrals are computed using the RC, RD, RF,
28265    and RJ routines from the SLATEC Common Mathematical Library.
28266    SLATEC is a large set of high quality, portable, public domain
28267    Fortran routines for various mathematical capabilities maintained
28268    by seven federal laboratories.
28269
28270Note:
28271    DATAPLOT computes Legendre elliptic integrals by computing the
28272    equivalent Carlson elliptic integrals.  See the documentation for
28273    the ELLIP1, ELLIP2, ELLIP3, ELLIPC1, and ELLIPC2 functions for
28274    details on computing Legendre elliptic functions in DATAPLOT.
28275
28276Note:
28277    Library functions are distinguished from let subcommands
28278    in the following ways.
28279    1) Functions enclose the input value in parenthesis.  Let
28280       subcommands use spaces.
28281    2) Functions can accept (and return) either parameters
28282       (i.e., single values) or variables (i.e., an array of
28283       values) while let subcommands are specific in which they
28284       accept as input and what they return as output.
28285    3) Functions can accept expressions while let subcommands
28286       do not.  For example, the following is legal:
28287           LET Y2 = ABS(Y1-INT(Y1))
28288       For let subcommands, you typically have to do something
28289       like the following:
28290           LET YTEMP = Y**2 + 8
28291           LET A = SUM YTEMP
28292
28293Default:
28294    None
28295
28296Synonyms:
28297    None
28298
28299Related Commands:
28300    RF      = Compute the Carlson elliptic integral of the first kind.
28301    RD      = Compute the Carlson elliptic integral of the second kind.
28302    RJ      = Compute the Carlson elliptic integral of the third kind.
28303    ELLIPC1 = Compute the Legendre complete elliptic integral of the
28304              first kind.
28305    ELLIPC2 = Compute the Legendre complete elliptic integral of the
28306              second kind.
28307    ELLIP1  = Compute the Legendre elliptic integral of the first
28308              kind.
28309    ELLIP2  = Compute the Legendre elliptic integral of the second
28310              kind.
28311    ELLIP3  = Compute the Legendre's elliptic integral of the third
28312              kind.
28313
28314Reference:
28315    "Algorithms for Incomplete Elliptic Integrals by Duplication",
28316    Carlson, ACM Transactions on Mathematical Software, 7,
28317    pp. 398-403.
28318
28319    "Handbook of Mathematical Functions, Applied Mathematics Series,
28320    Vol. 55", Abramowitz and Stegun, National Bureau of Standards,
28321    1964 (chapter 17).
28322
28323Applications:
28324    Special Functions
28325
28326Implementation Date:
28327    94/9
28328
28329Program:
28330    TITLE CARLSON ELLIPTIC FUNCTIONS
28331    PLOT RC(X,1) FOR X = 0.1 0.1 10 AND
28332    PLOT RC(1,X) FOR X = 0.1 0.1 10
28333
28334-----RD (LET)----------------------------------------------
28335
28336RD
28337
28338Name:
28339    RD (LET)
28340
28341Type:
28342    Library Function
28343
28344Purpose:
28345    Compute Carlson's elliptic integral of the second kind.
28346
28347Description:
28348    Carlson's elliptic integral of the second kind is defined as:
28349        RD(x,y,z,p)=1.5*INTEGRAL[1/SQRT((t+x)*(t+y)*(t+z)**3)]dt
28350    where INTEGRAL is the integral from 0 to infinity.  The parameters
28351    x, y, and z must all be non-negative with at most one of them
28352    being zero.  The p parameter must be non-zero.
28353
28354Syntax:
28355    LET <a> = RD(<x>,<y>,<z>)  <SUBSET/EXCEPT/FOR qualification>
28356    where <x> is a non-negative number, parameter, or variable;
28357          <y> is a non-negative number, parameter, or variable;
28358          <z> is a non-negative number, parameter, or variable;
28359          <a> is a variable or a parameter (depending on what, <p>,
28360               <x>, <y>, and <z> are) where the computed values are
28361               stored;
28362    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
28363
28364Examples:
28365    LET A = RD(2,1,3)
28366    LET A = RD(X,0,4)
28367    LET X2 = RD(1,1,Y)
28368
28369Note:
28370    The Carlson elliptic integrals are computed using the RC, RD, RF,
28371    and RJ routines from the SLATEC Common Mathematical Library.
28372    SLATEC is a large set of high quality, portable, public domain
28373    Fortran routines for various mathematical capabilities maintained
28374    by seven federal laboratories.
28375
28376Note:
28377    DATAPLOT computes Legendre elliptic integrals by computing the
28378    equivalent Carlson elliptic integrals.  See the documentation for
28379    the ELLIP1, ELLIP2, ELLIP3, ELLIPC1, and ELLIPC2 functions for
28380    details on computing Legendre elliptic functions in DATAPLOT.
28381
28382Note:
28383    Library functions are distinguished from let subcommands
28384    in the following ways.
28385    1) Functions enclose the input value in parenthesis.  Let
28386       subcommands use spaces.
28387    2) Functions can accept (and return) either parameters
28388       (i.e., single values) or variables (i.e., an array of
28389       values) while let subcommands are specific in which they
28390       accept as input and what they return as output.
28391    3) Functions can accept expressions while let subcommands
28392       do not.  For example, the following is legal:
28393           LET Y2 = ABS(Y1-INT(Y1))
28394       For let subcommands, you typically have to do something
28395       like the following:
28396           LET YTEMP = Y**2 + 8
28397           LET A = SUM YTEMP
28398
28399Default:
28400    None
28401
28402Synonyms:
28403    None
28404
28405Related Commands:
28406    RF      = Compute the Carlson elliptic integral of the first kind.
28407    RJ      = Compute the Carlson elliptic integral of the third kind.
28408    RC      = Compute the degenerate Carlson elliptic integral.
28409    ELLIPC1 = Compute the Legendre complete elliptic integral of the
28410              first kind.
28411    ELLIPC2 = Compute the Legendre complete elliptic integral of the
28412              second kind.
28413    ELLIP1  = Compute the Legendre elliptic integral of the first
28414              kind.
28415    ELLIP2  = Compute the Legendre elliptic integral of the second
28416              kind.
28417    ELLIP3  = Compute the Legendre's elliptic integral of the third
28418              kind.
28419
28420Reference:
28421    "Algorithms for Incomplete Elliptic Integrals by Duplication",
28422    Carlson, ACM Transactions on Mathematical Software, 7,
28423    pp. 398-403.
28424
28425    "Handbook of Mathematical Functions, Applied Mathematics Series,
28426    Vol. 55", Abramowitz and Stegun, National Bureau of Standards,
28427    1964 (chapter 17).
28428
28429Applications:
28430    Special Functions
28431
28432Implementation Date:
28433    94/9
28434
28435Program:
28436    TITLE CARLSON ELLIPTIC FUNCTIONS
28437    PLOT RD(X,1,2) FOR X = 0.1 0.1 10 AND
28438    PLOT RD(1,X,2) FOR X = 0.1 0.1 10 AND
28439    PLOT RD(1,2,X) FOR X = 0.1 0.1 10
28440
28441-----READ-------------------------------------------------------
28442
28443READ
28444
28445Name:
28446    READ
28447
28448Type:
28449    Support Command
28450
28451Purpose:
28452    Reads data into variables
28453       1) from an ASCII mass storage file;
28454       2) from within a CALLed DATAPLOT sub-program;
28455       3) from the terminal.
28456
28457Description:
28458    The READ command is primarily intended for reading from the terminal
28459    or from ASCII files.  Dataplot has limited support for binary data
28460    files (see the Note sections below with regards to reading Fortran
28461    unformatted files and image data).
28462
28463    Also, Dataplot does not currently support directly reading files
28464    from other statistical/spreadsheet programs or database files.
28465    Some support may be provided in future releases, but for now
28466    you need to save the data from these programs in an ASCII file
28467    in order to read them into Dataplot.  XML based data files are
28468    becoming increasingly popular as well.  At this time, Dataplot does
28469    not support XML based data files.
28470
28471    IDEAL CASE
28472
28473    By default, Dataplot assumes rectangular data files containing
28474    numeric data where the data columns are separated by one or
28475    more spaces.  Commas or tabs may be used as delimiters as well.
28476
28477    In this case, you can read the file with a command like the
28478    following:
28479
28480        READ  FILE.DAT  Y X1 X2
28481
28482    The first argument after the READ is the name of the ASCII file.
28483    The remaining arguments identify the variable names.  Variable
28484    names can be up to eight characters long and should be limited
28485    to alphabetic (A-Z) and numeric (0-9) characters.  Although
28486    other characters can in fact be used, this is discouraged
28487    since their use can cause problems in some contexts.  Variable
28488    names are not case sensitive (Dataplot converts all alphabetic
28489    characters to upper case).
28490
28491    Dataplot recognizes the first argument as a file name if it
28492    finds a "." in the name.  If no "." is found, Dataplot assumes
28493    the first argument is a variable name and it tries to read
28494    from the keyboard rather than the file.
28495
28496    For this ideal case, the following are the basic rules.
28497
28498       1) If there are k variables listed on the READ statement, then
28499          each line image must have at least k data values.  Only the
28500          first k data values are read (this is how the READ command
28501          differs from the SERIAL READ command), and these are read
28502          into successive elements of the individual variables.  Thus
28503
28504             READ X Y
28505             1 1 1
28506             2 4 8
28507             3 9 27
28508             END OF DATA
28509
28510          results in X containing the 3 elements 1, 2, and 3; Y
28511          containing the 3 elements 1, 4, and 9; and the values 1, 8,
28512          and 27 not being read at all.
28513
28514       2) In scanning for the k variables, the full line image is
28515          scanned.  By default, the full line image is 255 characters.
28516
28517          The COLUMN LIMITS can be used to restrict the read to certain
28518          columns.  The case where the data line is longer than 255
28519          characters is discussed below.
28520
28521       3) Data values on a line image must be separated by at least one
28522          blank or comma.  Non-printing characters, such as tabs, are
28523          treated as spaces.
28524
28525       4) Data values may be free-format.  That is, they need not be
28526          aligned in specific columns.  If your data file is aligned
28527          in specific columns, you may be able to significantly speed
28528          up the read by specifying a format for the data.  This is
28529          discussed below.
28530
28531       5) The format of individual data values is general.  It can be
28532          integer, floating point, or exponential.  It is stored
28533          internally as a single precision real number.
28534
28535          Support for character data is discussed below.
28536
28537       6) All reads start from the beginning of the file.  The SKIP and
28538          ROW LIMITS can be used to skip header lines are to restrict
28539          which row of the file are read.
28540
28541       7) The analyst need not be concerned about the number of
28542          observations for each variable;  DATAPLOT automatically
28543          determines and reports this value at the end of the read.
28544
28545       8) The read terminates when a line image is encountered which
28546          consists of
28547
28548             END OF DATA
28549          or
28550
28551             END DATA
28552
28553          or when the end of the file is reached.
28554
28555    Many ASCII files will not be in the "ideal" format.  The remainder of
28556    this section discusses various issues that may cause problems when
28557    reading ASCII files and provides suggestions on how to deal with these
28558    issues.  The following topics are discussed:
28559
28560       1) Viewing ASCII files within Dataplot
28561       2) Header lines/restricted rows or columns
28562       3) Long data records
28563       4) Automatic variable names
28564       5) Reading fixed columns
28565       6) Reading variables with unequal lengths
28566       7) Reading character data
28567       8) Reading row oriented data
28568       9) Comment lines in data files
28569      10) Reading Excel (or other spreadsheet) files
28570      11) Cut and Paste
28571      12) Comma as decimal point
28572      13) Missing values and undefined numbers
28573      14) Reading date and time fields
28574      15) Reading IP addresses
28575      16) Reading monetary data (e.g., $23,461.58)
28576      17) Reading numeric values with trailing "+" or "-" or "*" or "%"
28577      18) Commas within character fields
28578      19) Reading binary data
28579      20) Reading image data
28580      21) What if all of the data will not fit into memory?
28581
28582    If you create the ASCII file yourself, it is recommended that
28583    you create it with variables of equal length (pick some numeric
28584    value to signify missing data) and with data items separated by one
28585    or more spaces.  Inclusion of a header giving a description of
28586    the data file is optional, but we find it helpful (Dataplot
28587    can skip over the header lines).  When the ASCII files are created
28588    by another program (e.g., Excel), then you may have less control
28589    over the format of the file.  Hopefully, most ASCII files you
28590    encounter can be handled using the commands discussed below.
28591
28592
28593    VIEWING THE ASCII FILE WITHIN DATAPLOT
28594
28595    In order to identify some of the issues discussed below, it is
28596    often helpful to view the ASCII file before trying to read it into
28597    Dataplot.  You can do this with the command
28598
28599        LIST FILE.DAT
28600
28601    This will list the file 20 lines (you can change the number
28602    of lines with the SET LIST LINES command) at a time.  You
28603    can then enter a carriage return to view the next 20 lines or
28604    a "no" to stop viewing the file.
28605
28606    For some of the commands given below, you need to either know
28607    approriate line numbers or column numbers.
28608
28609    To view the file with line numbers, enter the command
28610
28611       NLIST  FILE.DAT
28612
28613    To identify appropriate columns, enter the command
28614
28615       RULER
28616
28617    This will identify the first 80 columns.
28618
28619
28620    HEADER LINES/RESTRICTED ROWS OR COLUMNS
28621
28622    Many data files contain header lines at the beginning of the
28623    file that provide a description of the file.  In order to
28624    skip over these lines, enter the command
28625
28626        SKIP N
28627
28628    where N identifies how many lines to skip.
28629
28630    Most of the sample data files that are distributed with Dataplot
28631    contain a line starting with hyphens ("---").  You can use the
28632    command
28633
28634        SKIP AUTOMATIC
28635
28636    for these files.  Dataplot will skip all lines until a line
28637    starting with three or more hypens is encoutered.
28638
28639    In a related issue, if you want to restrict the read to certain
28640    rows in the file, you can enter the command
28641
28642        ROW LIMITS  N1  N2
28643
28644    with N1 and N2 denoting the first and last rows to read,
28645    respectively.
28646
28647    You can also restrict the read to certain columns of the file
28648    using the command
28649
28650        COLUMN LIMITS  C1  C2
28651
28652    with C1 denoting the first column to read and C2 the last column
28653    to read.
28654
28655
28656    LONG DATA RECORDS
28657
28658    When reading from the keyboard, Dataplot restricts a single record
28659    to a maximum of 255 columns.
28660
28661    When reading from a file, Dataplot previously restricted a single
28662    record to a maximum of 132 columns.  The March, 2003 version raised
28663    the default limit to 255 characters.  In addition, the following
28664    command was added:
28665
28666       MAXIMUM RECORD LENGTH  N
28667
28668    with N denoting the size of the largest record to be read.
28669
28670    Dataplot accepts values of N up to 9999.  However, be aware
28671    that some Fortran compilers may impose their own limit.  These
28672    limits tend not to be well documented, but with modern compilers
28673    they tend to be sufficiently large that this should not be a
28674    problem in practice.
28675
28676    Note that if you specify a MAXIMUM RECORD LENGTH command, you
28677    should also specify the COLUMN LIMITS command.  For example,
28678
28679        MAXIMUM RECORD LENGTH 512
28680        COLUMN LIMITS 1 512
28681
28682    If you specify a SET READ FORMAT command (discussed below), you
28683    do not need to specify the maximum record length.
28684
28685
28686    AUTOMATIC VARIABLE NAMES
28687
28688    Dataplot normally reads variable names on the READ command.
28689    However, many ASCII files will have the name of the variables
28690    given directly in the file or Dataplot can assign the variable
28691    names automatically.
28692
28693    Specific methods include the following.
28694
28695      1. Many of the sample files provided in the Dataplot
28696         installation use a syntax like
28697
28698             Y     X1   X2
28699            ----------------
28700               <data values>
28701
28702         For these files, you can enter the commands
28703
28704             SKIP AUTOMATIC
28705             SET VARIABLE NAMES FILE
28706             READ FILE.DAT
28707
28708         In this case, Dataplot will skip all lines until a line
28709         starting with three or more hypens is encountered.  It
28710         will then backspace to the previous line and read the
28711         variable names from that line.
28712
28713         Alternatively, you can specify the number of lines to skip with
28714         the command
28715
28716             SKIP N
28717
28718         where N specifies the number of lines in the header.  If the
28719         SET VARIABLE NAME FILE command has been given, Dataplot will look
28720         at the last line of the header (i.e., line N).  If it starts with
28721         three or more hyphens, then Dataplot assumes that the variable
28722         names are on line N-1.  If line N does not start with hyphens,
28723         then Dataplot assumes that the variable names are on line N.
28724
28725      2. Many non-Dataplot ASCII data files will have the variable names on
28726         the first line of the file.  For these files, you can enter the
28727         commands
28728
28729            SET VARIABLE LABELS ON
28730            READ FILE.DAT
28731
28732         Dataplot then assumes line one of the file contains the variable
28733         names and the data start with line two.
28734
28735         This is equivalent to using
28736
28737             SKIP 1
28738             SET VARIABLE NAMES FILE
28739             READ FILE.DAT
28740
28741      3. If you would like Dataplot to simply assign the variable
28742         names, enter the commands
28743
28744             SET VARIABLE NAMES AUTOMATIC
28745             READ FILE.DAT
28746
28747         Dataplot will read the first line of the file to determine
28748         the number of variables.  It will then assign the names
28749         COL1, COL2, and so on to the variable names.  Prior to
28750         2014/10, Dataplot used default names of X1, X2, and so on.
28751         You can specify what to use for the base of the variable
28752         names by entering the command
28753
28754              SET AUTOMATIC VARIABLE BASE NAME <value>
28755
28756         The use of SET VARIABLE NAMES AUTOMATIC applies to either the
28757         SKIP AUTOMATIC or the SKIP N cases.
28758
28759    Note that Dataplot's usual rules for variable names still apply.
28760    That is, a maximum of eight characters will be used and spaces (commas
28761    can also be used as the delimiter and non-printing characters such as
28762    tabs will be treated as spaces) will delimit variable names.  The use
28763    of special (i.e., not a number and not an alphabetic character)
28764    characters is discouraged.  You may need to edit the file if the
28765    variable names do not follow these rules (more than eight characters will
28766    simply be ignored, so the issue is more one of duplicate variable names
28767    in the first eight characters).
28768
28769    The SET VARIABLE NAMES <AUTOMATIC/FILE> command was implemented 2014/10.
28770    Prior to that, the SKIP AUTOMATIC worked equivalently to the
28771    SET VARIABLE NAMES FILE and the SKIP N worked equivalently to the
28772    SET VARIABLE NAMES AUTOMATIC.  The default is AUTOMATIC.
28773
28774
28775    READING FIXED COLUMNS
28776
28777    By default, Dataplot performs free format reads.  That is,
28778    you do not need to line up the columns neatly.  You do need
28779    to provide one or more spaces (tabs, commas, colons, semi-colons,
28780    parenthesis, or brackets can be used as well) between data fields.
28781
28782    Many data files will contain fixed fields.  There are several reasons
28783    you may want or need to take advantage of these fixed fields rather
28784    than using a free format read.
28785
28786       1. If your data fields do not contain spaces (or some other
28787          delimiter) between data columns, you need to tell
28788          Dataplot how to interpret the columns.
28789
28790       2. In some cases, you may only want to read selected
28791          variables in the data file.
28792
28793       3. Using a formatted read can significantly speed up the reading
28794          of the data.  If you have small or moderate size data files (say
28795          500 rows or fewer), this is really not an issue.  However, if you
28796          are reading 50,000 rows, you can significantly speed up the read
28797          by specifying the format.
28798
28799       4. If the data fields have unequal lengths, Dataplot will not
28800          interpret the data file correctly with a free format read.
28801          It assigns the data items in the order they are encountered
28802          to the variable names in the order they are given.  Dataplot
28803          does not try to guess if a data item is missing based on the
28804          columns.
28805
28806          The issue of unequal lengths is discussed in detail in the
28807          next section.
28808
28809    There are two basic cases for fixed fields.
28810
28811       1. The data fields are justified by the decimal point.
28812
28813          In this case, you can use the
28814
28815              SET READ FORMAT  <format>
28816
28817          command to specify a Fortran-like format to read the file.
28818          Enter HELP READ FORMAT for details.
28819
28820          Using a formatted read is significantly faster than a
28821          free format read.
28822
28823       2. Many programs will write ASCII files with fixed columns,
28824          but the data fields will be either left or right justified
28825          rather than lined up by the decimal point.
28826
28827          In this case, you can use a special form of the
28828          COLUMN LIMITS command that was introduced with the
28829          January, 2004 version.  Normally, the first and last columns
28830          to read are specified.  However, you can now enter variables for
28831          the lower and upper limits as in the following example:
28832
28833             LET LOWER = DATA  1  21   41
28834             LET UPPER = DATA 10  30   50
28835             COLUMN LIMITS LOWER UPPER
28836
28837          That is, if variables rather than parameters are specified,
28838          separate column limits are specified for each data field.
28839          In this case, the first data field is between columns
28840          1 and 10, the second field is between columns 21 and 30, and
28841          the third field is between 41 and 50.
28842
28843          When this syntax is used, only one variable is read for
28844          each specified field.  If the field is blank, then this is
28845          interpreted as a missing value.
28846
28847
28848    READING VARIABLES OF UNEQUAL LENGTH
28849
28850    Dataplot normally expects all variables to be of equal length.
28851    If some variables have missing rows, this can have undesired
28852    results.  Dataplot will assign the first value read to the
28853    first variable name, the second value to second variable and
28854    so on.  If fewer values than variables are specified, then variables
28855    that have no data values are not read at all (even if they have
28856    values for other rows).
28857
28858    If you have a data file where the columns have unequal lengths,
28859    you can do one of the following things.
28860
28861       1. Pick some value to represent a missing value and fill
28862          in missing data points with that value.  After reading
28863          the data, you can use a RETAIN command to remove them.
28864          For example, if you use -99 to signify a missing value,
28865          you can enter
28866
28867              RETAIN Y SUBSET Y > -99
28868
28869          Alternatively, you can use a SUBSET clause on subsequent
28870          plot and analysis commands.
28871
28872       2. Use the variable form of the COLUMN LIMITS command as
28873          described above.  By default, when a blank field is
28874          encountered, it is set to zero.  You can specify the
28875          value to use by entering the command
28876
28877            SET READ MISSING VALUE  <value>
28878
28879          This option depends on having consistent columns for
28880          each of the data fields.
28881
28882       3. If your data has both columns of unequal length and
28883          inconsistent columns for given data fields, an alternative
28884          is to use a comma delimited data file.  That is, separate
28885          data values with a comma.  If there is no data data between
28886          successive commas, this is treated as a missing value.  The
28887          default is to assign a value of zero.  Alternatively, you
28888          can use the SET READ MISSING VALUE command described above.
28889
28890          You can specify a delimiter other than a comma with the
28891          command
28892
28893              SET READ DELIMITER <character>
28894
28895          The variable form of the COLUMN LIMITS, the
28896          SET READ MISSING VALUE, and the SET READ DELIMITER commands
28897          were introduced in the January, 2004 version.  The
28898          interpretation of successive commas as a missing value was
28899          also introduced in the January, 2004 version.
28900
28901
28902    READING DATA WITH CHARACTER FIELDS
28903
28904    Dataplot has not previously supported character data.  The one
28905    execption is that you could read row labels with the READ ROW LABEL
28906    command (enter HELP READ ROW LABEL for details).  If encountered,
28907    Dataplot would generate an error message and not read the data file
28908    correctly.
28909
28910    With the January 2004 version, we have introduced some limited
28911    support for character data.  Specifically, we have added the command
28912
28913         SET CONVERT CHARACTER <ON/CATEGORICAL/IGNORE/ERROR>
28914
28915    Setting this to ERROR will continue the current Dataplot action of
28916    reporting character data as an error.  This is recommended for the
28917    case when a file is suppossed to contain only numeric data and the
28918    presence of character data is in fact indicative of an error in the
28919    data file.
28920
28921    Setting this to IGNORE will instruct Dataplot to simply ignore any
28922    fields containing character data.  This can be useful if you simply
28923    want to extract the numeric data fields in the file without
28924    entering COLUMN LIMITS or SET READ FORMAT commands.
28925
28926    Setting this to ON will read character fields and write them to the
28927    file "dpzchf.dat".  Note that Dataplot saves numeric data
28928    "in memory" for fast access.  Since character data has limited
28929    use in Dataplot, we have decided to save character data
28930    externally to minimize memory requirements.  Dataplot keeps a
28931    separate name table for the character data fields (the names for
28932    character variables are stored in the file "dpzchf.dat").
28933
28934    Setting this to CATEGORICAL is similar to ON.  However, CATEGORICAL
28935    will additionally create a coded numeric variable in addtion to
28936    the character variable.  The numeric variable is useful for computing
28937    purposes while the character variable is used for labeling purposes.
28938
28939    There are some restrictions on when Dataplot will try to
28940    read character data:
28941
28942       1) This only applies to the variable read case.  That
28943          is, READ PARAMETER and READ MATRIX will ignore
28944          character fields or treat them as an error.
28945
28946       2) Dataplot will only try to read character data from
28947          a file.  When reading from the keyboard (i.e., when
28948          READ is specified with no file name), character data
28949          will be ignored when a SET CONVERT CHARACTER ON is
28950          specified.
28951
28952          Note: The 2020/01 version of Dataplot has removed this
28953                restriction.  You can now read character data from
28954                the terminal.
28955
28956       3) This capability is not supported for the SERIAL READ
28957          case.
28958
28959       4) The SET READ FORMAT command does not accept the
28960          "A" format specification for reading character
28961          fields.
28962
28963       5) A maximum of 20 character variables will be saved.
28964
28965       6) A maximum of 24 characters for each character variable
28966          will be saved.
28967
28968       7) The character variables from at most one data file
28969          will be saved in a given session.
28970
28971    Some of these restrictions may be addressed in subsequent
28972    releases of Dataplot.
28973
28974    Currently, Dataplot has limited support for character variables.
28975    Specifically,
28976
28977       1) The row label can be used for the plot character by
28978          entering the command
28979
28980            CHARACTER ROWLABEL
28981
28982       2) You can convert a character variable to a coded numeric
28983          variable with the command
28984
28985            LET Y = CHARACTER CODE IX
28986            LET Y = ALPHABETIC CHARACTER CODE IX
28987
28988          with IX denoting the name of the character variable.  These
28989          command assigns a numeric value for each unique name in
28990          the character variable.
28991
28992          For the CHARACTER CODE case, the coding is from 1 to K where
28993          K is the number of unique values.  The order is based on
28994          the order these values are found in the file.
28995
28996          For the ALPHABETIC CHARACTER CODE case, the coding is from
28997          1 to K where K is the number of unique values.  The order is
28998          performed in alpabetical order.
28999
29000    We anticipate additional use of character variables in subsequent
29001    releases of Dataplot.
29002
29003    If your character fields contain non-numeric/non-alphabetic characters,
29004    then it is recommended that the character fields be enclosed in
29005    quotes.  When Dataplot encounters a quote (either a single or double
29006    quote), it interprets everything until a matching quote is found
29007    as part of that character field.  If the quotes are not used,
29008    then spaces, tabs, parenthesis, brackets, colons, and semi-colons
29009    are interpreted as delimiters that signify the end of that data item.
29010
29011
29012    READING ROW ORIENTED DATA
29013
29014    Dataplot assumes a column oriented format.  That is, a row of
29015    data represents a single record (or case) and a column of data
29016    represents a variable.  If a data file has a row orientation, then
29017    this is reversed.  A row of data represents a variable and a column
29018    of data represents a record (or case).
29019
29020    The following example shows one way of correctly reading the data
29021    into Dataplot.  Suppose that your data file contains five rows with
29022    each row corresponding to a single variable.  You can do the following:
29023
29024       LOOP FOR K = 1 1 5
29025          ROW LIMITS K K
29026          SERIAL READ FILE.DAT  X^K
29027       END OF LOOP
29028
29029    Note: The 2018/10 version of Dataplot added a "READ ROW" command that
29030          will read each row into a separate Dataplot variable.
29031
29032
29033    COMMENT LINES IN DATA FILES
29034
29035    It is sometimes convenient to include comments in data files.
29036    If these comments are contained at the beginning of the file, then
29037    the SKIP command can be used.  To have Dataplot check for comment
29038    lines in the data file, enter the command
29039
29040        COMMENT CHECK ON
29041
29042    The default comment character is a ".".  That is, any line starting
29043    with a ". " is treted as a comment line and ignored.  To specify
29044    a different comment character, enter the command
29045
29046        COMMENT CHARACTER  <char>
29047
29048    with <char> denoting the desired comment character.
29049
29050
29051    EXCEL FILES
29052
29053    At the current time (1/2004), Dataplot does not support the
29054    direct reading of Excel data files.  We are planning to add
29055    this capability in a future release of Dataplot.  Until that
29056    time, you need to save the data in Excel to an ASCII file and
29057    read that ASCII file into Dataplot.
29058
29059    Excel provides the following options for writing ASCII data
29060    files:
29061
29062      1. Formatted text (space delimited) (.PRN extension)
29063
29064         This format will use consistent columns for the data fields.
29065         The variable form of the COLUMN LIMITS command can be used
29066         when the data columns have unequal length.
29067
29068         Character fields will often not have the separating space.  The
29069         variable form of the COLUMN LIMITS command can be used in this
29070         case as well.
29071
29072      2. CSV (Comma delimited) (.CSV extension)
29073
29074         This format will separate data fields with a single comma.
29075         Missing data is represented with successive commas.  Dataplot
29076         can now (as of the January 2004 version) handle this correctly.
29077
29078      3. Text (Tab delimited) (.TXT extension)
29079         Text (MS-DOS) (.TXT extension)
29080
29081         These files will separate data fields with a tab character.
29082         Note that Dataplot converts all non-printing characters
29083         (including tabs) to a single space character.
29084
29085         This format is not appropriate for data containing variables
29086         with unequal lengths since it will not generate consistent
29087         columns for the data fields.  Use either the space delimited
29088         or comma delimited file for that case.
29089
29090      Other spreadsheets will typically have similar options.  However, the
29091      details may vary depending on the specific spreadsheet program.
29092
29093      Note that directly exporting the Excel data to an ASCII file tends
29094      to work well when the data sheet is "clean".  That, is you basically
29095      have a single rectangular set of data cells.  If your spreadsheet
29096      contains graphs or multiple rectangular areas of data, then the
29097      generated ASCII file will tend to be difficult to work with.  In
29098      this case, it is recommended that you either copy the relevant data
29099      to a clean sheet or paste it into an ASCII editor and save the file
29100      from there.
29101
29102      The next section discusses cut and paste within Dataplot.  In many
29103      cases, this may provide the simplest way to retrieve data from a
29104      spreadsheet.
29105
29106      Note: The 2020/02 version of Dataplot added the READ EXCEL command
29107            to read Excel files using a Python script.  Enter
29108            HELP READ EXCEL for details.
29109
29110    CUT AND PASTE
29111
29112    In some contexts, it may be desirable to simply cut and paste relevant
29113    data into Dataplot.  For example, this can provide an alternative way
29114    to import data from spreadsheets and other statistical software.
29115
29116    How well cut and paste works is dependent on the operating system and
29117    the compiler used to build Dataplot.  If you do this, we recommend
29118    limiting it to the case of numeric data.
29119
29120    Some specific cases are
29121
29122        1. Linux systems with the gfortran compiler
29123
29124           As an example, suppose that the system clipboard contains three
29125           columns of data.  You can then do something like
29126
29127               READ  Y X1 X2
29128                   <paste the contents of the clipboard>
29129               END OF DATA
29130
29131           That is, you do a terminal read, paste your data, and then
29132           enter an END OF DATA command to terminate the READ.
29133
29134        2. Windows systems with the Intel compiler
29135
29136           For earlier versions of the compiler, the operations described
29137           for Linux/gfortran worked for this environment as well.  However,
29138           for the version of the compiler currently being used, this is
29139           no longer working.  Some testing has shown that it works for one
29140           or two lines, but Dataplot crashes for more than that.  We are
29141           investigating this to see if we can get it working again.
29142
29143           Note: The 2014/12 version of Dataplot added numerous commands
29144                 for reading from (and writing to) the clipboard.  The
29145                 initial implementation is for the Windows environments,
29146                 although this should be extended to Linux and Mac OS X
29147                 platforms in subsequent releases.  Enter HELP CLIPBOARD
29148                 for details.  In many cases, using the READ CLIPBOARD
29149                 capability may be the easiest method for reading
29150                 spreadsheet data into Dataplot.
29151
29152        3. Tcl/Tk GUI
29153
29154           The spreadsheet in the Dataplot Tcl/Tk GUI does not accept
29155           paste operations in the data spreadsheet.
29156
29157    COMMA AS DECIMAL POINT
29158
29159    Dataplot follows the United States convention where the decimal
29160    point is the period ".".  Some locales may use a different
29161    character to denote the decimal point.  In particular, some
29162    countries use the comma ",".
29163
29164    To allow Dataplot to read files that use a character other than
29165    the "." for the decimal point, enter the command
29166
29167         SET DECIMAL POINT <value>
29168
29169    where <value> denotes the character that specifies the decimal point.
29170
29171    Note this support is fairly limited.  Specifically, it applies
29172    to free-format reads (i.e., no SET READ FORMAT command has been
29173    entered).  In addition,
29174
29175       1. This option is not supported for the WRITE command.  WRITE
29176          will always use a period for the decimal point.
29177
29178       2. Dataplot alphanumeric output (e.g., the output from the FIT
29179          command) is generated with the period as the decimal point.
29180
29181       3. As mentioned above, if you read your data with a
29182          SET READ FORMAT command, the data must use the period
29183          for the decimal point.
29184
29185    MISSING VALUES AND UNDEFINED NUMBERS
29186
29187    Some software programs will have special characters to denote
29188    missing values or undefined values (e.g., the result of trying
29189    to divide by 0).
29190
29191    In particular, Unix/Linux software often uses "nan" to denote an
29192    undefined number.  If Dataplot encounters an "nan" in a numeric
29193    field, it will convert it to the Dataplot "missing value".  The "nan"
29194    search is not case sensitive (i.e., it will check for "NAN", "NaN",
29195    etc.).  You can specify what Dataplot will use for the missing value
29196    by entering the command
29197
29198        SET READ MISSING VALUE  <value>
29199
29200    where <value> is a numeric value.
29201
29202    Missing value flags are specific to individual programs.  You can
29203    specify a character string that denotes a missing value with the
29204    command
29205
29206        SET DATA MISSING VALUE <value>
29207
29208    where <value> is a string with 1 to 4 characters.  If Dataplot
29209    encounters <value> in a numeric field, it will convert it to the
29210    Dataplot "missing value".  The missing value string is not case
29211    sensitive.  You can specify what Dataplot will use for the missing
29212    value by entering the command
29213
29214        SET READ MISSING VALUE  <value>
29215
29216    where <value> is a numeric value.
29217
29218    The above discussion was for missing numeric data.  If you have
29219    missing data for a character field, you can specify the string
29220    that will denoted missing data by entering the command
29221
29222        SET READ CHARACTER MISSING VALUE <string>
29223
29224    The default string is ZZZZNULL.
29225
29226    READING DATE AND TIME FIELDS
29227
29228    Date and time fields will typically have syntax like
29229
29230       2016/06/22
29231       12:43:08
29232
29233    Dataplot treats the "/" and ":" as indicating character fields
29234    (based on the SET CHARACTER CONVERT command, this will either cause
29235    an error, result in this field being ignored, or the field being
29236    read as a character variable).
29237
29238    The following commands were added (2016/06) to help deal with date and
29239    time fields.
29240
29241       SET DATE DELIMITER <character>
29242       SET TIME DELIMITER <character>
29243
29244    Although Dataplot does not have explicit date or time variables,
29245    these commands allow the components of date and time fields to
29246    be read as separate numeric variables.  For example,
29247
29248       SET DATE DELIMITER /
29249       SET TIME DELIMITER :
29250       READ YEAR MONTH DAY HOUR MIN SEC
29251       2016/06/22  23:19:03
29252       END OF DATA
29253
29254    READING IP ADDRESSES
29255
29256    IP addresses typically have a syntax like
29257
29258       129.6.37.209
29259
29260    By default, Dataplot will generate an error when trying to read a
29261    field of this type.  To address this, you can enter the command
29262
29263       SET READ IP ADDRESSES ON
29264
29265    If this switch is ON, Dataplot will scan the line and if a field is
29266    encountered that conains more than one period ".", Dataplot will
29267    convert these periods to spaces before parsing the line.
29268
29269    The default is OFF since this adds additional processing time to
29270    the READ and most data sets do not contain IP addresses.
29271
29272    READING MONETARY DATA
29273
29274    Monetary data may sometimes be given as
29275
29276       $11,456.12  $1,021,111.10
29277
29278    The "$" and "," in these numeric fields will cause problems.  The
29279    "$" will be treated as a non-numeric value (depending on other
29280    SET commands, this will be treated as an error or the numeric field
29281    will be read as a character field).  The comma is typically treated
29282    as a field delimiter.  If you have this kind of data, enter the
29283    commands
29284
29285        set read dollar sign ignore on
29286        set read comma ignore on
29287
29288    To reset the defaults, enter
29289
29290        set read dollar sign ignore off
29291        set read comma ignore off
29292
29293    Note that if you enter the SET READ COMMA IGNORE ON command, the
29294    comma will no longer be treated as the delimiter.  Dataplot cannot
29295    currently handle the case where the comma is used both for monetary
29296    data and also as a field delimiter.
29297
29298    READING NUMERIC VALUES WITH TRAILING "+" OR "-" OR "*" OR "%"
29299
29300    On occassion, numeric fields may have a trailing "+", a trailing
29301    "-", a trailing "*" or a trailing "%".
29302
29303    The "+" is typically used to indicate that the value is greater
29304    than or equal to the entered value.  Likewise, the "-" is used to
29305    indicate that the value is less than or equal to the entered value.
29306    This may be used when data is truncated at a high or low value.  If
29307    you have data that uses this convention, enter
29308
29309        set read trailing plus minus ignore on
29310
29311    Dataplot does not have any convention for indicating that a number
29312    in fact means "greater than" or "less than", so it will read the
29313    numeric value and simply ignore the "+" or "-".
29314
29315    To reset the defualt, enter
29316
29317        set read trailing plus minus ignore off
29318
29319    Trailing asterisks ("*") are sometimes used to indicate statistical
29320    significance.  To ignore these asterisks, enter
29321
29322        set read asterisk ignore on
29323
29324    If this command is not given, the field will be treated as a
29325    character field.  To reset the default, enter
29326
29327        set read asterisk ignore off
29328
29329    Percentage data will sometimes include a trailing percent sign
29330    ("%").  To ignore the percent sign, enter
29331
29332        set read percent sign ignore on
29333
29334    If this command is not given, the field will be treated as a
29335    character field.  To reset the default, enter
29336
29337        set read percent sign ignore off
29338
29339    COMMAS WITHIN CHARACTER FIELDS
29340
29341    If you are reading data that may contain character fields, you can
29342    specify whether you want commas in the character fields to be
29343    treated as part of the character field or as a delimiter.
29344
29345    To have the comma treated as a delimiter, enter
29346
29347        set character field comma delimiter on
29348
29349    To have the comma not be interpreted as a delimiter (i.e., it
29350    will simply be another character in the character field), enter
29351
29352        set character field comma delimiter off
29353
29354    The default is OFF.
29355
29356    READING BINARY DATA
29357
29358    Currently, the only types of binary data that Dataplot currently
29359    supports are:
29360
29361      1) A few types of image files can be read on some platforms.
29362         This is discussed in the next section.
29363
29364      2) Dataplot may be able to read some files created using Fortran
29365         unformatted data files.  Dataplot is most likely to have success
29366         reading unformatted Fortran files that contain only numeric data
29367         and use a consistent record structure.  Unformatted Fortran
29368         files that contain a mixture of character and numeric data
29369         will not be read successfully.
29370
29371    Support for other types of binary files may be added in future
29372    releases.  However, this support will probably be for specific
29373    types of binary files as oppossed to arbitrary binary files.
29374
29375    The advantage of using unformatted Fortran files is that file sizes
29376    may be significantly smaller and reading the data can be significantly
29377    faster.  One potential use of unformatted Fortran files is to save
29378    a large data file that you will read many times in Dataplot.
29379
29380    The disadvantages of using unformatted Fortran files are that they
29381    are not human readable, they cannot be edited or modified using an
29382    ASCII editor, and, most importantly, they are not portable between
29383    operating systems and compilers.  That is, unformatted Fortran files
29384    typically need to be read using the same operating system and compiler
29385    that was used to create them.
29386
29387    For details on using unformatted Fortran files, enter
29388
29389         HELP SET READ FORMAT
29390
29391    READING IMAGE DATA
29392
29393    If Dataplot was built with support for the GD library, Dataplot
29394    can read image data in PNG, JPEG, or GIF format.  If you have
29395    image data in another format, you may be able to use an image
29396    conversion program (e.g., NetPBM or ImageMagick) to convert it
29397    to one of the supported formats.
29398
29399    For further information, enter
29400
29401        HELP READ IMAGE
29402
29403    WHAT IF ALL THE DATA WILL NOT FIT INTO MEMORY?
29404
29405    Dataplot was designed primarily for interactive usage.  For this reason,
29406    it reads all data into memory.  The current default is to have a
29407    workspace that accomodates 10 columns with 1,500,000 rows (you can
29408    re-dimension to obtain more columns at the expense of fewer rows, however
29409    you cannot increase the maximum number of rows).
29410
29411    With the advent of "big data", there are more data files that cannot be
29412    read into Dataplot's available memory.  For these data files, there are
29413    several things that can potentially be done
29414
29415       1. For some platforms, if you have a large amount of memory you may
29416          be able to build a version of Dataplot that raises the maximum
29417          number of rows.  For example, on a Linux system with 64MB of RAM,
29418          we were able to build a version that supports a maximum of
29419          10,000,000 rows.  Contact Alan Heckert if you need assistance
29420          with this.
29421
29422       2. The STREAM READ command was added.  This command uses one pass
29423          algorithms to do a number of things.
29424
29425          a. You can create a new file that uses SET WRITE FORMAT.  This
29426             is typically done once so that you can use SET READ FORMAT on
29427             subsequent reading of the data file (this can substantially
29428             speed up processing of these large files).
29429
29430          b. You can generate various summary statistics either for the full
29431             data set or for groups in the data.
29432
29433          c. You can generate cross tabulation statistics (up to 4
29434             cross tabulation variables may be specified).
29435
29436          d. You can create various types of distance (e.g., Euclidean
29437             distances, correlation distances) matrices either for the full
29438             data set or for cross tabulations of the data.
29439
29440             Distance matrices are often used for various types of
29441             multivariate analysis.
29442
29443          e. You can generate approximate percentiles either for the full
29444             data set or for cross tabulations of the data.  Based on this,
29445             you can perform distributional modeling for a single variable
29446             or distributional comparisons between variables (e.g.,
29447             quantile quantile plots, bihistograms, two sample KS tests, and
29448             so on).
29449
29450          The STREAM READ command allows you to do a fair bit of exploratory
29451          analyses on these large data sets even though the full data set is
29452          not read into memory.
29453
29454Syntax 1:
29455    READ  <x1>   <x2>   ... <xk>
29456    where <x1>, <x2>, ... <xk> are the desired names for the variables
29457                 into which the data are read.
29458
29459    This syntax is used to read from the terminal or from within a
29460    macro file.  All lines are read until an END OF DATA is
29461    encountered.
29462
29463Syntax 2:
29464    READ   <file>   <x1>   <x2>   <x3>   etc.
29465    where <file> is the name of the mass storage file where the data
29466             resides;
29467    and   <x1>, <x2>, ... <xk> are the desired names for the variables
29468                 into which the data in <file> are read.
29469
29470    This syntax is used to read from a file.  All lines are read until
29471    an END OF DATA or the physical end of file is encountered.
29472
29473Examples:
29474    READ CALIB. PRES TEMP TIME
29475    READ ASTM.DAT Y1 Y2 Y3 X DAY LAB
29476    READ Y1 Y2 Y3 X DAY LAB
29477
29478Note:
29479    By default, Dataplot does free format reads.  However, it has the
29480    capability for supporting Fortran style formats.  Formatted reads
29481    can be about 10 times faster on many systems which can be helpful
29482    for large data files.  Enter HELP READ FORMAT for more details.
29483
29484    Note that Fortran formats are based on the decimal point lining up
29485    consistenly between rows.  Spreadsheet programs such as Excel tend to
29486    generate either right justified or left justified columns when
29487    generating fixed width ASCII files.  These are typically not
29488    consistent with Fortran formatted reads.
29489
29490Note:
29491    Blank lines in data files are ignored.
29492
29493Note:
29494    In order to determine whether the first argument is a file name or
29495    a variable name, it looks for a period in the name.  If it finds
29496    one, it assumes a file name.  If it does not, it assumes a variable
29497    name.  If your file name does not contain a period, attach a
29498    trailing period (no spaces) to the file name on the READ command.
29499
29500Note:
29501    Dataplot does not assume specific extensions for file names.  Although
29502    using conventions (e.g., ".DAT" or ".TXT" for data files, ".DP" for
29503    Dataplot macros) can be helpful for distinguishing between types of
29504    files, this is more for the analysts convenience.  Dataplot itself
29505    does not enforce any conventions.
29506
29507    File names have the following restrictions:
29508
29509        1. The file name should be a valid file name for the local
29510           operating system.
29511
29512        2. The file name should contain a period "." in the file name
29513           itself or as a trailing character.  Dataplot strips off trailing
29514           periods on those systems where it is appropriate to do so.  On
29515           systems where trailing periods can be a valid file name (e.g.,
29516           Unix), Dataplot tries to open the file with the trailing period.
29517           If this fails, it then tries to open the file with the trailing
29518           period stripped off.
29519
29520        3. If the file name contains spaces or hyphens, then it needs to be
29521           enclosed in quotes.
29522
29523        4. File names are currently limited to 80 characters.  This can
29524           in particular be a problem if the file name is contained within
29525           a long path name.  The following can be helpful in these cases.
29526
29527           a. You can use the CD command to make the path where the file
29528              is stored the current directory.  This is most useful for
29529              data files.  For example,
29530
29531                  pwd
29532                  cd  <path where data file resided>
29533                  read  file.dat ...
29534                  cd ^CURDIR
29535
29536              The pwd command is used to save the current directory.  The
29537              cd command is then used to set the current directory to the
29538              path where the data resides, the read is performed, and then
29539              the cd command is used to restore the original working
29540              directory (the cd command saves the current path in the
29541              string CURDIR).
29542
29543           b. You can use the SEARCH DIRECTORY command to specify an
29544              additional directory to search for file names.
29545
29546Note:
29547    File names are case sensitive on Unix/Linux/Mac OS X systems.  For these
29548    systems, Dataplot attempts to open the file as given.  If this fails, it
29549    attempts to open the file as all upper case characters.  If this fails, it
29550    attempts to open the file as all lower case characters.
29551
29552    As a further caution for Unix/Linux hosts, certain expansion characters
29553    (specifically ~ to refer to your home directory) are interpreted
29554    by the shell and are not recognized by the Fortran compiler.  These
29555    expansion characters are interpreted as literal characters and do
29556    not yield the intended file name.
29557
29558Note:
29559    In general, Dataplot does not read binary data.  However, it can
29560    read and write binary data using Fortran unformatted I/O.  Note that
29561    although the Fortran standard includes unformatted I/O, the
29562    implementation details are left to the individual compiler.  This
29563    means that Fortran unformatted files are not portable across systems
29564    and compilers.
29565
29566    The primary use for this option is if you have a large data file that
29567    you will be accessing frequently. In this case, it can speed up the
29568    I/O to save a binary version of the file (you should keep the original
29569    ASCII version).
29570
29571    For details, enter HELP SET READ FORMAT.
29572
29573Note:
29574    Many data sets are now collected as images.  On some implementations,
29575    Dataplot can use the GD library to read image data into numeric arrays.
29576
29577    Although the GD library supports a limited number of image formats,
29578    open source software packages such as Image Magick and Netpbm can be
29579    used to convert a large number of image formats to ones supported by
29580    the GD library.
29581
29582    For details, enter HELP READ IMAGE.
29583
29584Note:
29585    There are variants of this command for reading matrices, parameters,
29586    and strings/functions.  See the Related Commands section below.
29587
29588Note:
29589    After a READ command, Dataplot creates the following parameters:
29590
29591        ISKIP  - the number of header lines skipped
29592        NUMLRD - the number of data lines read
29593        NUMVRD - the number of variables read
29594
29595    In addition, the variable names read are saved in the strings
29596    ZZZV1, ZZZV2, ZZZV3, and so on.  These parameters and strings are
29597    updated each time a READ is performed.
29598
29599    This capability was added 2014/12.
29600
29601Default:
29602    1) If no file name is specified and a CALL is being executed, then
29603       the data values should be listed directly in the DATAPLOT
29604       sub-program immediately after the READ command (do not forget
29605       the END OF DATA statement).
29606
29607    2) If no file name is specified and the commands are being manually
29608       entered/executed one at a time from the terminal, then the data
29609       should be entered directly from the terminal immediately after
29610       the READ command (also terminated by an END OF DATA statement).
29611
29612Synonyms:
29613    None
29614
29615Related Commands:
29616    READ FUNCTION          = Read a function.
29617    READ MATRIX            = Read a matrix.
29618    READ PARAMETER         = Read a parameter.
29619    READ STRING            = Read a string.
29620    READ IMAGE             = Read an image format into numeric arrays.
29621    READ STACKED VARIABLE  = Read a list of variables into a single
29622                             response variable and a group-id variable.
29623    SERIAL READ            = Perform a serial read.
29624    SET READ FORMAT        = Define a FORTRAN style format for reads.
29625    DATA (LET)             = Enter data values into a variable.
29626    CLIPBOARD              = Various commands for reading from the
29627                             system clipboard.
29628
29629Applications:
29630    Data Input
29631
29632Implementation Date:
29633    Pre-1987
29634    1988/02 Ignore column limits when reading from the terminal
29635    1990/05 Check for comment character in data files
29636    1995/04 Support for unformatted read
29637    1996/04 Ignore SET READ FORMAT for READ STRING
29638    1997/10 Support for SKIP AUTOMATIC
29639    1998/11 Support for more than 100 variable names
29640    1999/12 Support for READ ROWID
29641    2002/07 Support for quotes on file name
29642    2003/02 Maximum number of characters per record user settable
29643    2004/01 Support for reading variable names from file
29644    2004/01 Support for reading character data
29645    2004/11 PACK/DISPERSE options for READ with SUBSET
29646    2014/11 Support for reading from system clipboard
29647    2014/12 Create several automatic parameters/strings for READ
29648    2016/06 Support for SET DATE DELIMITER
29649    2016/06 Support for SET TIME DELIMITER
29650    2016/06 Support for SET READ IP ADDRESSES
29651    2019/03 Support for SET READ ASTERISK IGNORE
29652    2019/12 Support for SET READ PERCENT SIGN IGNORE
29653    Numerous bug fixes over the years
29654
29655Program 1:
29656    SKIP 25
29657    READ BERGER1.DAT Y X BATCH
29658
29659Program 2:
29660    READ X Y
29661    1  1
29662    2  4
29663    3  9
29664    4 16
29665    5 25
29666    END OF DATA
29667    PRINT X Y
29668
29669-----READ DECIMAL POINT (SET)----------------------------------------
29670
29671READ DECIMAL POINT (SET)
29672
29673Name:
29674    READ DECIMAL POINT (SET)
29675
29676Type:
29677    Subcommand under SET
29678
29679Purpose:
29680    Specifies the character to be interpreted as the decimal
29681    point when reading data.
29682
29683Description:
29684    Dataplot follows the United States convention where the
29685    decimal point is the period ".".  Some locales may use a
29686    different character to denote the decimal point.  In
29687    particular, some countries use the comma ",".
29688
29689    In order to make it easier for Dataplot to read files which
29690    use a different convention for the decimal point, this command
29691    allows you to specify a different character, such as the comma,
29692    to denote the decimal point.
29693
29694    Note this support is fairly limited.  Specifically, it only
29695    applies to free-format reads.
29696
29697       1. This option is not supported for the WRITE command.  The
29698          WRITE command will always use a period for the decimal
29699          point.
29700
29701       2. Dataplot alphanumeric output (e.g., the output from the
29702          FIT command) is generated with the period as the decimal
29703          point.
29704
29705       3. If you read your data with a SET READ FORMAT command, the
29706          data must use the period for the decimal point.
29707
29708Syntax:
29709    SET READ DECIMAL POINT   <value>
29710    where <value> denotes the character to interpret as the decimal
29711               point.
29712
29713Examples:
29714    SET READ DECIMAL POINT ,
29715    SET READ DECIMAL POINT .
29716
29717Default:
29718    The period "." is the default decimal point character.
29719
29720Synonyms:
29721    None
29722
29723Related Commands:
29724    READ             = Carries out a column-wise input of data.
29725    ASCII FILES      = Provides guidance on reading ASCII files.
29726
29727Applications:
29728    Input/Output
29729
29730Implementation Date:
29731    2005/5
29732
29733Program:
29734    SET READ DECIMAL ,
29735    READ FILE.DAT  Y X
29736
29737-----READ DELIMITER (SET)----------------------------------------
29738
29739READ DELIMITER (SET)
29740
29741Name:
29742    READ DELIMITER (SET)
29743
29744Type:
29745    Subcommand under SET
29746
29747Purpose:
29748    Specifies the character that is used as the delimiter to
29749    separate data fields in an ASCII data file.
29750
29751Description:
29752    If Excel writes a comma delimited ASCII file (.CSV), then
29753    missing values are denoted with ",,".  In order to interpert
29754    these files correctly, you can enter the command
29755
29756       SET READ DELIMITER  <value>
29757
29758    where <value> specifies the desired delimiter.  The default
29759    delimiter is a comma.
29760
29761    If Dataplot encounters the delimiter before any valid data
29762    has been found, it interprets this as a missing value.
29763
29764    By default, missing values are set to 0.  If you would like
29765    to specify a different value to use for missing values, enter
29766    the command
29767
29768        SET READ MISSING VALUE  <value>
29769
29770Syntax:
29771    SET READ DELIMITER   <value>
29772    where <value> denotes the value to use as the delimiter.
29773
29774Examples:
29775    SET READ DELIMITER :
29776    SET READ DELIMITER ,
29777    SET READ DELIMITER %
29778
29779Default:
29780    Comma
29781
29782Synonyms:
29783    None
29784
29785Related Commands:
29786    READ                = Carries out a column-wise input of data.
29787    READ MISSING VALUE  = Specify the value to use for missing data.
29788
29789Applications:
29790    Input/Output
29791
29792Implementation Date:
29793    2004/1
29794
29795Program:
29796    SET READ DELIMITER  ,
29797    SET MISSING VALUE -99
29798    READ DUMMY.CSV  Y X
29799    PLOT Y X   SUBSET Y > -99 SUBSET X > -99
29800
29801-----READ EXCEL-------------------------------------------------
29802
29803READ EXCEL
29804
29805Name:
29806    READ EXCEL
29807
29808Type:
29809    Support Command
29810
29811Purpose:
29812    Read variables (vectors) from an Excel file.
29813
29814Description:
29815    Spreadsheet programs are a popular method for saving data.  Most
29816    spreadsheet programs support the Microsoft Excel file format.
29817
29818    Dataplot does not natively support reading or writing to Excel format
29819    files.  The READ EXCEL command works as follows
29820
29821        1. Dataplot writes the name of the Excel file to line 1
29822           of the file "dpst5f.dat".  It writes the name of the
29823           Excel sheet to line 2 of "dpst5f.dat".  The default
29824           sheet name is "Sheet1".  To change the sheet name, enter
29825           the command
29826
29827               SET EXCEL SHEET <sheet-name>
29828
29829        2. Dataplot then invokes a Python script to read the variables
29830           from the specified Excel file and then writes the variables
29831           to the file "dpst1f.dat".
29832
29833           The Python script, "read_excel.py", is located in the
29834           "scripts" subdirectory of the Dataplot auxiliary directory.
29835           This script uses the Pandas function "dataframe.read_excel"
29836           to read the data from the Excel file.  It then uses the
29837           Pandas function "pandas.to_csv" to write the variables as
29838           a comma separated file (CSV) to the file "dpst1f.dat".
29839
29840        3. Dataplot reads the contents of the variables from the
29841           file "dpst1f.dat".
29842
29843    This command assumes that Python and the Python package Pandas
29844    are already installed on your local platform.  Dataplot does not
29845    check if Python is installed and it does not initiate the
29846    Python installation if it is not already installed.
29847
29848    As Python is used by many popular applications on Linux platforms,
29849    most Linux platforms will already have Python installed.  However,
29850    this is not the case for Windows and MacOS platforms.
29851
29852    If you need to install Python, there are a number of Python
29853    distributions (see https://wiki.python.org/moin/PythonDistributions).
29854    However, the most common are ActivePython from ActiveState and
29855    Anaconda from Continuum Analytics.  Dataplot does not depend on a
29856    specific Python distribution and we make no recommendation for the
29857    preferred distribution.
29858
29859    This command will typically work well with Excel files that are
29860    clean rectangular data sets.  If you have added graphs, formulas,
29861    cross-tabulations, and so on to the Excel sheet, then the
29862    READ EXCEL command is likely to be unsatisfactory.  You can either
29863    copy the data portion of the spreadsheet to a new sheet or use
29864    one of the other methods for reading data from spreadsheets
29865    listed below.
29866
29867    If you infrequently need to read Excel files and do not already
29868    have Python installed on your local platform, there are several
29869    additional methods for reading the data from Excel files.  However,
29870    if you anticipate the need for frequently reading Excel files, then
29871    going through the Python installation is probably worth the effort.
29872
29873    In addition to READ EXCEL, the following methods can also be used
29874    to read data from Excel files.
29875
29876         1. Spreadsheets typically support writing data to ASCII files.
29877            For example, Excel can write formatted text (space delimited)
29878            (.PRN extension), comma delimited files (.CSV extension), or
29879            tab delimited files (.TXT extension).  Enter HELP READ for
29880            details of this.
29881
29882            As with READ EXCEL, this option works best with clean
29883            rectangular data sets.  If you do not have a clean Excel
29884            sheet, you will probably need to manually edit the ASCII
29885            file before trying to read it with Dataplot.  However, it is
29886            a viable alternative to READ EXCEL when you do not have Python
29887            installed on your platform and do not wish to install it.
29888
29889         2. You can also use Copy and Paste.  On Windows platforms,
29890            you can Copy the desired data to the clipboard and then use
29891            the READ CLIPBOARD command.  Alternatively, you can paste
29892            the data into an ASCII editor (e.g., Notepad or Wordpad on
29893            Windows, vi or Emacs on Linux), save the file and then use
29894            the Dataplot READ command.
29895
29896            This option is particularly useful when your spreadsheet is
29897            not a clean rectangular data set.
29898
29899Syntax:
29900    READ EXCEL <fname> <variable list>
29901               <SUBSET/EXCEPT/FOR qualification>
29902    where <fname> is the name of the Excel file;
29903          <variable list> is the list of variables to read;
29904    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
29905
29906Examples:
29907    READ EXCEL FILE.XLSX Y1 Y2 Y3 X
29908
29909Note:
29910    The Pandas pandas.to_csv function will typically add a row id
29911    variable to the ASCII file.
29912
29913Note:
29914    The python script will currently read the entire spreadsheet.
29915    Additional commands to specify columns and rows in the spreadsheet
29916    to read are under development but not yet available.
29917
29918    Also, Dataplot will not search for the Excel file in the
29919    Dataplot auxiliary files directories as it does for the
29920    READ for ASCII files.
29921
29922    Note: The 2020/05 version of Dataplot now supports specifying the
29923          first and last rows of the Excel file to read with the following
29924          commands
29925
29926              SET EXCEL START ROW <value>
29927              SET EXCEL STOP  ROW <value>
29928
29929          One use of this is to skip over header lines in the Excel file.
29930
29931Note:
29932    Excel (or some other spreadsheet program) does not need to be
29933    installed on your local platform.  For example, you can create
29934    the Excel file on a Windows platform and then move the Excel file
29935    to a Linux platform.
29936
29937Note:
29938    If Python is not installed on your default path, you can specify it
29939    using the SET PYTHON PATH command. For example, the following is for
29940    the Anaconda installation of Python 3 under Windows (where Anaconda
29941    is installed for the single user heckert)
29942
29943       set python path c:\Users\heckert\AppData\Local\Continum\anaconda3\
29944
29945    There are several different Python distributions. The appropriate
29946    Python path will depend on the specific distribution you used to
29947    install Python and whether you choose to install it for a single user
29948    or for all users.
29949
29950Note:
29951    On Windows platforms, the "read_excel.py" script will be copied to
29952    the current directory.
29953
29954Default:
29955    None
29956
29957Synonyms:
29958    None
29959
29960Related Commands:
29961    WRITE EXCEL = Write variables to an Excel file.
29962    PYTHON      = Run a user specified Python script from within Dataplot.
29963    READ        = Read variables, strings, parameters and matrices.
29964
29965Applications:
29966    Data Input
29967
29968Implementation Date:
29969    2020/02
29970
29971Program:
29972    dimension 40 columns
29973    . Path name for Windows
29974    . read excel "C:\Program Files (x86)\NIST\DATAPLOT\LIB\DATA\FIBERS.XLSX" ...
29975    .     rowid breakid xcent ycent xc1 yc1 xc2 yc2 xc3 yc3 xc4 yc4 length
29976    . Path name for Linux
29977    read excel /usr/local/lib/data/FIBERS.XLSX ...
29978         rowid breakid xcent ycent xc1 yc1 xc2 yc2 xc3 yc3 xc4 yc4 length
29979    set write decimals 3
29980    print breakid xcent length
29981
29982-----READ FORMAT (SET)-------------------------------------------
29983
29984READ FORMAT (SET)
29985
29986Name:
29987    READ FORMAT (SET)
29988
29989Type:
29990    Subcommand under SET
29991
29992Purpose:
29993    Sets the (optional) FORTRAN format for the READ and SERIAL READ
29994    commands.  Unformatted Fortran files are now also supported (see
29995    NOTE section below).
29996
29997Description:
29998    The default format for the READ and SERIAL READ command is
29999    free-format.  This allows the analyst to input data into DATAPLOT
30000    without having to worry about how the data is residing out on the
30001    file.  On the other hand, if the data happens to reside on the
30002    file in a structured format, and if the analyst knows what the
30003    format is, then the analyst can optionally specify to DATAPLOT
30004    this format information.  The advantage of this is speed since
30005    formatted READs and SERIAL READs are 10 to 15 times faster.  For
30006    small data sets (less than a few hundred lines), there is little
30007    to gain.  However, if your data file is large (say more than 500
30008    lines) and formatted, then the time for I/O can be drastically
30009    reduced by making use of such format information.  Any
30010    FORTRAN-like format must contain only F (floating-point), E
30011    (exponential), and X (blanks) specifications.  I (integer), D
30012    (double-precision), H (hollerith), etc.  specifications are not
30013    permitted.  The restriction against I format is no restriction at
30014    all.  Simply use the corresponding F format (e.g., I2 becomes
30015    F2.0, I8 becomes F8.0).
30016
30017Syntax:
30018    SET READ FORMAT   <s>
30019    where <s> is a FORTRAN format-like string.
30020
30021Examples:
30022    SET READ FORMAT 4F10.0
30023    SET READ FORMAT 5X,F6.0,F6.2,4X,2F5.0
30024    SET READ FORMAT 10X,3E12.4,5X,F10.0
30025    SET READ FORMAT DEFAULT
30026
30027    SET READ FORMAT 3F10.0
30028    READ CALIB.DAT X Y Z
30029
30030Note:
30031    Support was added for reading Fortran unformatted data files.
30032    This was done primarily for sites that have created "mega" size
30033    versions of DATAPLOT where the time entailed in reading large
30034    data files becomes important.  For standard size DATAPLOT
30035    (typically a maximum of 10,000 rows with 10 columns for 100,000
30036    data points total), the use of the SET READ FORMAT command
30037    provides adequate performance.  However, the unformatted read
30038    capability is available regardless of the workspace size.  The
30039    advantage of unformatted reads is that the data files are much
30040    smaller (typically by a factor of 10 or more) and reading the
30041    data is significantly faster (e.g., reading 10,000 rows of data is
30042    almost instantaneous).  The disadvantage is that unformatted
30043    files are binary, and thus cannot be modified or viewed with a
30044    standard text editor.  Also, Fortran unformatted files are NOT
30045    transportable across different computer systems.
30046
30047    An unformatted read is accomplished by entering the command:
30048
30049       SET READ FORMAT UNFORMATTED
30050
30051    and then entering a standard READ command.  For example,
30052
30053       READ LARGE.DAT X1 X2 X3
30054
30055    There are 2 ways to create the unformatted file in Fortran.  For
30056    example, suppose X and Y are to be written to an unformatted
30057    file.  The WRITE can be generated by:
30058
30059    a)    WRITE(IUNIT) (X(I),Y(I),I=1,N)
30060    b)    WRITE(IUNIT) X,Y
30061
30062    The distinction is that (a) stores the data as X(1), Y(1),
30063    X(2), Y(2), ..., X(N), Y(N) while (b) stores all of X then
30064    all of Y.  There is no inherent advantage in either method in
30065    terms of performance or file size.  The SET READ FORMAT
30066    UNFORMATTED command assumes (a).  To specify (b), enter the
30067    command:
30068
30069          SET READ FORMAT COLUMNWISE (or UNFORMATTEDCOLUMNWISE)
30070
30071    Unformatted reading is supported only for variables or matrices
30072    (i.e., not for parameters or strings).  Also, it only applies
30073    when reading from a file.  The limits for the maximum number of
30074    rows and columns for a matrix still apply (500 rows and 100
30075    columns on most systems).  When reading a matrix, the number of
30076    columns must be specified via the SET UNFORMATTED COLUMNS
30077    command.  For example,
30078
30079          SET READ FORMAT UNFORMATTED
30080          SET UNFORMATTED COLUMNS 25
30081          READ MATRIX.DAT M
30082
30083    The maximum size of the file that DATAPLOT can read is equal to
30084    the workspace size on your implementation (100,000 or 200,000
30085    points on most installations).  For larger files, it will read
30086    up to this number of data values.
30087
30088    The data is assumed to be a rectangular grid of data written in
30089    a single chunk.  Only single precision real numbers are
30090    supported.  By default, the entire file (up to the maximum number
30091    of points) is read.  DATAPLOT does provide 2 commands to allow
30092    some control of what portion of the file is read:
30093
30094          SET UNFORMATTED OFFSET <value>
30095          SET UNFORMATTED RECORDS <value>
30096
30097    The OFFSET specifies the number of data values at the begining of
30098    the file to skip.  This is useful for skipping header lines
30099    (similar to a SKIP command for reading ASCII files) and other
30100    miscellaneous values.  The RECORDS value is useful for reading
30101    part of a larger file.
30102
30103    Be aware that Fortran unformatted files are NOT transportable
30104    across systems.  This is due to the fact that the file contains
30105    various header bytes (the Fortran standard leaves implementation
30106    of this up to vendor) that are not standard.  Also, the storage
30107    of real numbers can vary between platforms.  This means that
30108    the SET READ FORMAT UNFORMATTED command can NOT be used to read
30109    raw binary files (as might be produced by a C program) and it
30110    cannot, in general, be used to read unformatted Fortran files
30111    created on systems other than the one you are running DATAPLOT on.
30112
30113Default:
30114    Free-format (i.e., no format).
30115
30116Synonyms:
30117    None
30118
30119Related Commands:
30120    READ        = Carries out a column-wise input of data.
30121    SERIAL READ = Carries out a line-wise input of data.
30122
30123Applications:
30124    Input/Output
30125
30126Implementation Date:
30127    1988/03 (support for reading unformatted Fortran files added 1995/04)
30128
30129Program:
30130    SET READ FORMAT 2F10.1
30131    READ X Y
30132    21.0      110.7
30133    31.2      120.6
30134    55.4      100.2
30135    END OF DATA
30136    WRITE X Y
30137
30138-----READ FUNCTION--------------------------------------------------
30139
30140READ FUNCTION
30141
30142Name:
30143    READ FUNCTION
30144
30145Type:
30146    Support Command
30147
30148Purpose:
30149    Reads a function into DATAPLOT:
30150       1) from a mass storage file;
30151       2) from within a CALLed DATAPLOT sub-program;
30152       3) from the terminal.
30153
30154Description:
30155    The rules regarding READ FUNCTION are as follows:
30156       1) Only one line is read.  Unlike a READ of variables, no END OF
30157          DATA is searched for.
30158       2) Typically, only one function is read at a time.  Reading more
30159          than one function is allowed (but not recommended).  If more
30160          than one function is read from the same line, separate the
30161          functions with at least one space and leave no spaces within
30162          a given function.  For example,
30163             READ FUNCTION F G
30164             X**2+8X-4     X**3-X+1
30165       3) In scanning for the function, the full line image is scanned
30166          (for reading from a mass storage file, the full line image is
30167          132 columns; for reading from within a sub-program and for
30168          reading from the terminal, the full line image is 80
30169          columns).  For variations on this, see the COLUMN LIMITS
30170          command.
30171       4) If one function is read, blanks are ignored in the function.
30172          However, if more than one function is read, blanks are used
30173          to separate the functions (and are therefor significant).
30174       5) Function definitions can be free-format  They need not be
30175          aligned in specific columns.
30176       6) All reads start from the beginning of the file (for
30177          variations of this, see the SKIP and ROW LIMITS commands).
30178
30179Syntax 1:
30180    READ FUNCTION   <f1>   <f2>   ...   <fk>
30181    where <f1>, <f2>, ..., <fk> are the desired functions (typically
30182              only one is given).
30183
30184    This syntax is used to read a function from the terminal or from
30185    within a DATAPLOT sub-program.
30186
30187Syntax 2:
30188    READ FUNCTION   <file>   <f1>   <f2>   ...   <fk>
30189    where <file> is the name of the mass storage file where the
30190              function resides;
30191    and   <f1>, <f2>, ..., <fk> are the desired functions (typically
30192              only one is given).
30193
30194    This syntax is used to read a function from a file.
30195
30196Examples:
30197    READ FUNCTION CALIB. F
30198    READ FUNCTION F
30199      X**2+4*X-1
30200
30201Default:
30202    1) If no file name is specified, and if a CALL is being executed,
30203       then the function should be listed directly in the DATAPLOT
30204       sub-program immediately after the READ FUNCTION command.
30205    2) If no file name is specified, and if commands are being manually
30206       entered/executed 1-at-a-time from the terminal, then the
30207       function should be entered directly from the terminal
30208       immediately after the READ FUNCTION command.
30209
30210Related Commands:
30211    SERIAL READ        = Perform a serial read.
30212    READ               = Read variables.
30213    READ PARAMETER     = Read a parameter.
30214    READ MATRIX        = Read a matrix.
30215    READ STRING        = Read a string.
30216
30217Applications:
30218    XX
30219
30220Implementation Date:
30221    XX
30222
30223Program:
30224    READ FUNCTION F
30225    X**2+2*X-6
30226    PLOT F FOR X = -3 .1 3
30227
30228-----READ IMAGE----------------------------------------
30229
30230READ IMAGE
30231
30232Name:
30233    READ IMAGE
30234
30235Type:
30236    Input Command
30237
30238Purpose:
30239    Reads an image file that is in JPEG, PNG, or GIF format.
30240
30241Description:
30242    Scientific data is increasingly collected in the form of
30243    images.  Although Dataplot does not currently support an
30244    explicit image data type, the READ IMAGE command can be used
30245    to read images into Dataplot in the form of real numbers
30246    (i.e., each real number represents the intensity value of
30247    a given pixel in the image).
30248
30249    There are two forms for this command:
30250
30251       1) You can read the image data into a matrix.
30252
30253       2) You can read the image data into a response variable,
30254          a row-id variable, and a column-id variable.
30255
30256    The best choice depends on what analysis you intend to
30257    perform on the data.  If you will not be using the matrix
30258    specific commands, the second form is typically more useful.
30259
30260    Images can be either grey scale (i.e., a single color with
30261    varying intensity levels) or color.  Color images are
30262    represented with intensity values for red, green, and
30263    blue (RGB).  Although RGB is not the only color model used,
30264    it is currently the only one supported in Dataplot.
30265
30266    Dataplot implements the READ IMAGE command using the GD
30267    library.  The GD library was developed by the Boutell company.
30268    GD in turn uses three additional libraries: zlib, libpng, and
30269    libjpeg.  These libraries are all freely downloadable from the
30270    web.  The URL for GD is (this site contains links to the other
30271    three libraries):
30272
30273        http://www.libgd.org/
30274
30275    The READ IMAGE command depends on the GD library being
30276    integrated into Dataplot.  Currently, it should be available
30277    on most Linux and Mac OSX implementations.  However, it is
30278    not currently available on the Microsoft Windows
30279    implementation.
30280
30281    Note that the primary purpose of reading images into Dataplot
30282    is in order to perform data analysis on the image data.
30283    Although you can use the LET comamnd to perform some basic
30284    image manipulation tasks, image manipulation is not a primary
30285    goal for the Dataplot developers.
30286
30287Syntax 1:
30288    READ IMAGE <file>  <m>
30289    where <file> is the name of the file containing the image;
30290    and   <m> is the matrix where the image will be saved.
30291
30292    This syntax is used to save a grey scale image into a matrix.
30293
30294Syntax 2:
30295    READ IMAGE <file>  <r>  <g>  <b>
30296    where <file> is the name of the file containing the image;
30297          <r> is the matrix where the red component of the image
30298              will be saved.
30299          <g> is the matrix where the green component of the image
30300              will be saved.
30301    and   <b> is the matrix where the blue component of the image
30302              will be saved.
30303
30304    This syntax is used to save an RGB image into 3 separate matrices
30305    (one matrix for each color).
30306
30307Syntax 3:
30308    READ IMAGE TO VARIABLES  <file>  <y>  <rowid>  <colid>
30309    where <file> is the name of the file containing the image;
30310          <y> is the variable where the image data will be saved;
30311          <rowid> is a variable that identifies the row of the image;
30312     and  <colid> is a variable that identifies the column of the
30313              image.
30314
30315    This syntax is used to save a grey scale image into a single
30316    response variable and corresponding row-id and column-id
30317    variables.
30318
30319Syntax 4:
30320    READ IMAGE TO VARIABLES  <file>  <r> <b> <g> <rowid>  <colid>
30321    where <file> is the name of the file containing the image;
30322          <r> is the variable where the red component of the image data
30323              will be saved;
30324          <b> is the variable where the blue component of the image data
30325              will be saved;
30326          <g> is the variable where the green component of the image data
30327              will be saved;
30328          <rowid> is a variable that identifies the row of the image;
30329     and  <colid> is a variable that identifies the column of the
30330              image.
30331
30332    This syntax is used to save an RGB image into a three response
30333    variables (one for each color component) and corresponding row-id
30334    and column-id variables.
30335
30336Examples:
30337    READ IMAGE TO VARIABLES IMAGE_GREY.JPG  Y ROW COL
30338    READ IMAGE TO VARIABLES IMAGE_COLOR.JPG  RED BLUE GREEN
30339    READ IMAGE IMAGE_GREY.JPG  M
30340    READ IMAGE IMAGE_COLOR.JPG RED BLUE GREEN
30341
30342Note:
30343    The current implementation supports a limited number of image
30344    file formats.  If you have image data in some other format
30345    (and there is a long list of available image formats), you will
30346    need to convert the image to either JPEG, PNG, or GIF format.
30347
30348    ImageMagick and Netpbm are two freely downloadable software
30349    suites that are capable of converting image formats for a wide
30350    variety of image formats (they also contains many image
30351    manipulation tools).  ImageMagick and Netpbm will often be
30352    installed on Unix/Linux platforms and they are freely
30353    downloadable for most common computer platforms.  In addition,
30354    programs such as Perl have integrated the Image Magick libraries
30355    to provide image conversion and manipulation capabilities.
30356
30357    If you need to perform some basic image manipulation tasks,
30358    it is probably easier to use one of these software programs
30359    (or some other image manipulation tool) first before reading the
30360    image into Dataplot.
30361
30362    The ImageMagick software can be downloaded from the following
30363    web site:
30364
30365         http://www.imagemagick.org/
30366
30367    The Netpbm software can be downloaded from the following
30368    web site:
30369
30370         http://netpbm.sourceforge.net/
30371
30372    Windows users may find it more convenient to use
30373
30374         http://gnuwin32.sourceforge.net/packages/netpbm.htm
30375
30376    We are investigating the possibility of integrating one or both
30377    of these libraries into a future release of Dataplot in order to
30378    provide direct access to a greater range of image formats and to
30379    provide some basic image manipulation capabilities.
30380
30381Note:
30382    There are some limitations on the size of the images that
30383    Dataplot can handle.
30384
30385    If you use the READ IMAGE TO VARIABLES form of the command,
30386    the limiting factor is the maximum number of rows for a single
30387    variable.  On most platforms, the default is to have 10 columns
30388    with a maximum of 1,000,000 rows.  You can use the DIMENSION
30389    command to create more columns at the expense of fewer rows.
30390    However, you cannot create more rows (i.e., the minimum number
30391    of columns is 10).
30392
30393    So multiply the number of rows by the number of columns in your
30394    image to see the minimum number of rows you need.  For example,
30395    if you have a 512x512 image, you need 262,144 rows of data.  If
30396    your version of Dataplot has a maximum of 1,000,000 rows, then
30397    you can accomodate images up to 1,000x1,000.
30398
30399    You may want to do something like the following before using the
30400    READ IMAGE TO VARIABLES command:
30401
30402         LET NUMROW = 512
30403         LET NUMCOL = 512
30404         LET MAXROW = NUMROW*NUMCOL
30405         DIMENSION MAXROW ROWS
30406
30407    If you use the READ IMAGE command, you will typically need to
30408    create a large number of columns (which means you will be able
30409    to accomodate fewer rows in any variables you create).  You may
30410    want to do something like the following before using the READ IMAGE
30411    command:
30412
30413         LET NUMROW = 512
30414         LET NUMCOL = 512
30415         DIMENSION NUMROW
30416         MATRIX DIMENSION ROWS NROWS
30417
30418    This will give you the maximum number of columns based on the
30419    number of rows in your image.  The MATRIX DIMENSION is used to
30420    dimension temporary matrices in the various Dataplot MATRIX
30421    commands.
30422
30423    The maximum row size is set before Dataplot is built.  To see
30424    what it is on your platform, you can enter the command
30425
30426         DIMENSION 10 COLUMNS
30427
30428    The value given for the line MAXIMUM NUMBER OBS/VARIABLE (ROWS)
30429    specifies the maximum number of rows for your implementation.
30430
30431Note:
30432    Unlike most of the other READ commands, the file name argument
30433    is required on the READ IMAGE command.
30434
30435Note:
30436    DATAPLOT has no restrictions on the file name other than it be a
30437    valid file name on the local operating system and that it contain
30438    a period "." in the file name itself or as a trailing character.
30439    DATAPLOT strips off trailing periods on those systems where it is
30440    appropriate to do so.  On systems where trailing periods can be a
30441    valid file name (e.g., Unix), DATAPLOT tries to open the file with
30442    the trailing period.  If this fails, it then tries to open the file
30443    with the trailing period stripped off.
30444
30445    Although Dataplot does not require specific file extensions for
30446    the other READ commands, it does require them for the READ IMAGE
30447    command.  The file extension is used to determine whether a
30448    JPEG, PNG, or GIF file is being read.  JPEG files should have
30449    a ".jpeg", ".jpg", ".JPEG", or ".JPG" extension, GIF files should
30450    have a ".gif" or ".GIF" extension, and PNG files should have
30451    a ".png" or ".PNG" extension.
30452
30453Note:
30454    File names are case sensitive on Unix file systems.  For Unix,
30455    DATAPLOT attempts to open the file as given.  If this fails, it
30456    attempts to open the file as all upper case characters.  If this
30457    fails, it attempts to open the file as all lower case characters.
30458    All other currently supported systems are not case sensitive
30459    regarding file names.
30460
30461    As a further caution for Unix hosts, certain expansion characters
30462    (specifically ~ to refer to your home directory) are interpreted
30463    by the shell and are not recognized by the Fortran compiler.  These
30464    expansion characters are interpreted as literal characters and do
30465    not yield the intended file name.
30466
30467Default:
30468    None
30469
30470Synonyms:
30471    None
30472
30473Related Commands:
30474    IMAGE PLOT              = Display an image.
30475    READ                    = Read variables.
30476    READ MATRIX             = Read matrix data.
30477    READ STACKED VARIABLES  = Read a list of variables into a
30478                              single response variable and a
30479                              group-id variable.
30480    CREATE MATRIX           = Create a matrix from a list of
30481                              variables.
30482
30483Applications:
30484    Data Input
30485
30486Implementation Date:
30487    2008/3
30488
30489Program:
30490    dimension 10 variables
30491    read image to variables takashi.jpg  red blue green rowid colid
30492    .
30493    probe iopsy1
30494    if probeval = 1
30495      device 1 x11
30496      device 1 picture points 600 600
30497    end of if
30498    .
30499    erase
30500    erase
30501    set ipl1na takashi_image.jpg
30502    set gd color true
30503    device 2 gd jpg
30504    device 2 picture points 600 600
30505    .
30506    char size 1
30507    frame off
30508    frame corner coordinates 5 5 95 95
30509    .
30510    title offset 2
30511    title Takashi Image
30512    image plot red rowid colid
30513    .
30514    device 2 close
30515
30516-----READ LINE (SET)-------------------------------------------
30517
30518READ LINE (SET)
30519
30520Name:
30521    READ LINE (SET)
30522
30523Type:
30524    Subcommand under SET
30525
30526Purpose:
30527    Specifies whether or not the GNU READLINE library will be used
30528    to parse commands entered from the terminal.
30529
30530Description:
30531    The GNU READLINE library allows command line editing and
30532    history recall (with editing).  This library is available
30533    on most Unix/Linux platforms.  Dataplot does not support
30534    this capability for Windows implementations.
30535
30536    By default, this feature is disabled.  To specify that
30537    command lines should be parsed by the READLINE library,
30538    enter the command
30539
30540        SET READ LINE ON
30541
30542    This capability is provided as a convenience for those
30543    Unix/Linux users who are familiar with the capabilities
30544    of READLINE from other applications.
30545
30546    This capability only applies to commands that are entered from
30547    the terminal (i.e., commands read from macros or other files
30548    do not use this capability).
30549
30550    When the READLINE capability is supported and the
30551    SET READLINE ON command is entered, then the following is
30552    available:
30553
30554       1) The current command line can be edited.  By default,
30555          the editing is performed using EMACS style commands.
30556          Alternatively, you can request vi style editing commands.
30557
30558       2) You can recall previously entered commands (use
30559          Cntrl-r to search the history list starting with the
30560          most recently entered commands and Cntrl-f to search the
30561          history list in the order the commands were entered).
30562
30563          The history list only starts with commands entered
30564          after the SET READ LINE ON command was entered and it
30565          will only include commands entered from the termininal
30566          (i.e., it will not include commands entered from the
30567          macro files).
30568
30569    The editing capabilities supported by readline are extensive
30570    and we do not document them here.  They are documented in full
30571    at the readline web site:
30572
30573          http://tiswww.case.edu/php/chet/readline/rltop.html
30574
30575    This documentation lists the editing commands that are
30576    available and shows how you can customize key bindings.
30577    Note that Dataplot does not provide any customized commands
30578    or command completion.
30579
30580Syntax:
30581    SET READ FORMAT   <ON/OFF>
30582    where <ON> specifies that the READLINE capability will be used
30583          and <OFF> specifies that it will not.
30584
30585Examples:
30586    SET READ LINE ON
30587    SET READ LINE OFF
30588
30589Note:
30590    Dataplot allows recently entered commands to be listed with
30591    the LIST (or L) command.  Selective commands may be re-executed
30592    or saved with the REPEAT (or R) and SAVE (or S) commands,
30593    respectively.  However, no editing capability is provided
30594    for the REPEAT and SAVE commands.
30595
30596    The LIST, REPEAT, and SAVE capabilities are independent of the
30597    READLINE capabilities.  Commands entered via the READLINE
30598    capability are added to the DATAPLOT command list (i.e., the
30599    commands displayed by the LIST command).
30600
30601Note:
30602    The maximum line length for a command is 255 characters.  This
30603    is true whether READLINE is used or not.
30604
30605Default:
30606    The READLINE capability is off.
30607
30608Synonyms:
30609    None
30610
30611Related Commands:
30612    LIST        = List previously entered commands.
30613    REPEAT      = Execute previously entered commands.
30614    SAVE        = Save previously entered commands.
30615
30616Applications:
30617    Input/Output
30618
30619Implementation Date:
30620    2009/4
30621
30622Program:
30623    XX
30624
30625-----READ MISSING VALUE (SET)----------------------------------------
30626
30627READ MISSING VALUE (SET)
30628
30629Name:
30630    READ MISSING VALUE (SET)
30631
30632Type:
30633    Subcommand under SET
30634
30635Purpose:
30636    Specifies the value to be used when a missing value is
30637    encountered with the array form of the COLUMN LIMITS
30638    command.
30639
30640Description:
30641    The January, 2004 version of Dataplot added support for
30642    an array form of the COLUMN LIMITS command.  This form is
30643    used to specify the lower and upper columns to read for
30644    each data field.  One specific case this was intended to
30645    handle was data files containing columns of unequal length.
30646    This is a common occurence when Excel files are saved to
30647    ASCII data files.
30648
30649    When the array form of the COLUMN LIMITS comamnd is used,
30650    an empty field is interpreted as a missing value.  By default,
30651    Dataplot will assign a value of zero.  If you want to assign
30652    a value other than zero, use the SET READ MISSING VALUE command
30653    to specify that value.
30654
30655Syntax:
30656    SET READ MISSING VALUE   <value>
30657    where <value> denotes the value to assign when an empty data
30658               field is encoutered.
30659
30660Examples:
30661    SET READ MISSING VALUE -999
30662    SET READ MISSING VALUE 0
30663    SET READ MISSING VALUE -1
30664
30665Note:
30666    This command only applies when the array form of the
30667    COLUMN LIMITS command has been invoked.  Otherwise, if the
30668    number of values read is less than the number of variables
30669    specified on the READ command, Dataplot treats this as an
30670    error.
30671
30672Default:
30673    Zero
30674
30675Synonyms:
30676    None
30677
30678Related Commands:
30679    READ             = Carries out a column-wise input of data.
30680    COLUMN LIMITS    = Specify what columns to read.
30681
30682Applications:
30683    Input/Output
30684
30685Implementation Date:
30686    2004/1
30687
30688Program:
30689    SET READ MISSING VALUE -99
30690    LET LOWLIM = DATA  1 11
30691    LET UPPLIM = DATA 10 20
30692    COLUMN LIMITS LOWLIM UPPLIM
30693    READ DUMMY.DAT  Y X
30694    PLOT Y X   SUBSET Y > -99 SUBSET X > -99
30695
30696-----READ PAD MISSING COLUMNS (SET)--------------------------------
30697
30698READ PAD MISSING COLUMNS (SET)
30699
30700Name:
30701    READ PAD MISSING COLUMNS (SET)
30702
30703Type:
30704    Subcommand under SET
30705
30706Purpose:
30707    If the number of variables specified on a READ command is
30708    greater than the number of values read from a data record,
30709    specify whether these extra values will be set to a
30710    "missing value" or this data record will be
30711    considered an error.
30712
30713Description:
30714    Dataplot typically expects all variables to be of equal length.  That
30715    is, the data is rectangular with no empty fields.
30716
30717    Dataplot reads the data file one row at a time.  When reading a row,
30718    Dataplot assigns the first value read to the first variable name, the
30719    second value read to the second variable name, and so on.  By default,
30720    the row with the smallest number of values defines the number of
30721    variables that will be read.  For example, if you entered the command
30722
30723         READ FILE.DAT Y X1 X2 X3
30724
30725    and one of the rows has only two values, then only Y and X1 will
30726    be read into Dataplot.
30727
30728    In some cases, it may be more convenient to assign a missing value to
30729    any variables that did not have a corresponding data item.  To do
30730    this enter the command
30731
30732        SET READ PAD MISSING COLUMNS ON
30733
30734    You can specify the value to use for missing values (the default is
30735    zero) with the command
30736
30737       SET READ MISSING VALUE <value>
30738
30739    This works well if the empty fields are the end columns.  However,
30740    be aware that if your empty fields are the beginning or middle
30741    columns, the data values may not be assigned to the variables
30742    in the way you expect.  See the NOTE: section below for alternative
30743    methods for dealing with empty fields are columns of unequal length.
30744
30745    NOTE 2019/04: The default behavior was modifed.  Now, Dataplot will
30746    always pad with missing values.  The only distinction between ON
30747    and OFF is that OFF is set a warning message will be printed when
30748    a row is encountered with less than the expected number of values.
30749
30750Syntax:
30751    SET READ PAD MISSING COLUMNS   <ON/OFF>
30752    where ON specifies that missing columns will be padded with
30753          a missing data value and OFF specifies that missing
30754          columns will be treated as an error.
30755
30756    NOTE 2019/04: Now missing columns will always be padded with the
30757                  missing value code.  If OFF is specified, a warning
30758                  message will be printed when rows with a fewer than
30759                  expected number of values are encountered.  If ON
30760                  is specified, no warning messages will be printed.
30761
30762Examples:
30763    SET READ PAD MISSING COLUMN ON
30764    SET READ PAD MISSING COLUMN OFF
30765
30766Note:
30767    When your data file has columns of unequal length or empty
30768    fields, there are several alternative approaches.
30769
30770       1. Pick some value to represent a missing value and fill in
30771          missing data points with that value. After reading the data,
30772          you can use a RETAIN command to remove them. For example, if
30773          you use -99 to signify a missing value, you can enter
30774          something like
30775
30776            RETAIN Y SUBSET Y > -99
30777
30778          Alternatively, you can use a SUBSET clause on subsequent plot
30779          and analysis commands.
30780
30781          There are two SET commands that pertain to missing values.
30782
30783          SET DATA MISSING VALUE <value> specifies a character string
30784          that will be interpreted as a missing value in the data file
30785          (this character string can be a numeric value).
30786
30787          SET READ MISSING VALUE <value> specifies the numeric value that
30788          will be saved to the Dataplot variable when a missing value (as
30789          defined by the SET DATA MISSING VALUE) is encountered.
30790
30791          Where feasible, this is the recommended solution.
30792
30793       2. If your data file has consistent formats for the rows, then
30794          there are two possible solutions.
30795
30796          If the fields are justified by the decimal point so that a
30797          Fortran format statement can be applied, then you can use the
30798          SET READ FORMAT command. In this case, empty fields are read as
30799          zero. If zero can be a valid data value for one or more of your
30800          variables, then it can be ambiguous whether a zero in your
30801          variable denotes a valid data point or a missing value. The
30802          SET READ MISSING VALUE setting does not apply when the
30803          SET READ FORMAT is used.
30804
30805          Many spreadsheets have an option for saving data to a "fixed
30806          width" ASCII text file. In these cases, the fields are typically
30807          either right or left justified. However, the column for the
30808          decimal point will not be consistent so that the SET READ FORMAT
30809          command cannot be used. In this case, you can use the variable
30810          form of the COLUMN LIMITS command. That is
30811
30812             COLUMN LIMITS LOWLIMIT  UPPLIMIT
30813
30814          where LOWLIMIT and UPPLIMIT are variables containing the start
30815          and stop columns, respectively, for each of the variables.  By
30816          default, when a blank field is encountered, it is set to zero.
30817          You can specify the value to use by entering the command
30818
30819             SET READ MISSING VALUE <value>
30820
30821       3. If your data has both columns of unequal length (or empty
30822          fields) and inconsistent columns for given data fields, an
30823          alternative is to use a comma delimited data file. If there is
30824          no data between successive commas, this is treated as a missing
30825          value. The default is to assign a value of zero. Alternatively,
30826          you can use the SET READ MISSING VALUE command described above.
30827
30828          You can specify a delimiter other than a comma with the command
30829
30830              SET READ DELIMITER <character>
30831
30832Default:
30833    OFF
30834
30835Synonyms:
30836    None
30837
30838Related Commands:
30839    READ                    = Carries out a column-wise input of
30840                              data.
30841    COLUMN LIMITS           = Specify what columns to read.
30842    SET READ MISSING VALUE  = Specify the value used to denote a
30843                              missing value.
30844    SET DATA MISSING VALUE  = Specify the missing value code in a data
30845                              file.
30846    SET READ DELIMITER      = Specify the character that will be
30847                              interperted as a delimiter between
30848                              fields on a data record.
30849
30850Applications:
30851    Input/Output
30852
30853Implementation Date:
30854    2004/10
30855    2019/04: The default behavior for empty fields changed.
30856
30857Program:
30858    SET READ MISSING VALUE -99
30859    SET READ PAD MISSING COLUMN ON
30860    READ DUMMY.DAT  Y X
30861    RETAIN Y X SUBSET Y > -99 SUBSET X > -99
30862    PLOT Y X
30863
30864-----READ SUBSET (SET)--------------------------------
30865
30866READ SUBSET (SET)
30867
30868Name:
30869    READ SUBSET (SET)
30870
30871Type:
30872    Subcommand under SET
30873
30874Purpose:
30875    Specify how SUBSET clauses are to be interpreted on
30876    READ commands.
30877
30878Description:
30879    The SUBSET/EXCEPT/FOR clause on a READ command is ambiguous.  The
30880    ambiguity aries from the fact that it is not clear whether the
30881    SUBSET/EXCEPT/CLAUSE command refers to the lines in the data file
30882    being read or to the output variables that are created by the
30883    READ command.  We address this with the following command:
30884
30885        SET READ SUBSET  <PACK/DISPERSE>   <PACK/DISPERSE>
30886
30887    In this command, PACK means the SUBSET/EXCEPT/FOR clause does not
30888    apply while DISPERSE means that it does.  The first setting applies
30889    to the input file while the second setting applies to the created
30890    data variables.
30891
30892    This is demonstrated with the following example (note that P-D means
30893    the data file is set to PACK and the output variable is set to
30894    DISPERSE).  The first column is the data in the file while the
30895    remaining columns show what the resulting data variable should look
30896    like.
30897
30898         LET TAG = 1 FOR I = 1 1 10
30899         LET TAG = 0 FOR I = 2 2 10
30900         READ FILE.DAT  X  SUBSET TAG = 1
30901
30902         X      P-D       P-P          D-P      D-D
30903         ===========================================
30904          1       1         1            1        1
30905          2       0         2            3        0
30906          3       2         3            5        3
30907          4       0         4            7        0
30908          5       3         5            9        5
30909          6       0         6            -        0
30910          7       4         7            -        7
30911          8       0         8            -        0
30912          9       5         9            -        9
30913         10       -        10            -        -
30914
30915    The default setting is PACK-DISPERSE (this is the default
30916    because this is the behavior of previous versions of Dataplot).
30917    However, the DISPERSE-PACK option is the one most likely to be
30918    used.  The PACK-PACK option is equivalent to not using the
30919    SUBSET clause at all, so is unlikely to be used.
30920
30921Syntax:
30922    SET READ SUBSET  <PACK/DISPERSE>   <PACK/DISPERSE>
30923    where the first <PACK/DISPERSE> specifies how the SUBSET clause
30924    applies to the data file and second <PACK/DISPERSE> specifies
30925    how the output file is created.
30926
30927Examples:
30928    SET READ SUBSET PACK DISPERSE
30929    SET READ SUBSET PACK PACK
30930    SET READ SUBSET DISPERSE PACK
30931    SET READ SUBSET DISPERSE DISPERSE
30932
30933Note:
30934    This command works as documented for SUBSET clauses.
30935    It is not currently working correctly for FOR clauses.
30936
30937Default:
30938    The default is SET READ SUBSET PACK DISPERSE.
30939
30940Synonyms:
30941    None
30942
30943Related Commands:
30944    READ                    = Carries out a column-wise input of
30945                              data.
30946    COLUMN LIMITS           = Specify what columns to read.
30947    SET READ MISSING VALUE  = Specify the value used to denote a
30948                              missing value.
30949    SET READ DELIMITER      = Specify the character that will be
30950                              interperted as a delimiter between
30951                              fields on a data record.
30952
30953Applications:
30954    Input/Output
30955
30956Implementation Date:
30957    2004/10
30958
30959Program:
30960    .  This example shows how to read every other line
30961    .  of the input file.
30962    .
30963    SKIP 25
30964    SET READ SUBSET DISPERSE PACK
30965    LET N = 107
30966    LET TAG = 1 FOR I = 1 1 N
30967    LET TAG = 0 FOR I = 2 2 N
30968    READ BERGER1.DAT  Y X  SUBSET TAG = 1
30969
30970-----READ VARIABLE LABEL (SET)----------------------------------------
30971
30972READ VARIABLE LABEL (SET)
30973
30974Name:
30975    READ VARIABLE LABEL (SET)
30976
30977Type:
30978    Subcommand under SET
30979
30980Purpose:
30981    Specifies whether variable names will be read from the data
30982    file or not.
30983
30984Description:
30985    Typically, Dataplot reads variable names from the READ
30986    command.  For example,
30987
30988       READ BERGER1.DAT Y X BATCH
30989
30990    Alternatively, you can omit the variable names:
30991
30992       READ BERGER1.DAT
30993
30994    In this case, Dataplot will automatically assign the variable
30995    names X1, X2, and X3.
30996
30997    Some data files contain the variable names as the first
30998    line of the data file.  In this case, you can enter the
30999    command
31000
31001        SET READ VARIABLE LABEL ON
31002
31003    to instruct Dataplot to read the variable names from the
31004    first line.
31005
31006Syntax:
31007    SET READ VARIABLE LABEL   <ON/OFF>
31008    where <ON> specifies that variable labels will be read from
31009               the data file and <OFF> specifies that they will
31010               not.
31011
31012Examples:
31013    SET READ VARIABLE LABEL ON
31014    SET READ VARIABLE LABEL OFF
31015
31016Note:
31017    If the SKIP command has been entered, the variable labels
31018    will be read from the first line after the skipped lines.
31019    For example, SKIP 24 implies that the variable labels will
31020    be read from line 25.
31021
31022Note:
31023    Many of the built-in Dataplot sample files contain the
31024    variable names on line 24 and a line of dashes ("-") on
31025    line 25.  These files can be read with
31026
31027         SKIP AUTOMATIC
31028         READ FILE.DAT
31029
31030
31031Default:
31032    OFF (variable labels will not be read from the file)
31033
31034Synonyms:
31035    None
31036
31037Related Commands:
31038    READ                   = Carries out a column-wise input of data.
31039    SERIAL READ            = Carries out a line-wise input of data.
31040    SET CONVERT CHARACTER  = Specifies whether character data will
31041                             be read.
31042    SKIP                   = Specifies number of header lines to
31043                             bypass.
31044    COLUMN LIMITS          = Specify what columns to read.
31045
31046Applications:
31047    Input/Output
31048
31049Implementation Date:
31050    2004/1
31051
31052Program:
31053    SET READ VARIABLE LABEL ON
31054    READ TEST.DAT
31055
31056-----READ MATRIX TO VARIABLES----------------------------------------
31057
31058READ MATRIX TO VARIABLES
31059
31060Name:
31061    READ MATRIX TO VARIABLES
31062
31063Type:
31064    Input Command
31065
31066Purpose:
31067    Reads matrix data into a response variable, a row-id
31068    variable, and a column-id variable.
31069
31070Description:
31071    The READ MATRIX command is used to read a data file
31072    into a matrix.  This is useful for utilizing the Dataplot
31073    commands that explicitly work on matrices.
31074
31075    However, in some cases it may be more convenient to
31076    read the matrix as a single response variable.  For
31077    example, you may want to use commands that work on variables
31078    rather than matrices.  In these cases, you can use the
31079    READ MATRIX TO VARIABLES command instead of the READ MATRIX
31080    command.  This command will create row-id and column-id
31081    variables in addition to the response variable.
31082
31083Syntax:
31084    READ MATRIX TO VARIABLES  <file>  <y>  <rowid>  <colid>
31085    where <file> is the name of the file that contains the matrix
31086                 data;
31087          <y> is the response variable where the data will be
31088                 saved;
31089          <rowid> is a variable that identifies the row of the
31090                 matrix for each response variable;
31091     and  <colid> is a variable that identifies the column of the
31092                 matrix for each response variable.
31093
31094     The <file> argument is optional.  If it is omitted, Dataplot
31095     will read the matrix data from the terminal rather than a file.
31096
31097Examples:
31098    READ MATRIX TO VARIABLES FILE.DAT  Y ROW COL
31099
31100Note:
31101    By default, DATAPLOT does free format reads.  However, it has the
31102    capability for supporting FORTRAN style formats.  Formatted reads
31103    can be about 10 times faster on many systems.   This can be helpful
31104    for large data files.  Enter HELP READ FORMAT for more details.
31105
31106Note:
31107    Blank lines in data files are ignored.
31108
31109Note:
31110    DATAPLOT supports the ability to embed comment lines within
31111    the data file.  Enter HELP COMMENT CHECK for details.
31112
31113Note:
31114    In order to determine whether the first argument is a file name or
31115    a variable name, it looks for a period in the name.  If it finds
31116    one, it assumes a file name.  If it does not, it assumes a variable
31117    name.  If your file name does not contain a period, attach a
31118    trailing period (no spaces) to the file name on the
31119    READ MATRIX TO VARIABLES command.
31120
31121Note:
31122    DATAPLOT has no restrictions on the file name other than it be a
31123    valid file name on the local operating system and that it contain
31124    a period "." in the file name itself or as a trailing character.
31125    DATAPLOT strips off trailing periods on those systems where it is
31126    appropriate to do so.  On systems where trailing periods can be a
31127    valid file name (e.g., Unix), DATAPLOT tries to open the file with
31128    the trailing period.  If this fails, it then tries to open the file
31129    with the trailing period stripped off.
31130
31131    Some users prefer to give all data files a ".DAT" or ".dat"
31132    extension.  Although this is a useful method for keeping track of
31133    data files, it is strictly a user convention and is not enforced
31134    by DATAPLOT in any way.
31135
31136Note:
31137    File names are case sensitive on Unix file systems.  For Unix,
31138    DATAPLOT attempts to open the file as given.  If this fails, it
31139    attempts to open the file as all upper case characters.  If this
31140    fails, it attempts to open the file as all lower case characters.
31141    All other currently supported systems are not case sensitive
31142    regarding file names.
31143
31144    As a further caution for Unix hosts, certain expansion characters
31145    (specifically ~ to refer to your home directory) are interpreted
31146    by the shell and are not recognized by the Fortran compiler.  These
31147    expansion characters are interpreted as literal characters and do
31148    not yield the intended file name.
31149
31150Default:
31151    None
31152
31153Synonyms:
31154    None
31155
31156Related Commands:
31157    READ MATRIX             = Read matrix data.
31158    READ                    = Read variables.
31159    READ IMAGE TO VARIABLES = Read an image file into one or more
31160                              response variables.
31161    READ STACKED VARIABLES  = Read a list of variables into a
31162                              single response variable and a
31163                              group-id variable.
31164    CREATE MATRIX           = Create a matrix from a list of
31165                              variables.
31166    SERIAL READ             = Perform a serial read.
31167    SET READ FORMAT         = Define a FORTRAN style format for
31168                              reads.
31169    READ PARAMETER          = Read a parameter.
31170    READ STRING             = Read a string.
31171
31172Applications:
31173    Data Input
31174
31175Implementation Date:
31176    2009/1
31177
31178Program:
31179    READ MATRIX TO VARIABLES Y ROWID COLID
31180    1 3 2
31181    7 3 1
31182    8 1 2
31183    END OF DATA
31184    PRINT Y ROWID COLID
31185
31186    The following output results for Y, ROWID and COLID:
31187
31188    1  1  1
31189    3  1  2
31190    2  1  3
31191    7  2  1
31192    3  2  2
31193    1  2  3
31194    8  3  1
31195    1  3  2
31196    2  3  3
31197
31198-----READ MATRIX------------------------------------------------
31199
31200READ MATRIX
31201
31202Name:
31203    READ MATRIX
31204
31205Type:
31206    Support Command
31207
31208Purpose:
31209    Reads data into a matrix:
31210       1) from a mass storage file;
31211       2) from within a CALLed DATAPLOT sub-program;
31212       3) from the terminal.
31213
31214Description:
31215    The rules regarding READ MATRIX are as follows:
31216       1) Only one matrix is read for a given READ MATRIX command
31217          (additional matrices on the READ FUNCTION line are ignored).
31218       2) In scanning for the matrix, the full line image is scanned
31219          (for reading from a mass storage file, the full line image
31220          is 132 columns; for reading from within a sub-program and for
31221          reading from the terminal, the full line image is 80
31222          columns).  For variations on this, see the COLUMN LIMITS
31223          command.
31224       3) Data values on a line image must be separated by at least
31225          one blank.
31226       4) Data values can be free-format.  They need not be aligned in
31227          specific columns.
31228       5) The format of individual data values is general.  It can be
31229          integer, floating point, or exponential.  It is stored
31230          internally as a single precision real number.
31231       6) All reads start from the beginning of the file (for
31232          variations of this, see the SKIP and ROW LIMITS commands).
31233       7) The analyst need not be concerned about the number of
31234          observations or the number of variables for the matrix.
31235          DATAPLOT automatically determines and reports these values at
31236          the end of the read.
31237       8) The read terminates when a line image is encountered which
31238          consists of
31239             END OF DATA
31240          or
31241             END DATA
31242          or when the end of the file is reached.
31243       9) The individual columns of the matrix are available as
31244          variables (e.g., for matrix M, the columns are M1, M2, and
31245          so on).
31246
31247Syntax 1:
31248    READ   MATRIX  <mat>
31249    where <mat> is the name for the matrix.
31250
31251    This syntax is used to read a matrix from the terminal or from
31252    within a DATAPLOT sub-program.
31253
31254Syntax 2:
31255    READ   MATRIX  <file>   <mat>
31256    where <file> is the name of the mass storage file where the data
31257              resides;
31258    and   <mat> is the name for the matrix.
31259
31260    This syntax is used to read a matrix from a file.
31261
31262Examples:
31263    READ MATRIX CALIB. M
31264
31265Note:
31266    By default, DATAPLOT does free format reads.  However, it has the
31267    capability for supporting FORTRAN style formats.  Formatted reads
31268    can be about 10 times faster on many systems.   This can be helpful
31269    for large data files.  Enter HELP READ FORMAT for more details.
31270
31271Note:
31272    Blank lines in data files are ignored.
31273
31274Note:
31275    DATAPLOT supports the ability to embed comment lines within
31276    the data file.  Enter HELP COMMENT CHECK for details.
31277
31278Note:
31279    In order to determine whether the first argument is a file name or
31280    a variable name, it looks for a period in the name.  If it finds
31281    one, it assumes a file name.  If it does not, it assumes a variable
31282    name.  If your file name does not contain a period, attach a
31283    trailing period (no spaces) to the file name on the READ command.
31284
31285Note:
31286    DATAPLOT has no restrictions on the file name other than it be a
31287    valid file name on the local operating system and that it contain
31288    a period "." in the file name itself or as a trailing character.
31289    DATAPLOT strips off trailing periods on those systems where it is
31290    appropriate to do so.  On systems where trailing periods can be a
31291    valid file name (e.g., Unix), DATAPLOT tries to open the file with
31292    the trailing period.  If this fails, it then tries to open the file
31293    with the trailing period stripped off.
31294
31295    Some users prefer to give all data files a ".DAT" or ".dat"
31296    extension.  Although this is a useful method for keeping track of
31297    data files, it is strictly a user convention and is not enforced
31298    by DATAPLOT in any way.
31299
31300Note:
31301    File names are case sensitive on Unix file systems.  For Unix,
31302    DATAPLOT attempts to open the file as given.  If this fails, it
31303    attempts to open the file as all upper case characters.  If this
31304    fails, it attempts to open the file as all lower case characters.
31305    All other currently supported systems are not case sensitive
31306    regarding file names.
31307
31308    As a further caution for Unix hosts, certain expansion characters
31309    (specifically ~ to refer to your home directory) are interpreted
31310    by the shell and are not recognized by the Fortran compiler.  These
31311    expansion characters are interpreted as literal characters and do
31312    not yield the intended file name.
31313
31314Default:
31315    1) If no file name is specified and a CALL is being executed, then
31316       the data values should be listed directly in the DATAPLOT
31317       sub-program immediately after the READ MATRIX command (do not
31318       forget the END OF DATA statement).
31319    2) If no file name is specified and commands are being manually
31320       entered/executed one at a time from the terminal, then the data
31321       should be entered directly from the terminal immediately after
31322       the READ MATRIX command (also terminated by an END OF DATA
31323       statement).
31324
31325Synonyms:
31326    None
31327
31328Related Commands:
31329    MATRIX DEFINITION  = Copy variables into a matrix.
31330    SERIAL READ        = Perform a serial read.
31331    SET READ FORMAT    = Define a FORTRAN style format for reads.
31332    READ               = Read variables.
31333    READ PARAMETER     = Read a parameter.
31334    READ STRING        = Read a string.
31335
31336Applications:
31337    XX
31338
31339Implementation Date:
31340    XX
31341
31342Program:
31343    READ MATRIX M
31344    1 3 2
31345    7 3 1
31346    8 1 2
31347    END OF DATA
31348
31349-----READ PARAMETER--------------------------------------------------
31350
31351READ PARAMETER
31352
31353Name:
31354    READ PARAMETER
31355
31356Type:
31357    Support Command
31358
31359Purpose:
31360    Reads a parameter into DATAPLOT:
31361       1) from a mass storage file; or
31362       2) from within a CALLed DATAPLOT sub-program; or
31363       3) from the terminal.
31364
31365Description:
31366    The rules regarding READ PARAMETER are as follows:
31367       1) Only one line is read.  Unlike a READ of variables, no END
31368          OF DATA is searched for.
31369       2) If more than one parameter is read, enter them on the same
31370          line separated by one or more spaces.
31371       3) In scanning for the parameter, the full line image is scanned
31372          (for reading from a mass storage file, the full line image is
31373          132 columns; for reading from within a sub-program and for
31374          reading from the terminal, the full line image is 80
31375          columns).  For variations on this, see the COLUMN LIMITS
31376          command.
31377       4) Parameters can be free-format.  They need not be aligned in
31378          specific columns.
31379       5) All reads start from the beginning of the file (for
31380          variations of this, see the SKIP and ROW LIMITS commands).
31381
31382Syntax 1:
31383    READ PARAMETER   <p1>   <p2>   ...   <p3>
31384    where <p1>, <p2>, ..., <pk> are the desired parameters.
31385
31386    This syntax is used to read parameters from the terminal or from a
31387    DATAPLOT sub-program.
31388
31389Syntax 2:
31390    READ PARAMETER   <file>   <p1>   <p2>   ...   <p3>
31391    where <file> is the name of the mass storage file where the
31392              parameters reside;
31393    and   <p1>, <p2>, ..., <pk> are the desired parameters.
31394
31395    This syntax is used to read parameters from a file.
31396
31397Examples:
31398    READ PARAMETER CALIB. P1 P2
31399    READ PARAMETER P
31400      5.2
31401
31402Note:
31403    In order to determine whether the first argument is a file name or
31404    a variable name, it looks for a period in the name.  If it finds
31405    one, it assumes a file name.  If it does not, it assumes a variable
31406    name.  If your file name does not contain a period, attach a
31407    trailing period (no spaces) to the file name on the READ command.
31408
31409Note:
31410    DATAPLOT has no restrictions on the file name other than it be a
31411    valid file name on the local operating system and that it contain
31412    a period "." in the file name itself or as a trailing character.
31413    DATAPLOT strips off trailing periods on those systems where it is
31414    appropriate to do so.  On systems where trailing periods can be a
31415    valid file name (e.g., Unix), DATAPLOT tries to open the file with
31416    the trailing period.  If this fails, it then tries to open the file
31417    with the trailing period stripped off.
31418
31419    Some users prefer to give all data files a ".DAT" or ".dat"
31420    extension.  Although this is a useful method for keeping track of
31421    data files, it is strictly a user convention and is not enforced
31422    by DATAPLOT in any way.
31423
31424Note:
31425    File names are case sensitive on Unix file systems.  For Unix,
31426    DATAPLOT attempts to open the file as given.  If this fails, it
31427    attempts to open the file as all upper case characters.  If this
31428    fails, it attempts to open the file as all lower case characters.
31429    All other currently supported systems are not case sensitive
31430    regarding file names.
31431
31432    As a further caution for Unix hosts, certain expansion characters
31433    (specifically ~ to refer to your home directory) are interpreted
31434    by the shell and are not recognized by the Fortran compiler.  These
31435    expansion characters are interpreted as literal characters and do
31436    not yield the intended file name.
31437
31438Default:
31439    1) If no file name is specified, and if a CALL is being
31440       executed, then the parameter should be listed directly
31441       in the DATAPLOT sub-program immediately after the READ
31442       PARAMETER command.
31443    2) If no file name is specified, and if commands are being
31444       manually entered/executed 1-at-a-time from the terminal,
31445       then the parameter should be entered directly from the
31446       terminal immediately after the READ PARAMETER command.
31447
31448Related Commands:
31449    SERIAL READ        = Perform a serial read.
31450    READ               = Read variables.
31451    READ FUNCTION      = Read a function.
31452    READ MATRIX        = Read a matrix.
31453    READ STRING        = Read a string.
31454    LET                = Define a parameter.
31455
31456Applications:
31457    XX
31458
31459Implementation Date:
31460    Pre-1987
31461
31462Program:
31463    READ PARAMETER A B C
31464    10  20  30
31465
31466-----READ ROW---------------------------------------------------
31467
31468READ ROW
31469
31470Name:
31471    READ ROW
31472
31473Type:
31474    I/O Command
31475
31476Purpose:
31477    Reads row oriented data into variables.
31478
31479Description:
31480    Dataplot is a column oriented system.  That is, columns denote
31481    variables while rows denote observations.
31482
31483    Sometimes you may encounter data files that are row oriented, that
31484    is rows denote variables while columns denote observations.  This is
31485    often the case when the number of variables is significantly greater
31486    than the number of observations.
31487
31488    The READ ROW command was added to better accomodate these types of
31489    data files.  With the ROW READ the file is read one row at a time
31490    and each row is added as a Dataplot variable.  Only a single
31491    variable name is given to READ ROW command.  This name serves as the
31492    "base name".  So if Y is the variable name given and there are 25
31493    rows of data, variables Y1, Y2, ..., Y25 will be created by the
31494    READ ROW command.
31495
31496    The READ ROW command is only supported for numeric data.  However,
31497    the rows do not need to contain the same number of data values.
31498
31499    If the maximum number of available columns is reached, the READ ROW
31500    command will be terminated.  However, any rows that have already been
31501    successfully read will still be retained.  If there in error in
31502    reading a specific row, that row will be skipped and Dataplot will go
31503    to the next row.
31504
31505    The READ ROW command generates a limited amount of feedback.  It
31506    prints feedback for the first row read and the last row read only.
31507    If you want to see what variable names were created, you can enter
31508    the command
31509
31510        STATUS VARIABLES  (or STATUS V)
31511
31512Syntax 1:
31513    READ ROW <y>
31514    where <y> is the base name for the variables being read.
31515
31516    This syntax is used to read from the terminal or from within a
31517    macro file.  All lines are read until an END OF DATA is
31518    encountered.
31519
31520    In practice, READ ROW is not typically used for terminal reads.
31521    However, it does work.
31522
31523Syntax 2:
31524    READ   <file>   <y>
31525    where <file> is the name of the file where the data resides;
31526    and where  <y> is the base name for the variables being read.
31527
31528    This syntax is used to read from a file.  All lines are read until an
31529    END OF DATA is encountered, the physical end of file is encountered,
31530    or the maximum number of variables is reached.
31531
31532Examples:
31533    READ ROW FILE.DAT Y
31534
31535Note:
31536    By default, Dataplot does free format reads.  However, it has the
31537    capability for supporting Fortran style formats.  Formatted reads
31538    can be about 10 times faster on many systems which can be helpful
31539    for large data files.  Enter HELP READ FORMAT for more details.
31540
31541    Note that Fortran formats are based on the decimal point lining up
31542    consistenly between rows.  Spreadsheet programs such as Excel tend to
31543    generate either right justified or left justified columns when
31544    generating fixed width ASCII files.  These are typically not
31545    consistent with Fortran formatted reads.
31546
31547Note:
31548    Blank lines in data files are ignored.
31549
31550Note:
31551    In order to determine whether the first argument is a file name or
31552    a variable name, it looks for a period in the name.  If it finds
31553    one, it assumes a file name.  If it does not, it assumes a variable
31554    name.  If your file name does not contain a period, attach a
31555    trailing period (no spaces) to the file name on the READ command.
31556
31557Note:
31558    Dataplot does not assume specific extensions for file names.  Although
31559    using conventions (e.g., ".DAT" or ".TXT" for data files, ".DP" for
31560    Dataplot macros) can be helpful for distinguishing between types of
31561    files, this is more for the analysts convenience.  Dataplot itself
31562    does not enforce any conventions.
31563
31564    File names have the following restrictions:
31565
31566        1. The file name should be a valid file name for the local
31567           operating system.
31568
31569        2. The file name should contain a period "." in the file name
31570           itself or as a trailing character.  Dataplot strips off trailing
31571           periods on those systems where it is appropriate to do so.  On
31572           systems where trailing periods can be a valid file name (e.g.,
31573           Unix), Dataplot tries to open the file with the trailing period.
31574           If this fails, it then tries to open the file with the trailing
31575           period stripped off.
31576
31577        3. If the file name contains spaces or hyphens, then it needs to be
31578           enclosed in quotes.
31579
31580        4. File names are currently limited to 80 characters.  This can
31581           in particular be a problem if the file name is contained within
31582           a long path name.  The following can be helpful in these cases.
31583
31584           a. You can use the CD command to make the path where the file
31585              is stored the current directory.  This is most useful for
31586              data files.  For example,
31587
31588                  pwd
31589                  cd  <path where data file resided>
31590                  read  file.dat ...
31591                  cd ^CURDIR
31592
31593              The pwd command is used to save the current directory.  The
31594              cd command is then used to set the current directory to the
31595              path where the data resides, the read is performed, and then
31596              the cd command is used to restore the original working
31597              directory (the cd command saves the current path in the
31598              string CURDIR).
31599
31600           b. You can use the SEARCH DIRECTORY command to specify an
31601              additional directory to search for file names.
31602
31603Note:
31604    File names are case sensitive on Unix/Linux/Mac OS X systems.  For these
31605    systems, Dataplot attempts to open the file as given.  If this fails, it
31606    attempts to open the file as all upper case characters.  If this fails, it
31607    attempts to open the file as all lower case characters.
31608
31609    As a further caution for Unix/Linux hosts, certain expansion characters
31610    (specifically ~ to refer to your home directory) are interpreted
31611    by the shell and are not recognized by the Fortran compiler.  These
31612    expansion characters are interpreted as literal characters and do
31613    not yield the intended file name.
31614
31615Default:
31616    1) If no file name is specified and a CALL is being executed, then
31617       the data values should be listed directly in the DATAPLOT
31618       sub-program immediately after the READ command (do not forget
31619       the END OF DATA statement).
31620
31621    2) If no file name is specified and the commands are being manually
31622       entered/executed one at a time from the terminal, then the data
31623       should be entered directly from the terminal immediately after
31624       the READ command (also terminated by an END OF DATA statement).
31625
31626Synonyms:
31627    None
31628
31629Related Commands:
31630    READ                   = Read data into variables.
31631    SERIAL READ            = Perform a serial read.
31632    READ FUNCTION          = Read a function.
31633    READ MATRIX            = Read a matrix.
31634    READ PARAMETER         = Read a parameter.
31635    READ STRING            = Read a string.
31636    READ IMAGE             = Read an image format into numeric arrays.
31637    READ STACKED VARIABLE  = Read a list of variables into a single
31638                             response variable and a group-id variable.
31639    SET READ FORMAT        = Define a FORTRAN style format for reads.
31640    DATA (LET)             = Enter data values into a variable.
31641    CLIPBOARD              = Various commands for reading from the
31642                             system clipboard.
31643
31644Applications:
31645    Data Input
31646
31647Implementation Date:
31648    2018/10
31649
31650Program:
31651    READ ROW Y
31652    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
31653    16 17 18 19 20 21 22 23 24 25
31654    END OF DATA
31655    SET WRITE DECIMALS 0
31656    PRINT Y1 Y2
31657
31658-----READ ROW LABEL--------------------------------------------------
31659
31660READ ROW LABEL
31661
31662Name:
31663    READ ROW LABEL
31664
31665Type:
31666    Support Command
31667
31668Purpose:
31669    Reads row labels into DATAPLOT:
31670      1) from a mass storage file; or
31671      2) from within a CALLed DATAPLOT sub-program; or
31672      3) from the terminal.
31673
31674Description:
31675    Row labels are primarily used for improved labeling.  For
31676    this initial implementation, the use of row labels is currently
31677    limited to labeling plot points via the CHARACTER ROWLABEL
31678    command.  However, the uses of row labels will expand
31679    in future implementations.
31680
31681Syntax 1:
31682    READ ROW LABEL
31683
31684    This syntax has no file name and no arguments.  Row labels
31685    are read from the terminal (one label per row) until an
31686    END OF DATA is entered.
31687
31688Syntax 2:
31689    READ ROW LABEL <file name>
31690    where <file> is the name of the mass storage file where the
31691              row labels reside.
31692
31693    This syntax reads the row label from the specified mass storage
31694    file.
31695
31696Examples:
31697    SKIP 25
31698    COLUMN LIMITS 1 19
31699    READ ROW LABELS AUTO79.DAT
31700    COLUMN LIMITS
31701
31702Note:
31703    The row labels may have up to 32 characters.
31704
31705Note:
31706    The READ ROW LABELS command is almost always preceeded by
31707    a COLUMN LIMITS command.  That is, if the data file contains
31708    both a text label and data, then the file is typically read
31709    twice.  One read sets the column limits to cover the text
31710    for the row labels and the other sets the column limits
31711    to read the data.  Dataplot does not currently allow both
31712    the row labels and data to be read at the same time.
31713
31714Note:
31715    In order to determine whether the first argument is a file name or
31716    a variable name, it looks for a period in the name.  If it finds
31717    one, it assumes a file name.  If it does not, it assumes a variable
31718    name.  If your file name does not contain a period, attach a
31719    trailing period (no spaces) to the file name on the READ command.
31720
31721Note:
31722    DATAPLOT has no restrictions on the file name other than it be a
31723    valid file name on the local operating system and that it contain
31724    a period "." in the file name itself or as a trailing character.
31725    DATAPLOT strips off trailing periods on those systems where it is
31726    appropriate to do so.  On systems where trailing periods can be a
31727    valid file name (e.g., Unix), DATAPLOT tries to open the file with
31728    the trailing period.  If this fails, it then tries to open the file
31729    with the trailing period stripped off.
31730
31731    Some users prefer to give all data files a ".DAT" or ".dat"
31732    extension.  Although this is a useful method for keeping track of
31733    data files, it is strictly a user convention and is not enforced
31734    by DATAPLOT in any way.
31735
31736Note:
31737    File names are case sensitive on Unix file systems.  For Unix,
31738    DATAPLOT attempts to open the file as given.  If this fails, it
31739    attempts to open the file as all upper case characters.  If this
31740    fails, it attempts to open the file as all lower case characters.
31741    All other currently supported systems are not case sensitive
31742    regarding file names.
31743
31744    As a further caution for Unix hosts, certain expansion characters
31745    (specifically ~ to refer to your home directory) are interpreted
31746    by the shell and are not recognized by the Fortran compiler.  These
31747    expansion characters are interpreted as literal characters and do
31748    not yield the intended file name.
31749
31750Default:
31751    All row labels are blank.
31752
31753Synonyms:
31754    None
31755
31756Related Commands:
31757    READ                  = Read data.
31758    READ PARAMETER        = Read parameters.
31759    READ STRING           = Read strings..
31760
31761Applications:
31762    Presentation Graphics
31763
31764Implementation Date:
31765    2000/1
31766
31767Program:
31768    SKIP 25
31769    COLUMN LIMITS 1 19
31770    READ ROW LABELS AUTO79.DAT
31771    COLUMN LIMITS 20 80
31772    READ AUTO79.DAT Y1 Y2
31773    CHARACTER ROWLABELS
31774    LINE BLANK
31775    PLOT Y1 VERSUS Y2
31776
31777-----READ REWIND (SET)-------------------------------------------
31778
31779READ REWIND (SET)
31780
31781Name:
31782    READ REWIND (SET)
31783
31784Type:
31785    Subcommand under SET
31786
31787Purpose:
31788    Normally DATAPLOT reads file from the beginning.  This command
31789    specifies that files being read are not rewound (more specifically,
31790    when a read is performed, the file is left open at its current
31791    position).
31792
31793Description:
31794    This can be useful when portions of a file are being read (e.g.,
31795    the analyst has identifier strings in a file stored one per line).
31796
31797Syntax:
31798    SET READ REWIND   <ON/OFF>
31799    where ON specifies that the file is rewound before reading and OFF
31800             specifies that it is not rewound.
31801
31802Examples:
31803    SET READ REWIND ON
31804    SET READ REWIND OFF
31805
31806Default:
31807    Files are rewound before reading (i.e., ON).
31808
31809Synonyms:
31810    None
31811
31812Related Commands:
31813    READ            = Carries out a column-wise input of data.
31814    SERIAL READ     = Carries out a line-wise input of data.
31815    READ FUNCTION   = Read a function.
31816    READ PARAMETER  = Read a parameter.
31817    READ MATRIX     = Read a matrix.
31818    READ STRING     = Read a string.
31819    WRITE REWIND    = Specify file rewind when writing to file.
31820
31821Applications:
31822    Input/Output
31823
31824Implementation Date:
31825    88/3
31826
31827Program:
31828    SET READ REWIND OFF
31829    LOOP FOR K = 1 1 50
31830        READ STRING STATES.DAT  S^K
31831    END OF LOOP
31832    SET READ REWIND ON
31833
31834-----READ STACKED VARIABLES----------------------------------------
31835
31836READ STACKED VARIABLES
31837
31838Name:
31839    READ STACKED VARIABLES
31840
31841Type:
31842    Input Command
31843
31844Purpose:
31845    Reads a list of variables into a single response variable
31846    and a corresponding group-id variable.
31847
31848Description:
31849    A number of Dataplot commands expect data in the form
31850
31851       Y  X
31852
31853    where Y is a response variable and X is a group-id variable.
31854    For example,
31855
31856       BOX PLOT Y X
31857       MEAN PLOT Y X
31858
31859    However, many data files are in the form where the data for
31860    each group is stored as a separate column.  The command
31861    READ STACKED VARIABLES can be used to read these files into
31862    the Y X format needed by many Dataplot commands.
31863
31864Syntax:
31865    READ STACKED VARIABLES  <file>  <y>  <groupid>  <var-list>
31866    where <file> is the name of a data file;
31867          <y> is the response variable where the data will be
31868                 saved;
31869          <groupid> is a variable that identifies the group for
31870                 each row of the response variable;
31871     and  <var-list> is a list of one or more variables to read
31872                 from the data file.
31873
31874     The file name is optional.  If the file name is omitted, the
31875     read will be from the terminal (until an END OF DATA is
31876     entered).
31877
31878     The first variable read will have a group-id value of 1,
31879     the second variable read will have a group-id value of 2
31880     and so on.
31881
31882Examples:
31883    READ STACKED VARIABLES FILE.DAT  Y GROUP X1 X2
31884    READ STACKED VARIABLES FILE.DAT  Y GROUP X1 X2 X3
31885    READ STACKED VARIABLES FILE.DAT  Y GROUP X1 X2 X3 X4
31886
31887Note:
31888    This command is similar to the READ MATRIX TO VARIABLES
31889    command.  The distinction is that the READ MATRIX TO VARIABLES
31890    returns both a row-id and a column-id variable.  The
31891    READ STACKED VARIABLES just returns a group-id variable
31892    (i.e., a column-id).
31893
31894    The STACK command is also similar.  However, it works on
31895    variables that have already been read into Dataplot.
31896
31897Note:
31898    By default, DATAPLOT does free format reads.  However, it has the
31899    capability for supporting FORTRAN style formats.  Formatted reads
31900    can be about 10 times faster on many systems.   This can be helpful
31901    for large data files.  Enter HELP READ FORMAT for more details.
31902
31903Note:
31904    Blank lines in data files are ignored.
31905
31906Note:
31907    DATAPLOT supports the ability to embed comment lines within
31908    the data file.  Enter HELP COMMENT CHECK for details.
31909
31910Note:
31911    In order to determine whether the first argument is a file name or
31912    a variable name, it looks for a period in the name.  If it finds
31913    one, it assumes a file name.  If it does not, it assumes a variable
31914    name.  If your file name does not contain a period, attach a
31915    trailing period (no spaces) to the file name on the
31916    READ STACKED VARIABLES command.
31917
31918Note:
31919    DATAPLOT has no restrictions on the file name other than it be a
31920    valid file name on the local operating system and that it contain
31921    a period "." in the file name itself or as a trailing character.
31922    DATAPLOT strips off trailing periods on those systems where it is
31923    appropriate to do so.  On systems where trailing periods can be a
31924    valid file name (e.g., Unix), DATAPLOT tries to open the file with
31925    the trailing period.  If this fails, it then tries to open the file
31926    with the trailing period stripped off.
31927
31928    Some users prefer to give all data files a ".DAT" or ".dat"
31929    extension.  Although this is a useful method for keeping track of
31930    data files, it is strictly a user convention and is not enforced
31931    by DATAPLOT in any way.
31932
31933Note:
31934    File names are case sensitive on Unix file systems.  For Unix,
31935    DATAPLOT attempts to open the file as given.  If this fails, it
31936    attempts to open the file as all upper case characters.  If this
31937    fails, it attempts to open the file as all lower case characters.
31938    All other currently supported systems are not case sensitive
31939    regarding file names.
31940
31941    As a further caution for Unix hosts, certain expansion characters
31942    (specifically ~ to refer to your home directory) are interpreted
31943    by the shell and are not recognized by the Fortran compiler.  These
31944    expansion characters are interpreted as literal characters and do
31945    not yield the intended file name.
31946
31947Default:
31948    None
31949
31950Synonyms:
31951    None
31952
31953Related Commands:
31954    STACK                    = Convert a set of response variables to
31955                               a single response variable and a
31956                               group-id variable.
31957    READ MATRIX TO VARIABLES = Read a matrix into a single response
31958                               variable.
31959    READ IMAGE TO VARIABLES  = Read an image into variables.
31960    READ                     = Read variables.
31961    SERIAL READ              = Perform a serial read.
31962    READ MATRIX              = Read matrix data.
31963    READ PARAMETER           = Read a parameter.
31964    READ STRING              = Read a string.
31965    SET READ FORMAT          = Define a FORTRAN style format for
31966                               reads.
31967
31968Applications:
31969    Data Input
31970
31971Implementation Date:
31972    2008/3
31973
31974Program:
31975    SKIP 25
31976    READ STACKED VARIABLES MONTGOME.DAT  Y GROUP X1 X2 X3
31977    .
31978    TITLE Mean Plot
31979    TITLE OFFSET 2
31980    TITLE CASE ASIS
31981    XLIMITS 1 3
31982    TIC OFFSET UNITS DATA
31983    XTIC OFFSET 0.5  0.5
31984    MAJOR XTIC MARK NUMBER 3
31985    MINOR XTIC MARK NUMBER 0
31986    XTIC MARK LABEL FORMAT ALPHA
31987    XTIC MARK LABEL CONTENT Large Medium Small
31988    TIC MARK LABEL CASE ASIS
31989    Y1LABEL Mean Percentage
31990    X1LABEL Group
31991    LABEL CASE ASIS
31992    CHARACTER X BLANK
31993    LINE BLANK SOLID
31994    .
31995    MEAN PLOT Y GROUP
31996
31997-----READ STRING--------------------------------------------------
31998
31999READ STRING
32000
32001Name:
32002    READ STRING
32003
32004Type:
32005    Support Command
32006
32007Purpose:
32008    Reads a string into DATAPLOT:
32009       1) from a mass storage file; or
32010       2) from within a CALLed DATAPLOT sub-program; or
32011       3) from the terminal.
32012
32013Description:
32014    The rules regarding READ STRING are as follows:
32015       1) Only one line is read.  Unlike a READ of variables, no
32016          END OF DATA is searched for.
32017       2) Typically, only one string is read at a time.  Reading more
32018          than one STRING is allowed (but not recommended).  If more
32019          than STRING is read from the same line, separate the strings
32020          with at least one space and leave no spaces within a given
32021          string.  For example,
32022             READ STRING S1 S2
32023             String1    String2
32024       3) In scanning for the string, the full line image is scanned
32025          (for reading from a mass storage file, the full line image
32026          is 132 columns; for reading from within a sub-program and
32027          for reading from the terminal, the full line image is 80
32028          columns).  For variations on this, see the COLUMN LIMITS
32029          command.
32030       4) If one string is read, embedded blanks are included in the
32031          string.  However, if more than one string is read, blanks
32032          are used to separate the strings.
32033       5) All reads start from the beginning of the file (for
32034          variations of this, see the SKIP and ROW LIMITS commands).
32035
32036Syntax 1:
32037    READ STRING   <s1>   <s2>   ...    <sk>
32038    where <s1>, <s2>, ..., <sk> are the desired strings (typically
32039              only one is given).
32040
32041    This syntax is used to read strings from the terminal or from a
32042    DATAPLOT sub-program.
32043
32044Syntax 2:
32045    READ STRING   <file>   <s1>   <s2>   ...    <sk>
32046    where <file> is the name of the mass storage file where the
32047              strings reside;
32048    and   <s1>, <s2>, ..., <sk> are the desired strings (typically
32049              only one is given).
32050
32051    This syntax is used to read strings from a file.
32052
32053Examples:
32054    READ STRING CALIB. S
32055    READ STRING S
32056      This is a sample string
32057
32058Note:
32059    The LET command can also be used to define a string (e.g.,
32060    LET S = STRING THIS IS A STRING).  However, there is one important
32061    distinction.  The LET command automatically converts the string to
32062    upper case while the READ STRING command preserves the case that
32063    is read.
32064
32065Note:
32066    In order to determine whether the first argument is a file name or
32067    a variable name, it looks for a period in the name.  If it finds
32068    one, it assumes a file name.  If it does not, it assumes a variable
32069    name.  If your file name does not contain a period, attach a
32070    trailing period (no spaces) to the file name on the READ command.
32071
32072Note:
32073    DATAPLOT has no restrictions on the file name other than it be a
32074    valid file name on the local operating system and that it contain
32075    a period "." in the file name itself or as a trailing character.
32076    DATAPLOT strips off trailing periods on those systems where it is
32077    appropriate to do so.  On systems where trailing periods can be a
32078    valid file name (e.g., Unix), DATAPLOT tries to open the file with
32079    the trailing period.  If this fails, it then tries to open the file
32080    with the trailing period stripped off.
32081
32082    Some users prefer to give all data files a ".DAT" or ".dat"
32083    extension.  Although this is a useful method for keeping track of
32084    data files, it is strictly a user convention and is not enforced
32085    by DATAPLOT in any way.
32086
32087Note:
32088    File names are case sensitive on Unix file systems.  For Unix,
32089    DATAPLOT attempts to open the file as given.  If this fails, it
32090    attempts to open the file as all upper case characters.  If this
32091    fails, it attempts to open the file as all lower case characters.
32092    All other currently supported systems are not case sensitive
32093    regarding file names.
32094
32095    As a further caution for Unix hosts, certain expansion characters
32096    (specifically ~ to refer to your home directory) are interpreted
32097    by the shell and are not recognized by the Fortran compiler.  These
32098    expansion characters are interpreted as literal characters and do
32099    not yield the intended file name.
32100
32101Default:
32102    1) If no file name is specified and a CALL is being executed, then
32103       the string should be listed directly in the DATAPLOT
32104       sub-program immediately after the READ STRING command.
32105    2) If no file name is specified and commands are being manually
32106       entered/executed one at a time from the terminal, then the
32107       string should be entered directly from the terminal immediately
32108       after the READ STRING command.
32109
32110Related Commands:
32111    SERIAL READ        = Perform a serial read.
32112    READ               = Read variables.
32113    READ FUNCTION      = Read a function.
32114    READ PARAMETER     = Read a parameter.
32115    READ MATRIX        = Read a matrix.
32116    LET                = Define a string.
32117
32118Applications:
32119    XX
32120
32121Implementation Date:
32122    XX
32123
32124Program:
32125    SET READ REWIND OFF
32126    LOOP FOR K = 1 1 50
32127        READ STRING STATES.DAT  S^K
32128    END OF LOOP
32129    SET READ REWIND ON
32130
32131-----RF (LET)----------------------------------------------
32132
32133RF
32134
32135Name:
32136    RF (LET)
32137
32138Type:
32139    Library Function
32140
32141Purpose:
32142    Compute Carlson's elliptic integral of the first kind.
32143
32144Description:
32145    Carlson's elliptic integral of the first kind is defined as:
32146        RF(x,y,z)=0.5*INTEGRAL[1/SQRT((t+x)*(t+y)*(t+z))]dt
32147    where INTEGRAL is the integral from 0 to infinity.  The parameters
32148    x, y, and z must all be non-negative with at most one of them
32149    being zero.
32150
32151Syntax:
32152    LET <a> = RF(<x>,<y>,<z>)  <SUBSET/EXCEPT/FOR qualification>
32153    where <x> is a non-negative number, parameter, or variable;
32154          <y> is a non-negative number, parameter, or variable;
32155          <z> is a non-negative number, parameter, or variable;
32156          <a> is a variable or a parameter (depending on what <x>,
32157               <y>, and <z> are) where the computed values are stored;
32158    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
32159
32160Examples:
32161    LET A = RF(2,1,3)
32162    LET A = RF(X,0,4)
32163    LET X2 = RF(1,1,Y)
32164
32165Note:
32166    The Carlson elliptic integrals are computed using the RC, RD, RF,
32167    and RJ routines from the SLATEC Common Mathematical Library.
32168    SLATEC is a large set of high quality, portable, public domain
32169    Fortran routines for various mathematical capabilities maintained
32170    by seven federal laboratories.
32171
32172Note:
32173    DATAPLOT computes Legendre elliptic integrals by computing the
32174    equivalent Carlson elliptic integrals.  See the documentation for
32175    the ELLIP1, ELLIP2, ELLIP3, ELLIPC1, and ELLIPC2 functions for
32176    details on computing Legendre elliptic functions in DATAPLOT.
32177
32178Note:
32179    Library functions are distinguished from let subcommands
32180    in the following ways.
32181    1) Functions enclose the input value in parenthesis.  Let
32182       subcommands use spaces.
32183    2) Functions can accept (and return) either parameters
32184       (i.e., single values) or variables (i.e., an array of
32185       values) while let subcommands are specific in which they
32186       accept as input and what they return as output.
32187    3) Functions can accept expressions while let subcommands
32188       do not.  For example, the following is legal:
32189           LET Y2 = ABS(Y1-INT(Y1))
32190       For let subcommands, you typically have to do something
32191       like the following:
32192           LET YTEMP = Y**2 + 8
32193           LET A = SUM YTEMP
32194
32195Default:
32196    None
32197
32198Synonyms:
32199    None
32200
32201Related Commands:
32202    RC      = Compute the degenerate Carlson elliptic integral.
32203    RD      = Compute the Carlson elliptic integral of the second kind.
32204    RF      = Compute the Carlson elliptic integral of the first kind.
32205    RJ      = Compute the Carlson elliptic integral of the third kind.
32206    ELLIPC1 = Compute the Legendre complete elliptic integral of the
32207              first kind.
32208    ELLIPC2 = Compute the Legendre complete elliptic integral of the
32209              second kind.
32210    ELLIP1  = Compute the Legendre elliptic integral of the first
32211              kind.
32212    ELLIP2  = Compute the Legendre elliptic integral of the second
32213              kind.
32214    ELLIP3  = Compute the Legendre's elliptic integral of the third
32215              kind.
32216
32217Reference:
32218    "Algorithms for Incomplete Elliptic Integrals by Duplication",
32219    Carlson, ACM Transactions on Mathematical Software, 7,
32220    pp. 398-403.
32221
32222    "Handbook of Mathematical Functions, Applied Mathematics Series,
32223    Vol. 55", Abramowitz and Stegun, National Bureau of Standards,
32224    1964 (chapter 17).
32225
32226Applications:
32227    Special Functions
32228
32229Implementation Date:
32230    94/9
32231
32232Program:
32233    TITLE CARLSON ELLIPTIC FUNCTIONS
32234    PLOT RF(X,1,2) FOR X = 0.1 0.1 10 AND
32235    PLOT RF(1,X,2) FOR X = 0.1 0.1 10 AND
32236    PLOT RF(1,2,X) FOR X = 0.1 0.1 10
32237
32238
32239-----RECCDF (LET)--------------------------------
32240
32241RECCDF
32242
32243Name:
32244    RECCDF (LET)
32245
32246Type:
32247    Library Function
32248
32249Purpose:
32250    Compute the reciprocal probability density function.
32251
32252Description:
32253    The probability density function is:
32254       f(x.b) = 1/(x*LOG(b))       for 1/b <= x < 1,  b > 1
32255    where b is the shape parameter.  The formula for the cumulative
32256    distribution function is:
32257       F(x,b) = (LOG(x) + LOG(b))/LOG(b)   for 1/b <= x < 1, b > 1
32258
32259Syntax:
32260    LET <y> = RECCDF(<x>,<b>)   <SUBSET/EXCEPT/FOR qualification>
32261    where <x> is a variable, a number, or a parameter;
32262          <y> is a variable or a parameter (depending on what <x> is)
32263               where the computed reciprocal cdf value is saved;
32264          <b> is a number, parameter, or variable that specifies
32265               the shape parameter;
32266    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
32267
32268Examples:
32269    LET A = RECCDF(0.5,1.5)
32270    LET X2 = RECCDF(X1,B)
32271
32272Note:
32273    Library functions are distinguished from let subcommands
32274    in the following ways.
32275    1) Functions enclose the input value in parenthesis.  Let
32276       subcommands use spaces.
32277    2) Functions can accept (and return) either parameters
32278       (i.e., single values) or variables (i.e., an array of
32279       values) while let subcommands are specific in which they
32280       accept as input and what they return as output.
32281    3) Functions can accept expressions while let subcommands
32282       do not.  For example, the following is legal:
32283           LET Y2 = ABS(Y1-INT(Y1))
32284       For let subcommands, you typically have to do something
32285       like the following:
32286           LET YTEMP = Y**2 + 8
32287           LET A = SUM YTEMP
32288
32289Default:
32290    None
32291
32292Synonyms:
32293    None
32294
32295Related Commands:
32296    RECPDF = Compute the reciprocal probability density function.
32297    RECPPF = Compute the reciprocal percent point function.
32298    BRACDF = Compute the Bradford cumulative distribution function.
32299    BRAPDF = Compute the Bradford probability density function.
32300    BRAPPF = Compute the Bradford percent point function.
32301    BETCDF = Compute the beta cumulative distribution function.
32302    BETPDF = Compute the beta probability density function.
32303    BETPPF = Compute the beta percent point function.
32304
32305Reference:
32306    "Numerical Methods for Scientists and Engineers", 2nd. Ed.,
32307    Hamming, Dover Publications, 1973.
32308
32309Applications:
32310    Data Analysis
32311
32312Implementation Date:
32313    96/5
32314
32315Program:
32316    MULTIPLOT 2 2; MULTIPLOT CORNER COORDINATES 0 0 100 100
32317    TITLE AUTOMATIC
32318    X1LABEL X
32319    Y1LABEL PROBABILITY
32320    LET B = 10
32321    X1LABEL  BETA = ^B
32322    PLOT RECCDF(X,B) FOR X = 0.1 0.01 0.99
32323    LET B = 100
32324    X1LABEL  BETA = ^B
32325    PLOT RECCDF(X,B) FOR X = 0.01 0.01 0.99
32326    LET B = 5
32327    X1LABEL  BETA = ^B
32328    PLOT RECCDF(X,B) FOR X = 0.2 0.01 0.99
32329    LET B = 2
32330    X1LABEL  BETA = ^B
32331    PLOT RECCDF(X,B) FOR X = 0.5 0.01 0.99
32332    END OF MULTIPLOT
32333
32334-----RECIPE---------------------------------------------
32335
32336RECIPE
32337
32338Name:
32339    RECIPE
32340
32341Type:
32342    Analysis Command
32343
32344Purpose:
32345    Compute REgression Confidence Intervals on PErcentiles
32346    (RECIPE).
32347
32348Description:
32349    RECIPE is used to compute approximate one-sided tolerance
32350    limits (or equivalently, confidence intervals on
32351    percentiles) for a wide range of situations where one is
32352    able to assume a normal probability model.  Arbitrary
32353    regression models with or without a random effect can be
32354    analyzed.  It is this ability to accomodate between batch
32355    variability that makes the RECIPE code perhaps unique.
32356
32357    The development of RECIPE was motivated for use in
32358    determining design allowables for composite materials in
32359    aircraft applications, particularly in the prescence of
32360    between-batch variability.
32361
32362    Note that an A-basis value is a (0.99,0.95) lower tolerance
32363    limit and a B-basis value is a (0.90,0.95) lower tolerance
32364    limit.  Alternatively A- and B-basis values can be
32365    interpreted to be 95% lower confidence bounds on the 1st
32366    and 10th population percentiles respectively.
32367
32368    In Dataplot, the A BASIS and B BASIS commands can be used
32369    to compute A-basis and B-basis values for univariate
32370    data for normal, lognormal, and Weibull distributions.
32371
32372    RECIPE is used to calculate basis values for regression
32373    models with or without a random batch effect.  This
32374    methodology was developed by NIST statistician Mark Vangel
32375    as part of his involvement with MIL-HDBK-17E (or MIL-17
32376    Handbook).  Dataplot adapted source code provided by
32377    Mark Vangel to implement this command within Dataplot.
32378
32379    More formally, let
32380
32381       y = X*theta + Z*b + e
32382
32383    denote a mixed model with two components of variance.  The
32384    fixed part of the model is X*theta, where X is an nxr
32385    known matrix having l <= n distinct rows and theta is an
32386    unkown rXl vector.  The random part is Z*b + e where Z
32387    is an nxm known matrix of zeros and ones,
32388    b follows a normal distribution with mean zero and standard
32389    deviation sigma(b)**2*I(m), and e follows a normal
32390    distribution with mean zero and standard deviation
32391    sigma(e)**2*I(n).  Let w be an arbitrary rx1 vector, and
32392    assume (w**T)*theta, sigma(b)**2, and sigma(e)**2 are
32393    estimable.  RECIPE uses y to obtain approximate one-sided
32394    beta-content tolerance intervals for the population
32395    U where U follows a normal distribution with mean
32396    (w**T)*theta and standard deviation
32397    sigma(b)**2 + sigma(e)**2.
32398
32399    A complete discussion of this methodolgy is available at
32400    the following web site (including the original Fortran
32401    source code):
32402
32403       http://www.itl.nist.gov/div898/software/recipe/
32404
32405    These web pages discuss both the mathematical model
32406    for RECIPE and its application to real problems.
32407    Additional discussion is contained in the papers listed
32408    in the Reference section.  The example programs below
32409    give some typical applications of RECIPE.
32410
32411    Note that the input model for the original Fortran
32412    implementation of RECIPE is different than the Dataplot
32413    implementation.
32414
32415    RECIPE is typically preceeded by a regression or ANOVA
32416    analysis.  RECIPE is then typically applied to the final
32417    regression or ANOVA model.  RECIPE supports the following
32418    types of models:
32419
32420       1) 1-factor regression (including polynomial models)
32421       2) multi-factor regression
32422       3) multi-factor ANOVA
32423
32424    RECIPE is generally used in the context of the MIL-17
32425    Handbook standards for obtaining A- and B-basis material
32426    property values.
32427
32428    The primary output from the RECIPE command is a set of
32429    tolerance values.
32430
32431Syntax 1:
32432    RECIPE FIT  <y> <x> <batch> <xpred>
32433                            <SUBSET/EXCEPT/FOR qualification>
32434    where <y> is the response (= dependent) variable;
32435          <x> is the independent variable;
32436          <batch> is a batch identifier variable;
32437          <xpred> is a variable containing the points at
32438              which the tolerances are calculated;
32439    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
32440
32441    This syntax is used for linear regression and polynomial
32442    models.
32443
32444    The degree of the fit can be specified by entering the
32445    following command before the RECIPE FIT command:
32446
32447    RECIPE FIT DEGREE <N>
32448    where <N> is a positive integer that specifies the degree
32449          polynomial to fit (usually 1 or 2, but higher degrees
32450          are allowed).
32451
32452    If the RECIPE FIT DEGREE command is not entered, a linear
32453    fit is assumed.
32454
32455Syntax 2:
32456    RECIPE FIT  <y> <x1 ... xk> <batch> <xpred1 ... xpredk>
32457                            <SUBSET/EXCEPT/FOR qualification>
32458    where <y> is the response (= dependent) variable;
32459          <x1 ... xk> is a list of one or more independent
32460              variables;
32461          <batch> is a batch identifier variable;
32462          <xpred1 ... xpredk> is a list of one or more variables
32463              containing the points at which the tolerances are
32464              calculated;
32465    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
32466
32467    This syntax is used for the multilinear regression case.
32468
32469Syntax 3:
32470    RECIPE ANOVA  <y> <x1> ... <xk> <batch>
32471                            <SUBSET/EXCEPT/FOR qualification>
32472    where <y> is the response (= dependent) variable;
32473          <x1> ... <xk> are the k independent variables;
32474          <batch> is a batch identifier variable;
32475    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
32476
32477    This syntax is used for multilinear and ANOVA models.
32478
32479    The <batch> variable is optional.  To specify whether or not
32480    the last variable is a batch variable or one of the factor
32481    variables, enter the following command:
32482
32483    RECIPE FACTORS <N>
32484    where <N> is a positive integer that specifies the number
32485          of factor (indpendent) variables on the RECIPE ANOVA
32486          command.
32487
32488Examples:
32489    RECIPE ANOVA Y X BATCH
32490    RECIPE ANOVA Y X BATCH  SUBSET BATCH = 1 TO 3
32491
32492    RECIPE FIT Y X BATCH X2
32493    RECIPE FIT Y X1 X2 BATCH X1P X2P
32494
32495Note:
32496    By default, Dataplot compute a 95% confidence interval for the
32497    90% coverage interval (i.e., the 10th percentile).
32498
32499    To change the confidence interval calculated, enter
32500
32501        RECIPE CONFIDENCE <val>
32502
32503    where <val> defines the desired confidence.  Typical values
32504    are 0.95, 0.90, or 0.99.
32505
32506    To change the coverage interval, enter
32507
32508        RECIPE PROBABILITY CONTENT <val>
32509
32510    where <val> defines the desired coverage.  Typical values are
32511    0.90 and 0.99.
32512
32513Note:
32514    By default, the tolerance values outout from the RECIPE commands
32515    are automatically saved in the internal variable TOL.  If you
32516    want to save these values in a variable with a different name,
32517    then enter the following command before the RECIPE FIT or
32518    RECIPE ANOVA command:
32519
32520       RECIPE OUTPUT <varname>
32521
32522    where <varname> is the desired variable name.  Note that after
32523    the RECIPE FIT or RECIPE ANOVA command, this variable can be
32524    used like any other Dataplot variable.
32525
32526Note:
32527    If the between batch variance is zero, then tolerance limits
32528    produced by RECIPE are exact.  However, when between batch
32529    variability exists, the actual confidence level will depend on
32530    the ratio of between batch variability and to within batch
32531    variability sigma(b)**2/sigma(e)**2, or equivalently, to
32532    the intraclass correlation
32533
32534         p = sigma(b)**2/(sigma(b)**2 + sigma(e)**2)
32535
32536    The intraclass correlation is the correlation between
32537    observations from the same batch.
32538
32539    The nuisance parameter p is unknown and typically the number
32540    of batches is too small to even estimate it well.  We would
32541    like to have a tolerance limit procedure for which the
32542    actual confidence interval equals the nominal level, whatever
32543    p might be.  Although this goal is probably unobtainable in
32544    general, one can come extremely close for certain simple
32545    regression models.  RECIPE provides tolerance intervals for
32546    which the confidence levels do not depend strongly on p,
32547    and for which the actual confidence is generally fairly close
32548    to the nominal level.
32549
32550    In order to determine how close the actual and nominal
32551    confidence levels are, it is necessary to simulate.  The
32552    following commands
32553
32554         RECIPE SIMCOV FIT
32555         RECIPE SIMCOV ANOVA
32556
32557    correspond to the RECIPE FIT and RECIPE ANOVA commands and
32558    can be used to simulate the actual confidence.  The
32559    RECIPE SIMCOV commands have the same syntax as the RECIPE
32560    commands.
32561
32562    The output from the RECIPE SIMCOV commands is a column of
32563    values for p with the corresponding actual confidence
32564    level.  One can expect this command to show that the RECIPE
32565    intervals are conservative when p is near zero, somewhat
32566    anticonservative for intermediate values of p, and nearly
32567    exact for p near 1.  For highly unbalanced data, the
32568    confidence may vary substatially from the nominal level
32569    when p=1.
32570
32571    If the actual confidence levels differ too substantially
32572    from the nominal levels, this indicates that a
32573    Satterthwaite approximation used by RECIPE is not
32574    adequate and can be improved upon by replacing the
32575    Satterthwaite approximation with the appropriate quantile
32576    of a simulated pivotal random variable.  By doing this,
32577    one can obtain an actual confidence level that is nearly
32578    exact for p=1 and typically better than Satterthwaite
32579    approximation for intermediate values of p as well.
32580
32581    If the RECIPE SIMCOV command shows that the Satterthwaite
32582    approximation is not adequate, enter the following command
32583    to use simulated pivotal values instead:
32584
32585         RECIPE SATTERTHWAITE NO
32586
32587    To restore the use of Satterthwaite approximation, enter
32588
32589         RECIPE SATTERTHWAITE NO
32590
32591    To control the number of correlation values at which to
32592    compute SIMCOV probabilites, enter
32593
32594         RECIPE CORRELATION <n>
32595
32596    where <n> is the desired number of values.  The default
32597    is 11 (that is, p = 0, 0.1, 0.2, 0.3, ... , 0.9 1.0).
32598
32599    To control the number of replicates used in computing the
32600    SIMCOV confidence levels, enter
32601
32602         RECIPE SIMCOV REPLICATES <n>
32603
32604    where <n> is the number of replicates.  The default is 10,000.
32605
32606    If Satterthwaite approximation is turned off (and simulated
32607    pivotal values are used instead), the number of replicates used
32608    in computing the simulated pivotal values can be specified
32609    by entering the command
32610
32611         RECIPE SIMPVT REPLICATES <n>
32612
32613    where <n> is the number of replicates.  The default is 10,000.
32614
32615Default:
32616    None
32617
32618Synonyms:
32619    None
32620
32621Related Commands:
32622    FIT                     = Perform a lest squares fit.
32623    ANOVA                   = Perform an ANOVA.
32624    BASIS TOLERANCE LIMITS  = Generate A- and B-basis tolerance
32625                              limits.
32626    TOLERANCE LIMITS        = Generate tolerance limits for the mean.
32627    ANDERSON-DARLING K      = Perform an Anderson-Darling k sample
32628       SAMPLE TEST            test.
32629    ANDERSON-DARLING TEST   = Perform an Anderson-Darling goodness
32630                              of fit test.
32631    GRUBBS TEST             = Perform Grubbs test for outliers.
32632
32633References:
32634    "MIL-HDBK-17 Volume 1: Guidelines for Characterization of
32635    Structural Materials", Depeartment of Defense, chapter 8.
32636    The URL for MIL-HDBK-17 is http://mil-17.udel.edu/.
32637
32638    "A User's Guide to RECIPE: A FORTRAN Program for Determining
32639    One-Sided Tolerance Limits for Mixed Models With Two
32640    Components of Variance Version 1.0", Mark Vangel,
32641    unpublished document available online at
32642    http://www.itl.nist.gov/div898/software/recipe/recidoc.pdf.
32643
32644    "New Methods for One-Sided Tolerance Limits for a One-Way
32645    Balanced Random Effects ANOVA Model", Mark Vangel,
32646    Technometrics, Vol. 34, 1992, pp. 176-185.
32647
32648    "One-Sided B-Content Tolerance Limits for Mixed Models
32649    with Two Components of Variance", Mark Vangel,
32650    Technometrics, submitted.
32651
32652    "Design Allowables From Regression Models Using Data From
32653    Several Batches", Mark Vangel, 12th Symposium on Composite
32654    Materials: Testing and Design, American Society of Testing
32655    and Materials, 1996.
32656
32657Applications:
32658    Materials Science
32659
32660Implementation Date:
32661    1997/9
32662
32663Program 1: (UNIVARIATE EXAMPLE)
32664    . The complete analysis can be viewed by:
32665    .     LIST VANGEL31.DP
32666    . RECIPE Tolerance Limits Analysis of Graphite/Epoxy Tape Strength
32667    . Univariate Case
32668    . ------------------------
32669    . Step 1--Read in the data
32670    .
32671    skip 25
32672    read vangel31.dat y
32673    . ------------------------------------------------
32674    . Step 6--Compute (recipe/normal) tolerance limits
32675    .
32676    recipe content 90
32677    recipe confidence 95
32678    recipe factors 1
32679    let n = size y
32680    let x = 1 for i = 1 1 n
32681    let b = 1 for i = 1 1 n
32682    recipe anova y x b
32683    .
32684    let tol1 = tol(1)
32685    relative histogram y
32686    drawdata tol1 0 tol1 +.01
32687
32688Program 2: (NON-LINEAR EXAMPLE)
32689    . The complete analysis can be viewed by:
32690    .     LIST VANGEL32.DP
32691    . RECIPE Tolerance Limits Analysis of Graphite/Epoxy Tape Strength
32692    . Regression Case
32693    . Date--September 1997
32694    .
32695    . ------------------------
32696    . Step 1--Read in the data
32697    .
32698    skip 25
32699    read vangel32.dat y x b
32700    .
32701    . ------------------------------------------------
32702    . Step 6--Compute (recipe/normal) tolerance limits
32703    .
32704    recipe content 90
32705    recipe confidence 95
32706    recipe degree 1
32707    let x2 = sequence -75 25 200
32708    recipe fit y x b x2
32709    .
32710    .
32711    characters x blank box
32712    lines blank solid dotted
32713    plot y pred versus x and
32714    plot tol versus x2
32715
32716Program 3: (ANOVA EXAMPLE)
32717    . The complete analysis can be viewed by:
32718    .     LIST VANGEL33.DP
32719    . RECIPE Tolerance Limits Analysis of Graphite/Epoxy Fabric Strength
32720    . ANOVA Case
32721    . Date--September 1997
32722    .
32723    . ------------------------
32724    . Step 1--Read in the data
32725    .
32726    skip 25
32727    read vangel33.dat y x b
32728    .
32729    . ------------------------------------------------
32730    . Step 6--Compute (recipe/normal) tolerance limits
32731    .
32732    recipe content 90
32733    recipe confidence 95
32734    recipe factors 1
32735    recipe anova y x b
32736    .
32737    characters x blank box
32738    lines blank blank blank
32739    xtic offset 0.3 0.3
32740    major xtic mark number 2
32741    minor xtic mark number 0
32742    plot y pred versus x and
32743    plot tol versus x
32744
32745-----RECPDF (LET)--------------------------------
32746
32747RECPDF
32748
32749Name:
32750    RECPDF (LET)
32751
32752Type:
32753    Library Function
32754
32755Purpose:
32756    Compute the reciprocal probability density function.
32757
32758Description:
32759    The probability density function is:
32760       f(x.b) = 1/(x*LOG(b))       for 1/b <= x < 1,  b > 1
32761    where b is the shape parameter.
32762
32763Syntax:
32764    LET <y> = RECPDF(<x>,<b>)   <SUBSET/EXCEPT/FOR qualification>
32765    where <x> is a variable, a number, or a parameter;
32766          <y> is a variable or a parameter (depending on what <x> is)
32767               where the computed reciprocal pdf value is saved;
32768          <b> is a number, parameter, or variable that specifies
32769               the shape parameter;
32770    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
32771
32772Examples:
32773    LET A = RECPDF(0.5,1.5)
32774    LET X2 = RECPDF(X1,B)
32775
32776Note:
32777    Library functions are distinguished from let subcommands
32778    in the following ways.
32779    1) Functions enclose the input value in parenthesis.  Let
32780       subcommands use spaces.
32781    2) Functions can accept (and return) either parameters
32782       (i.e., single values) or variables (i.e., an array of
32783       values) while let subcommands are specific in which they
32784       accept as input and what they return as output.
32785    3) Functions can accept expressions while let subcommands
32786       do not.  For example, the following is legal:
32787           LET Y2 = ABS(Y1-INT(Y1))
32788       For let subcommands, you typically have to do something
32789       like the following:
32790           LET YTEMP = Y**2 + 8
32791           LET A = SUM YTEMP
32792
32793Default:
32794    None
32795
32796Synonyms:
32797    None
32798
32799Related Commands:
32800    RECCDF = Compute the reciprocal cumulative distribution function.
32801    RECPPF = Compute the reciprocal percent point function.
32802    BRACDF = Compute the Bradford cumulative distribution function.
32803    BRAPDF = Compute the Bradford probability density function.
32804    BRAPPF = Compute the Bradford percent point function.
32805    BETCDF = Compute the beta cumulative distribution function.
32806    BETPDF = Compute the beta probability density function.
32807    BETPPF = Compute the beta percent point function.
32808
32809Reference:
32810    "Numerical Methods for Scientists and Engineers", 2nd. Ed.,
32811    Hamming, Dover Publications, 1973.
32812
32813Applications:
32814    Data Analysis
32815
32816Implementation Date:
32817    96/5
32818
32819Program:
32820    MULTIPLOT 2 2; MULTIPLOT CORNER COORDINATES 0 0 100 100
32821    TITLE AUTOMATIC
32822    X1LABEL X
32823    Y1LABEL PROBABILITY
32824    LET B = 10
32825    X1LABEL  BETA = ^B
32826    PLOT RECPDF(X,B) FOR X = 0.1 0.01 0.99
32827    LET B = 100
32828    X1LABEL  BETA = ^B
32829    PLOT RECPDF(X,B) FOR X = 0.01 0.01 0.99
32830    LET B = 5
32831    X1LABEL  BETA = ^B
32832    PLOT RECPDF(X,B) FOR X = 0.2 0.01 0.99
32833    LET B = 2
32834    X1LABEL  BETA = ^B
32835    PLOT RECPDF(X,B) FOR X = 0.5 0.01 0.99
32836    END OF MULTIPLOT
32837
32838-----RECPPF (LET)--------------------------------
32839
32840RECPPF
32841
32842Name:
32843    RECPPF (LET)
32844
32845Type:
32846    Library Function
32847
32848Purpose:
32849    Compute the reciprocal probability density function.
32850
32851Description:
32852    The probability density function is:
32853       f(x.b) = 1/(x*LOG(b))       for 1/b <= x < 1,  b > 1
32854    where b is the shape parameter.  The formula for the percent
32855    point function is:
32856       G(p,b) = EXP(LOG(b)*(p-1))          for 0 <= p < 1, b > 1
32857
32858Syntax:
32859    LET <y> = RECPPF(<p>,<b>)   <SUBSET/EXCEPT/FOR qualification>
32860    where <p> is a variable, a number, or a parameter in the
32861               range (0,1);
32862          <y> is a variable or a parameter (depending on what <p> is)
32863               where the computed reciprocal ppf value is saved;
32864          <b> is a number, parameter, or variable that specifies
32865               the shape parameter;
32866    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
32867
32868Examples:
32869    LET A = RECPPF(0.5,1.5)
32870    LET X2 = RECPPF(P,B)
32871
32872Note:
32873    Library functions are distinguished from let subcommands
32874    in the following ways.
32875    1) Functions enclose the input value in parenthesis.  Let
32876       subcommands use spaces.
32877    2) Functions can accept (and return) either parameters
32878       (i.e., single values) or variables (i.e., an array of
32879       values) while let subcommands are specific in which they
32880       accept as input and what they return as output.
32881    3) Functions can accept expressions while let subcommands
32882       do not.  For example, the following is legal:
32883           LET Y2 = ABS(Y1-INT(Y1))
32884       For let subcommands, you typically have to do something
32885       like the following:
32886           LET YTEMP = Y**2 + 8
32887           LET A = SUM YTEMP
32888
32889Default:
32890    None
32891
32892Synonyms:
32893    None
32894
32895Related Commands:
32896    RECCDF = Compute the reciprocal cumulative distribution function.
32897    RECPDF = Compute the reciprocal probability density function.
32898    BRACDF = Compute the Bradford cumulative distribution function.
32899    BRAPDF = Compute the Bradford probability density function.
32900    BRAPPF = Compute the Bradford percent point function.
32901    BETCDF = Compute the beta cumulative distribution function.
32902    BETPDF = Compute the beta probability density function.
32903    BETPPF = Compute the beta percent point function.
32904
32905Reference:
32906    "Numerical Methods for Scientists and Engineers", 2nd. Ed.,
32907    Hamming, Dover Publications, 1973.
32908
32909Applications:
32910    Data Analysis
32911
32912Implementation Date:
32913    96/5
32914
32915Program:
32916    MULTIPLOT 2 2; MULTIPLOT CORNER COORDINATES 0 0 100 100
32917    TITLE AUTOMATIC
32918    Y1LABEL X
32919    X1LABEL PROBABILITY
32920    LET B = 10
32921    X1LABEL  BETA = ^B
32922    PLOT RECPPF(P,B) FOR P = 0 0.01 0.99
32923    LET B = 100
32924    X1LABEL  BETA = ^B
32925    PLOT RECPPF(P,B) FOR P = 0 0.01 0.99
32926    LET B = 5
32927    X1LABEL  BETA = ^B
32928    PLOT RECPPF(P,B) FOR P = 0 0.01 0.99
32929    LET B = 2
32930    X1LABEL  BETA = ^B
32931    PLOT RECPPF(P,B) FOR P = 0 0.01 0.99
32932    END OF MULTIPLOT
32933
32934-----REGION BASE-------------------------------------------------------
32935
32936REGION BASE
32937
32938Name:
32939    REGION BASE
32940
32941Type:
32942    Plot Control Command
32943
32944Purpose:
32945    Specifies the base location for regions on plots.
32946
32947Description:
32948    On a plot, a region is defined as the figure formed by the line
32949    connecting points belonging to a common trace and a region base
32950    (typically zero).  The REGION FILL command can be used to generate
32951    a solid fill or a cross-hatch fill of this region.  The attributes
32952    of the fill are set with additional REGION commands (see the
32953    RELATED COMMANDS section below).  The attributes of the region
32954    border are set with LINE, LINE COLOR, and LINE THICKNESS commands.
32955
32956    There are 3 special cases for the region base.  Specifying REGION
32957    BASE POLYGON specifies that the points in the trace form a closed
32958    polygon.  DATAPLOT automatically connects the first and last point
32959    if they are not already the same.  This option is useful for
32960    drawing filled 2d polygons with the standard PLOT command.  Drawing
32961    statistical maps is one application of this.  The PROGRAM 2 example
32962    demonstrates this case.
32963
32964    The REGION BASE AUTOMATIC and REGION BASE INTERPOLATE commands
32965    are typically used together to fill in the area between 2 curves.
32966    The REGION BASE AUTOMATIC command specifies a variable to be used
32967    as arguments for the REGION BASE command which allows a moving
32968    region base between points.  However, in the case of filling the
32969    area between curves, the base is not horizontal between points.
32970    The REGION BASE INTERPOLATE command specifies that the base should
32971    be drawn to connect pairs of base points.  The PROGRAM 3 example
32972    shows how these two commands can be used to draw two curves with
32973    the are between them filled.  The key trick in this macro is to
32974    define each consecutive pair of points on the second curve as a
32975    single trace.  Generally, it is better practice to explicitly plot
32976    differences than it is to draw filled area curves.
32977
32978    The REGION AUTOMATIC and REGION BASE INTERPOLATE commands are
32979    actually not needed because the REGION BASE POLY command supports
32980    the capability they provide in a simpler manner.  The PROGRAM 4
32981    example generates the same plot as the PROGRAM 3 example, but it
32982    uses the REGION BASE POLY command.
32983
32984Syntax 1:
32985    REGION BASE  <number>  <number>  <number>  etc.
32986    where <number> is a decimal number or trace that specifies the
32987              desired region base.  Up to 100 region bases can be
32988              specified.
32989
32990Syntax 2:
32991    REGION BASE POLYGON <ON/OFF> <ON/OFF> etc.
32992    where ON specifies that the trace is treated as a closed polygon
32993              while OFF specifies that it is not.  Up to 100 region
32994              bases can be specified.
32995
32996Syntax 3:
32997    REGION BASE  AUTOMATIC <var>
32998    where <var> is a variable whose elements are used as arguments to
32999              the REGION BASE command.
33000
33001Syntax 2:
33002    REGION BASE INTERPOLATE <ON/OFF> <ON/OFF> etc.
33003    where ON specifies that the region base is drawn between the
33004             entered values for 2 consecutive bases while OFF
33005             specifies that it is not.  Up to 100 region bases can be
33006             specified.
33007
33008Examples:
33009    REGION BASES 0. 0. 10.
33010    REGION BASES 20. 20. 20.
33011    REGION BASES 0. ALL
33012    REGION BASES ALL 0.
33013    REGION BASES
33014    REGION BASE POLYGON ON
33015    REGION BASE INTERPOLATE ON
33016    REGION BASE AUTOMATIC Y1
33017
33018Note:
33019    The REGION BASE command with no arguments sets the region base to
33020    zero for all regions.  The REGION BASE command with the word ALL
33021    before or after the specified base assigns that region base to all
33022    regions; thus REGION BASE 0. ALL or REGION BASE ALL 0. uses a base
33023    of 0. for all regions.  The REGION, BAR, SPIKE, CHARACTER, and LINE
33024    switch all work independently of each other.  That is, a plot point
33025    can be a line, a character, a region, a spike or a bar or any
33026    combination of the above.
33027
33028Default:
33029    All region bases are 0.0.
33030
33031Synonyms:
33032    None
33033
33034Related Commands:
33035    PLOT                   = Generates a data or function plot.
33036    REGION FILL            = Sets the on/off switches for region fills.
33037    REGION FILL COLOR      = Sets the color for solid region fills.
33038    REGION PATTERN         = Sets the types for region fill patterns.
33039    REGION PATTERN COLOR   = Sets the color for hatched region fills.
33040    REGION PATTERN LINE    = Sets the line types for region fill
33041                             patterns.
33042    REGION PATTERN SPACING = Sets the line spacing for region fill
33043                             patterns.
33044    REGION PATTERN THICK   = Sets the line thickness for region fill
33045                             patterns.
33046    LINE BORDER COLOR      = Sets the color for region border lines.
33047    LINE BORDER LINE       = Sets the types for region border lines.
33048    LINE BORDER THICKNESS  = Sets the line thickness for region border
33049                             lines.
33050
33051Applications:
33052    Presentation Graphics
33053
33054Implementation Date:
33055    XX
33056
33057    The REGION BASE POLYGON option was added 94/4.
33058
33059    The REGION BASE AUTOMATIC and REGION BASE INTERPOLATE commands and
33060    the ability to do hatch fills of non-rectangular regions were
33061    added 93/10.
33062
33063Program 1:
33064    LET FUNCTION F = SHIFT + AMPL*SIN(PERIOD*X+PHASE)
33065    LET SHIFT = 3
33066    LET AMPL = 2
33067    LET PERIOD = 0.5
33068    LET PHASE = PI
33069    .
33070    REGION FILL ON
33071    REGION BASE SHIFT
33072    .
33073    TITLE SINE WAVE
33074    LET MIN = -2*PI
33075    LET MAX = 2*PI
33076    XLIMITS -7 7
33077    PLOT F FOR X = MIN 0.1 MAX
33078
33079Program 2:
33080    SKIP 25
33081    READ TEXAS.DAT X Y
33082    .
33083    FRAME OFF
33084    FRAME CORNER COORDINATES 5 5 95 95
33085    MULTIPLOT 2 2; MULTIPLOT CORNER COORDINATES 0 0 100 100
33086    PRE-SORT OFF
33087    PLOT Y X
33088    PRE-SORT ON
33089    REGION BASE POLYGON
33090    REGION FILL ON
33091    PLOT Y X
33092    REGION PATTERN COLOR G25
33093    PLOT Y X
33094    REGION PATTERN D1D2
33095    REGION PATTERN SPACING 5
33096    PLOT Y X
33097    END OF MULTIPLOT
33098
33099Program 3:
33100    . PERCENTAGE BELOW POVERTY LEVEL
33101    . SOURCE: "SOCIAL INDICATORS 1976", US CENSUS BUREAU
33102    . Y1 = AGES 22-42    Y2 = AGES 65+
33103    .
33104    LET Y1 = DATA 9.8 9.1 8.2 7.7 8.3 8.5 8.2 7.6 7.7 8.8
33105    LET Y2 = DATA 28.5 29.5 25.0 25.3 24.5 21.6 18.6 16.3 14.6 15.3
33106    LET N = SIZE Y1
33107    .
33108    XLIMITS 1 N; XTIC OFFSET 1 1
33109    MAJOR X1TIC MARK NUMBER N; MINOR X1TICMARK NUMBER 0
33110    X1TIC MARK FORMAT ALPHA
33111    X1TIC MARK CONTENT 66 67 68 69 70 71 72 73 74 75
33112    YLIMITS 0 30
33113    .
33114    PLOT Y1
33115    PRE-ERASE OFF
33116    LET N1 = N - 1
33117    LET N2 = N + 1
33118    .
33119    REGION BASE INTERPOLATION ON
33120    REGION BASE AUTOMATIC Y1
33121    REGION FILL ON ALL
33122    . CREATE X AND TAG VARIABLES
33123    LET X = SEQUENCE 1 1 N1
33124    LET NLAST = 2*N1
33125    LET X = SEQUENCE 2 1 N FOR I = N 1 NLAST
33126    LET TAG = SEQUENCE 1 1 N1 FOR I = 1 1 NLAST
33127    . CREATE Y VARIABLE
33128    LET JUNK = Y2
33129    DELETE JUNK(1)
33130    DELETE Y2(^N)
33131    EXTEND Y2 JUNK
33132    PLOT Y2 X TAG
33133
33134Program 4:
33135    . PERCENTAGE BELOW POVERTY LEVEL
33136    . SOURCE: "SOCIAL INDICATORS 1976", US CENSUS BUREAU
33137    . Y1 = 22-42    Y2 = 65+
33138    .
33139    LET Y1 = DATA 9.8 9.1 8.2 7.7 8.3 8.5 8.2 7.6 7.7 8.8
33140    LET Y2 = DATA 28.5 29.5 25.0 25.3 24.5 21.6 18.6 16.3 14.6 15.3
33141    LET X = SEQUENCE 1966 1 1975
33142    LET XREV = X
33143    LET N = SIZE Y1
33144    LET INDX = SEQUENCE N -1 1
33145    LET INDX = SORTC INDX XREV Y2
33146    .
33147    EXTEND Y1 Y2
33148    EXTEND X XREV
33149    REGION BASE POLYGON
33150    REGION FILL ON ALL
33151    XLIMITS 1966 1975; XTIC OFFSET 1 1
33152    MAJOR X1TIC MARK NUMBER N; MINOR X1TICMARK NUMBER 0
33153    TITLE FILLED AREA PLOT
33154    PLOT Y1 X
33155
33156-----REGION FILL--------------------------------------------------
33157
33158REGION FILL
33159
33160Name:
33161    REGION FILL
33162
33163Type:
33164    Plot Control Command
33165
33166Purpose:
33167    Specifies whether or not regions on subsequent plots are filled.
33168    Additionally, it is used to specify whether or not certain types
33169    of diagrammatic graphics are filled.
33170
33171Description:
33172    On a plot, a region is defined as the figure formed by the line
33173    connecting points belonging to a common trace and a region base
33174    (typically zero).  The REGION FILL command can be used to generate
33175    a solid fill or a cross-hatch fill of this region.  The attributes
33176    of the fill are set with additional REGION commands (see the
33177    RELATED COMMANDS section below).  The attributes of the region
33178    border are set with LINE, LINE COLOR, and LINE THICKNESS commands.
33179
33180    The diagrammatic graphics commands CIRCLE, CUBE, DIAMOND, ELLIPSE,
33181    HEXAGON, PYRAMID, SEMI-CIRCLE, and TRIANGLE can be filled using the
33182    REGION FILL command.  The BOX command has its own attribute
33183    setting commands.
33184
33185Syntax:
33186    REGION FILL <ON/OFF>  <ON/OFF>  <ON/OFF>  etc.
33187    where ON specifies that the region is filled while OFF specifies
33188             that it is not.  Up to 100 region fill switches can be
33189             specified.
33190
33191Examples:
33192    REGION FILL ON OFF ON OFF
33193    REGION FILL OFF OFF ON
33194    REGION FILL ON ALL
33195    REGION FILL ALL ON
33196    REGION
33197
33198Note:
33199    The diagrammatic graphics commands use the first setting of the
33200    REGION FILL command only.
33201
33202Note:
33203    Regions can be used for the following applications in DATAPLOT:
33204       1) They can be used to draw filled or cross-hatched 2d
33205          polygons.  These polygons are not limited to convex polygons.
33206       2) Statistical maps can be generated.  The boundary for each
33207          area (e.g., state or county) should be defined as a common
33208          trace.  This area can then be treated as a polygon.  At this
33209          time, DATAPLOT does not provide map files.  Hopefully, some
33210          will be added in the future.
33211       3) Area plots can be generated or the area between curves can
33212          be filled.  Although this type of plot is possible with
33213          DATAPLOT, it is generally not a recommended graphical
33214          technique.
33215
33216Note:
33217    At this time, the region fill capability should not be used for
33218    3d plots.  The results will be unpredictable.
33219
33220Note:
33221    The REGION FILL command with no arguments sets the region fill to
33222    OFF for all traces.  The REGION FILL command with the word ALL
33223    before or after the specified fill switch assigns that region type
33224    to all traces; thus REGION FILL ON ALL or REGION FILL ALL ON plots
33225    regions for all traces.
33226
33227Note:
33228    The BAR, REGION, SPIKE, CHARACTER, and LINE switch all work
33229    independently of each other.  That is, a plot point can be a line,
33230    a character, a bar, a spike or a region or any combination of the
33231    above.
33232
33233Default:
33234    All regions off
33235
33236Synonyms:
33237    None
33238
33239Related Commands:
33240    PLOT                   = Generates a data or function plot.
33241    REGION BASE            = Sets the base locations for plot regions.
33242    REGION FILL COLOR      = Sets the color for solid region fills.
33243    REGION PATTERN         = Sets the types for region fill patterns.
33244    REGION PATTERN COLOR   = Sets the color for region hatched fills.
33245    REGION PATTERN LINE    = Sets the line types for region fill
33246                             patterns.
33247    REGION PATTERN SPACING = Sets the line spacing for region fill
33248                             patterns.
33249    REGION PATTERN THICK   = Sets the line thickness for region fill
33250                             patterns.
33251    LINE BORDER COLOR      = Sets the color for region border lines.
33252    LINE BORDER LINE       = Sets the types for region border lines.
33253    LINE BORDER THICKNESS  = Sets the line thickness for region border
33254                             lines.
33255
33256Applications:
33257    Presentation Graphics
33258
33259Implementation Date:
33260    XX
33261
33262Program 1:
33263    MULTIPLOT 2 2; MULTIPLOT CORNER COORDINATES 0 0 100 100
33264    TITLE SIZE 3
33265    .
33266    REGION FILL ON OFF
33267    REGION BASE 0 ALL
33268    TITLE NORPDF FROM -1.5 TO -1
33269    PLOT NORPDF(X) FOR X = -1.5 0.01 -1 AND
33270    PLOT NORPDF(X) FOR X = -3 0.01 3
33271    .
33272    TITLE PLOT OF SINE CURVE
33273    PLOT SIN(X) FOR X = -6.28 0.1 6.28
33274    .
33275    LET X = DATA 81 82 83 84 85
33276    LET Y = DATA 2 5 9 15 28
33277    TITLE AREA CURVE
33278    PLOT Y X
33279    .
33280    TITLE PIE CHART
33281    LINE THICKNESS 0.3 ALL
33282    REGION FILL ON ALL
33283    REGION BASE
33284    REGION FILL COLOR G10 G30 G50 G70 G90
33285    PIE CHART Y X
33286    END OF MULTIPLOT
33287
33288Program 2:
33289    MULTIPLOT 2 2; MULTIPLOT CORNER COORDINATES 0 0 100 100
33290    TITLE SIZE 3
33291    .
33292    READ X2 Y2
33293       .6255459213E+002       .4360801888E+002
33294       .6408000851E+002       .4019557142E+002
33295       .7055372143E+002       .3765282536E+002
33296       .7249774456E+002       .3541294813E+002
33297       .7415955067E+002       .3788125515E+002
33298       .7837881279E+002       .3731980515E+002
33299       .8329592896E+002       .3269992304E+002
33300       .8584967327E+002       .2901664400E+002
33301       .9298062229E+002       .3339557743E+002
33302       .9053282833E+002       .3760073233E+002
33303       .8058299351E+002       .4461946392E+002
33304       .7574584389E+002       .4518656731E+002
33305       .7132878590E+002       .4718765020E+002
33306       .6534696388E+002       .4567384863E+002
33307       .6277094793E+002       .4543599606E+002
33308    END OF DATA
33309    REGION FILL ON
33310    REGION BASE POLYGON
33311    TITLE PLOT A POLYGON
33312    PLOT Y2 X2
33313    .
33314    SKIP 25
33315    READ TEXAS.DAT X Y
33316    REGION FILL ON
33317    REGION BASE POLYGON
33318    FRAME OFF
33319    TITLE MAP OF TEXAS
33320    PLOT Y X
33321    REGION BASE 0
33322    .
33323    TITLE; PLOT
33324    MOVE 50 97; JUSTIFICATION CENTER
33325    TEXT FILLED DIAGRAMMATIC GRAPHICS REGION FILL ON
33326    CIRCLE 10 10 20 20
33327    REGION FILL ONTS
33328    CUBE 40 70 48 78
33329    REGION FILL ON
33330    ELLIPSE 10 90 15 80 20 90
33331    DIAMOND 80 70 84 65 88 70
33332    HEXAGON 60 10 80 30
33333    END OF MULTIPLOT
33334
33335-----REGION FILL COLOR---------------------------------------------
33336
33337REGION FILL COLOR
33338
33339Name:
33340    REGION FILL COLOR
33341
33342Type:
33343    Plot Control Command
33344
33345Purpose:
33346    Specifies the color used for solid fill regions on subsequent
33347    plots or for certain types of diagrammatic graphics.
33348
33349Description:
33350    On a plot, a region is defined as the figure formed by the line
33351    connecting points belonging to a common trace and a region base
33352    (typically zero).  The REGION FILL command can be used to generate
33353    a solid fill or a cross-hatch fill of this region.  The REGION FILL
33354    command is used to set the color for solid fill regions (the REGION
33355    PATTERN COLOR command is used to set the color for hatch fill
33356    regions).  Other attributes of the fill are set with additional
33357    REGION commands (see the RELATED COMMANDS section below).  The
33358    attributes of the region border are set with LINE, LINE COLOR, and
33359    LINE THICKNESS commands.
33360
33361    The diagrammatic graphics commands CIRCLE, CUBE, DIAMOND, ELLIPSE,
33362    HEXAGON, PYRAMID, SEMI-CIRCLE, and TRIANGLE can be filled using the
33363    REGION FILL command.  The BOX command has its own attribute
33364    setting commands.
33365
33366Syntax:
33367    REGION FILL COLOR  <color>  <color>  <color>  etc.
33368    where <color> is a character string or index number that specifies
33369                the desired color.  Up to 100 region fill colors can
33370                be specified.
33371
33372Examples:
33373    REGION FILL COLOR RED BLUE GREEN
33374    REGION FILL COLOR BLACK ALL
33375    REGION FILL COLOR ALL BLACK
33376    REGION FILL COLOR
33377
33378Default:
33379    All solid region fills are black.
33380
33381Synonyms:
33382    None
33383
33384Note:
33385    The diagrammatic graphics commands use the first setting of the
33386    REGION FILL COLOR command only.
33387
33388Note:
33389    The REGION FILL COLOR command with no arguments sets the region
33390    fill color to default for all regions.  The REGION FILL COLOR
33391    command with the word ALL before or after the specified color
33392    assigns that region fill color to all regions; thus REGION FILL
33393    COLOR BLACK ALL or REGION FILL COLOR ALL BLACK plots all region
33394    fills in black.
33395
33396Note:
33397    The REGION, BAR, SPIKE, CHARACTER, and LINE switch all work
33398    independently of each other.  That is, a plot point can be a line,
33399    a character, a spike a region, a bar or any combination of the
33400    above.
33401
33402Related Commands:
33403    PLOT                   = Generates a data or function plot.
33404    REGION BASE            = Sets the base locations for plot regions.
33405    REGION FILL            = Sets the on/off switches for region fills.
33406    REGION PATTERN         = Sets the types for region fill patterns.
33407    REGION PATTERN COLOR   = Sets the color for region hatched fills.
33408    REGION PATTERN LINE    = Sets the line types for region fill
33409                             patterns.
33410    REGION PATTERN SPACING = Sets the line spacing for region fill
33411                             patterns.
33412    REGION PATTERN THICK   = Sets the line thickness for region fill
33413                             patterns.
33414    LINE BORDER COLOR      = Sets the color for region border lines.
33415    LINE BORDER LINE       = Sets the types for region border lines.
33416    LINE BORDER THICKNESS  = Sets the line thickness for region border
33417                             lines.
33418
33419Applications:
33420    Presentation Graphics
33421
33422Implementation Date:
33423    XX
33424
33425Program:
33426    SKIP 25
33427    READ TEXAS.DAT X Y
33428    .
33429    FRAME OFF
33430    FRAME CORNER COORDINATES 5 5 95 95
33431    MULTIPLOT 2 2; MULTIPLOT CORNER COORDINATES 0 0 100 100
33432    REGION BASE POLYGON
33433    REGION FILL ON
33434    TITLE BLACK
33435    PLOT Y X
33436    REGION FILL COLOR G75
33437    TITLE G75
33438    PLOT Y X
33439    REGION FILL COLOR G50
33440    TITLE G50
33441    PLOT Y X
33442    REGION FILL COLOR G25
33443    TITLE G25
33444    PLOT Y X
33445    END OF MULTIPLOT
33446
33447-----REGION PATTERN---------------------------------------------------
33448
33449REGION PATTERN
33450
33451Name:
33452    REGION PATTERN
33453
33454Type:
33455    Plot Control Command
33456
33457Purpose:
33458    Specifies the type of fill pattern for regions on subsequent plots
33459    or for certain types of diagrammatic graphics.
33460
33461Description:
33462    On a plot, a region is defined as the figure formed by the line
33463    connecting points belonging to a common trace and a region base
33464    (typically zero).  The REGION FILL command can be used to generate
33465    a solid fill or a cross-hatch fill of this region.  The REGION
33466    PATTERN command can be used to specify the type of pattern fill.
33467    Other attributes of the fill are set with additional REGION
33468    commands (see the RELATED COMMANDS section below).  The attributes
33469    of the region border are set with LINE, LINE COLOR, and LINE
33470    THICKNESS commands.
33471
33472    The diagrammatic graphics commands CIRCLE, CUBE, DIAMOND, ELLIPSE,
33473    HEXAGON, PYRAMID, SEMI-CIRCLE, and TRIANGLE can be filled using the
33474    REGION FILL command.  The BOX command has its own attribute
33475    setting commands.
33476
33477Syntax:
33478    REGION PATTERN  <pattern>  <pattern>  <pattern>  etc.
33479    where <pattern> is a character string that specifies the desired
33480              fill pattern.
33481
33482Examples:
33483    REGION PATTERN SOLID VERTICAL HORIZONTAL BLANK
33484    REGION PATTERN D1 D2 D1D2 HOD1 VED2 VEDD
33485    REGION PATTERN D1 ALL
33486    REGION PATTERN ALL D1
33487    REGION PATTERN
33488
33489Note:
33490    The following region fill patterns are available:
33491        BLANK   - no fill
33492        EMPTY   - no fill
33493        OFF     - no fill
33494        SOLID   - solid fill
33495        ON      - solid fill
33496        HORI    - horizontal lines
33497        VERT    - vertical lines
33498        D1      - up diagonals
33499        D2      - down diagonals
33500        D1D2    - both up and down diagonals
33501        VED1    - both vertical lines and up diagonals
33502        VED2    - both vertical lines and down diagonals
33503        HOD1    - both horizontal lines and up diagonals
33504        HOD2    - both vertical lines and down diagonals
33505        VEDD    - both horizontal and vertical lines, and
33506                  both up and down diagonals
33507    In practice, the first 7 (OFF, ON, HORI, VERT, D1, D2, D1D2) are
33508    heavily used and the last 5 (VED1, VED2, HOD1, HOD2, VEDD) are
33509    rarely used.
33510
33511Note:
33512    The diagrammatic graphics commands use the first setting of the
33513    REGION PATTERN command only.
33514
33515Note:
33516    The REGION PATTERN command with no arguments sets the region
33517    pattern type to blank for all regions.  The REGION PATTERN command
33518    with the word ALL before or after the specified pattern type
33519    assigns that region pattern type to all regions; thus REGION
33520    PATTERN D1 ALL or REGION PATTERN ALL D1 fills all regions with
33521    pattern D1.
33522
33523Note:
33524    The REGION, SPIKE, CHARACTER, BAR, and LINE switch all work
33525    independently of each other.  That is, a plot point can be a line,
33526    a region, a character, a spike, a region, or any combination of the
33527    above.
33528
33529Default:
33530    All region patterns are blank.
33531
33532Synonyms:
33533    None
33534
33535Related Commands:
33536    PLOT                   = Generates a data or function plot.
33537    REGION BASE            = Sets the base locations for plot regions.
33538    REGION FILL            = Sets the on/off switches for region fills.
33539    REGION FILL COLOR      = Sets the color for region solid fills.
33540    REGION PATTERN COLOR   = Sets the color for region hatched fills.
33541    REGION PATTERN LINE    = Sets the line types for region fill
33542                             patterns.
33543    REGION PATTERN SPACING = Sets the line spacing for region fill
33544                             patterns.
33545    REGION PATTERN THICK   = Sets the line thickness for region fill
33546                             patterns.
33547    LINE COLOR             = Sets the color for region border lines.
33548    LINE                   = Sets the types for region border lines.
33549    LINE THICKNESS         = Sets the line thickness for region border
33550                             lines.
33551
33552Applications:
33553    Presentation Graphics
33554
33555Implementation Date:
33556    The ability to generate hatch fills for non-rectangular regions
33557    was added 93/10.
33558
33559Program:
33560    LET C = 1
33561    LET FUNCTION F1 = C
33562    LET FUNCTION F2 = -1.5*X + 9
33563    LET FUNCTION F3 = 6
33564    LET FUNCTION F4 = 1+0.3*X**2
33565    .
33566    XMINIMUM 0; YLIMITS 0 10
33567    TITLE PLOT INEQUALITY REGIONS
33568    .
33569    REGION FILL ON ALL
33570    REGION BASE 0 10 10 0
33571    REGION PATTERN D1 HORI D2 VERT
33572    REGION PATTERN SPACING 5 ALL
33573    .
33574    LINE THICKNESS 0.3
33575    LINE SOLID DASH SOLID DASH
33576    X1LABEL SOLID = EQUALITY
33577    X2LABEL DASH = INEQUALITY
33578    .
33579    PLOT F1 FOR X = 0 5 5 AND
33580    PLOT F2 FOR X = 0 5 5 AND
33581    PLOT F3 FOR X = 0 5 5 AND
33582    PLOT F4 FOR X = 0 0.01 5
33583
33584-----REGION PATTERN COLOR---------------------------------------------
33585
33586REGION PATTERN COLOR
33587
33588Name:
33589    REGION PATTERN COLOR
33590
33591Type:
33592    Plot Control Command
33593
33594Purpose:
33595    Specifies the color used for cross-hatch fill regions on subsequent
33596    plots or for certain types of diagrammatic graphics.
33597
33598Description:
33599    On a plot, a region is defined as the figure formed by the line
33600    connecting points belonging to a common trace and a region base
33601    (typically zero).  The REGION FILL and REGION PATTERN commands can
33602    be used to generate a solid or cross-hatch fill of this region.
33603    The REGION FILL COLOR command specifies the color for solid fill
33604    regions while the REGION PATTERN COLOR command specifies the color
33605    for cross-hatch lines.  Other attributes of the fill are set with
33606    additional REGION commands (see the RELATED COMMANDS section
33607    below).  The attributes of the region border are set with LINE,
33608    LINE COLOR, and LINE THICKNESS commands.
33609
33610    The diagrammatic graphics commands CIRCLE, CUBE, DIAMOND, ELLIPSE,
33611    HEXAGON, PYRAMID, SEMI-CIRCLE, and TRIANGLE can be filled using the
33612    REGION FILL command.  The BOX command has its own attribute
33613    setting commands.
33614
33615Syntax:
33616    REGION PATTERN COLOR  <color>  <color>  <color>  etc.
33617    where <color> is a character string or index number that specifies
33618              the desired color.  Up to 100 region pattern colors can
33619              be specified.
33620
33621Examples:
33622    REGION PATTERN COLOR RED BLUE GREEN
33623    REGION PATTERN COLOR BLACK ALL
33624    REGION PATTERN COLOR ALL BLACK
33625    REGION PATTERN COLOR
33626
33627Note:
33628    The diagrammatic graphics commands use the first setting of the
33629    REGION FILL command only.
33630
33631Note:
33632    The REGION PATTERN COLOR command with no arguments sets the region
33633    pattern color to default for all regions.  The REGION PATTERN COLOR
33634    command with the word ALL before or after the specified color
33635    assigns that region pattern color to all regions; thus REGION
33636    PATTERN COLOR BLACK ALL or REGION PATTERN COLOR ALL BLACK plots all
33637    region fills in black.
33638
33639Note:
33640    The REGION, BAR, SPIKE, CHARACTER, and LINE switch all work
33641    independently of each other.  That is, a plot point can be a line,
33642    a character, a spike, a region, a bar, or any combination of the
33643    above.
33644
33645Default:
33646    All region pattern colors are black.
33647
33648Synonyms:
33649    None
33650
33651Related Commands:
33652    PLOT                   = Generates a data or function plot.
33653    REGION BASE            = Sets the base locations for plot regions.
33654    REGION FILL            = Sets the on/off switches for region fills.
33655    REGION FILL COLOR      = Sets the color for region solid fills.
33656    REGION PATTERN         = Sets the types for region fill patterns.
33657    REGION PATTERN LINE    = Sets the line types for region fill
33658                             patterns.
33659    REGION PATTERN SPACING = Sets the line spacing for region fill
33660                             patterns.
33661    REGION PATTERN THICK   = Sets the line thickness for region fill
33662                             patterns.
33663    LINE COLOR             = Sets the color for region border lines.
33664    LINE                   = Sets the types for region border lines.
33665    LINE THICKNESS         = Sets the line thickness for region border
33666                             lines.
33667
33668Applications:
33669    Presentation Graphics
33670
33671Implementation Date:
33672    The capability to do cross-hatch fills for non-rectangular regions
33673    was added 93/10.
33674
33675Program:
33676    LET C = 1
33677    LET FUNCTION F1 = C
33678    LET FUNCTION F2 = -1.5*X + 9
33679    LET FUNCTION F3 = 6
33680    LET FUNCTION F4 = 1+0.3*X**2
33681    .
33682    XMINIMUM 0; YLIMITS 0 10
33683    TITLE PLOT INEQUALITY REGIONS
33684    .
33685    REGION FILL ON ALL
33686    REGION BASE 0 10 10 0
33687    REGION PATTERN D1 HORI D2 VERT
33688    REGION PATTERN SPACING 5 ALL
33689    REGION PATTERN THICKNESS 0.5 0.5 0.5 0.5
33690    REGION PATTERN COLOR G10 G30 G50 G80
33691    .
33692    PLOT F1 FOR X = 0 5 5 AND
33693    PLOT F2 FOR X = 0 5 5 AND
33694    PLOT F3 FOR X = 0 5 5 AND
33695    PLOT F4 FOR X = 0 0.01 5
33696
33697-----REGION PATTERN LINE----------------------------------------------
33698
33699REGION PATTERN LINE
33700
33701Name:
33702    REGION PATTERN LINES
33703
33704Type:
33705    Plot Control Command
33706
33707Purpose:
33708    Specifies the line patterns used to do region fills on subsequent
33709    plots and certain types of diagrammatic graphics.
33710
33711Description:
33712    On a plot, a region is defined as the figure formed by the line
33713    connecting points belonging to a common trace and a region base
33714    (typically zero).  The REGION FILL and REGION PATTERN commands can
33715    be used to generate a solid fill or a cross-hatch fill of this
33716    region.  The REGION PATTERN LINE command is used to specify the
33717    line type (i.e., solid, dashed) when generating cross-hatch fills.
33718    The attributes of the fill are set with additional REGION commands
33719    (see the RELATED COMMANDS section below).  The attributes of the
33720    region border are set with LINE, LINE COLOR, and LINE THICKNESS
33721    commands.
33722
33723    The diagrammatic graphics commands CIRCLE, CUBE, DIAMOND, ELLIPSE,
33724    HEXAGON, PYRAMID, SEMI-CIRCLE, and TRIANGLE can be filled using the
33725    REGION FILL command.  The BOX command has its own attribute
33726    setting commands.
33727
33728    The line type (e.g., solid or dashed) is distinct from the pattern
33729    type (e.g., solid or horizontal).
33730
33731Syntax:
33732    REGION PATTERN LINE  <type>  <type>  <type>  etc.
33733    where <type> is a character string that specifies the desired line
33734                type.  Up to 100 region pattern line types can be
33735                specified.
33736
33737Examples:
33738    REGION PATTERN LINE SOLID DASH DOT
33739    REGION PATTERN LINES SOLID ALL
33740    REGION PATTERN LINES ALL SOLID
33741    REGION PATTERN LINES
33742
33743Note:
33744    The REGION PATTERN LINE command with no arguments sets the region
33745    type to default for all regions.  The REGION PATTERN LINE command
33746    with the word ALL before or after the specified type assigns that
33747    pattern line type to all regions; thus REGION PATTERN LINE SOLID
33748    ALL or REGION PATTERN LINE ALL SOLID plots region patterns with
33749    solid lines for all regions.
33750
33751Note:
33752    The REGION, BAR, SPIKE, CHARACTER, and LINE switch all work
33753    independently of each other.  That is, a plot point can be a line,
33754    a character, a region, a spike, a bar, or any combination of the
33755    above.
33756
33757Default:
33758    All region pattern line types are solid.
33759
33760Synonyms:
33761    None
33762
33763Related Commands:
33764    PLOT                   = Generates a data or function plot.
33765    REGION BASE            = Sets the base locations for plot regions.
33766    REGION FILL            = Sets the on/off switches for region fills.
33767    REGION FILL COLOR      = Sets the color for region solid fills.
33768    REGION PATTERN         = Sets the types for region fill patterns.
33769    REGION PATTERN COLOR   = Sets the color for region hatched fills.
33770    REGION PATTERN SPACING = Sets the line spacing for region fill
33771                             patterns.
33772    REGION PATTERN THICK   = Sets the line thickness for region fill
33773                             patterns.
33774    LINE COLOR             = Sets the color for region border lines.
33775    LINE                   = Sets the types for region border lines.
33776    LINE THICKNESS         = Sets the line thickness for region border
33777                             lines.
33778
33779Applications:
33780    Presentation Graphics
33781
33782Implementation Date:
33783    The ability to generate cross-hatch fills of non-rectangular
33784    regions was added 93/10.
33785
33786Program:
33787    LET C = 1
33788    LET FUNCTION F1 = C
33789    LET FUNCTION F2 = -1.5*X + 9
33790    LET FUNCTION F3 = 6
33791    LET FUNCTION F4 = 1+0.3*X**2
33792    .
33793    XMINIMUM 0; YLIMITS 0 10
33794    TITLE PLOT INEQUALITY REGIONS
33795    .
33796    REGION FILL ON ALL
33797    REGION BASE 0 10 10 0
33798    REGION PATTERN D1 HORI D2 VERT
33799    REGION PATTERN SPACING 5 ALL
33800    LINE SOLID DASH SOLID DASH
33801    REGION PATTERN LINE SOLID DASH SOLID DASH
33802    .
33803    X1LABEL SOLID = EQUALITY
33804    X2LABEL DASH = INEQUALITY
33805    .
33806    PLOT F1 FOR X = 0 5 5 AND
33807    PLOT F2 FOR X = 0 5 5 AND
33808    PLOT F3 FOR X = 0 5 5 AND
33809    PLOT F4 FOR X = 0 0.01 5
33810
33811-----REGION PATTERN SPACING------------------------------------------
33812
33813REGION PATTERN SPACING
33814
33815Name:
33816    REGION PATTERN SPACING
33817
33818Type:
33819    Plot Control Command
33820
33821Purpose:
33822    Specifies the spacing to be used between lines when doing
33823    cross-hatch pattern fills of regions on subsequent plots or for
33824    certain types of diagrammatic graphics.
33825
33826Description:
33827    On a plot, a region is defined as the figure formed by the line
33828    connecting points belonging to a common trace and a region base
33829    (typically zero).  The REGION FILL and REGION PATTERN commands can
33830    be used to generate a solid fill or a cross-hatch fill of this
33831    region.  The REGION PATTERN SPACING controls the spacing between
33832    lines for cross-hatch fills.  Other attributes of the fill are set
33833    with additional REGION commands (see the RELATED COMMANDS section
33834    below).  The attributes of the region border are set with LINE,
33835    LINE COLOR, and LINE THICKNESS commands.
33836
33837    The diagrammatic graphics commands CIRCLE, CUBE, DIAMOND, ELLIPSE,
33838    HEXAGON, PYRAMID, SEMI-CIRCLE, and TRIANGLE can be filled using the
33839    REGION FILL command.  The BOX command has its own attribute
33840    setting commands.
33841
33842    The region pattern spacing is given in 0.0 to 100.0 DATAPLOT units.
33843    A value of 0.1 gives a solid fill on most devices.  Typical values
33844    are between 1 and 5.
33845
33846Syntax:
33847    REGION PATTERN SPACINGS  <number>  <number>  <number>  etc.
33848    where <number> is a number or parameter that specifies the desired
33849                region pattern spacing.  Up to 100 region pattern
33850                spacings can be specified.
33851
33852Examples:
33853    REGION PATTERN SPACINGS 1.0 0.5 3.0 5.0
33854    REGION PATTERN SPACINGS 1.0 ALL
33855    REGION PATTERN SPACINGS ALL 1.0
33856    REGION PATTERN SPACINGS
33857
33858Note:
33859    The diagrammatic graphics commands use the first setting of the
33860    REGION FILL command only.
33861
33862Note:
33863    The REGION PATTERN SPACING command with no arguments sets the
33864    region pattern spacing to default for all regions.  The REGION
33865    PATTERN SPACING command with the word ALL before or after the
33866    specified pattern spacing assigns that pattern spacing to all
33867    regions; thus REGION PATTERN SPACING 1.0 ALL or REGION PATTERN
33868    SPACING ALL 1.0 uses a pattern spacing of 1.0 for all regions on
33869    the plot.
33870
33871Note:
33872    The REGION, SPIKE, BAR, CHARACTER, and LINE switch all work
33873    independently of each other.  That is, a plot point can be a bar, a
33874    line, a character, a spike, a region, or any combination of the
33875    above.
33876
33877Default:
33878    All region pattern spacings are 1.0.
33879
33880Synonyms:
33881    None
33882
33883Related Commands:
33884    PLOT                   = Generates a data or function plot.
33885    REGION BASE            = Sets the base locations for plot regions.
33886    REGION FILL            = Sets the on/off switches for region fills.
33887    REGION FILL COLOR      = Sets the color for region solid fills.
33888    REGION PATTERN         = Sets the types for region fill patterns.
33889    REGION PATTERN COLOR   = Sets the color for region hatched fills.
33890    REGION PATTERN LINE    = Sets the line types for region fill
33891                             patterns.
33892    REGION PATTERN THICK   = Sets the line thickness for region fill
33893                             patterns.
33894    LINE COLOR             = Sets the color for region border lines.
33895    LINE                   = Sets the types for region border lines.
33896    LINE THICKNESS         = Sets the line thickness for region border
33897                             lines.
33898
33899Applications:
33900    Presentation Graphics
33901
33902Implementation Date:
33903    The ability to generate cross-hatch fills for non-rectangular
33904    regions was added 93/10.
33905
33906Program:
33907    LET C = 1
33908    LET FUNCTION F1 = C
33909    LET FUNCTION F2 = -1.5*X + 9
33910    LET FUNCTION F3 = 6
33911    LET FUNCTION F4 = 1+0.3*X**2
33912    .
33913    XMINIMUM 0; YLIMITS 0 10
33914    TITLE PLOT INEQUALITY REGIONS
33915    .
33916    REGION FILL ON ALL
33917    REGION BASE 0 10 10 0
33918    REGION PATTERN D1 HORI D2 VERT
33919    REGION PATTERN SPACING 5 2 4 3
33920    .
33921    PLOT F1 FOR X = 0 5 5 AND
33922    PLOT F2 FOR X = 0 5 5 AND
33923    PLOT F3 FOR X = 0 5 5 AND
33924    PLOT F4 FOR X = 0 0.01 5
33925
33926-----REGION PATTERN THICKNESS-----------------------------------------
33927
33928REGION PATTERN THICKNESS
33929
33930Name:
33931    REGION PATTERN THICKNESS
33932
33933Type:
33934    Plot Control Command
33935
33936Purpose:
33937    Specifies the thickness of lines used when generating cross-hatch
33938    pattern fills of regions on subsequent plots or for certain
33939    diagrammatic graphics.
33940
33941Description:
33942    On a plot, a region is defined as the figure formed by the line
33943    connecting points belonging to a common trace and a region base
33944    (typically zero).  The REGION FILL and REGION PATTERN commands can
33945    be used to generate a solid or cross-hatch fill of this region.
33946    The REGION PATTERN THICKNESS command is used to specify the line
33947    thickness for a cross-hatch pattern.  Other attributes of the fill
33948    are set with additional REGION commands (see the RELATED COMMANDS
33949    section below).  The attributes of the region border are set with
33950    LINE, LINE COLOR, and LINE THICKNESS commands.
33951
33952    The diagrammatic graphics commands CIRCLE, CUBE, DIAMOND, ELLIPSE,
33953    HEXAGON, PYRAMID, SEMI-CIRCLE, and TRIANGLE can be filled using the
33954    REGION FILL command.  The BOX command has its own attribute
33955    setting commands.
33956
33957    The line thickness is specified in 0.0 to 100.0 DATAPLOT units.
33958    Typical values are between 0.05 and 0.3.
33959
33960Syntax:
33961    REGION PATTERN THICKNESSS  <thick>  <thick>  <thick> etc.
33962    where <thick> is a number or parameter that specifies the desired
33963               thickness.  Up to 100 region pattern line thicknesses
33964               can be specified.
33965
33966Examples:
33967    REGION PATTERN THICKNESSS 0.1 0.2 0.1 0.2
33968    REGION PATTERN THICKNESSS 0.2 0.2 0.1
33969    REGION PATTERN THICKNESSS 0.1 ALL
33970    REGION PATTERN THICKNESSS ALL 0.1
33971    REGION PATTERN THICKNESSS
33972
33973Note:
33974    The diagrammatic graphics commands use the first setting of the
33975    REGION FILL command only.
33976
33977Note:
33978    The REGION PATTERN THICKNESS command with no arguments sets
33979    the region pattern line thickness to default for all regions.
33980    The REGION PATTERN THICKNESS command with the word ALL before
33981    or after the specified thickness assigns that region pattern
33982    line thickness to all regions; thus REGION PATTERN THICKNESS
33983    0.1 ALL or REGION PATTERN THICKNESS ALL 0.1 plots region
33984    pattern fills with a line thickness of 0.1 for all regions
33985    on the plot.
33986
33987Note:
33988    The REGION, SPIKE, CHARACTER, BAR, and LINE switches all work
33989    independently of each other.  That is, a plot point can be a line,
33990    a bar, a character, a spike, a region, or any combination of the
33991    above.
33992
33993Default:
33994    All region pattern line thicknesses are 0.1.
33995
33996Synonyms:
33997    None
33998
33999Related Commands:
34000    PLOT                   = Generates a data or function plot.
34001    REGION BASE            = Sets the base locations for plot regions.
34002    REGION FILL            = Sets the on/off switches for region fills.
34003    REGION FILL COLOR      = Sets the color for region solid fills.
34004    REGION PATTERN         = Sets the types for region fill patterns.
34005    REGION PATTERN COLOR   = Sets the color for region hatched fills.
34006    REGION PATTERN LINE    = Sets the line types for region fill
34007                             patterns.
34008    REGION PATTERN SPACING = Sets the line spacing for region fill
34009                             patterns.
34010    LINE COLOR             = Sets the color for region border lines.
34011    LINE                   = Sets the types for region border lines.
34012    LINE THICKNESS         = Sets the line thickness for region border
34013                             lines.
34014
34015Applications:
34016    Presentation Graphics
34017
34018Implementation Date:
34019    The ability to generate cross-hatch fills of non-rectangular
34020    regions was added 93/10.
34021
34022Program:
34023    LET C = 1
34024    LET FUNCTION F1 = C
34025    LET FUNCTION F2 = -1.5*X + 9
34026    LET FUNCTION F3 = 6
34027    LET FUNCTION F4 = 1+0.3*X**2
34028    .
34029    XMINIMUM 0; YLIMITS 0 10
34030    TITLE PLOT INEQUALITY REGIONS
34031    .
34032    REGION FILL ON ALL
34033    REGION BASE 0 10 10 0
34034    REGION PATTERN D1 HORI D2 VERT
34035    REGION PATTERN SPACING 5 ALL
34036    REGION PATTERN THICKNESS 0.1 0.3 0.1 0.5
34037    .
34038    PLOT F1 FOR X = 0 5 5 AND
34039    PLOT F2 FOR X = 0 5 5 AND
34040    PLOT F3 FOR X = 0 5 5 AND
34041    PLOT F4 FOR X = 0 0.01 5
34042
34043-----REGIS-------------------------------------------------------
34044
34045REGIS
34046
34047Name:
34048    REGIS
34049
34050Type:
34051    Output Device Command
34052
34053Purpose:
34054    The REGIS command is used to direct graphical output to a REGIS
34055    device.
34056
34057Description:
34058    This is the protocol supported on many DEC terminals (e.g., the
34059    VT-240 and VT-340).
34060
34061Syntax 1:
34062    REGIS  <model>
34063    where <model> is 240 for VT-240 class terminals and 340 for VT-340
34064              class terminals.
34065
34066    This form designates device 1 (the terminal) as a Regis device.
34067
34068Syntax 2:
34069    DEVICE <1/2/3> REGIS  <model>
34070    where <model> is 240 for VT-240 class terminals and 340 for VT-340
34071              class terminals.
34072
34073    This form designates one of of DATAPLOT's 3 devices (it will
34074    typically be device 1) as a Regis device.
34075
34076Examples:
34077    REGIS
34078    DEVICE 1 REGIS
34079    DEVICE 1 REGIS 340
34080
34081Note:
34082    Regis supports both monochrome and color terminals.  By default,
34083    the Regis driver is monochrome.  To specify color Regis, enter
34084    the command DEVICE 1 COLOR ON after the REGIS command.
34085
34086Note:
34087    Regis terminals support 64 colors.  However, only a subset of these
34088    can be active at a given time.  For the VT-240 type terminals, 4
34089    colors can be active.  For the VT-340 type terminals, 16 colors
34090    can be active.  One color is reserved for the background and the
34091    rest for the foreground.  The command REGIS COLORS can be used to
34092    specify the active colors.  If this command is not used, then the
34093    3 (or 15 for the VT-340) foreground colors are assigned in the
34094    order requested.  Any additional colors are assigned to the last
34095    position (which can cause current colors on the screen to change
34096    when the new one is assigned).
34097
34098Default:
34099    Off
34100
34101Synonyms:
34102    None
34103DEVICE NOTES
34104    1) HARDWARE TEXT - Regis supports 17 hardware characters, although
34105       only the first few are generally useful.  The first size is
34106       9x10 pixels, the second is 9x15.  The rest are integer multiples
34107       of the 9x15 pixel size.  This means there is a fairly large
34108       jump between successive character strings.  Regis hardware
34109       characters are of low quality.  They are not rotated.
34110    2) COLOR - Some Regis terminals support color.  Regis defines a
34111       database of 64 fixed colors.  The VT-240 allows 4 of these
34112       colors to be active (1 background color, 3 foreground colors) at
34113       one time.  The VT-340 allows 15 foreground colors to be active.
34114    3) HARDWARE FILL - Solid area fills are done in hardware.
34115    4) DASH PATTERNS - The Regis driver supports unique dash patterns
34116       for DASH, DOT, DASH2, DASH3, and DASH4.  DASH5 is the same
34117       as DASH4.
34118    5) LINE WIDTH - Thick lines are generated as multiple lines.
34119    6) GRAPHICS INPUT - The CROSS-HAIR command is supported for this
34120       device.
34121
34122Related Commands:
34123    POSTSCRIPT        = Direct graphical output to a Postscript device.
34124    HPGL              = Direct graphical output to an HPGL device.
34125    TEKTRONIX         = Direct graphical output to a Tektronix device.
34126    X11               = Direct graphical output to an X11 device.
34127    DEVICE            = Specify certain actions for the graphics
34128                        output.
34129    SHOW REGIS COLOR  = Show the available colors on the Regis device.
34130
34131Applications:
34132    XX
34133
34134Implementation Date:
34135    XX
34136
34137Program:
34138    XX
34139
34140-----REGIS COLORS--------------------------------------------------
34141
34142REGIS COLORS
34143
34144Name:
34145    REGIS COLORS
34146
34147Type:
34148    Output Devices Command
34149
34150Purpose:
34151    Assign the active colors for a Regis graphics device.
34152
34153Description:
34154    Regis color devices support 64 colors.  However, only 4 (for VT-240
34155    class terminals) or 16 (for VT-340 class terminals) colors can be
34156    active at a given time.  This command allows the analyst to specify
34157    the active colors.
34158
34159Syntax:
34160    REGIS COLORS <color> <index>
34161    where <color> is a character string that specifies the desired
34162             color;
34163    and   <index> is an integer number or parameter between 1 and 16.
34164
34165Examples:
34166    REGIS COLORS SHOW
34167    REGIS COLORS RED 4
34168
34169Default:
34170    The following is the default for VT-240 class terminals
34171        1     WHITE
34172        2     YELLOW
34173        3     RED
34174    The following is the default for VT-340 class terminals
34175        1     WHITE
34176        2     YELLOW
34177        3     RED
34178        4     BLACK
34179        5     GREEN
34180        6     CYAN
34181        7     BLUE
34182        8     ORANGE
34183        9     TURQUOISE
34184       10     MAGENTA
34185       11     YELLOW GREEN
34186       12     TAN
34187       13     GOLD
34188       14     VIOLET RED
34189       15     LIGHT GRAY
34190
34191Synonyms:
34192    REGIS PEN MAP
34193
34194Related Commands:
34195    SHOW COLORS    = Print the available colors for various devices.
34196    REGIS          = Direct graphical output to a Regis device.
34197
34198Applications:
34199    XX
34200
34201Implementation Date:
34202    90/6
34203
34204Program:
34205    DEVICE 1 REGIS 340
34206    DEVICE 1 COLOR ON
34207    REGIS COLORS BLACK 1
34208    REGIS COLORS BLUE   2
34209    REGIS COLORS GREEN  3
34210    REGIS COLORS RED 4
34211
34212-----RJ (LET)----------------------------------------------
34213
34214RJ
34215
34216Name:
34217    RJ (LET)
34218
34219Type:
34220    Library Function
34221
34222Purpose:
34223    Compute Carlson's elliptic integral of the third kind.
34224
34225Description:
34226    Carlson's elliptic integral of the third kind is defined as:
34227        RJ(x,y,z,p)=1.5*INTEGRAL[1/((t+p)*SQRT((t+x)*(t+y)*(t+z)))]dt
34228    where INTEGRAL is the integral from 0 to infinity.  The parameters
34229    x, y, and z must all be non-negative with at most one of them
34230    being zero.  The p parameter must be non-zero.
34231
34232Syntax:
34233    LET <a> = RJ(<x>,<y>,<z>,<p>)  <SUBSET/EXCEPT/FOR qualification>
34234    where <x> is a non-negative number, parameter, or variable;
34235          <y> is a non-negative number, parameter, or variable;
34236          <z> is a non-negative number, parameter, or variable;
34237          <p> is a non-zero number, parameter, or variable;
34238          <a> is a variable or a parameter (depending on what, <p>,
34239               <x>, <y>, and <z> are) where the computed values are
34240               stored;
34241    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
34242
34243Examples:
34244    LET A = RJ(2,1,3,1)
34245    LET A = RJ(X,0,4,1)
34246    LET X2 = RJ(1,1,Y,P)
34247
34248Note:
34249    The Carlson elliptic integrals are computed using the RC, RD, RF,
34250    and RJ routines from the SLATEC Common Mathematical Library.
34251    SLATEC is a large set of high quality, portable, public domain
34252    Fortran routines for various mathematical capabilities maintained
34253    by seven federal laboratories.
34254
34255Note:
34256    DATAPLOT computes Legendre elliptic integrals by computing the
34257    equivalent Carlson elliptic integrals.  See the documentation for
34258    the ELLIP1, ELLIP2, ELLIP3, ELLIPC1, and ELLIPC2 functions for
34259    details on computing Legendre elliptic functions in DATAPLOT.
34260
34261Note:
34262    Library functions are distinguished from let subcommands
34263    in the following ways.
34264    1) Functions enclose the input value in parenthesis.  Let
34265       subcommands use spaces.
34266    2) Functions can accept (and return) either parameters
34267       (i.e., single values) or variables (i.e., an array of
34268       values) while let subcommands are specific in which they
34269       accept as input and what they return as output.
34270    3) Functions can accept expressions while let subcommands
34271       do not.  For example, the following is legal:
34272           LET Y2 = ABS(Y1-INT(Y1))
34273       For let subcommands, you typically have to do something
34274       like the following:
34275           LET YTEMP = Y**2 + 8
34276           LET A = SUM YTEMP
34277
34278Default:
34279    None
34280
34281Synonyms:
34282    None
34283
34284Related Commands:
34285    RF      = Compute the Carlson elliptic integral of the first kind.
34286    RC      = Compute the degenerate Carlson elliptic integral.
34287    RD      = Compute the Carlson elliptic integral of the second kind.
34288    ELLIPC1 = Compute the Legendre complete elliptic integral of the
34289              first kind.
34290    ELLIPC2 = Compute the Legendre complete elliptic integral of the
34291              second kind.
34292    ELLIP1  = Compute the Legendre elliptic integral of the first
34293              kind.
34294    ELLIP2  = Compute the Legendre elliptic integral of the second
34295              kind.
34296    ELLIP3  = Compute the Legendre's elliptic integral of the third
34297              kind.
34298
34299Reference:
34300    "Algorithms for Incomplete Elliptic Integrals by Duplication",
34301    Carlson, ACM Transactions on Mathematical Software, 7,
34302    pp. 398-403.
34303
34304    "Handbook of Mathematical Functions, Applied Mathematics Series,
34305    Vol. 55", Abramowitz and Stegun, National Bureau of Standards,
34306    1964 (chapter 17).
34307
34308Applications:
34309    Special Functions
34310
34311Implementation Date:
34312    94/9
34313
34314Program:
34315    TITLE CARLSON ELLIPTIC FUNCTIONS
34316    PLOT RJ(X,1,2,1) FOR X = 0.1 0.1 10 AND
34317    PLOT RJ(1,X,2,2) FOR X = 0.1 0.1 10 AND
34318    PLOT RJ(1,2,2,P) FOR P = 0.1 0.1 10
34319
34320-----RELATIVE DISPERSION INDEX (LET)-----------------------------------------
34321
34322RELATIVE DISPERSION INDEX
34323
34324Name:
34325    RELATIVE DISPERSION INDEX (LET)
34326
34327Type:
34328    Let Subcommand
34329
34330Purpose:
34331    Given a vector of counts, compute the difference from uniformity
34332    based on a transformation of the variational distance.
34333
34334Description:
34335    In spatial analysis, it is sometimes desired to determine if the
34336    points in the given space are consistent with a uniform
34337    distribution.  One such measure is based on the variational distance
34338    which is defined as
34339
34340        d = 0.5*SUM[k=0 to infinity][|P(Unif=k) - P(data=k)|]
34341
34342    Given that the points have been converted to a set of N counts, X(k),
34343    this formula becomes
34344
34345
34346        d = 0.5*SUM[k=1 to N][|((1/N) - X(k))/SUM[k=1 to N][X(k)]|]
34347
34348    The value of the variational distance is between zero and one with
34349    values closer to zero indicating greater consistency with a uniform
34350    distribution.
34351
34352    The relative dispersion index is a scaled version of the variational
34353    distance
34354
34355       RDI = 100*(1 - d)
34356
34357    where d is the variational distance statistic.  This transforms the
34358    zero to one scale to a zero to 100 scale.  Values close to 100 indicate
34359    consistency with a uniform distribution.
34360
34361Syntax:
34362    LET <a> = RELATIVE DISPERSION INDEX <y>
34363                       <SUBSET/EXCEPT/FOR qualification>
34364    where <y> is the response variable;
34365          <a> is a parameter where the computed statistic is saved;
34366    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
34367
34368Examples:
34369    LET A = RELATIVE DISPERSION INDEX Y1
34370    LET A = RELATIVE DISPERSION INDEX Y1  SUBSET TAG > 2
34371
34372Note:
34373    Dataplot statistics can be used in a number of commands.  For
34374    details, enter
34375
34376         HELP STATISTICS
34377
34378Default:
34379    None
34380
34381Synonyms:
34382    None
34383
34384Related Commands:
34385    VARIATIONAL DISTANCE       = Compute the variational distance of
34386                                 a variable containing a set of counts.
34387    UNIFORM CHISQUARE STAT     = Compute the chi-square statistic for
34388                                 uniformity for a variable containing a
34389                                 set of counts.
34390    GOODNESS OF FIT            = Perform a goodness of fit test.
34391
34392Reference:
34393    Kashiwagi, Fagan, Douglas, Yamamoto, Heckert, Leigh, Obrzut, Du, Lin-Gibson,
34394    Mu, Winey, Haggennueller (2007), "Relationship between dispersion metric and
34395    properties of PMMA/SWNT nanocomposites", Polymer Journal, Vol. 48,
34396    pp. 4855 - 4866.
34397
34398Applications:
34399    Spatial Statistics
34400
34401Implementation Date:
34402    2014/3
34403
34404Program:
34405    LET Y  = UNIFORM RANDOM NUMBERS FOR I = 1 1 1000
34406    LET Y1 X1 = BINNED Y
34407    LET Y  = NORMAL RANDOM NUMBERS FOR I = 1 1 1000
34408    LET Y2 X2 = BINNED Y
34409    LET Y  = EXPONENTIAL RANDOM NUMBERS FOR I = 1 1 1000
34410    LET Y3 X3 = BINNED Y
34411    LET A1 = RELATIVE DISPERSION INDEX Y1
34412    LET A2 = RELATIVE DISPERSION INDEX Y2
34413    LET A3 = RELATIVE DISPERSION INDEX Y3
34414    SET WRITE DECIMALS 4
34415    PRINT A1 A2 A3
34416
34417-----RELATIVE RISK (LET)--------------------------------
34418
34419RELATIVE RISK
34420
34421Name:
34422    RELATIVE RISK (LET)
34423
34424Type:
34425    Let Subcommand
34426
34427Purpose:
34428    Compute the relative risk between two binary variables.
34429
34430Description:
34431    Given two variables with n parired observations where each
34432    variable has exactly two possible outcomes, we can generate
34433    the following 2x2 table:
34434
34435                      |       Variable 2        |
34436        Variable 1    |   Success      Failure  |  Row Total
34437        ====================================================
34438        Success       |   N11            N12    |  N11 + N12
34439        Failure       |   N21            N22    |  N21 + N22
34440        ====================================================
34441        Column Total  |   Success      Failure  |  Total
34442
34443    The parameters N11, N12, N21, and N22 denote the counts
34444    for each category.
34445
34446    Success and failure can denote any binary response.
34447    Dataplot expects "success" to be coded as "1" and "failure"
34448    to be coded as "0".  Some typical examples would be:
34449
34450       1) Variable 1 denotes whether or not a patient has a
34451          disease (1 denotes disease is present, 0 denotes
34452          disease not present).  Variable 2 denotes the result
34453          of a test to detect the disease (1 denotes a positive
34454          result and 0 denotes a negative result).
34455
34456       2) Variable 1 denotes whether an object is present or
34457          not (1 denotes present, 0 denotes absent). Variable 2
34458          denotes a detection device (1 denotes object detected
34459          and 0 denotes object not detected).
34460
34461    In these examples, the "ground truth" is typically given
34462    as variable 1 while some estimator of the ground truth is
34463    given as variable 2.
34464
34465    The relative risk is defined as the ratio of the
34466    probability of "success" probabilities, that is
34467
34468        relative risk = {N11/(N11+N21)}/{N12/(N12+N22)}
34469
34470    The relative risk is a useful statistic when comparing the
34471    difference in two binomial proportions when the probabilities
34472    of success are close to zero.  For example, page 21 of
34473    Agresti gives the example where the absolute difference of
34474    proportions between 0.410, 0.401 and 0.010, 0.001 are both
34475    0.09.  However the relative risks are 0.410/0.401 = 1.02
34476    and 0.010/0.001 = 10.
34477
34478Syntax:
34479    LET <par> = RELATIVE RISK <y1> <y2>
34480                              <SUBSET/EXCEPT/FOR qualification>
34481    where <y1> is the first  response variable;
34482          <y2> is the second response variable;
34483          <par> is a parameter where the computed relative risk
34484               proportion is stored;
34485    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
34486
34487Examples:
34488    LET A = RELATIVE RISK Y1 Y2
34489    LET A = RELATIVE RISK Y1 Y2 SUBSET TAG > 2
34490
34491Note:
34492    The two variables need not have the same number of elements.
34493
34494Note:
34495    Dataplot statistics can be used in 20+ commands.  For details, enter
34496
34497         HELP STATISTICS
34498
34499Note:
34500    There are two ways you can define the response variables:
34501
34502       1) Raw data - in this case, the variables contain
34503          0's and 1's.
34504
34505          If the data is not coded as 0's and 1's, Dataplot
34506          will check for the number of distinct values.  If
34507          there are two distinct values, the minimum value
34508          is converted to 0's and the maximum value is
34509          converted to 1's.  If there is a single distinct
34510          value, it is converted to 0's if it is less than
34511          0.5 and to 1's if it is greater than or equal to
34512          0.5.  If there are more than two distinct values,
34513          an error is returned.
34514
34515       2) Summary data - if there are two observations, the
34516          data is assummed to be the 2x2 summary table.
34517          That is,
34518
34519              Y1(1) = N11
34520              Y1(2) = N21
34521              Y2(1) = N12
34522              Y2(2) = N22
34523
34524    Note that the above commands expect the variables to have
34525    the same number of observations.  If the two samples are
34526    in fact of different sizes, there are two ways to address
34527    the issue:
34528
34529       1) Y1 and Y2 can contain the summary data.  That is,
34530
34531            Y1(1) = N11
34532            Y1(2) = N21
34533            Y2(1) = N12
34534            Y2(2) = N22
34535
34536          This is a useful option in that the data is sometimes
34537          only available in summary form.  Note that this will
34538          not work for the BOOTSTRAP PLOT and JACKNIFE PLOT
34539          commands (these require raw data).
34540
34541       2) You can specify a missing value for the smaller
34542          sample.  For example, if Y1 has 100 observations and
34543          Y2 has 200 observations, you can do something like
34544
34545              SET STATISTIC MISSING VALUE -99
34546              LET Y1 = -99 FOR I = 101  1  200
34547Default:
34548    None
34549
34550Synonyms:
34551    None
34552
34553Related Commands:
34554    ODDS RATIO                 = Compute the bias corrected
34555                                 log(odds ratio).
34556    ODDS RATIO STANDARD ERROR  = Compute the standard error of the
34557                                 bias corrected log(odds ratio).
34558    FALSE POSITIVES            = Compute the proportion of
34559                                 false positives.
34560    FALSE NEGATIVES            = Compute the proportion of
34561                                 false negatives.
34562    TRUE NEGATIVES             = Compute the proportion of
34563                                 true negatives.
34564    TRUE POSITIVES             = Compute the proportion of
34565                                 true positives.
34566    TEST SENSITIVITY           = Compute the test sensitivity.
34567    TEST SPECIFICITY           = Compute the test specificity.
34568    TABULATE                   = Compute a statistic for data with
34569                                 a single grouping variable.
34570    CROSS TABULATE             = Compute a statistic for data with
34571                                 two grouping variables.
34572    STATISTIC PLOT             = Generate a plot of a statistic for
34573                                 data with a single grouping
34574                                 variable.
34575    CROSS TABULATE PLOT        = Generate a plot of a statistic for
34576                                 data with two grouping variables.
34577    BOOTSTRAP PLOT             = Generate a bootstrap plot for a
34578                                 given statistic.
34579
34580References:
34581    Fleiss, Levin, and Paik (2003), "Statistical Methods for
34582    Rates and Proportions", Third Edition, Wiley, chapter 1.
34583
34584    Agresti (2007), "Introduction to Categorical Data Analysis",
34585    Second Edition, Wiley.
34586
34587Applications:
34588    Categorical Data Analysis
34589
34590Implementation Date:
34591    2007/4
34592
34593Program:
34594    let n = 1
34595    .
34596    let p = 0.2
34597    let y1 = binomial rand numb for i = 1 1 100
34598    let p = 0.1
34599    let y2 = binomial rand numb for i = 1 1 100
34600    .
34601    let p = 0.4
34602    let y1 = binomial rand numb for i = 101 1 200
34603    let p = 0.08
34604    let y2 = binomial rand numb for i = 101 1 200
34605    .
34606    let p = 0.15
34607    let y1 = binomial rand numb for i = 201 1 300
34608    let p = 0.18
34609    let y2 = binomial rand numb for i = 201 1 300
34610    .
34611    let p = 0.6
34612    let y1 = binomial rand numb for i = 301 1 400
34613    let p = 0.45
34614    let y2 = binomial rand numb for i = 301 1 400
34615    .
34616    let p = 0.3
34617    let y1 = binomial rand numb for i = 401 1 500
34618    let p = 0.1
34619    let y2 = binomial rand numb for i = 401 1 500
34620    .
34621    let x = sequence 1 100 1 5
34622    .
34623    let a = relative risk y1 y2 subset x = 1
34624    tabulate relative risk y1 y2 x
34625    .
34626    label case asis
34627    xlimits 1 5
34628    major xtic mark number 5
34629    minor xtic mark number 0
34630    xtic mark offset 0.5 0.5
34631    y1label Relative Risk
34632    x1label Group ID
34633    character x blank
34634    line blank solid
34635    .
34636    relative risk plot y1 y2 x
34637
34638-----RELATIVE STANDARD DEVIATION (LET)------------------------------
34639
34640RELATIVE STANDARD DEVIATION
34641
34642Name:
34643    RELATIVE STANDARD DEVIATION (LET)
34644
34645Type:
34646    Let Subcommand
34647
34648Purpose:
34649    Compute the relative standard deviation of a variable.
34650
34651Description:
34652    The relative standard deviation is:
34653         relsd = 100*(standard deviation/abs(mean))
34654    Some analysts prefer to call this the percent relative standard
34655    deviation and the value obtained without multiplying by 100 the
34656    relative standard deviation.  If this is your preference, simply
34657    divide the obtained value by 100 with the LET command.
34658
34659Syntax:
34660    LET <par> = RELATIVE STANDARD DEVIATION <x1>
34661               <SUBSET/EXCEPT/FOR qualification>
34662    where <x1> is a response variable;
34663          <par> is a parameter where the relative standard deviation
34664              value is saved;
34665    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
34666
34667Examples:
34668    LET RSD = RELATIVE STANDARD DEVIATION Y1
34669    LET RSD = RELATIVE STANDARD DEVIATION Y1  SUBSET TAG > 2
34670
34671Note:
34672    Versions prior to 94/2 use the mean rather than the absolute value
34673    of the mean.
34674
34675Default:
34676    None
34677
34678Synonyms:
34679    COEFFICIENT OF VARIATION
34680    COEFFICIENT VARIATION
34681    RELATIVE SD
34682
34683Related Commands:
34684    MEAN (LET)        = Compute the mean of a variable.
34685    STAND DEVI (LET)  = Compute the standard deviation of a variable.
34686    RELATIVE SD PLOT  = Generate a relative standard deviation (versus
34687                        subset) plot.
34688
34689Applications:
34690    XX
34691
34692Implementation Date:
34693    XX
34694
34695Program:
34696    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
34697    LET RSD = RELATIVE STANDARD DEVIATION X1
34698
34699-----RELATIVE VARIANCE (LET)------------------------------
34700
34701RELATIVE VARIANCE
34702
34703Name:
34704    RELATIVE VARIANCE (LET)
34705
34706Type:
34707    Let Subcommand
34708
34709Purpose:
34710    Compute the relative variance of a variable.
34711
34712Description:
34713    The relative variance is:
34714         relvar = 100*(variance/mean)
34715    Some analysts prefer to call this the percent relative variance and
34716    the value obtained without multiplying by 100 the relative variance.
34717    If this is your preference, simply divide the obtained value by 100
34718    with the LET command.  If you prefer to use the absolute value of
34719    the mean, use the LET command to calculate the absolute value of
34720    the value (e.g., LET RELVAR = ABS(RELVAR)).
34721
34722Syntax:
34723    LET <par> = RELATIVE VARIANCE <y> <SUBSET/EXCEPT/FOR qualification>
34724    where <y> is a response variable;
34725          <par> is a parameter where the relative variance value is
34726              stored;
34727    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
34728
34729Examples:
34730    LET RELVAR = RELATIVE VARIANCE Y1
34731    LET RELVAR = RELATIVE VARIANCE Y1  SUBSET TAG > 2
34732
34733Default:
34734    None
34735
34736Synonyms:
34737    None
34738
34739Related Commands:
34740    MEAN                    = Compute the mean of a variable.
34741    VARIANCE                = Compute the variance of a variable.
34742    STANDARD DEVIATION      = Compute the standard deviation of a
34743                              variable.
34744    RELATIVE VARIANCE PLOT  = Generate a relative variance versus
34745                              subset plot.
34746    RELATIVE STANDARD DEVI  = Compute the relative standard deviation
34747                              of a variable.
34748
34749Applications:
34750    XX
34751
34752Implementation Date:
34753    XX
34754
34755Program:
34756    SKIP 25
34757    READ GEAR.DAT DIAMETER
34758    LET RELVAR = RELATIVE VARIANCE DIAMETER
34759
34760-----RELATIVE VARIANCE PLOT-----------------------------------------
34761
34762RELATIVE VARIANCE PLOT
34763
34764Name:
34765    RELATIVE VARIANCE PLOT
34766
34767Type:
34768    Graphics Command
34769
34770Purpose:
34771    Generates a relative variance plot.
34772
34773Description:
34774    A relative variance plot is a plot consisting of subsample relative
34775    variances versus subsample index.  The relative variance is the
34776    variance divided by the mean times 100.  The subsample relative
34777    variance is the relative variance of the data in the subsample.  The
34778    relative variance plot is used to answer the question--"Does the
34779    subsample spread change over different subsamples?".  The plot
34780    consists of:
34781       Vertical   axis = subsample relative variance;
34782       Horizontal axis = subsample index.
34783    The relative variance plot yields 2 traces:
34784       1. a subsample relative variance trace; and
34785       2. a full-sample relative variance reference line.
34786    Like usual, the appearance of these 2 traces is controlled by
34787    the first 2 settings of the LINES, CHARACTERS, SPIKES, BARS,
34788    and similar attributes.
34789
34790Syntax:
34791    RELATIVE VARIANCE PLOT <y> <x>  <SUBSET/EXCEPT/FOR qualification>
34792    where <y> is the response (= dependent) variable;
34793          <x> is the subsample identifier variable (this variable
34794              appears on the horizontal axis);
34795    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
34796
34797Examples:
34798    RELATIVE VARIANCE PLOT Y X
34799    RELATIVE VARIANCE PLOT Y TAG SUBSET TAG > 2
34800
34801Default:
34802    None
34803
34804Synonyms:
34805    None
34806
34807Related Commands:
34808    RELATIVE VARIANCE  = Compute the relative variance of a variable.
34809    RELSD PLOT         = Generates a relative standard deviation plot.
34810    CHARACTERS         = Sets the type for plot characters.
34811    LINES              = Sets the type for plot lines.
34812    MEAN   PLOT        = Generates a mean plot.
34813    SD   PLOT          = Generates a standard deviation plot.
34814    BOX PLOT           = Generates a box plot.
34815    XBAR CHART         = Generates a mean control chart.
34816    PLOT               = Generates a data or function plot.
34817
34818Applications:
34819    Exploratory Data Analysis
34820
34821Implementation Date:
34822    88/2
34823
34824Program:
34825    SKIP 25
34826    READ GEAR.DAT DIAMETER BATCH
34827    LINE BLANK DASH
34828    CHARACTER X BLANK
34829    XTIC OFFSET 0.2 0.2
34830    Y1LABEL RELATIVE VARIANCE
34831    X1LABEL SAMPLE BATCH
34832    TITLE AUTOMATIC
34833    RELATIVE VARIANCE PLOT DIAMETER BATCH
34834
34835-----RELDIF (LET)--------------------------------
34836
34837RELDIF
34838
34839Name:
34840    RELDIF (LET)
34841
34842Type:
34843    Library Function
34844
34845Purpose:
34846    Return the relative difference of two numbers.
34847
34848Description:
34849    The definition of the relative difference between X1 and X2 used
34850    by Dataplot is:
34851
34852         Relative Difference = ABS(X1 - X2)/MAX(ABS(X1),ABS(X2))
34853
34854    Dataplot also supports the alternative formula
34855
34856         Relative Difference = ABS((X1 - X2)/((X1 + X2)/2))
34857
34858Syntax 1:
34859    LET <y> = RELDIF(<y1>,<y2>)      <SUBSET/EXCEPT/FOR qualification>
34860    where <y1> is a variable or a parameter;
34861          <y2> is a variable or a parameter;
34862          <y>  is a variable or a parameter (depending on what <y1> and
34863               <y2> are) where the computed relative difference values
34864               are stored;
34865    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
34866
34867    This syntax implements the first formula given above (the
34868    denominator is the maximum of the two values).
34869
34870Syntax 2:
34871    LET <y> = RELDIF2(<y1>,<y2>)      <SUBSET/EXCEPT/FOR qualification>
34872    where <y1> is a variable or a parameter;
34873          <y2> is a variable or a parameter;
34874          <y>  is a variable or a parameter (depending on what <y1> and
34875               <y2> are) where the computed relative difference values
34876               are stored;
34877    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
34878
34879    This syntax implements the second formula given above (the
34880    denominator is the average of the two values).
34881
34882Examples:
34883    LET A = RELDIF(14,10)
34884    LET A = RELDIF(A1,A2)
34885    LET X2 = RELDIF(X1,X4)
34886    LET X2 = RELDIF(X1-4,X2+6)
34887
34888Note:
34889    Library functions are distinguished from let subcommands
34890    in the following ways.
34891    1) Functions enclose the input value in parenthesis.  Let
34892       subcommands use spaces.
34893    2) Functions can accept (and return) either parameters
34894       (i.e., single values) or variables (i.e., an array of
34895       values) while let subcommands are specific in which they
34896       accept as input and what they return as output.
34897    3) Functions can accept expressions while let subcommands
34898       do not.  For example, the following is legal:
34899           LET Y2 = ABS(Y1-INT(Y1))
34900       For let subcommands, you typically have to do something
34901       like the following:
34902           LET YTEMP = Y**2 + 8
34903           LET A = SUM YTEMP
34904
34905Default:
34906    None
34907
34908Synonyms:
34909    None
34910
34911Related Commands:
34912    RELERR   = Compute the relative error of two numbers.
34913    PERCDIF  = Compute the percent difference of two numbers.
34914    PERCERR  = Compute the percent error of two numbers.
34915    MIN      = Compute the minimum of two numbers.
34916    MAX      = Compute the maximum of two numbers.
34917    ABS      = Compute the absolute value of a number.
34918
34919Applications:
34920    Data Management
34921
34922Implementation Date:
34923    2010/12
34924
34925Program:
34926    LET X = SEQUENCE 0.1  0.1  3
34927    LET Y1 = X**2
34928    LET Y2 = X**(1/2)
34929    LET Y3 = RELDIF(Y1,Y2)
34930    SET WRITE DECIMALS 5
34931    PRINT Y1 Y2 Y3
34932
34933-----RELERR (LET)--------------------------------
34934
34935RELERR
34936
34937Name:
34938    RELERR (LET)
34939
34940Type:
34941    Library Function
34942
34943Purpose:
34944    Return the relative error of two numbers.
34945
34946Description:
34947    The definition of the relative error between a "true" value
34948    X(t) and an observed value X(o) used by Dataplot is:
34949
34950         Relative Error = (X(t) - X(o))/X(t)
34951
34952    There may be some slight differences for this formula in other
34953    sources.  Specifically,
34954
34955    1) Some sources take the absolute value of the above
34956       quantity.  In Dataplot, you can use the ABS function
34957       to obtain this form.
34958
34959    2) Some sources may reverse the order of the X(t) and X(o) values.
34960       This changes the sign of the result, but not the magnitude.
34961
34962
34963Syntax:
34964    LET <y> = RELERR(<y1>,<y2>)      <SUBSET/EXCEPT/FOR qualification>
34965    where <y1> is a variable or a parameter;
34966          <y2> is a variable or a parameter;
34967          <y>  is a variable or a parameter (depending on what <y1> and
34968               <y2> are) where the computed relative error values
34969               are stored;
34970    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
34971
34972Examples:
34973    LET A = RELERR(14,10)
34974    LET A = RELERR(A1,A2)
34975    LET X2 = RELERR(X1,X4)
34976    LET X2 = RELERR(X1-4,X2+6)
34977
34978Note:
34979    Library functions are distinguished from let subcommands
34980    in the following ways.
34981    1) Functions enclose the input value in parenthesis.  Let
34982       subcommands use spaces.
34983    2) Functions can accept (and return) either parameters
34984       (i.e., single values) or variables (i.e., an array of
34985       values) while let subcommands are specific in which they
34986       accept as input and what they return as output.
34987    3) Functions can accept expressions while let subcommands
34988       do not.  For example, the following is legal:
34989           LET Y2 = ABS(Y1-INT(Y1))
34990       For let subcommands, you typically have to do something
34991       like the following:
34992           LET YTEMP = Y**2 + 8
34993           LET A = SUM YTEMP
34994
34995Default:
34996    None
34997
34998Synonyms:
34999    None
35000
35001Related Commands:
35002    RELDIF   = Compute the relative difference of two numbers.
35003    PERCDIF  = Compute the percent difference of two numbers.
35004    PERCERR  = Compute the percent error of two numbers.
35005    MIN      = Compute the minimum of two numbers.
35006    MAX      = Compute the maximum of two numbers.
35007    ABS      = Compute the absolute value of a number.
35008
35009Applications:
35010    Data Management
35011
35012Implementation Date:
35013    2010/12
35014
35015Program:
35016    LET X = SEQUENCE 0.1  0.1  3
35017    LET Y1 = X**2
35018    LET Y2 = X**(1/2)
35019    LET Y3 = RELERR(Y1,Y2)
35020    SET WRITE DECIMALS 5
35021    PRINT Y1 Y2 Y3
35022
35023-----RELIABILITY TRENDS TEST---------------------------------
35024
35025RELIABILITY TRENDS TEST
35026
35027Name:
35028    RELIABILITY TRENDS TEST
35029
35030Type:
35031    Analysis Command
35032
35033Purpose:
35034    Compute tests to determine whether or not the repair times of
35035    a system show significant trend.  The trend may be either an
35036    improvement or a degradation.
35037
35038    Specifically, it computes the following three tests
35039
35040        1) The reverse arrangement test.
35041        2) The military handbook test.
35042        3) The Laplace test.
35043
35044Description:
35045    Determining if repair times exhibit a trend is necessary for
35046    choosing an appropriate reliability model.  These formal tests
35047    for trend in repair times are a compliment to the Duane plot
35048    for detecting trend.
35049
35050    Each of these tests will be described separately.
35051
35052    1) The Reverse Arrangement Test
35053
35054       Given r repairs, T1, T2, ...., Tr, the interarrival
35055       times I2=R2-T1, I3=T3-T2, ...., Ir=Tr-T(r-1), and the
35056       censoring time T(end) > Tr, we calculate how many instances
35057       we have of a later interarrival time being strictly greater
35058       than an earlier interarrival time.  These are called
35059       reversals.  Too many reversals indicates a significant
35060       improving trend and too few reversals indicates a
35061       significant degradation trend.  More formally,
35062
35063          1) Count a reversal every time I(j) < I(k) for some
35064             j and k with j < k.
35065
35066          2) Compute the total number of reversals, R.
35067
35068          3) For r repair times, the maximum possible number of
35069             reversals is r(r-1)/2.
35070
35071          4) If there are no trends, the expected number of
35072             reversals is r(r-1)/4.
35073
35074          5) For r > 12, the following approximation can be
35075             used to determine if the number of reversals is
35076             statistically significant.
35077
35078                z = R - C1 + 0.5/SQRT(C2)
35079
35080             where
35081
35082                C1 = r(r-1)/4
35083                C2 = (2r+5)(r-1)r/72
35084
35085             The test statistic is compared to a standard
35086             normal distribution.  That is, if |z| > 1.96, we
35087             have statistical significance at the 95% level.
35088
35089             For r <= 12, tabled values are used.
35090
35091       The advantage of this test is that it is simple and it
35092       makes no assumptions about a model for the possible trend.
35093
35094    2) The Military Handbook Test
35095
35096       Given r repairs, T1, T2, ...., Tr and the censoring time
35097       T(end) > Tr, we calculate the test statistic
35098
35099           T = 2*SUM(ln(T(end)/T(i)))
35100
35101       where the summation is from i=1 to r.
35102
35103       This test statistic follows a chi-square distribution with
35104       2*r degrees of freedom.
35105
35106       This test is recommended for the case when the choice is
35107       between no trend and a non-homogeneous Poisson process
35108       (NHPP) power law (Duane) model.
35109
35110    3) The Laplace Test
35111
35112       Given r repairs, T1, T2, ...., Tr and the censoring time
35113       T(end) > Tr, we calculate the test statistic
35114
35115           z = SQRT(12*r)*SUM(T(i) - T(end)/2)/r*T(end)
35116
35117       where the summation is from i=1 to r.
35118
35119       This test statistic follows a standard normal distribution.
35120
35121       This test is recommended for the case when the choice is
35122       between no trend and a non-homogeneous Poisson process
35123       (NHPP) exponential law model.
35124
35125    If you have internet access, you can enter the following
35126    command to see a discussion of the power law model
35127
35128          WEB HANDBOOK NHPP POWER LAW
35129
35130Syntax:
35131    RELIABILITY TREND TEST <y>    <SUBSET/EXCEPT/FOR qualification>
35132    where <y> is the response variable;
35133    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
35134
35135Examples:
35136    RELIABILITY TREND TEST Y
35137    RELIABILITY TREND TEST Y  SUBSET TAG > 0
35138
35139Note:
35140    These commands require a censoring time.  Enter the following
35141    command before the RELIABILITY TREND TEST command to
35142    specify the censoring time:
35143
35144        LET TEND = <censor time>
35145
35146Default:
35147    None
35148
35149Synonyms:
35150    None
35151
35152Related Commands:
35153    DUANE PLOT                = Generate a Duane plot.
35154    POWER LAW RANDOM NUMBERS  = Generate random number from a
35155                                NHPP power law model.
35156    INTERARRIVAL TIME         = Compute interarrival times of a
35157                                variable.
35158
35159Applications:
35160    Reliability
35161
35162Implementation Date:
35163    1998/5
35164
35165Program:
35166    skip 25
35167    read hahn.dat y tag
35168    .
35169    LET TEND = 135000
35170    RELIABILITY TREND TEST Y SUBSET TAG = 1
35171
35172    The following output is generated:
35173
35174
35175     ***** NOTE--
35176           SUBSET VARIABLE = TAG
35177           SUBSET MINIMUM  =  0.9999989867E+00
35178           SUBSET MAXIMUM  =  0.1000000954E+01
35179           INPUT  NUMBER OF OBSERVATIONS  =       96
35180           NUMBER OF OBSERVATIONS IGNORED =       59
35181           OUTPUT NUMBER OF OBSERVATIONS  =       37
35182
35183     REVERSE ARRANGEMENTS TEST:
35184           NUMBER OF FAILURE TIMES               =       37
35185           OBSERVED NUMBER OF REVERSALS          =      215
35186           MAXIMUM POSSIBLE NUMBER OF REVERSALS  =      666
35187           EXPECTED NUMBER OF REVERSALS          =      333
35188           VALUE OF TEST STATISTIC               =  -21.40790
35189           90% CRITICAL VALUE FOR NO IMPROVEMENT = 1.282
35190           95% CRITICAL VALUE FOR NO IMPROVEMEMT = 1.645
35191           99% CRITICAL VALUE FOR NO IMPROVEMENT = 2.33
35192
35193
35194     MILITARY HANDBOOK TEST:
35195           NUMBER OF FAILURE TIMES               =       37
35196           CHI-SQUARE TEST STATISTIC VALUE       =    35.72037
35197           CHI-SQUARE TEST STATISTIC CDF VALUE   =   0.4925163E-04
35198
35199           IMPROVEMENT TEST
35200           HYPOTHESIS     ACCEPTANCE INTERVAL    CONCLUSION
35201           NO TREND          (0.000,0.900)         ACCEPT
35202           NO TREND          (0.000,0.950)         ACCEPT
35203           NO TREND          (0.000,0.990)         ACCEPT
35204
35205
35206           DEGRADATION TEST
35207           HYPOTHESIS     ACCEPTANCE INTERVAL    CONCLUSION
35208           NO TREND          (0.100,1)             REJECT
35209           NO TREND          (0.050,1)             REJECT
35210           NO TREND          (0.010,1)             REJECT
35211
35212
35213
35214     LAPLACE TEST:
35215           NUMBER OF FAILURE TIMES               =       37
35216           NORMAL TEST STATISTIC VALUE       =    3.416969
35217           NORMAL TEST STATISTIC CDF VALUE   =   0.9996833
35218
35219           IMPROVEMENT TEST
35220           HYPOTHESIS     ACCEPTANCE INTERVAL    CONCLUSION
35221           NO TREND          (0.000,0.900)         REJECT
35222           NO TREND          (0.000,0.950)         REJECT
35223           NO TREND          (0.000,0.990)         REJECT
35224
35225
35226           DEGRADATION TEST
35227           HYPOTHESIS     ACCEPTANCE INTERVAL    CONCLUSION
35228           NO TREND          (0.100,1)             ACCEPT
35229           NO TREND          (0.050,1)             ACCEPT
35230           NO TREND          (0.010,1)             ACCEPT
35231
35232
35233-----RELSD PLOT------------------------------------------------
35234
35235RELSD PLOT
35236
35237Name:
35238    RELSD PLOT
35239
35240Type:
35241    Graphics Command
35242
35243Purpose:
35244    Generates a relative standard deviation plot.
35245
35246Description:
35247    A relative standard deviation plot is a plot consisting of
35248    subsample relative standard deviations versus subsample index.
35249    The subsample relative standard deviation is the relative standard
35250    deviation of the data in the subsample.  The relative standard
35251    deviation plot is used to answer the question--"Does the subsample
35252    spread change over different subsamples?".  It consists of:
35253       Vertical   axis = subsample relative standard deviation;
35254       Horizontal axis = subsample index.
35255    The relative standard deviation plot yields 2 traces:
35256       1. a subsample relative standard deviation trace; and
35257       2. a full-sample relative standard deviation reference line.
35258    Like usual, the appearance of these 2 traces is controlled by
35259    the first 2 settings of the LINES, CHARACTERS, SPIKES, BARS,
35260    and similar attributes.
35261
35262Syntax:
35263    RELSD PLOT   <y>   <x>   <SUBSET/EXCEPT/FOR qualification>
35264    where <y> is the response (= dependent) variable;
35265          <x> is the subsample identifier variable (this variable
35266              appears on the horizontal axis);
35267    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
35268
35269Examples:
35270    RELSD PLOT Y X
35271    RELSD PLOT Y TAG SUBSET TAG > 2
35272
35273Default:
35274    None
35275
35276Synonyms:
35277    None
35278
35279Related Commands:
35280    CHARACTERS         = Sets the type for plot characters.
35281    LINES              = Sets the type for plot lines.
35282    MEAN   PLOT        = Generates a mean plot.
35283    SD   PLOT          = Generates a standard deviation plot.
35284    BOX PLOT           = Generates a box plot.
35285    XBAR CHART         = Generates a xbar control chart.
35286    PLOT               = Generates a data or function plot.
35287
35288Applications:
35289    Exploratory Data Analysis
35290
35291Implementation Date:
35292    88/2
35293
35294Program:
35295    SKIP 25
35296    READ GEAR.DAT DIAMETER BATCH
35297    LINE BLANK DASH
35298    CHARACTER X BLANK
35299    XTIC OFFSET 0.2 0.2
35300    Y1LABEL RELATIVE STANDARD DEVIATION
35301    X1LABEL SAMPLE BATCH
35302    TITLE AUTOMATIC
35303    RELSD PLOT DIAMETER BATCH
35304
35305-----RENAME-------------------------------------------------------
35306
35307RENAME
35308    RENAME
35309
35310Type:
35311    Support Command
35312
35313Purpose:
35314    Specifies an additional name to be assigned to an already-existing
35315    variable.
35316
35317Description:
35318    This is useful, for example, if the analyst has written a generic
35319    sub-program which makes reference to, say, X and Y, while the
35320    variable names in the main program are, say, PRESSURE and TEMP.
35321    The RENAME command is efficient in that it does not duplicate the
35322    data.  Thus RENAME X PRESSURE will not duplicate the data already
35323    existing in the variable PRESSURE (as would LET X = PRESSURE).  It
35324    merely adds the additional name X by which that same data in
35325    PRESSURE can be subsequently referred.
35326
35327Syntax:
35328    RENAME   <name 1>   <name 2>
35329    where <name 1> is the name of an already-existing variable;
35330    and   <name 2> is the desired additional name by which that
35331                   variable can be referred.
35332
35333Examples:
35334    RENAME PRESSURE Y
35335
35336Note:
35337    The name list can be extended in pairs; thus
35338       RENAME PRESSURE Y TEMP X CONC Z
35339    is equivalent to
35340       RENAME PRESSURE Y
35341       RENAME TEMP X
35342       RENAME CONC Y
35343
35344Default:
35345    None
35346
35347Synonyms:
35348    NAME
35349
35350Related Commands:
35351    LET       = Copies variables (and many other operations).
35352    STATUS    = Displays dimension, variables, parameters, functions,
35353                etc.
35354    DELETE    = Deletes (all or part of) a variable.
35355    DIMENSION = Changes internal workspace size.
35356    CALL      = Executes the commands in a "macro" file.
35357
35358Applications:
35359    Data Management
35360
35361Implementation Date:
35362    Pre-1987
35363
35364Program:
35365    XX
35366
35367-----REPAIR PLOT--------------------------------------
35368
35369REPAIR PLOT
35370
35371Name:
35372    REPAIR PLOT
35373
35374Type:
35375    Graphics Command
35376
35377Purpose:
35378    Generates a plot of repair times where there may be
35379    multiple groups and a censoring time for each group.
35380
35381Description:
35382    In reliability studies, it is often necessary to
35383    analyze repair times.  A first step in analyzing these
35384    repair times is to simply plot the repair data.
35385
35386    The repair data consists of the following:
35387
35388       1) The repair times.
35389
35390       2) A system id corresponding to each of the repair
35391          times.
35392
35393       3) If the test continued to run after the last failure
35394          time, then a censoring time needs to be included.
35395          Note that there should be at most one censoring time
35396          for each system.
35397
35398          The Dataplot convention is to code the repair times
35399          as 1 and censoring times as 0.
35400
35401    The vertical coordinate is the system id and the horizontal
35402    coordinates are the repair/censoring times.
35403
35404    The appearance of the plot can be controlled by appropriate
35405    settings for the LINE and CHARACTER commands.  The traces
35406    (i.e., curves) are defined as follows:
35407
35408        1) The first trace consists of all the repair times.
35409           For this trace, the line setting is typically set to
35410           a blank value while the character is set to some
35411           non-blank value.
35412
35413        2) If there are N systems, traces 2 through N+1 correspond
35414           to the repair and censoring times for each of these
35415           systems.  The line settings are typically set to a
35416           non-blank value while the character settings are
35417           typically set to blank.
35418
35419    A typical sequence of commands to set the character and
35420    line settings would be
35421
35422        LINES SOLID ALL
35423        CHARACTER BLANK ALL
35424        LINE BLANK
35425        CHARACTER *
35426
35427
35428    The system id and censoring variables are optional.  If you
35429    specify a censoring variable, a group variable must be
35430    given.  If you have a single system with a censoring time,
35431    simply create a variable the same length as the response
35432    variable that has all values equal to 1.  For example,
35433
35434        LET N = SIZE Y
35435        LET GROUPID = 1 FOR I = 1 1 N
35436
35437Syntax 1:
35438    REPAIR PLOT <y> <x> <cens>   <SUBSET/EXCEPT/FOR qualification>
35439    where <y> is a variable containing repair times;
35440          <x> is a variable containing the group id's;
35441          <cens> is a variable containing the censoring values;
35442    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
35443
35444    This syntax is used to plot repair times for the case where
35445    there multiple systems, but there are no censoring times.
35446
35447Syntax 2:
35448    REPAIR PLOT <y> <x>   <SUBSET/EXCEPT/FOR qualification>
35449    where <y> is a variable containing repair times;
35450          <x> is a variable containing the group id's;
35451    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
35452
35453    This syntax is used to plot repair times for the case where
35454    there multiple systems, but there are no censoring times.
35455
35456Syntax 3:
35457    REPAIR PLOT <y>   <SUBSET/EXCEPT/FOR qualification>
35458    where <y> is a variable containing repair times;
35459    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
35460
35461    This syntax is used to plot repair times for the case where
35462    there is only a single system and there is no censoring time.
35463
35464Examples:
35465    REPAIR PLOT Y BATCH CENSOR
35466    REPAIR PLOT Y BATCH
35467    REPAIR PLOT Y BATCH CENSOR  SUBSET BATCH > 1
35468
35469Default:
35470    None
35471
35472Synonyms:
35473    None
35474
35475Related Commands:
35476    LINES                     = Sets the type for plot lines.
35477    CHARACTERS                = Sets the type for plot characters.
35478    MEAN REPAIR FUNCTION PLOT = Generates a mean repair function
35479                                plot.
35480    DUANE PLOT                = Generates a Duane plot.
35481    KAPLAN-MEIER PLOT         = Generates a Kaplan-Meier plot.
35482    PLOT                      = Generates a data or function plot.
35483
35484Applications:
35485    Reliability (Repairable Systems)
35486
35487Implementation Date:
35488    2006/10
35489
35490Program:
35491    skip 25
35492    read tob312.dat  y  x  cens
35493    .
35494    tic offset units screen
35495    tic offset 5 5
35496    ylimits 1 3
35497    major ytic mark number 3
35498    minor ytic mark number 0
35499    line blank
35500    char *
35501    title Repair Plot
35502    y1label System ID
35503    x1label System Age
35504    title case asis
35505    title offset 2
35506    label case asis
35507    .
35508    repair plot y x cens
35509
35510-----REPDF-------------------------------------------------------
35511
35512REPDF
35513
35514Name:
35515    REPDF
35516
35517Type:
35518    Keyword
35519
35520Purpose:
35521    An internal DATAPLOT parameter into which the replication
35522    degrees of freedom is automatically placed whenever the FIT,
35523    SPLINE FIT, EXACT RATIONAL FIT, LOWESS, ANOVA, SMOOTH, YATES
35524    ANALYSIS, PRE-FIT, and MEDIAN POLISH commands are executed.
35525
35526Description:
35527    In general, the replication degrees of freedom is computable only
35528    when replication exists in the data.  The formula is:
35529       REPDF = total number of observations - number of subsets
35530    REPDF may be used by the analyst in whatever fashion desired.
35531
35532Syntax:
35533    None
35534
35535Examples:
35536    WRITE RESDF REPSD RESDF RESSD LOGCDF
35537    LET SSQD = RESDF*(REPSD**2)
35538    WRITE CALIB. RESDF REPSD RESDF RESSD LOGCDF
35539
35540Default:
35541    None
35542
35543Synonyms:
35544    None
35545
35546Related Commands:
35547    PRED               = A variable where predicted values are stored.
35548    RES                = A variable where residuals are stored.
35549    RESSD              = A parameter where the residual standard
35550                         deviation is stored.
35551    RESDF              = A parameter where the residual degrees of
35552                         freedom is stored.
35553    REPSD              = A parameter where the replication standard
35554                         deviation is stored.
35555    LOFCDF             = A parameter where the lack of fit cdf is
35556                         stored.
35557    FIT                = Carries out a least squares linear or
35558                         non-linear fit.
35559    EXACT RATIONAL FIT = Carries out an exact rational fit.
35560    PRE-FIT            = Carries out a least squares pre-fit.
35561    SPLINE FIT         = Carries out a spline fit.
35562    YATES ANALYSIS     = Carries out an analysis of a Yates design.
35563    LOWESS             = Carries out a locally weighted least squares
35564                         fit.
35565    SMOOTH             = Carries out a smoothing.
35566    ANOVA              = Carries out an ANOVA.
35567    MEDIAN POLISH      = Carries out a median polish.
35568    PLOT               = Generates a data/function plot.
35569
35570Applications:
35571    Fitting
35572
35573Implementation Date:
35574    Pre-1987
35575
35576Program:
35577    XX
35578
35579-----REPLACE (LET)-------------------------------------
35580
35581REPLACE
35582
35583Name:
35584    REPLACE (LET)
35585
35586Type:
35587    Let Subcommand
35588
35589Purpose:
35590    Match two columns (typically group-id vaues) and use
35591    the indices of any matching rows to replace the
35592    values in one array with the values in another array.
35593
35594Description:
35595    Given the command
35596
35597       LET Y2 = REPLACE GROUPID GROUP2 Y1
35598
35599    This command does the following:
35600
35601       1) It matches the values in GROUP2 against GROUPID
35602          and returns the indices of the matching rows for
35603          the GROUPID array.
35604
35605       2) The indices are used to access the corresponding
35606          value in the Y1 array.
35607
35608       3) The corresponding row of Y2 is replaced with the
35609          Y1 value.
35610
35611    The motivation for adding this command was to address
35612    the problem where you have two sets of labs (each data set
35613    contains a lab-id and a corresponding measurement) and you
35614    need to create a new data set that contains the data for
35615    the labs that are common to both sets.  The program example
35616    below demonstrates how the REPLACE command can help
35617    accomplish this.
35618
35619Syntax 1:
35620    LET <y2> = REPLACE <groupid>  <group2> <y1>
35621               <SUBSET/EXCEPT/FOR qualification>
35622    where <groupid> is a variable (typically a group-id variable);
35623          <group2> is a variable (typically a group-id variable);
35624          <y1> is a variable containing the values to be
35625              extracted;
35626          <y2> is a variable where the extracted values from
35627              <y1> are placed;
35628    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
35629
35630    The <groupid> and <group2> variable do not need to be the
35631    same length.  The <y2> variable should be a previously
35632    existing variable.
35633
35634Syntax 2:
35635    LET <y2> = REPLACE <groupid>  <group2>
35636               <SUBSET/EXCEPT/FOR qualification>
35637    where <groupid> is a variable (typically a group-id variable);
35638          <group2> is a variable (typically a group-id variable);
35639          <y2> is the returned variable;
35640    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
35641
35642    This is an abbreviated syntax where the <y1> variable is
35643    assummed to be all 1's.
35644
35645    The <groupid> and <group2> variable do not need to be the
35646    same length.  The <y2> variable should be a previously
35647    existing variable.
35648
35649Examples:
35650    LET Y2 = REPLACE LAB1 LAB2 Y1
35651    LET Y2 = REPLACE LAB1 LAB2
35652    LET Y2 = REPLACE LAB1 LAB2 Y1 SUBSET LAB1 > 2
35653
35654Default:
35655    None
35656
35657Synonyms:
35658    None
35659
35660Related Commands:
35661    MATCH       = Compare two column of numbers and return the
35662                  indices of any matching values.
35663    SORT        = Sort a column of numbers.
35664    RANK        = Rank a column of numbers.
35665    CODE        = Code a column of numbers.
35666
35667Applications:
35668    Data Transformation
35669
35670Implementation Date:
35671    2006/3
35672
35673Program:
35674    .
35675    .  Problem:
35676    .
35677    .  We have 2 sets of labs and we want to create a new
35678    .  data set that contains the labs common to both sets
35679    .  (for each set, there is a lab-id and a measurement).
35680    .
35681    .  Step 1: Create some data
35682    .
35683    let lab1 = data 1 3 4  5 7 8 11 13 15 16 18 19
35684    let n1 = size lab1
35685    let y1 = norm rand numb for i = 1 1 n1
35686    .
35687    let lab2 = data 1 2 5 6 8 12 15 18 20
35688    let n2 = size lab2
35689    let y2 = norm rand numb for i = 1 1 n2
35690    .
35691    .  Step 2: Identify the common labs
35692    .
35693    let labint = set intersection lab1 lab2
35694    .
35695    .  Step 3: Create the tag variables for
35696    .          each lab
35697    .
35698    let tag1 = 0 for i = 1 1 n1
35699    let tag1 = replace lab1 labint
35700    .
35701    let tag3 = 0 for i = 1 1 n2
35702    let tag3 = replace lab2 labint
35703    .
35704    .  Step 5: Retain the common labs
35705    .
35706    set write decimals 2
35707    retain y1 lab1 subset tag1 = 1
35708    retain y2 lab2 subset tag3 = 1
35709    print lab1 y1 y2
35710
35711-----REPLICATED STACK---------------------------------------------
35712
35713REPLICATED STACK
35714
35715Name:
35716    REPLICATED STACK
35717
35718Type:
35719    Support Command
35720
35721Purpose:
35722    Convert a set of response variables and a single group-id
35723    variable to a single response variable and two group-id
35724    variables.
35725
35726Description:
35727    Many commands in Dataplot expect the data to be in the
35728    form of a single response variable and two group-id variables
35729    (specifically, the INTERLAB E691 command).  However, many
35730    data files will contain this data in column form.  That is,
35731    each column contains the response for one value of the first
35732    group-id variable.  One of the columns will contain the value
35733    of the second group-id variable.
35734
35735    That is, the data is the form
35736
35737         X1  X2  X3  ...  XK  LABID
35738
35739    The REPLICATED STACK command will convert this to
35740
35741        X1(1)   1   LAB(1)
35742          .     .     .
35743        X1(n)   1   LAB(n)
35744        X2(1)   2   LAB(1)
35745          .     .     .
35746        X2(n)   2   LAB(n)
35747               ...
35748        Xk(1)   k   LAB(1)
35749          .     .     .
35750        Xk(n)   k   LAB(n)
35751
35752
35753Syntax:
35754    LET <y> <matid> <labid> = REPLICATED STACK <x1> ... <xk> <lab>
35755                            <SUBSET/EXPCEPT/FOR qualification>
35756    where <x1> ... <xk> is a set of one or more response variables;
35757          <lab> is the first group-id variable (often a lab-id);
35758          <y> is the variable to contain <x1> ... <xk> in a
35759               single response variable;
35760          <matid> is the variable that contain the value of the
35761               second group-id variable (i.e., the column number);
35762          <labid> is the variable that contain the value of the
35763               first group-id variable (i.e., the value of <lab>);
35764    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
35765
35766Examples:
35767    LET Y MATID LABID = REPLICATED STACK Z1 Z2 Z3 Z4 Z5 LAB
35768
35769Default:
35770    None.
35771
35772Synonyms:
35773    None
35774
35775Related Commands:
35776    STACK         = Convert column data to a single response
35777                    variable and a group-id variable;
35778    EXTEND        = Extends a variable by another variable.
35779    LET           = Creates, transforms, etc. a variable.
35780    E691 INTERLAB = Peform an interlab analysis based on the
35781                    E691 standard.
35782
35783Applications:
35784    Data Management
35785
35786Implementation Date:
35787    2005/4
35788
35789Program:
35790    SKIP 25
35791    READ GLUCOSE2.DAT LAB X1 TO X5
35792    .
35793    LET Y MATID LABID = REPLICATED STACK X1 X2 X3 X4 X5 LAB
35794    .
35795    E691 INTERLAB Y MATID LABID
35796
35797-----REPLOT-------------------------------------------------------
35798
35799REPLOT
35800
35801Name:
35802    REPLOT
35803
35804Type:
35805    Support Command
35806
35807Purpose:
35808    This command regenerates the most recently created plot.
35809
35810Syntax:
35811    REPLOT
35812
35813Examples:
35814    PLOT SIN(X) FOR X = 0 0.1 6.28
35815    TITLE SIN FUNCTION
35816    REPLOT
35817
35818Default:
35819    None
35820
35821Synonyms:
35822    None
35823
35824Related Commands:
35825    SAVE      = Save one or more commands for later execution.
35826    LIST      = List previously entered commands.
35827    REPEAT    = Re-execute previously entered commands.
35828    /         = Re-execute previously saved commands.
35829
35830Applications:
35831    Interactive Usage
35832
35833Implementation Date:
35834    1997/12
35835
35836Program:
35837    PLOT SIN(X) FOR X = 0 0.1 6.28
35838    TITLE SIN FUNCTION
35839    REPLOT
35840
35841-----REPRODUCIBILITY STANDARD DEVIATION (LET)--------------------------
35842
35843REPRODUCIBILITY STANDARD DEVIATION
35844
35845Name:
35846    REPRODUCIBILITY STANDARD DEVIATION (LET)
35847
35848Type:
35849    Let Subcommand
35850
35851Purpose:
35852    Compute the reproducibility standard deviation of a variable
35853    as defined by the ASTM E 691 - 99 standard.
35854
35855Description:
35856    The reproducibility standard deviation is a core concept
35857    defined in the ASTM E 691 - 99 standard.  This standard
35858    is described in detail in the following document:
35859
35860      "Standard Practice for Conducting an Interlaboratory Study
35861      to Determine the Precision of a Test Method", ASTM
35862      International, 100 Barr Harbor Drive, PO BOX C700,
35863      West Conshohoceken, PA 19428-2959, USA.
35864
35865    This document describes reproducibility in the following way.
35866
35867       Reproducability is the variability between single test
35868       results obtained in different laboratories, each of which
35869       has applied the test method to test specimens taken at
35870       random from a single quantity of homogeneous material.
35871
35872    The reproducibility standard deviation is computed as
35873
35874        s(R) = MAX(s(R)*,s(r))
35875
35876    with
35877
35878        s(R)*    = SQRT(s(xbar)**2 + (S(r)**2*(n-1)/n)
35879
35880        s(xbar)  = Standard deviation of the cell averages
35881        n        = cell sample size (currently, equal cell sizes
35882                   expected)
35883
35884    and S(r) denoting the repeatability standard deviation
35885
35886        Sr = SQRT(SUM[i=1 to p][s(i)**2/p]
35887
35888    with
35889
35890        p      = number of labs
35891        s(i)   = Standard deviation of group i.
35892
35893    In an interlaboratory study, the reproducibility standard
35894    deviation is computed for each material.
35895
35896Syntax:
35897    LET <par> = REPRODUCIBILITY STANDARD DEVIATION <y> <labid>
35898               <SUBSET/EXCEPT/FOR qualification>
35899    where <y> is a response variable;
35900          <labid> is a lab-id variable;
35901          <par> is a parameter where the reproducibility standard
35902              deviation value is saved;
35903    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
35904
35905Examples:
35906    LET RSD = REPRODUCIBILITY STANDARD DEVIATION Y LAB
35907    LET RSD = REPRODUCIBILITY STANDARD DEVIATION Y LAB  SUBSET MAT = 1
35908
35909Note:
35910    The reproducibility standard deviation can be computed for
35911    multiple materials with the command
35912
35913         TABULATE REPRODUCIBILITY STANDARD DEVIATION Y LABID MATID
35914
35915    The reproducibility standard deviation can be plotted for
35916    multiple materials with the command
35917
35918         REPRODUCIBILITY STANDARD DEVIATION PLOT Y LABID MATID
35919
35920Default:
35921    None
35922
35923Synonyms:
35924    REPRODUCIBILITY SD
35925
35926Related Commands:
35927    E691 INTERLAB                      = Perform an E691 interlab
35928                                         analysis.
35929    REPEATABILITY STANDARD DEVIATION   = Compute the repeatability
35930                                         standard deviation.
35931
35932Reference:
35933    "Standard Practice for Conducting an Interlaboratory Study
35934    to Determine the Precision of a Test Method", ASTM
35935    International, 100 Barr Harbor Drive, PO BOX C700,
35936    West Conshohoceken, PA 19428-2959, USA.
35937
35938Applications:
35939    Interlaboratory Analysis
35940
35941Implementation Date:
35942    2005/4
35943
35944Program:
35945    SKIP 25
35946    READ GLUCOSE.DAT Y LABID MATID
35947    .
35948    LET MATDIST = DISTINCT MATID
35949    LET NMAT = SIZE MATDIST
35950    XLIMITS 1 NMAT
35951    MAJOR XTIC MARK NUMBER NMAT
35952    MINOR XTIC MARK NUMBER 0
35953    XTIC OFFSET 0.5 0.5
35954    Y1LABEL REPRODUCIBILITY SD
35955    X1LABEL MATERIAL
35956    LINE BLANK
35957    CHARACTER X
35958    .
35959    REPRODUCIBILITY SD PLOT Y LABID MATID
35960
35961-----REPSD-------------------------------------------------------
35962
35963REPSD
35964
35965Name:
35966    REPSD
35967
35968Type:
35969    Keyword
35970
35971Purpose:
35972    An internal DATAPLOT parameter into which the replication standard
35973    deviation is automatically placed whenever the FIT, PRE-FIT, SPLINE
35974    FIT, YATES ANALYSIS, LOWESS, ANOVA, and MEDIAN POLISH commands are
35975    executed.
35976
35977Description:
35978    The replication standard deviation is a model-free estimate of the
35979    population standard deviation and is computable only when
35980    replication exists in the data.  REPSD may be used by the analyst
35981    in whatever fashion desired.
35982
35983Syntax:
35984    None
35985
35986Examples:
35987    WRITE RESDF REPSD RESDF RESSD LOGCDF
35988    LET SSQD = RESDF*(REPSD**2)
35989    WRITE CALIB. RESDF REPSD RESDF RESSD LOGCDF
35990
35991Default:
35992    None
35993
35994Synonyms:
35995    None
35996
35997Related Commands:
35998    PRED               = A variable where predicted values are stored.
35999    RES                = A variable where residuals are stored.
36000    RESSD              = A parameter where the residual standard
36001                         deviation is stored.
36002    RESDF              = A parameter where the residual degrees of
36003                         freedom is stored.
36004    REPDF              = A parameter where the replication degrees of
36005                         freedom is stored.
36006    LOFCDF             = A parameter where the lack of fit cdf is
36007                         stored.
36008    FIT                = Carries out a least squares linear or
36009                         non-linear fit.
36010    EXACT RATIONAL FIT = Carries out an exact rational fit.
36011    PRE-FIT            = Carries out a least squares pre-fit.
36012    SPLINE FIT         = Carries out a spline fit.
36013    YATES ANALYSIS     = Carries out an analysis of a Yates design.
36014    LOWESS             = Carries out a locally weighted least squares
36015                         fit.
36016    SMOOTH             = Carries out a smoothing.
36017    ANOVA              = Carries out an ANOVA.
36018    MEDIAN POLISH      = Carries out a median polish.
36019    PLOT               = Generates a data/function plot.
36020
36021Applications:
36022    XX
36023
36024Implementation Date:
36025    XX
36026
36027Program:
36028    XX
36029
36030-----REPEAT-------------------------------------------------------
36031
36032REPEAT
36033
36034Name:
36035    REPEAT
36036
36037Type:
36038    Support Command
36039
36040Purpose:
36041    Selectively re-execute one of, or a set of, the last 20 DATAPLOT
36042    commands that had been entered.
36043
36044Syntax:
36045    REPEAT  <id of first command>   <id of last command>
36046    where <id1> is the line number of the first command to re-execute;
36047    and   <id2> is the line number of the last command to re-execute.
36048
36049    The line numbers are obtained by preceding the REPEAT command by
36050    a LIST command with no arguments.  All the commands between the
36051    first and last line are re-executed as well.
36052
36053Examples:
36054    REPEAT 6 3     --to repeat commands 6, 5, 4, and 3 ago
36055    REPEAT 3 6     --to repeat commands 6, 5, 4, and 3 ago
36056    REPEAT 6 6     --to repeat command 6 ago
36057    REPEAT 6       --to repeat command 6 ago
36058    REPEAT 1       --to repeat the last command
36059    REPEAT         --to repeat the last command
36060
36061Note:
36062    The REPEAT command is almost always preceded by the LIST command
36063    (with no arguments).  LIST will print the last 20 commands that
36064    were entered.  Based on that list, the analyst can then enter the
36065    REPEAT command to selectively execute one or more of those
36066    commands.  For example,
36067
36068       LIST
36069       REPEAT 6 3
36070
36071    would list the last 20 commands and then re-execute the sixth,
36072    fifth, fourth, and third commands ago.  See the documentation for
36073    the LIST command for details.
36074
36075Note:
36076    DATAPLOT actually saves the last 200 (50 in earlier versions)
36077    commands.  Enter the command SET LIST LINES <n> where <n> is
36078    between 1 and 200 to control the number of commands that LIST
36079    prints.
36080
36081Note:
36082    The REPEAT command is commonly used for the re-execution of long
36083    complicated commands (e.g., PLOT with a complicated mathematical
36084    expression).
36085
36086Note:
36087    The R synonym for the REPEAT command is heavily used.
36088
36089Note:
36090    At this time, there is no way to edit the re-executed commands
36091    with the REPEAT command.  You can use SAVE to a file and then use
36092    the built-in editor (EDIT command).  However, this may be more
36093    trouble than it is worth.
36094
36095Default:
36096    If only one argument is entered, then only that command is
36097    re-executed.
36098    If no arguments are entered, then the last command is re-executed.
36099
36100Synonyms:
36101    R
36102
36103Related Commands:
36104    LIST     = List the previously entered commands.
36105    SAVE     = Select previously entered commands to be re-executed
36106               with the "/" command.
36107
36108Applications:
36109    XX
36110
36111Implementation Date:
36112    XX
36113
36114Program:
36115    XX
36116
36117-----REPEATABILITY STANDARD DEVIATION (LET)--------------------------
36118
36119REPEATABILITY STANDARD DEVIATION
36120
36121Name:
36122    REPEATABILITY STANDARD DEVIATION (LET)
36123
36124Type:
36125    Let Subcommand
36126
36127Purpose:
36128    Compute the repeatability standard deviation of a variable
36129    as defined by the ASTM E 691 - 99 standard.
36130
36131Description:
36132    The repeatability standard deviation is a core concept
36133    defined in the ASTM E 691 - 99 standard.  This standard
36134    is described in detail in the following document:
36135
36136      "Standard Practice for Conducting an Interlaboratory Study
36137      to Determine the Precision of a Test Method", ASTM
36138      International, 100 Barr Harbor Drive, PO BOX C700,
36139      West Conshohoceken, PA 19428-2959, USA.
36140
36141    This document describes repeatability in the following way.
36142
36143        Repeatability concerns the variability between independent
36144        test results obtained within a single laboratory in the
36145        shortest practical period of time by a single operator with
36146        a specific set of test apparatus using test specimens taken
36147        at random from a single quantity of homogeneous material.
36148
36149    The repeatability standard deviation is computed as
36150
36151        Sr = SQRT(SUM[i=1 to p][s(i)**2/p]
36152
36153    with
36154
36155        p      = number of labs
36156        s(i)   = Standard deviation of group i.
36157
36158    In an interlaboratory study, the repeatability standard
36159    deviation is computed for each material.
36160
36161Syntax:
36162    LET <par> = REPEATABILITY STANDARD DEVIATION <y> <labid>
36163               <SUBSET/EXCEPT/FOR qualification>
36164    where <y> is a response variable;
36165          <labid> is a lab-id variable;
36166          <par> is a parameter where the repeatability standard
36167              deviation value is saved;
36168    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
36169
36170Examples:
36171    LET RSD = REPEATABILITY STANDARD DEVIATION Y LAB
36172    LET RSD = REPEATABILITY STANDARD DEVIATION Y LAB  SUBSET MAT = 1
36173
36174Note:
36175    The repeatability standard deviation can be computed for
36176    multiple materials with the command
36177
36178         TABULATE REPEATABILITY STANDARD DEVIATION Y LABID MATID
36179
36180    The repeatability standard deviation can be plotted for
36181    multiple materials with the command
36182
36183         REPEATABILITY STANDARD DEVIATION PLOT Y LABID MATID
36184
36185Default:
36186    None
36187
36188Synonyms:
36189    REPEATABILITY SD
36190
36191Related Commands:
36192    E691 INTERLAB                      = Perform an E691 interlab
36193                                         analysis.
36194    REPRODUCIBILITY STANDARD DEVIATION = Compute the reproducibility
36195                                         standard deviation.
36196
36197Reference:
36198    "Standard Practice for Conducting an Interlaboratory Study
36199    to Determine the Precision of a Test Method", ASTM
36200    International, 100 Barr Harbor Drive, PO BOX C700,
36201    West Conshohoceken, PA 19428-2959, USA.
36202
36203Applications:
36204    Interlaboratory Analysis
36205
36206Implementation Date:
36207    2005/4
36208
36209Program:
36210    SKIP 25
36211    READ GLUCOSE.DAT Y LABID MATID
36212    .
36213    LET MATDIST = DISTINCT MATID
36214    LET NMAT = SIZE MATDIST
36215    XLIMITS 1 NMAT
36216    MAJOR XTIC MARK NUMBER NMAT
36217    MINOR XTIC MARK NUMBER 0
36218    XTIC OFFSET 0.5 0.5
36219    Y1LABEL REPEATABILITY SD
36220    X1LABEL MATERIAL
36221    LINE BLANK
36222    CHARACTER X
36223    .
36224    REPEATABILITY SD PLOT Y LABID MATID
36225
36226-----RES-------------------------------------------------------
36227
36228RES
36229
36230Name:
36231    RES
36232
36233Type:
36234    Keyword
36235
36236Purpose:
36237    An internal DATAPLOT variable into which the residuals are
36238    automatically placed whenever the FIT, PRE-FIT, SPLINE FIT, LOWESS,
36239    YATES ANALYSIS, SMOOTH, ANOVA, and MEDIAN POLISH commands are
36240    executed.
36241
36242Description:
36243    In general, the residuals are defined as
36244       raw data - predicted values
36245    where the predicted values are the "fitted values" from fitting,
36246    pre-fitting, spline fitting, smoothing, ANOVA, locally weighted
36247    least squares fitting, Yates analysis, and median polish.  RES can
36248    be used by the analyst in whatever fashion desired.  Residuals are
36249    extremely important because they serve as the base for testing
36250    model adequacy via the battery of techniques known as residual
36251    analysis.  Typical operations with these residuals include:
36252    1) plotting the residuals versus any independent variable to check
36253       for latent relationships (e.g., PLOT RES X);
36254    2) generating a lag plot of the residuals to check for
36255       autocorrelation (e.g., LAG PLOT RES);
36256    3) generating a histogram of the residuals to check for general
36257       distributional structure (e.g., HISTOGRAM RES);
36258    4) generating a normal probability plot of the residuals to check
36259       for normality (e.g., NORMAL PROBABILITY PLOT RES).
36260
36261Syntax:
36262    None
36263
36264Examples:
36265    WRITE X Y PRED RES
36266    PLOT RES X
36267    LET RES2=ABS(RES)
36268
36269Default:
36270    None
36271
36272Synonyms:
36273    None
36274
36275Related Commands:
36276    PRED               = A variable where predicted values are stored.
36277    RESSD              = A parameter where the residual standard
36278                         deviation is stored.
36279    RESDF              = A parameter where the residual degrees of
36280                         freedom is stored.
36281    REPSD              = A parameter where the replication standard
36282                         deviation is stored.
36283    REPDF              = A parameter where the replication degrees of
36284                         freedom is stored.
36285    LOFCDF             = A parameter where the lack of fit cdf is
36286                         stored.
36287    FIT                = Carries out a least squares linear or
36288                         non-linear fit.
36289    EXACT RATIONAL FIT = Carries out an exact rational fit.
36290    PRE-FIT            = Carries out a least squares pre-fit.
36291    SPLINE FIT         = Carries out a spline fit.
36292    YATES ANALYSIS     = Carries out an analysis of a Yates design.
36293    LOWESS             = Carries out a locally weighted least squares
36294                         fit.
36295    SMOOTH             = Carries out a smoothing.
36296    ANOVA              = Carries out an ANOVA.
36297    MEDIAN POLISH      = Carries out a median polish.
36298    PLOT               = Generates a data/function plot.
36299
36300Applications:
36301    Fitting
36302
36303Implementation Date:
36304    Pre-1987
36305
36306Program:
36307    SKIP 25
36308    READ BERGER.DAT Y X
36309    FIT Y X
36310    4-PLOT RES
36311
36312-----RESCALED SUM (LET)-----------------------------------------
36313
36314RESCALED SUM
36315
36316Name:
36317    RESCALED SUM (LET)
36318
36319Type:
36320    Let Subcommand
36321
36322Purpose:
36323    Compute the rescaled sum of a variable.
36324
36325Description:
36326    The rescaled sum has the formula:
36327
36328         RS = SUM[i=1 to N][X(i)]/SQRT(N)
36329
36330    with N denoting the number of observations.  This statistic has
36331    application in the ISO 13528 proficiency testing.
36332
36333Syntax 1:
36334    LET <par> = RESCALED SUM <y>   <SUBSET/EXCEPT/FOR qualification>
36335    where <y> is the response variable;
36336          <par> is a parameter where the computed rescaled sum is saved;
36337    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
36338
36339Syntax 2:
36340    LET <par> = DIFFERENCE OF RESCALED SUM <y1> <y2>
36341                <SUBSET/EXCEPT/FOR qualification>
36342    where <y1> is the first response variable;
36343          <y2> is the second response variable;
36344          <par> is a parameter where the computed difference of
36345              the rescaled sums is saved;
36346    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
36347
36348    This syntax computes the recaled sum of <y1> and <y2> and then
36349    computes the difference of the two sums.
36350
36351Examples:
36352    LET A = RESCALED SUM Y1
36353    LET A = RESCALED SUM Y1  SUBSET TAG > 2
36354    LET A = DIFFERENCE OF RESCALED SUM Y1 Y2
36355
36356Note:
36357    The rescaled sum is sometimes used in the context of ISO 13528
36358    proficiency studies for the case where there are multiple rounds
36359    of the proficiency study.  Specifcally, the following two plots
36360    are sometimes generated
36361
36362       1) A plot of the rescaled sum versus the laboratory where the
36363          summation is over all rounds and all materials for a given
36364          laboratory.  Laboratories with an absolute value greater than
36365          2 are of possible concern (i.e., warning) and those with an
36366          absolute value greater than 3 are of concern (i.e., action
36367          signal). The advantage of this statistic is that it has the
36368          same interpretation as the z-scores. The disadvantage is that
36369          large magnitude z-scores of opposite sign can cancel each other.
36370
36371       2) A plot of the relative laboratory performance (RLP) versus the
36372          rescaled sum for all laboratories.  A box is formed for
36373          the rescaled sum between -2 and 2 and for RLP between 0 and 1.5.
36374          Laboratories outside this box are identified as needing
36375          attention.
36376
36377Note:
36378    In some applications it may be desired to cap the value
36379    of outliers.  This is most common when the response variable
36380    is a z-score or some other standardized score.
36381
36382    To specify this value, enter the command
36383
36384        LET CAPVALUE = <value>
36385
36386    where <value> is typically 3 or 4 (if the reponse data are
36387    z-scores or z-score type data).  Note that the value represents
36388    an absolute value.  For example, if CAPVALUE is 4, values greater
36389    than 4 will be set to 4 and values less than -4 will be set to -4.
36390
36391Note:
36392    Dataplot statistics can be used in a number of commands.  For
36393    details, enter
36394
36395         HELP STATISTICS
36396
36397Default:
36398    None
36399
36400Synonyms:
36401    None
36402
36403Related Commands:
36404    MEAN                 = Compute the mean of a variable.
36405    STANDARD DEVIATION   = Compute the standard deviation of a variable.
36406    SUM OF SQUARES       = Compute the sum of squares of a variable.
36407    ROOT MEAN SQUARE     = Compute the root mean square error of a
36408                           variable.
36409
36410Applications:
36411    ISO 13528 Proficiency Testing
36412
36413Implementation Date:
36414    2012/2
36415    2012/6: Added DIFFERENCE OF RESCALED SUM
36416
36417Program 1:
36418    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
36419    LET RSUM = RESCALED SUM Y1
36420
36421Program 2:
36422    SKIP 25
36423    READ GEAR.DAT Y X
36424    LET Y = ZSCORE Y
36425    .
36426    CHARACTER X BLANK
36427    LINE BLANK SOLID
36428    TIC MARK OFFSET UNITS DATA
36429    X1TIC MARK OFFSET 0.5 0.5
36430    .
36431    LABEL CASE ASIS
36432    Y1LABEL Rescaled Sum
36433    X1LABEL Batch
36434    RESCALED SUM PLOT Y X
36435
36436-----RESDF-------------------------------------------------------
36437
36438RESDF
36439
36440Name:
36441    RESDF
36442
36443Type:
36444    Keyword
36445
36446Purpose:
36447    An internal DATAPLOT parameter into which the residual degrees of
36448    freedom is automatically placed whenever the FIT, PRE-FIT, SPLINE
36449    FIT, SMOOTH, ANOVA, YATES ANALYSIS, LOWESS, and MEDIAN POLISH
36450    commands are executed.
36451
36452Description:
36453    In general, the formula is:
36454       RESDF = total number of observations - number of parameters
36455               + the number of constraints.
36456    RESDF can be used by the analyst in whatever fashion desired.
36457
36458Syntax:
36459    None
36460
36461Examples:
36462    WRITE RESDF REPSD RESDF RESSD LOGCDF
36463    LET SSQD = RESDF*(REPSD**2)
36464    WRITE CALIB. RESDF REPSD RESDF RESSD LOGCDF
36465
36466Default:
36467    None
36468
36469Synonyms:
36470    None
36471
36472Related Commands:
36473    PRED               = A variable where predicted values are stored.
36474    RES                = A variable where residuals are stored.
36475    RESSD              = A parameter where the residual standard
36476                         deviation is stored.
36477    REPSD              = A parameter where the replication standard
36478                         deviation is stored.
36479    REPDF              = A parameter where the replication degrees of
36480                         freedom is stored.
36481    LOFCDF             = A parameter where the lack of fit cdf is
36482                         stored.
36483    FIT                = Carries out a least squares linear or
36484                         non-linear fit.
36485    EXACT RATIONAL FIT = Carries out an exact rational fit.
36486    PRE-FIT            = Carries out a least squares pre-fit.
36487    SPLINE FIT         = Carries out a spline fit.
36488    YATES ANALYSIS     = Carries out an analysis of a Yates design.
36489    LOWESS             = Carries out a locally weighted least squares
36490                         fit.
36491    SMOOTH             = Carries out a smoothing.
36492    ANOVA              = Carries out an ANOVA.
36493    MEDIAN POLISH      = Carries out a median polish.
36494    PLOT               = Generates a data/function plot.
36495
36496Applications:
36497    XX
36498
36499Implementation Date:
36500    XX
36501
36502Program:
36503    XX
36504
36505-----RESET-------------------------------------------------------
36506
36507RESET
36508
36509Name:
36510    RESET
36511
36512Type:
36513    Support Command
36514
36515Purpose:
36516    Resets all internal Dataplot parameters, variables, functions, and
36517    switches to default sign-on conditions.
36518
36519Description:
36520    The RESET command allows the analyst to clear all of Dataplot's
36521    internal settings so as to start afresh.
36522
36523    You can also selectively reset internal settings based on a
36524    keyword (see Syntax 2).  You can also specifiy names that will
36525    not be reset for the DATA, VARIABLES, PARAMETERS, FUNCTIONS, and
36526    MATRICES options (see Syntax 3).
36527
36528Syntax 1:
36529    RESET
36530
36531    This resets all internal settings.
36532
36533Syntax 2:
36534    RESET <keyword>
36535    where <keyword is one of the following:
36536              ALL         - reset all internal settings
36537              CONTROL     - reset the plot control settings
36538              DATA        - reset the data settings
36539              SUPPORT     - resets the support settings
36540              GRAPHICS    - resets the graphics settings
36541              I/O         - resets the I/O settings
36542              CLSB        - resets the CLSB (CHARACTER, LINE, SPIKE, BAR)
36543                            settings
36544              LIMITS      - resets the LIMITS settings
36545              VARIABLES   - reset variable settings
36546              PARAMETERS  - reset parameter settings
36547              FUNCTIONS   - reset function settings
36548              MATRICES    - reset matrix settings.
36549
36550Syntax 3:
36551    RESET NO RESET <name> <ON/OFF>
36552    where <name> identifies a single name;
36553    and where ON specifies the name will be added to the list and
36554        OFF specifies the name will be removed from the list.
36555
36556    Dataplot maintains a list of 1 to 30 names that will not be
36557    reset by the RESET DATA, RESET VARIABLES, RESET PARAMETERS,
36558    RESET FUNCTIONS, and RESET MATRICES commands.  You can use this
36559    syntax to add or remove names from the list.  The ON switch is
36560    optional for adding a name.  However, the OFF switch is required to
36561    delete a name from the list.
36562
36563Syntax 4:
36564    RESET COMMAND LINE ARGUMENTS
36565
36566    This syntax can be used to clear the argument list for macros.
36567    Enter HELP MACRO SUBSTITUTION CHARACTER for details.
36568
36569Examples:
36570    RESET
36571    RESET DATA
36572    RESET LIMITS
36573    RESET VARIABLES
36574    RESET NO RESET Y
36575
36576Default:
36577    None
36578
36579Synonyms:
36580    CLEAR
36581
36582Related Commands:
36583    SAVE MEMORY     = Dumps all of DATAPLOT' interal parameters,
36584                      variables, functions, and switches to a file.
36585    DIMENSION       = Set the number of columns and rows for
36586                      DATAPLOT's work array.
36587
36588Applications:
36589    Data Management
36590
36591Implementation Date:
36592    Pre-1987
36593    1993/09: Added RESET LIMITS and RESET CLSB
36594    2015/12: For Windows, do not reset the QuickWin device
36595    2016/09: Added RESET NO RESET option
36596    2016/09: Added RESET COMMAND LINE ARGUMENTS
36597
36598Program:
36599    SKIP 25
36600    READ BERGER1.DAT Y X BATCH
36601    FIT Y X
36602    RESET VARIABLES
36603    READ LEW.DAT Y
36604    4-PLOT Y
36605
36606-----RESISTOR-------------------------------------------------------
36607
36608RESISTOR
36609
36610Name:
36611    RESISTOR
36612
36613Type:
36614    Diagrammatic Graphics Command
36615
36616Purpose:
36617    Draws a (fixed value) resistor (a component used in electronic
36618    circuit diagrams).
36619
36620Description:
36621    The 2 pairs of coordinates define the (x,y) values for the start
36622    point and the end point (respectively) of the resistor.  Note that
36623    the height of the wrinkles in the resistor is controlled by the
36624    HEIGHT command.
36625
36626Syntax:
36627    RESISTOR   <x1>   <y1>   <x2>   <y2>
36628    where <x1> is a decimal number or parameter in the range 0 to 100
36629              that specifies the x coordinate of the start point;
36630          <y1> is a decimal number or parameter in the range 0 to 100
36631              that specifies the y coordinate of the start point;
36632          <x2> is a decimal number or parameter in the range 0 to 100
36633              that specifies the x coordinate of the end point;
36634    and   <y2> is a decimal number or parameter in the range 0 to 100
36635              that specifies the y coordinate of the end point.
36636
36637Examples:
36638    RESISTOR 50 50 60 50
36639    RESISTOR 50 50 60 60
36640    RESISTOR 20 20 25 20
36641    RESISTOR 20 70 25 70
36642    RESISTOR 30.55 50.7 40.23 50.7
36643    RESISTOR X1 Y1 X2 Y2
36644
36645Note:
36646    The line style (i.e., solid, dash), color, and thickness are
36647    controlled by the LINE, LINE COLOR, and LINE THICKNESS commands.
36648
36649Default:
36650    None
36651
36652Synonyms:
36653    None
36654
36655Related Commands:
36656    GROUND           = Draws a ground.
36657    AMPLIFIER        = Draws an amplifier.
36658    CAPACITOR        = Draws a capacitor.
36659    INDUCTOR         = Draws an inductor.
36660    RESISTOR         = Draws a resistor.
36661    DRAW             = Draws a line.
36662    MOVE             = Moves to a point.
36663    LINES            = Sets the line type for figures and plot lines.
36664    LINE THICKNESSES = Sets the line thickness for figures and  plot
36665                       lines.
36666    LINE COLOR       = Sets the line colors for figures and plot lines.
36667    CROSS-HAIR       = Activates and reads the cross-hair.
36668    TEXT             = Writes a text string.
36669
36670Applications:
36671    XX
36672
36673Implementation Date:
36674    XX
36675
36676Program:
36677    LINE SOLID
36678    LINE COLOR BLACK
36679    LINE THICKNESS 0.2
36680    RESISTOR 20 70 50 70
36681    MOVE 20 90
36682    TEXT RESISTOR COORDINATES (20,70), (50,70)
36683
36684-----RESSD-------------------------------------------------------
36685
36686RESSD
36687
36688Name:
36689    RESSD
36690
36691Type:
36692    Keyword
36693
36694Purpose:
36695    An internal DATAPLOT parameter into which the residual standard
36696    deviation is automatically placed whenever the FIT, PRE-FIT, SPLINE
36697    FIT, SMOOTH, ANOVA, LOWESS, YATES ANALYSIS, and MEDIAN POLISH
36698    commands are executed.
36699
36700Description:
36701    The residual standard deviation is a model-dependent estimate of
36702    the population standard deviation.  It is a measure of the
36703    variability that remains after the model has been accounted for.
36704    It is the single most important number in the output from the above
36705    commands.  RESSD can be used by the analyst in whatever fashion
36706    desired.
36707
36708Syntax:
36709    None
36710
36711Examples:
36712    WRITE RESDF RESSD RESDF RESSD LOGCDF
36713    LET SSQD = RESDF*(RESSD**2)
36714    WRITE CALIB. RESDF RESSD RESDF RESSD LOGCDF
36715
36716Default:
36717    None
36718
36719Synonyms:
36720    None
36721
36722Related Commands:
36723    PRED               = A variable where predicted values are stored.
36724    RES                = A variable where residuals are stored.
36725    RESDF              = A parameter where the residual degrees of
36726                         freedom is stored.
36727    REPSD              = A parameter where the replication standard
36728                         deviation is stored.
36729    REPDF              = A parameter where the replication degrees of
36730                         freedom is stored.
36731    LOFCDF             = A parameter where the lack of fit cdf is
36732                         stored.
36733    FIT                = Carries out a least squares linear or
36734                         non-linear fit.
36735    EXACT RATIONAL FIT = Carries out an exact rational fit.
36736    PRE-FIT            = Carries out a least squares pre-fit.
36737    SPLINE FIT         = Carries out a spline fit.
36738    YATES ANALYSIS     = Carries out an analysis of a Yates design.
36739    LOWESS             = Carries out a locally weighted least squares
36740                         fit.
36741    SMOOTH             = Carries out a smoothing.
36742    ANOVA              = Carries out an ANOVA.
36743    MEDIAN POLISH      = Carries out a median polish.
36744    PLOT               = Generates a data/function plot.
36745
36746Applications:
36747    XX
36748
36749Implementation Date:
36750    XX
36751
36752Program:
36753    XX
36754
36755-------------RESTORE MEMORY------------------------------------
36756
36757RESTORE MEMORY
36758
36759Name:
36760    RESTORE MEMORY
36761
36762Type:
36763    Support Command
36764
36765Purpose:
36766    Reloads all internal DATAPLOT parameters, variables, functions,
36767    and switches that were previously dumped to a file via the SAVE
36768    MEMORY command.
36769
36770Description:
36771    The RESTORE MEMORY command thus allows the analyst to restore all
36772    of DATAPLOT's internal settings so that a run my be resumed after
36773    being interrupted by a meeting, lunch, etc.
36774
36775Syntax:
36776    RESTORE MEMORY   <file name>
36777    where <file name> is the name of a file where the internal
36778              settings were previously saved.
36779
36780    If the file name does not contain a period, place a period (no
36781    spaces) at the end of the file name.
36782
36783Examples:
36784    RESTORE MEMORY OUT.
36785    RESTORE MEMORY SCRATCH.
36786    RESTORE MEMORY TEMP.
36787
36788Note:
36789    DATAPLOT has no restrictions on the file name other than it be a
36790    valid file name on the local operating system and that it contain
36791    a period "." in the file name itself or as a trailing character.
36792    DATAPLOT strips off trailing periods on those systems where it is
36793    appropriate to do so.  On systems where trailing periods can be a
36794    valid file name (e.g., Unix), DATAPLOT tries to open the file with
36795    the trailing period.  If this fails, it then tries to open the file
36796    with the trailing period stripped off.
36797
36798Note:
36799    File names are case sensitive on Unix file systems.  For Unix,
36800    DATAPLOT attempts to open the file as given.  If this fails, it
36801    attempts to open the file as all upper case characters.  If this
36802    fails, it attempts to open the file as all lower case characters.
36803    All other currently supported systems are not case sensitive
36804    regarding file names.
36805
36806    As a further caution for Unix hosts, certain expansion characters
36807    (specifically ~ to refer to your home directory) are interpreted
36808    by the shell and are not recognized by the Fortran compiler.  These
36809    expansion characters are interpreted as literal characters and do
36810    not yield the intended file name.
36811
36812Default:
36813    None
36814
36815Synonyms:
36816    None
36817
36818Related Commands:
36819    SAVE MEMORY    = Dump all internal DATAPLOT settings to a file.
36820    RESET          = Reset internal DATAPLOT settings to their default
36821                     values.
36822
36823Applications:
36824    XX
36825
36826Implementation Date:
36827    XX
36828
36829Program:
36830    XX
36831
36832-----RETAIN-------------------------------------------------------
36833
36834RETAIN
36835
36836Name:
36837    RETAIN
36838
36839Type:
36840    Support Command
36841
36842Purpose:
36843    Retains (keeps) the specified rows or subset of a variable,
36844    deletes the unspecified rows or subset, and packs the kept
36845    elements into the "top" of the variable.
36846
36847Syntax 1:
36848    RETAIN   <list>   <SUBSET/EXCEPT/FOR qualification>
36849    where <list> is a list of variables;
36850    and where the <SUBSET/EXCEPT/FOR qualification> is required.
36851
36852Syntax 2:
36853    RETAIN   <list>
36854    where <list> is a list of elements of a variable.
36855
36856Examples:
36857    RETAIN Y SUBSET X 2 TO 4
36858    RETAIN Y1 Y2 X SUBSET X 8 TO INFINITY
36859    RETAIN X Y Z FOR I = 11 1 20
36860    RETAIN X(100)
36861    RETAIN X(2) Y(7) Z(15)
36862    RETAIN X(2) Y(2) PRED(2) RES(2)
36863
36864Default:
36865    None
36866
36867Synonyms:
36868    KEEP
36869
36870Related Commands:
36871    DELETE = Deletes rows or subsets of a variable.
36872    LET    = Transforms rows or subsets of a variable (plus other
36873             capabilities).
36874    SUBSET = Allows specification of a subset.
36875    EXCEPT = Allows exclusion-specification of a subset.
36876    FOR    = Allows row-specification of a subset.
36877
36878Applications:
36879    Data Manipulation
36880
36881Implementation Date:
36882    Pre-1987
36883
36884Program:
36885    SKIP 25
36886    READ AUTO83B.DAT Y1 Y2
36887    RETAIN Y2 > -998
36888    BIHISTOGRAM Y1 Y2
36889
36890-----REVERSE (LET)--------------------------------
36891
36892REVERSE
36893
36894Name:
36895    REVERSE (LET)
36896
36897Type:
36898    Let Subcommand
36899
36900Purpose:
36901    Reverse the order of the elements in a variable.
36902    That is, if Y has N elements, Y(1) = Y(N), Y(2)=Y(N-1), ... ,
36903    Y(N)=Y(1).
36904
36905Syntax:
36906    LET <y2> = REVERSE <y1>    <SUBSET/EXCEPT/FOR qualification>
36907    where <y1> is a  response variable;
36908          <y2> is a variable where the reversed data is stored;
36909    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
36910
36911Examples:
36912    LET Y2 = REVERSE Y
36913    LET Y2 = REVERSE Y FOR I = 1 1 30
36914
36915Default:
36916    None
36917
36918Synonyms:
36919    FLIP is a synonym for REVERSE.
36920
36921Related Commands:
36922    SORT             = Sort the elements in a variable.
36923    RANK             = Rank the elements in a variable.
36924    SORT DIRECTION   = Specify whether sorting is done in a
36925                       descending or ascending order.
36926
36927Applications:
36928    Data Manipulation
36929
36930Implementation Date:
36931    1998/5
36932
36933Program:
36934    LET Y = NORMAL RANDOM NUMBERS FOR I = 1 1 100
36935    LET Y2 = RANK Y
36936    LET Y3 = REVERSE Y2
36937
36938-----RF SPREAD PLOT--------------------------------------
36939
36940RF SPREAD PLOT
36941
36942Name:
36943    RF SPREAD PLOT
36944
36945Type:
36946    Graphics Command
36947
36948Purpose:
36949    Generates a residuals-fitted (r-f) spread plot.
36950
36951Description:
36952    The residuals-fitted (r-f) spread plot is a graphical measure
36953    of the goodness of fit.  That is, this command is preceeded
36954    by some type of fit.  It plots percent point (or quantile)
36955    plots of the fitted values minus their mean and the residuals
36956    arranged side by side with a common vertical scale.
36957
36958    The vertical spread of the residuals compared to the vertical
36959    spread of the fitted values gives an indication of how much
36960    of the variation is explained by the fit.
36961
36962    Dataplot assumes that some type of fit has already been
36963    performed and that the predicted values are stored in the
36964    internal variable PRED and the residuals are stored in the
36965    internal variable RES.  If you want to generate the rf
36966    spread plot for variables that are not automatically
36967    stored on PRED and RES, then simply copy the desired variables
36968    into PRED and RES before entering the RF SPREAD PLOT (e.g.,
36969    LET PRED = Y).
36970
36971Syntax:
36972    RF SPREAD PLOT           <SUBSET/EXCEPT/FOR qualification>
36973    where the <SUBSET/EXCEPT/FOR qualification> is optional.
36974
36975Examples:
36976    FIT Y X
36977    RF SPREAD PLOT
36978
36979    LOWESS Y X
36980    RF SPREAD PLOT
36981
36982    SPLINE FIT Y X
36983    RF SPREAD PLOT
36984
36985Default:
36986    None
36987
36988Synonyms:
36989    None
36990
36991Related Commands:
36992    LINES               = Sets the type for plot lines.
36993    CHARACTER           = Sets the type for plot characters.
36994    PERCENT POINT PLOT  = Generates a percent point plot.
36995    PLOT                = Generates a data or function plot.
36996
36997References:
36998    "Visualizing Data", Cleveland, William S., Hobart Press, 1993.
36999
37000Applications:
37001    Exploratory Data Analysis
37002
37003Implementation Date:
37004    2000/1
37005
37006Program:
37007    SKIP 25
37008    READ BERGER1.DAT Y X
37009    FIT Y X
37010    CHARACTER CIRCLE
37011    LINE BLANK
37012    RF SPREAD PLOT
37013
37014-----RGTCDF (LET)--------------------------------
37015
37016RGTCDF
37017
37018Name:
37019    RGTCDF (LET)
37020
37021Type:
37022    Library Function
37023
37024Purpose:
37025    Compute the reflected generalized Topp and Leone cumulative
37026    distribution function with shape parameters alpha and beta.
37027
37028Description:
37029    The reflected generalized Topp and Leone distribution has
37030    the following cumulative distribution function:
37031
37032        F(x;alpha,beta,a,b) = 1 -
37033            ((b - x)/(b-a))**beta*
37034            {alpha - (alpha-1)*((b-x)/(b-a))}**beta
37035            a <= x <= b, beta > 0, 0 < alpha <= 2
37036
37037    with alpha and beta denoting the shape parameters and
37038    a and b the lower and upper limits, respectively.
37039
37040    The case where a = 0 and b = 1 is referred to as the
37041    standard reflected generalized Topp and Leone distribution.
37042
37043    The lower and upper limits are related to the location
37044    and scale parameters as follows:
37045
37046        location = a
37047        scale    = b - a
37048
37049   Kotz and van Dorp have proposed this distribution as an
37050   alternative to the beta distribution.  It is distinguished
37051   from the beta distribution in that it can have positive
37052   density at the lower limit with a strict positive mode.
37053
37054Syntax:
37055    LET <y> = RGTCDF(<x>,<alpha>,<beta>,<a>,<b>)
37056              <SUBSET/EXCEPT/FOR qualification>
37057    where <x> is a number, parameter, or variable containing
37058              values in the interval (a,b);
37059          <y> is a variable or a parameter (depending on what
37060              <x> is) where the computed reflected generalized
37061              topp and leone cdf value is stored;
37062          <alpha> is a number, parameter, or variable in the
37063              interval (0, 2) that specifies the first shape
37064              parameter;
37065          <beta> is a positive number, parameter, or variable that
37066              specifies the second shape parameter;
37067          <a> is a number, parameter, or variable that
37068              specifies the lower limit;
37069          <b> is a number, parameter, or variable that
37070              specifies the upper limit;
37071    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
37072
37073    If <a> and <b> are omitted, they default to 0 and 1,
37074    respectively.
37075
37076Examples:
37077    LET A = RGTCDF(0.3,0.2,1.2)
37078    LET Y = RGTCDF(X,0.5,2)
37079    PLOT RGTCDF(X,2,3) FOR X = 0  0.01  1
37080
37081Note:
37082    Library functions are distinguished from let subcommands
37083    in the following ways.
37084    1) Functions enclose the input value in parenthesis.  Let
37085       subcommands use spaces.
37086    2) Functions can accept (and return) either parameters
37087       (i.e., single values) or variables (i.e., an array of
37088       values) while let subcommands are specific in which they
37089       accept as input and what they return as output.
37090    3) Functions can accept expressions while let subcommands
37091       do not.  For example, the following is legal:
37092           LET Y2 = ABS(Y1-INT(Y1))
37093       For let subcommands, you typically have to do something
37094       like the following:
37095           LET YTEMP = Y**2 + 8
37096           LET A = SUM YTEMP
37097
37098Default:
37099    None
37100
37101Synonyms:
37102    None
37103
37104Related Commands:
37105    RGTPDF = Compute the reflected generalized Topp and Leone
37106             probability density function.
37107    RGTPPF = Compute the reflected generalized Topp and Leone
37108             percent point function.
37109    GTLCDF = Compute the generalized Topp and Leone probability
37110             density function.
37111    TOPPDF = Compute the Topp and Leone probability density
37112             function.
37113    TSPPDF = Compute the two-sided power probability density
37114             function.
37115    BETPDF = Compute the beta probability density function.
37116    TRIPDF = Compute the triangular probability density function.
37117    TRAPDF = Compute the trapezoid probability density function.
37118    UNIPDF = Compute the uniform probability density function.
37119    POWPDF = Compute the power probability density function.
37120    JSBPDF = Compute the Johnson SB probability density function.
37121
37122Reference:
37123    Samuel Kotz and J. Rene Van Dorp 2004, "Beyond Beta:
37124    Other Continuous Families of Distributions with Bounded
37125    Support and Applications", World Scientific, chapter 7.
37126
37127Applications:
37128    Distributional Modeling
37129
37130Implementation Date:
37131    2007/2
37132
37133Program:
37134    LABEL CASE ASIS
37135    TITLE CASE ASIS
37136    TITLE OFFSET 2
37137    .
37138    MULTIPLOT 3 3
37139    MULTIPLOT CORNER COORDINATES 0 0 100 95
37140    MULTIPLOT SCALE FACTOR 3
37141    .
37142    LET ALPHA = 2
37143    LET BETA  = 3
37144    TITLE Alpha = ^alpha, Beta = ^beta
37145    PLOT RGTCDF(X,ALPHA,BETA) FOR X = 0  0.01  1
37146    .
37147    LET ALPHA = 1.5
37148    LET BETA  = 6
37149    TITLE Alpha = ^alpha, Beta = ^beta
37150    PLOT RGTCDF(X,ALPHA,BETA) FOR X = 0  0.01  1
37151    .
37152    LET ALPHA = 1.5
37153    LET BETA  = 2
37154    TITLE Alpha = ^alpha, Beta = ^beta
37155    PLOT RGTCDF(X,ALPHA,BETA) FOR X = 0  0.01  1
37156    .
37157    LET ALPHA = 1.5
37158    LET BETA  = 1
37159    TITLE Alpha = ^alpha, Beta = ^beta
37160    PLOT RGTCDF(X,ALPHA,BETA) FOR X = 0  0.01  1
37161    .
37162    LET ALPHA = 0.5
37163    LET BETA  = 2
37164    TITLE Alpha = ^alpha, Beta = ^beta
37165    PLOT RGTCDF(X,ALPHA,BETA) FOR X = 0  0.01  1
37166    .
37167    LET ALPHA = 0.5
37168    LET BETA  = 1
37169    TITLE Alpha = ^alpha, Beta = ^beta
37170    PLOT RGTCDF(X,ALPHA,BETA) FOR X = 0  0.01  1
37171    .
37172    LET ALPHA = 0.5
37173    LET BETA  = 0.75
37174    TITLE Alpha = ^alpha, Beta = ^beta
37175    PLOT RGTCDF(X,ALPHA,BETA) FOR X = 0  0.01  1
37176    .
37177    LET ALPHA = 0.5
37178    LET BETA  = 0.25
37179    TITLE Alpha = ^alpha, Beta = ^beta
37180    PLOT RGTCDF(X,ALPHA,BETA) FOR X = 0  0.01  1
37181    .
37182    LET ALPHA = 1
37183    LET BETA  = 1
37184    TITLE Alpha = ^alpha, Beta = ^beta
37185    PLOT RGTCDF(X,ALPHA,BETA) FOR X = 0  0.01  1
37186    .
37187    END OF MULTIPLOT
37188    .
37189    JUSTIFICATION CENTER
37190    MOVE 50 97
37191    TEXT Reflected Generalized Topp and Leone CDF Functions
37192
37193-----RGTPDF (LET)--------------------------------
37194
37195RGTPDF
37196
37197Name:
37198    RGTPDF (LET)
37199
37200Type:
37201    Library Function
37202
37203Purpose:
37204    Compute the reflected generalized Topp and Leone probability
37205    density function with shape parameters alpha and beta.
37206
37207Description:
37208    The reflected generalized Topp and Leone distribution has
37209    the following probability density function:
37210
37211        f(x;alpha,beta,a,b) = (beta/(b-a))*
37212            ((b-x)/(b-a))**(beta-1)*
37213            {alpha - (alpha-1)*((b-x)/(b-a))}**(beta-1)*
37214            {alpha - 2*(alpha-1)*((b-x)/(b-a))}
37215            a <= x <= b, beta > 0, 0 < alpha <= 2
37216
37217    with alpha and beta denoting the shape parameters and
37218    a and b the lower and upper limits, respectively.
37219
37220    The case where a = 0 and b = 1 is referred to as the
37221    standard reflected generalized Topp and Leone distribution.
37222
37223    The lower and upper limits are related to the location
37224    and scale parameters as follows:
37225
37226        location = a
37227        scale    = b - a
37228
37229    Kotz and van Dorp have proposed this distribution as an
37230    alternative to the beta distribution.  It is distinguished
37231    from the beta distribution in that it can have positive
37232    density at the lower limit with a strict positive mode.
37233
37234Syntax:
37235    LET <y> = RGTPDF(<x>,<alpha>,<beta>,<a>,<b>)
37236              <SUBSET/EXCEPT/FOR qualification>
37237    where <x> is a number, parameter, or variable containing
37238              values in the interval (a,b);
37239          <y> is a variable or a parameter (depending on what
37240              <x> is) where the computed reflected generalized
37241              topp and leone pdf value is stored;
37242          <alpha> is a number, parameter, or variable in the
37243              interval (0, 2) that specifies the first shape
37244              parameter;
37245          <beta> is a positive number, parameter, or variable that
37246              specifies the second shape parameter;
37247          <a> is a number, parameter, or variable that
37248              specifies the lower limit;
37249          <b> is a number, parameter, or variable that
37250              specifies the upper limit;
37251    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
37252
37253    If <a> and <b> are omitted, they default to 0 and 1,
37254    respectively.
37255
37256Examples:
37257    LET A = RGTPDF(0.3,0.2,1.2)
37258    LET Y = RGTPDF(X,0.5,2)
37259    PLOT RGTPDF(X,2,3) FOR X = 0  0.01  1
37260
37261Note:
37262    Reflected generalized Topp and Leone random numbers,
37263    probability plots, and goodness of fit tests can be
37264    generated with the commands:
37265
37266       LET ALPHA = <value>
37267       LET BETA = <value>
37268       LET A = <value>
37269       LET B = <value>
37270       LET Y = REFLECTED GENERALIZED TOPP LEONE ...
37271               RANDOM NUMBERS FOR I = 1 1 N
37272       REFLECTED GENERALIZED TOPP LEONE PROBABILITY PLOT Y
37273       REFLECTED GENERALIZED TOPP LEONE PROBABILITY PLOT Y2 X2
37274       REFLECTED GENERALIZED TOPP LEONE PROBABILITY PLOT ...
37275               Y3 XLOW XHIGH
37276       REFLECTED GENERALIZED TOPP LEONE KOLMOGOROV SMIRNOV ...
37277               GOODNESS OF FIT Y
37278       REFLECTED GENERALIZED TOPP LEONE CHI-SQUARE ...
37279               GOODNESS OF FIT Y2 X2
37280       REFLECTED GENERALIZED TOPP LEONE CHI-SQUARE ...
37281               GOODNESS OF FIT Y3 XLOW XHIGH
37282
37283    The following commands can be used to estimate the alpha
37284    and beta shape parameters for the reflected generalized
37285    Topp and Leone distribution:
37286
37287       LET ALPHA1 = <value>
37288       LET ALPHA2 = <value>
37289       LET BETA1 = <value>
37290       LET BETA2 = <value>
37291       REFLECTED GENERALIZED TOPP LEONE PPCC PLOT Y
37292       REFLECTED GENERALIZED TOPP LEONE PPCC PLOT Y2 X2
37293       REFLECTED GENERALIZED TOPP LEONE PPCC PLOT Y3 XLOW XHIGH
37294       REFLECTED GENERALIZED TOPP LEONE KS PLOT Y
37295       REFLECTED GENERALIZED TOPP LEONE KS PLOT Y2 X2
37296       REFLECTED GENERALIZED TOPP LEONE KS PLOT Y3 XLOW XHIGH
37297
37298    The default values for ALPHA1 and ALPHA2 are 0.1 and 2.
37299    The default values for BETA1 and BETA2 are 0.5 and 10.
37300
37301    The probability plot can then be used to estimate the
37302    lower and upper limits (lower limit = PPA0,
37303    upper limit = PPA0 + PPA1).
37304
37305    The following options may be useful for these commands.
37306
37307       1) Instead of generating the ppcc plot or ks plot on
37308          the original data, we can generate them on
37309          selected percentiles of the data.  For example,
37310          if we have 1,000 points, we can choose to generate
37311          the plots on 100 evenly spaced percentiles with
37312          the command
37313
37314             SET PPCC PLOT DATA POINTS 100
37315
37316          This can be used to speed up the generation of
37317          the plot for larger data sets.
37318
37319       2) For the ks plot, we can fix the location and scale.
37320          This is equivalent to assuming that the lower and
37321          upper limits are known (e.g., we could use the
37322          data minimum and maximum as the lower and upper
37323          limit values).  Given that the lower and upper
37324          limits are LOWLIM and UPPLIM, enter the commands
37325
37326             LET KSLOC   = LOWLIM
37327             LET KSSCALE = UPPLIM
37328
37329          The ppcc plot is invariant to location and scale,
37330          so we cannot fix the lower and upper limits.
37331
37332    Kotz and Van Dorp describe an approximate maximum likelihood
37333    method for estimating the alpha and beta parameters of the standard
37334    reflected generalized Topp and Leone distribution.  It is assumed
37335    that the data are grouped into m intervals [x(i)-1,x(i)] where the
37336    ith interval has n(i) observations.  The midpoint of the interval is
37337    denoted as xbar(i).  For unbinned data, the intervals consist of the
37338    individual observations (and the frequency is equal to 1).  The total
37339    sample size, N, is the sum of the n(i).
37340
37341    The parameter alpha is the solution to the following equation:
37342
37343        G(alpha) = {N/SUM[i=1 to m][n(i)*LOG(1/(alpha*y(i) -
37344                   (alpha - 1)*y(i)**2)]) - 1}*
37345                   SUM[i=1 to m][n(i)*(1 - y(i)/(alpha - (alpha - 1)*y(i))]
37346                   + SUM[i=1 to m]
37347                   [n(i)*(1 - 2*y(i)/(alpha - 2*(alpha - 1)*y(i))]
37348
37349    where
37350
37351        y(i) = 1 - xbar(i)
37352
37353    The maximum likelihood estimate of beta is then:
37354
37355        betahat = N/
37356                  SUM[i=1 to m][n(i)*LOG(1/(alpha*y(i)-(alpha-1)*y(i)**2))]
37357
37358    If the data lie outside the (0,1) interval, then we first apply the
37359    transformation
37360
37361        X'(i) = (X(i) - Lower Limit)/(Upper Limit - Lower Limit)
37362
37363    To generate the approximate maximum likelihood estimates for
37364    ungrouped data in Dataplot, enter the command
37365
37366        REFLECTED GENERALIZED TOPP AND LEONE MLE Y
37367
37368    For grouped data, enter one of the following commands
37369
37370        REFLECTED GENERALIZED TOPP AND LEONE MLE Y X
37371        REFLECTED GENERALIZED TOPP AND LEONE MLE Y XLOW XHIGH
37372
37373    In the first case, X denotes the mid-points of the bins and Y
37374    denotes the corresponding frequency.  In the second case,
37375    XLOW denotes the lower end-points of the bins and XHIGH denotes
37376    the upper end-points of the bins.
37377
37378    If the lower and upper limits are fixed and known, you
37379    can enter the following commands:
37380
37381       LET LOWLIMIT = <value>
37382       LET UPPLIMIT = <value>
37383
37384    For the unknown case, the minimum and maximum of the data
37385    will be used (an epsilon value will be subtracted/added
37386    to the minimum/maximum).  Alternatively, you can use
37387    the estimates of the lower/upper limits generated by
37388    either the PPCC plot method or the KS plot methods and
37389    specify the LOWLIMIT and UPPLIMIT as above.
37390
37391    To specify starting values for alpha and beta, enter
37392    the commands
37393
37394       LET ALPHASV = <value>
37395       LET BETASV  = <value>
37396
37397    For example, the estimates obtained from the PPCC plot or the
37398    KS plot can be used as starting values for the maximum likelihood
37399    estimates.
37400
37401Note:
37402    Library functions are distinguished from let subcommands
37403    in the following ways.
37404    1) Functions enclose the input value in parenthesis.  Let
37405       subcommands use spaces.
37406    2) Functions can accept (and return) either parameters
37407       (i.e., single values) or variables (i.e., an array of
37408       values) while let subcommands are specific in which they
37409       accept as input and what they return as output.
37410    3) Functions can accept expressions while let subcommands
37411       do not.  For example, the following is legal:
37412           LET Y2 = ABS(Y1-INT(Y1))
37413       For let subcommands, you typically have to do something
37414       like the following:
37415           LET YTEMP = Y**2 + 8
37416           LET A = SUM YTEMP
37417
37418Default:
37419    None
37420
37421Synonyms:
37422    None
37423
37424Related Commands:
37425    RGTCDF = Compute the reflected generalized Topp and Leone
37426             cumulative distribution function.
37427    RGTPPF = Compute the reflected generalized Topp and Leone
37428             percent point function.
37429    GTLPDF = Compute the generalized Topp and Leone probability
37430             density function.
37431    TOPPDF = Compute the Topp and Leone probability density
37432             function.
37433    TSPPDF = Compute the two-sided power probability density
37434             function.
37435    BETPDF = Compute the beta probability density function.
37436    TRIPDF = Compute the triangular probability density function.
37437    TRAPDF = Compute the trapezoid probability density function.
37438    UNIPDF = Compute the uniform probability density function.
37439    POWPDF = Compute the power probability density function.
37440    JSBPDF = Compute the Johnson SB probability density function.
37441
37442Reference:
37443    Samuel Kotz and J. Rene Van Dorp 2004, "Beyond Beta:
37444    Other Continuous Families of Distributions with Bounded
37445    Support and Applications", World Scientific, chapter 7.
37446
37447Applications:
37448    Distributional Modeling
37449
37450Implementation Date:
37451    2007/2
37452
37453Program 1:
37454    LABEL CASE ASIS
37455    TITLE CASE ASIS
37456    TITLE OFFSET 2
37457    .
37458    MULTIPLOT 3 3
37459    MULTIPLOT CORNER COORDINATES 0 0 100 95
37460    MULTIPLOT SCALE FACTOR 3
37461    .
37462    LET ALPHA = 2
37463    LET BETA  = 3
37464    TITLE Alpha = ^alpha, Beta = ^beta
37465    PLOT RGTPDF(X,ALPHA,BETA) FOR X = 0  0.01  1
37466    .
37467    LET ALPHA = 1.5
37468    LET BETA  = 6
37469    TITLE Alpha = ^alpha, Beta = ^beta
37470    PLOT RGTPDF(X,ALPHA,BETA) FOR X = 0  0.01  1
37471    .
37472    LET ALPHA = 1.5
37473    LET BETA  = 2
37474    TITLE Alpha = ^alpha, Beta = ^beta
37475    PLOT RGTPDF(X,ALPHA,BETA) FOR X = 0  0.01  1
37476    .
37477    LET ALPHA = 1.5
37478    LET BETA  = 1
37479    TITLE Alpha = ^alpha, Beta = ^beta
37480    PLOT RGTPDF(X,ALPHA,BETA) FOR X = 0  0.01  1
37481    .
37482    LET ALPHA = 0.5
37483    LET BETA  = 2
37484    TITLE Alpha = ^alpha, Beta = ^beta
37485    PLOT RGTPDF(X,ALPHA,BETA) FOR X = 0  0.01  1
37486    .
37487    LET ALPHA = 0.5
37488    LET BETA  = 1
37489    TITLE Alpha = ^alpha, Beta = ^beta
37490    PLOT RGTPDF(X,ALPHA,BETA) FOR X = 0  0.01  1
37491    .
37492    LET ALPHA = 0.5
37493    LET BETA  = 0.75
37494    TITLE Alpha = ^alpha, Beta = ^beta
37495    PLOT RGTPDF(X,ALPHA,BETA) FOR X = 0  0.01  1
37496    .
37497    LET ALPHA = 0.5
37498    LET BETA  = 0.25
37499    TITLE Alpha = ^alpha, Beta = ^beta
37500    PLOT RGTPDF(X,ALPHA,BETA) FOR X = 0  0.01  1
37501    .
37502    LET ALPHA = 1
37503    LET BETA  = 1
37504    TITLE Alpha = ^alpha, Beta = ^beta
37505    PLOT RGTPDF(X,ALPHA,BETA) FOR X = 0  0.01  1
37506    .
37507    END OF MULTIPLOT
37508
37509Program 2:
37510    let alpha = 1.5
37511    let beta = 2
37512    .
37513    let y = reflected generalized topp leone rand numb for i = 1 1 200
37514    .
37515    let alphsav = alpha
37516    let betasav = beta
37517    reflected generalized topp leone ppcc plot y
37518    just center
37519    move 50 5
37520    let alpha = shape1
37521    let beta = shape2
37522    text maxppcc = ^maxppcc, Alpha = ^alpha, Beta = ^beta
37523    move 50 2
37524    text Alphasav = ^alphsav, Betasav = ^betasav
37525    .
37526    char x
37527    line blank
37528    reflected generalized topp leone prob plot y
37529    move 50 5
37530    text PPA0 = ^ppa0, PPA1 = ^ppa1
37531    move 50 2
37532    let upplim = ppa0 + ppa1
37533    text Lower Limit = ^ppa0, Upper Limit = ^upplim
37534    char blank
37535    line solid
37536    .
37537    let ksloc = ppa0
37538    let ksscale = upplim
37539    reflected generalized topp leone kolm smir goodness of fit y
37540    .
37541    bootstrap reflected generalized topp leone plot y
37542    .
37543
37544-----RGTPPF (LET)--------------------------------
37545
37546RGTPPF
37547
37548Name:
37549    RGTPPF (LET)
37550
37551Type:
37552    Library Function
37553
37554Purpose:
37555    Compute the reflected generalized Topp and Leone percent
37556    point function with shape parameters alpha and beta.
37557
37558Description:
37559    The standard reflected generalized Topp and Leone
37560    distribution has the following percent point function:
37561
37562        G(p;alpha,beta,a,b) =
37563            1-{alpha-SQRT(alpha**2-4*(alpha-1)*(1-p)**(1/beta)}/
37564            {2*(alpha-1)}            for 1 < alpha <= 2
37565
37566            1 - (1-p)**(1/beta)      for alpha = 1
37567
37568            1-{alpha+SQRT(alpha**2-4*(alpha-1)*(1-p)**(1/beta)}/
37569            {2*(alpha-1)}            for 0 < alpha < 1
37570
37571            0 <= p <= 1, beta > 0
37572
37573    with alpha and beta denoting the shape parameters.
37574
37575    The standard distribution can be generalized with
37576    lower and upper bound parameters, a and b respectively,
37577    by utilizing the following relation:
37578
37579        G(p;alpha,beta,a,b) = a + (b-a)*G(p;alpha,beta,0,1)
37580
37581    The lower and upper limits are related to the location
37582    and scale parameters as follows:
37583
37584        location = a
37585        scale    = b - a
37586
37587Syntax:
37588    LET <y> = RGTPPF(<p>,<alpha>,<beta>,<a>,<b>)
37589              <SUBSET/EXCEPT/FOR qualification>
37590    where <p> is a number, parameter, or variable containing
37591              values in the interval (0,1);
37592          <y> is a variable or a parameter (depending on what
37593              <x> is) where the computed reflected generalized
37594              topp and leone ppf value is stored;
37595          <alpha> is a number, parameter, or variable in the
37596              interval (0, 2) that specifies the first shape
37597              parameter;
37598          <beta> is a positive number, parameter, or variable that
37599              specifies the second shape parameter;
37600          <a> is a number, parameter, or variable that
37601              specifies the lower limit;
37602          <b> is a number, parameter, or variable that
37603              specifies the upper limit;
37604    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
37605
37606    If <a> and <b> are omitted, they default to 0 and 1,
37607    respectively.
37608
37609Examples:
37610    LET A = RGTPPF(0.95,0.2,1.2)
37611    LET Y = RGTPPF(P,0.5,2)
37612    PLOT RGTPPF(P,2,3) FOR P = 0  0.01  1
37613
37614Note:
37615    Library functions are distinguished from let subcommands
37616    in the following ways.
37617    1) Functions enclose the input value in parenthesis.  Let
37618       subcommands use spaces.
37619    2) Functions can accept (and return) either parameters
37620       (i.e., single values) or variables (i.e., an array of
37621       values) while let subcommands are specific in which they
37622       accept as input and what they return as output.
37623    3) Functions can accept expressions while let subcommands
37624       do not.  For example, the following is legal:
37625           LET Y2 = ABS(Y1-INT(Y1))
37626       For let subcommands, you typically have to do something
37627       like the following:
37628           LET YTEMP = Y**2 + 8
37629           LET A = SUM YTEMP
37630
37631Default:
37632    None
37633
37634Synonyms:
37635    None
37636
37637Related Commands:
37638    RGTCDF = Compute the reflected generalized Topp and Leone
37639             cumulative distribution function.
37640    RGTPDF = Compute the reflected generalized Topp and Leone
37641             probability density function.
37642    GTLPPF = Compute the generalized Topp and Leone probability
37643             density function.
37644    TOPPDF = Compute the Topp and Leone probability density
37645             function.
37646    TSPPDF = Compute the two-sided power probability density
37647             function.
37648    BETPDF = Compute the beta probability density function.
37649    TRIPDF = Compute the triangular probability density function.
37650    TRAPDF = Compute the trapezoid probability density function.
37651    UNIPDF = Compute the uniform probability density function.
37652    POWPDF = Compute the power probability density function.
37653    JSBPDF = Compute the Johnson SB probability density function.
37654
37655Reference:
37656    Samuel Kotz and J. Rene Van Dorp 2004, "Beyond Beta:
37657    Other Continuous Families of Distributions with Bounded
37658    Support and Applications", World Scientific, chapter 7.
37659
37660Applications:
37661    Distributional Modeling
37662
37663Implementation Date:
37664    2007/2
37665
37666Program:
37667    LABEL CASE ASIS
37668    TITLE CASE ASIS
37669    TITLE OFFSET 2
37670    .
37671    MULTIPLOT 3 3
37672    MULTIPLOT CORNER COORDINATES 0 0 100 95
37673    MULTIPLOT SCALE FACTOR 3
37674    .
37675    LET ALPHA = 2
37676    LET BETA  = 3
37677    TITLE Alpha = ^alpha, Beta = ^beta
37678    PLOT RGTPPF(P,ALPHA,BETA) FOR P = 0  0.01  1
37679    .
37680    LET ALPHA = 1.5
37681    LET BETA  = 6
37682    TITLE Alpha = ^alpha, Beta = ^beta
37683    PLOT RGTPPF(P,ALPHA,BETA) FOR P = 0  0.01  1
37684    .
37685    LET ALPHA = 1.5
37686    LET BETA  = 2
37687    TITLE Alpha = ^alpha, Beta = ^beta
37688    PLOT RGTPPF(P,ALPHA,BETA) FOR P = 0  0.01  1
37689    .
37690    LET ALPHA = 1.5
37691    LET BETA  = 1
37692    TITLE Alpha = ^alpha, Beta = ^beta
37693    PLOT RGTPPF(P,ALPHA,BETA) FOR P = 0  0.01  1
37694    .
37695    LET ALPHA = 0.5
37696    LET BETA  = 2
37697    TITLE Alpha = ^alpha, Beta = ^beta
37698    PLOT RGTPPF(P,ALPHA,BETA) FOR P = 0  0.01  1
37699    .
37700    LET ALPHA = 0.5
37701    LET BETA  = 1
37702    TITLE Alpha = ^alpha, Beta = ^beta
37703    PLOT RGTPPF(P,ALPHA,BETA) FOR P = 0  0.01  1
37704    .
37705    LET ALPHA = 0.5
37706    LET BETA  = 0.75
37707    TITLE Alpha = ^alpha, Beta = ^beta
37708    PLOT RGTPPF(P,ALPHA,BETA) FOR P = 0  0.01  1
37709    .
37710    LET ALPHA = 0.5
37711    LET BETA  = 0.25
37712    TITLE Alpha = ^alpha, Beta = ^beta
37713    PLOT RGTPPF(P,ALPHA,BETA) FOR P = 0  0.01  1
37714    .
37715    LET ALPHA = 1
37716    LET BETA  = 1
37717    TITLE Alpha = ^alpha, Beta = ^beta
37718    PLOT RGTPPF(P,ALPHA,BETA) FOR P = 0  0.01  1
37719    .
37720    END OF MULTIPLOT
37721    .
37722    JUSTIFICATION CENTER
37723    MOVE 50 97
37724    TEXT Reflected Generalized Topp and Leone PPF Functions
37725
37726-----RIGCDF (LET)--------------------------------
37727
37728RIGCDF
37729
37730Name:
37731    RIGCDF (LET)
37732
37733Type:
37734    Library Function
37735
37736Purpose:
37737    Compute the reciprocal inverse Gaussian cumulative distribution
37738    function with shape parameters gamma and mu.
37739
37740Description:
37741    The reciprocal inverse Gaussian distribution is the distribution
37742    of (1/X) when X has an inverse Gaussian distribution.  It has
37743    the following cumulative distribution function:
37744
37745      F(x;gamma,mu) = NORCDF[-(1/(mu*x) - 1)*SQRT(gamma*x)] -
37746                      EXP(2/gamma**2)*
37747                      NORCDF[-(1/(mu*x) - 1)*SQRT(gamma*x)]
37748                      x >= 0; gamma, mu > 0
37749
37750    with gamma and mu denoting the shape parameters and NORCDF denoting
37751    the cumulative distribution function of the standard normal
37752    distribution.
37753
37754    The reciprocal inverse Gaussian distribution can be computed
37755    in terms of the inverse Gaussian distribution by
37756
37757       RIGCDF(x;gamma,mu) = IGCDF((1/x);gamma,mu)/(x**2)
37758
37759    The reciprocal inverse Gaussian distribution can be generalized
37760    with location and scale parameters in the usual way.
37761
37762Syntax:
37763    LET <y> = RIGCDF(<x>,<gamma>,<mu>,<loc>,<scale>)
37764              <SUBSET/EXCEPT/FOR qualification>
37765    where <x> is a variable or a parameter;
37766          <gamma> is number or parameter that specifies the first
37767              shape parameter;
37768          <mu> is number or parameter that specifies the second
37769              shape parameter;
37770          <loc> is number or parameter that specifies the location
37771              parameter;
37772          <scale> is number or parameter that specifies the scale
37773              parameter;
37774          <y> is a variable or a parameter (depending on what <x> is)
37775              where the computed reciprocal inverse Gaussian cdf
37776              value is stored;
37777    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
37778
37779    Note that the location and scale parameters are optional.
37780
37781Examples:
37782    LET A = RIGCDF(3,2,1)
37783    LET A = RIGCDF(A1,2,1)
37784    LET X2 = RIGCDF(X1,2,3)
37785    PLOT RIGCDF(X,2,1.5) FOR X = 0.1  0.1  5
37786
37787Note:
37788    Library functions are distinguished from let subcommands
37789    in the following ways.
37790    1) Functions enclose the input value in parenthesis.  Let
37791       subcommands use spaces.
37792    2) Functions can accept (and return) either parameters
37793       (i.e., single values) or variables (i.e., an array of
37794       values) while let subcommands are specific in which they
37795       accept as input and what they return as output.
37796    3) Functions can accept expressions while let subcommands
37797       do not.  For example, the following is legal:
37798           LET Y2 = ABS(Y1-INT(Y1))
37799       For let subcommands, you typically have to do something
37800       like the following:
37801           LET YTEMP = Y**2 + 8
37802           LET A = SUM YTEMP
37803
37804Default:
37805    None
37806
37807Synonyms:
37808    None
37809
37810Related Commands:
37811    RIGPDF  = Compute the reciprocal inverse Gaussian probability
37812              density function.
37813    RIGCHAZ = Compute the reciprocal inverse Gaussian cumulative
37814              hazard function.
37815    RIGHAZ  = Compute the reciprocal inverse Gaussian hazard
37816              function.
37817    RIGPPF  = Compute the reciprocal inverse Gaussian percent point
37818              function.
37819    IGPDF   = Compute the reciprocal inverse Gaussian probability
37820              density function.
37821    CHSPDF  = Compute the chi-square probability density function.
37822    FPDF    = Compute the F probability density function.
37823    NORPDF  = Compute the normal probability density function.
37824    TPDF    = Compute the t probability density function.
37825    WEIPDF  = Compute the Weibull probability density function.
37826    WALPDF  = Compute the Wald probability density function.
37827    FLPDF   = Compute the fatigue life probability density function.
37828
37829Reference:
37830    "Continuous Univariate Distributions--Volume 1", Second Edition,
37831    Johnson, Kotz, and Balakrishnan, Wiley, 1994, chapter 15.
37832
37833    "Statistical Distributions", Third Edition, Evans, Hastings,
37834    and Peacock, Wiley, 2000, pp. 114-116.
37835
37836Applications:
37837    Distributional Modeling
37838
37839Implementation Date:
37840    1990/5: Original implementation
37841    2003/12: Modified to treat mu as a shape parameter instead of
37842             a location parameter
37843
37844Program:
37845    Y1LABEL Probability
37846    X1LABEL X
37847    LABEL CASE ASIS
37848    X1LABEL DISPLACEMENT 12
37849    Y1LABEL DISPLACEMENT 12
37850    MULTIPLOT SCALE FACTOR 2
37851    MULTIPLOT 2 2
37852    MULTIPLOT CORNER COORDINATES 0 0 100 95
37853    TITLE GAMMA = 2, MU = 1
37854    PLOT RIGCDF(X,2,1) FOR X = 0.01  0.01  5
37855    TITLE GAMMA = 5, MU = 1
37856    PLOT RIGCDF(X,5,1) FOR X = 0.01  0.01  5
37857    TITLE GAMMA = 2, MU = 2
37858    PLOT RIGCDF(X,2,2) FOR X = 0.01  0.01  5
37859    TITLE GAMMA = 5, MU = 2
37860    PLOT RIGCDF(X,5,2) FOR X = 0.01  0.01  5
37861    END OF MULTIPLOT
37862    JUSTIFICATION CENTER
37863    MOVE 50 97
37864    CASE ASIS
37865    TEXT Reciprocal Inverse Gaussian CDF
37866
37867-----RIGCHAZ (LET)--------------------------------
37868
37869RIGCHAZ
37870
37871Name:
37872    RIGCHAZ (LET)
37873
37874Type:
37875    Library Function
37876
37877Purpose:
37878    Compute the reciprocal inverse Gaussian cumulative hazard
37879    function with shape parameters gamma and mu.
37880
37881Description:
37882    The reciprocal inverse Gaussian distribution is the distribution
37883    of (1/X) when X has an inverse Gaussian distribution.  It has
37884    the following cumulative hazard function:
37885
37886       H(x;gamma,mu) = -LOG[1 - RIGCDF(x;gamma,mu)]
37887                       x >= 0; gamma, mu > 0
37888
37889    with gamma and mu denoting the shape parameters and RIGCDF
37890    denoting the reciprocal inverse Gaussian cumulative
37891    distribution function.
37892
37893    The reciprocal inverse Gaussian distribution can be generalized
37894    with location and scale parameters in the usual way.
37895
37896Syntax:
37897    LET <y> = RIGCHAZ(<x>,<gamma>,<mu>,<loc>,<scale>)
37898              <SUBSET/EXCEPT/FOR qualification>
37899    where <x> is a variable or a parameter;
37900          <gamma> is number or parameter that specifies the first
37901              shape parameter;
37902          <mu> is number or parameter that specifies the second
37903              shape parameter;
37904          <loc> is number or parameter that specifies the location
37905              parameter;
37906          <scale> is number or parameter that specifies the scale
37907              parameter;
37908          <y> is a variable or a parameter (depending on what <x> is)
37909              where the computed reciprocal inverse Gaussian
37910              cumulative hazard value is stored;
37911    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
37912
37913    Note that the location and scale parameters are optional.
37914
37915Examples:
37916    LET A = RIGCHAZ(3,2,1)
37917    LET A = RIGCHAZ(A1,2,1)
37918    LET X2 = RIGCHAZ(X1,2,3)
37919    PLOT RIGCHAZ(X,2,1.5) FOR X = 0.1  0.1  5
37920
37921Note:
37922    Library functions are distinguished from let subcommands
37923    in the following ways.
37924    1) Functions enclose the input value in parenthesis.  Let
37925       subcommands use spaces.
37926    2) Functions can accept (and return) either parameters
37927       (i.e., single values) or variables (i.e., an array of
37928       values) while let subcommands are specific in which they
37929       accept as input and what they return as output.
37930    3) Functions can accept expressions while let subcommands
37931       do not.  For example, the following is legal:
37932           LET Y2 = ABS(Y1-INT(Y1))
37933       For let subcommands, you typically have to do something
37934       like the following:
37935           LET YTEMP = Y**2 + 8
37936           LET A = SUM YTEMP
37937
37938Default:
37939    None
37940
37941Synonyms:
37942    None
37943
37944Related Commands:
37945    RIGCDF  = Compute the reciprocal inverse Gaussian cumulative
37946              distribution function.
37947    RIGHAZ  = Compute the reciprocal inverse Gaussian hazard
37948              function.
37949    RIGPDF  = Compute the reciprocal inverse Gaussian probability
37950              density function.
37951    RIGPPF  = Compute the reciprocal inverse Gaussian percent point
37952              function.
37953    IGPDF   = Compute the reciprocal inverse Gaussian probability
37954              density function.
37955    CHSPDF  = Compute the chi-square probability density function.
37956    FPDF    = Compute the F probability density function.
37957    NORPDF  = Compute the normal probability density function.
37958    TPDF    = Compute the t probability density function.
37959    WEIPDF  = Compute the Weibull probability density function.
37960    WALPDF  = Compute the Wald probability density function.
37961    FLPDF   = Compute the fatigue life probability density function.
37962
37963Reference:
37964    "Continuous Univariate Distributions--Volume 1", Second Edition,
37965    Johnson, Kotz, and Balakrishnan, Wiley, 1994, chapter 15.
37966
37967    "Statistical Distributions", Third Edition, Evans, Hastings,
37968    and Peacock, Wiley, 2000, pp. 114-116.
37969
37970Applications:
37971    Distributional Modeling
37972
37973Implementation Date:
37974    1990/5: Original implementation
37975    2003/12: Modified to treat mu as a shape parameter instead of
37976             a location parameter
37977
37978Program:
37979    Y1LABEL Cumulative Hazard
37980    X1LABEL X
37981    LABEL CASE ASIS
37982    X1LABEL DISPLACEMENT 12
37983    Y1LABEL DISPLACEMENT 12
37984    MULTIPLOT SCALE FACTOR 2
37985    MULTIPLOT 2 2
37986    MULTIPLOT CORNER COORDINATES 0 0 100 95
37987    TITLE GAMMA = 2, MU = 1
37988    PLOT RIGCHAZ(X,2,1) FOR X = 0.01  0.01  5
37989    TITLE GAMMA = 5, MU = 1
37990    PLOT RIGCHAZ(X,5,1) FOR X = 0.01  0.01  5
37991    TITLE GAMMA = 2, MU = 2
37992    PLOT RIGCHAZ(X,2,2) FOR X = 0.01  0.01  5
37993    TITLE GAMMA = 5, MU = 2
37994    PLOT RIGCHAZ(X,5,2) FOR X = 0.01  0.01  5
37995    END OF MULTIPLOT
37996    JUSTIFICATION CENTER
37997    MOVE 50 97
37998    CASE ASIS
37999    TEXT Reciprocal Inverse Gaussian Cumulative Hazard
38000
38001-----RIGHAZ (LET)--------------------------------
38002
38003RIGHAZ
38004
38005Name:
38006    RIGHAZ (LET)
38007
38008Type:
38009    Library Function
38010
38011Purpose:
38012    Compute the reciprocal inverse Gaussian hazard function with
38013    shape parameters gamma and mu.
38014
38015Description:
38016    The reciprocal inverse Gaussian distribution is the distribution
38017    of (1/X) when X has an inverse Gaussian distribution.  It has
38018    the following hazard function:
38019
38020       h(x;gamma,mu) = RIGPDF(x;gamma/mu)/[1 - RIGCDF(x;gamma,mu)]
38021                       x >= 0; gamma, mu > 0
38022
38023    with gamma and mu denoting the shape parameters and RIGPDF and
38024    RIGCDF denoting the reciprocal inverse Gaussian probability
38025    density and cumulative distribution functions, respectively.
38026
38027    The reciprocal inverse Gaussian distribution can be generalized
38028    with location and scale parameters in the usual way.
38029
38030Syntax:
38031    LET <y> = RIGHAZ(<x>,<gamma>,<mu>,<loc>,<scale>)
38032              <SUBSET/EXCEPT/FOR qualification>
38033    where <x> is a variable or a parameter;
38034          <gamma> is number or parameter that specifies the first
38035              shape parameter;
38036          <mu> is number or parameter that specifies the second
38037              shape parameter;
38038          <loc> is number or parameter that specifies the location
38039              parameter;
38040          <scale> is number or parameter that specifies the scale
38041              parameter;
38042          <y> is a variable or a parameter (depending on what <x> is)
38043              where the computed reciprocal inverse Gaussian cdf
38044              value is stored;
38045    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
38046
38047    Note that the location and scale parameters are optional.
38048
38049Examples:
38050    LET A = RIGHAZ(3,2,1)
38051    LET A = RIGHAZ(A1,2,1)
38052    LET X2 = RIGHAZ(X1,2,3)
38053    PLOT RIGHAZ(X,2,1.5) FOR X = 0.1  0.1  5
38054
38055Note:
38056    Library functions are distinguished from let subcommands
38057    in the following ways.
38058    1) Functions enclose the input value in parenthesis.  Let
38059       subcommands use spaces.
38060    2) Functions can accept (and return) either parameters
38061       (i.e., single values) or variables (i.e., an array of
38062       values) while let subcommands are specific in which they
38063       accept as input and what they return as output.
38064    3) Functions can accept expressions while let subcommands
38065       do not.  For example, the following is legal:
38066           LET Y2 = ABS(Y1-INT(Y1))
38067       For let subcommands, you typically have to do something
38068       like the following:
38069           LET YTEMP = Y**2 + 8
38070           LET A = SUM YTEMP
38071
38072Default:
38073    None
38074
38075Synonyms:
38076    None
38077
38078Related Commands:
38079    RIGPDF  = Compute the reciprocal inverse Gaussian probability
38080              density function.
38081    RIGCDF  = Compute the reciprocal inverse Gaussian cumulative
38082              distribution function.
38083    RIGCHAZ = Compute the reciprocal inverse Gaussian cumulative
38084              hazard function.
38085    RIGPPF  = Compute the reciprocal inverse Gaussian percent point
38086              function.
38087    IGPDF   = Compute the reciprocal inverse Gaussian probability
38088              density function.
38089    CHSPDF  = Compute the chi-square probability density function.
38090    FPDF    = Compute the F probability density function.
38091    NORPDF  = Compute the normal probability density function.
38092    TPDF    = Compute the t probability density function.
38093    WEIPDF  = Compute the Weibull probability density function.
38094    WALPDF  = Compute the Wald probability density function.
38095    FLPDF   = Compute the fatigue life probability density function.
38096
38097Reference:
38098    "Continuous Univariate Distributions--Volume 1", Second Edition,
38099    Johnson, Kotz, and Balakrishnan, Wiley, 1994, chapter 15.
38100
38101    "Statistical Distributions", Third Edition, Evans, Hastings,
38102    and Peacock, Wiley, 2000, pp. 114-116.
38103
38104Applications:
38105    Distributional Modeling
38106
38107Implementation Date:
38108    1990/5: Original implementation
38109    2003/12: Modified to treat mu as a shape parameter instead of
38110             a location parameter
38111
38112Program:
38113    Y1LABEL Hazard
38114    X1LABEL X
38115    LABEL CASE ASIS
38116    X1LABEL DISPLACEMENT 12
38117    Y1LABEL DISPLACEMENT 12
38118    MULTIPLOT SCALE FACTOR 2
38119    MULTIPLOT 2 2
38120    MULTIPLOT CORNER COORDINATES 0 0 100 95
38121    TITLE GAMMA = 2, MU = 1
38122    PLOT RIGHAZ(X,2,1) FOR X = 0.01  0.01  5
38123    TITLE GAMMA = 5, MU = 1
38124    PLOT RIGHAZ(X,5,1) FOR X = 0.01  0.01  5
38125    TITLE GAMMA = 2, MU = 2
38126    PLOT RIGHAZ(X,2,2) FOR X = 0.01  0.01  5
38127    TITLE GAMMA = 5, MU = 2
38128    PLOT RIGHAZ(X,5,2) FOR X = 0.01  0.01  5
38129    END OF MULTIPLOT
38130    JUSTIFICATION CENTER
38131    MOVE 50 97
38132    CASE ASIS
38133    TEXT Reciprocal Inverse Gaussian Hazard
38134
38135-----RIGPDF (LET)--------------------------------
38136
38137RIGPDF
38138
38139Name:
38140    RIGPDF (LET)
38141
38142Type:
38143    Library Function
38144
38145Purpose:
38146    Compute the reciprocal inverse Gaussian probability density
38147    function with shape parameters gamma and mu.
38148
38149Description:
38150    The reciprocal inverse Gaussian distribution is the distribution
38151    of (1/X) when X has an inverse Gaussian distribution.  It has
38152    the following probability density function:
38153
38154       f(x;gamma,mu) = SQRT(gamma/(2*PI*x))*
38155                       EXP(-gamma*(1-mu*x)**2/(2*mu**2*x))
38156                       x >= 0; gamma, mu > 0
38157
38158    with gamma and mu denoting the shape parameters.
38159
38160    The reciprocal inverse Gaussian distribution can be computed
38161    in terms of the inverse Gaussian distribution by
38162
38163       RIGPDF(x;gamma,mu) = IGPDF((1/x);gamma,mu)/(x**2)
38164
38165    The reciprocal inverse Gaussian distribution has mean
38166    (gamma + mu)/(gamma*mu) and standard deviation
38167    SQRT((gamma + 2*mu)/(gamma**2*mu)).
38168
38169    The reciprocal inverse Gaussian distribution can be generalized
38170    with location and scale parameters in the usual way.
38171
38172    The reciprocal inverse Gaussian distribution is also known as
38173    the random walk distribution.
38174
38175Syntax:
38176    LET <y> = RIGPDF(<x>,<gamma>,<mu>,<loc>,<scale>)
38177              <SUBSET/EXCEPT/FOR qualification>
38178    where <x> is a variable or a parameter;
38179          <gamma> is number or parameter that specifies the first
38180              shape parameter;
38181          <mu> is number or parameter that specifies the second
38182              shape parameter;
38183          <loc> is number or parameter that specifies the location
38184              parameter;
38185          <scale> is number or parameter that specifies the scale
38186              parameter;
38187          <y> is a variable or a parameter (depending on what <x> is)
38188              where the computed reciprocal inverse Gaussian pdf
38189              value is stored;
38190    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
38191
38192    Note that the location and scale parameters are optional.
38193
38194Examples:
38195    LET A = RIGPDF(3,2,1)
38196    LET A = RIGPDF(A1,2,1)
38197    LET X2 = RIGPDF(X1,2,3)
38198    PLOT RIGPDF(X,2,1.5) FOR X = 0.1  0.1  5
38199
38200Note:
38201    Random numbers, probability plots, and Kolmogorov-Smirnov and
38202    chi-square goodness of fit tests can be generated with the
38203    commands:
38204
38205       LET GAMMA = <value>
38206       LET MU = <value>
38207       LET Y = RECIPROCAL INVERSE GAUSSIAN RANDOM NUMBERS FOR I = 1 1 N
38208       RECIPROCAL INVERSE GAUSSIAN PROBABILITY PLOT Y
38209       RECIPROCAL INVERSE GAUSSIAN KOLMOGOROV-SMIRNOV GOODNESS OF FIT Y
38210       RECIPROCAL INVERSE GAUSSIAN CHI-SQUARE FIT Y
38211
38212    The following commands can be used to generate estimates for the
38213    shape parameters of the reciprocal inverse Gaussian distribution:
38214
38215       LET GAMMA1 = <value>
38216       LET GAMMA2 = <value>
38217       LET MU1 = <value>
38218       LET MU2 = <value>
38219       RECIPROCAL INVERSE GAUSSIAN PPCC PLOT Y
38220       RECIPROCAL INVERSE GAUSSIAN KS PLOT Y
38221
38222    The default values for GAMMA1 and GAMMA2 are 0.5 and 25.  The
38223    default values for MU1 and MU2 are 0.5 and 25.
38224
38225Note:
38226    Library functions are distinguished from let subcommands
38227    in the following ways.
38228    1) Functions enclose the input value in parenthesis.  Let
38229       subcommands use spaces.
38230    2) Functions can accept (and return) either parameters
38231       (i.e., single values) or variables (i.e., an array of
38232       values) while let subcommands are specific in which they
38233       accept as input and what they return as output.
38234    3) Functions can accept expressions while let subcommands
38235       do not.  For example, the following is legal:
38236           LET Y2 = ABS(Y1-INT(Y1))
38237       For let subcommands, you typically have to do something
38238       like the following:
38239           LET YTEMP = Y**2 + 8
38240           LET A = SUM YTEMP
38241
38242Default:
38243    None
38244
38245Synonyms:
38246    None
38247
38248Related Commands:
38249    RIGCDF  = Compute the reciprocal inverse Gaussian cumulative
38250              distribution function.
38251    RIGCHAZ = Compute the reciprocal inverse Gaussian cumulative
38252              hazard function.
38253    RIGHAZ  = Compute the reciprocal inverse Gaussian hazard
38254              function.
38255    RIGPPF  = Compute the reciprocal inverse Gaussian percent point
38256              function.
38257    IGPDF   = Compute the reciprocal inverse Gaussian probability
38258              density function.
38259    CHSPDF  = Compute the chi-square probability density function.
38260    FPDF    = Compute the F probability density function.
38261    NORPDF  = Compute the normal probability density function.
38262    TPDF    = Compute the t probability density function.
38263    WEIPDF  = Compute the Weibull probability density function.
38264    WALPDF  = Compute the Wald probability density function.
38265    FLPDF   = Compute the fatigue life probability density function.
38266
38267Reference:
38268    "Continuous Univariate Distributions--Volume 1", Second Edition,
38269    Johnson, Kotz, and Balakrishnan, Wiley, 1994, chapter 15.
38270
38271    "Statistical Distributions", Third Edition, Evans, Hastings,
38272    and Peacock, Wiley, 2000, pp. 114-116.
38273
38274Applications:
38275    Distributional Modeling
38276
38277Implementation Date:
38278    1990/5: Original implementation
38279    2003/12: Modified to treat mu as a shape parameter instead of
38280             a location parameter
38281
38282Program:
38283    Y1LABEL Probability
38284    X1LABEL X
38285    LABEL CASE ASIS
38286    X1LABEL DISPLACEMENT 12
38287    Y1LABEL DISPLACEMENT 12
38288    MULTIPLOT SCALE FACTOR 2
38289    MULTIPLOT 2 2
38290    MULTIPLOT CORNER COORDINATES 0 0 100 95
38291    TITLE GAMMA = 2, MU = 1
38292    PLOT RIGPDF(X,2,1) FOR X = 0.01  0.01  5
38293    TITLE GAMMA = 5, MU = 1
38294    PLOT RIGPDF(X,5,1) FOR X = 0.01  0.01  5
38295    TITLE GAMMA = 2, MU = 2
38296    PLOT RIGPDF(X,2,2) FOR X = 0.01  0.01  5
38297    TITLE GAMMA = 5, MU = 2
38298    PLOT RIGPDF(X,5,2) FOR X = 0.01  0.01  5
38299    END OF MULTIPLOT
38300    JUSTIFICATION CENTER
38301    MOVE 50 97
38302    CASE ASIS
38303    TEXT Reciprocal Inverse Gaussian PDF
38304
38305-----RIGPPF (LET)--------------------------------
38306
38307RIGPPF
38308
38309Name:
38310    RIGPPF (LET)
38311
38312Type:
38313    Library Function
38314
38315Purpose:
38316    Compute the reciprocal inverse Gaussian percent point function
38317    with shape parameters gamma and mu.
38318
38319Description:
38320    The reciprocal inverse Gaussian distribution is the distribution
38321    of (1/X) when X has an inverse Gaussian distribution.  It has
38322    the following cumulative distribution function:
38323
38324      F(x;gamma,mu) = NORCDF[-(1/(mu*x) - 1)*SQRT(gamma*x)] -
38325                      EXP(2/gamma**2)*
38326                      NORCDF[-(1/(mu*x) - 1)*SQRT(gamma*x)]
38327                      x >= 0; gamma, mu > 0
38328
38329    with gamma and mu denoting the shape parameters and NORCDF denoting
38330    the cumulative distribution function of the standard normal
38331    distribution.
38332
38333    The percent point function is the inverse of the cumulative
38334    distribution function.  The percent point function for the
38335    reciprocal inverse Gaussian distribution does not exist in
38336    simple, closed form.
38337
38338    The reciprocal inverse Gaussian percent point function can be
38339    computed in terms of the inverse Gaussian percent point
38340    function by
38341
38342       RIGPPF(p;gamma,mu) = 1/IGPPF(1-p;gamma,mu)
38343
38344    Dataplot uses this relationship to compute the reciprocal
38345    inverse gaussian percent point function.
38346
38347    The reciprocal inverse Gaussian distribution can be generalized
38348    with location and scale parameters in the usual way.
38349
38350Syntax:
38351    LET <y> = RIGPPF(<p>,<gamma>,<mu>,<loc>,<scale>)
38352              <SUBSET/EXCEPT/FOR qualification>
38353    where <p> is a variable or a parameter in the interval (0,1);
38354          <gamma> is number or parameter that specifies the first
38355              shape parameter;
38356          <mu> is number or parameter that specifies the second
38357              shape parameter;
38358          <loc> is number or parameter that specifies the location
38359              parameter;
38360          <scale> is number or parameter that specifies the scale
38361              parameter;
38362          <y> is a variable or a parameter (depending on what <x> is)
38363              where the computed reciprocal inverse Gaussian ppf
38364              value is stored;
38365    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
38366
38367    Note that the location and scale parameters are optional.
38368
38369Examples:
38370    LET A = RIGPPF(0.95,2,1)
38371    LET A = RIGPPF(P1,2,1)
38372    PLOT RIGPPF(P,2,1.5) FOR P = 0  0.01  0.99
38373
38374Note:
38375    Library functions are distinguished from let subcommands
38376    in the following ways.
38377    1) Functions enclose the input value in parenthesis.  Let
38378       subcommands use spaces.
38379    2) Functions can accept (and return) either parameters
38380       (i.e., single values) or variables (i.e., an array of
38381       values) while let subcommands are specific in which they
38382       accept as input and what they return as output.
38383    3) Functions can accept expressions while let subcommands
38384       do not.  For example, the following is legal:
38385           LET Y2 = ABS(Y1-INT(Y1))
38386       For let subcommands, you typically have to do something
38387       like the following:
38388           LET YTEMP = Y**2 + 8
38389           LET A = SUM YTEMP
38390
38391Default:
38392    None
38393
38394Synonyms:
38395    None
38396
38397Related Commands:
38398    RIGCDF  = Compute the reciprocal inverse Gaussian cumulative
38399              distribution function.
38400    RIGCHAZ = Compute the reciprocal inverse Gaussian cumulative
38401              hazard function.
38402    RIGHAZ  = Compute the reciprocal inverse Gaussian hazard
38403              function.
38404    RIGPDF  = Compute the reciprocal inverse Gaussian probability
38405              density function.
38406    IGPDF   = Compute the reciprocal inverse Gaussian probability
38407              density function.
38408    CHSPDF  = Compute the chi-square probability density function.
38409    FPDF    = Compute the F probability density function.
38410    NORPDF  = Compute the normal probability density function.
38411    TPDF    = Compute the t probability density function.
38412    WEIPDF  = Compute the Weibull probability density function.
38413    WALPDF  = Compute the Wald probability density function.
38414    FLPDF   = Compute the fatigue life probability density function.
38415
38416Reference:
38417    "Continuous Univariate Distributions--Volume 1", Second Edition,
38418    Johnson, Kotz, and Balakrishnan, Wiley, 1994, chapter 15.
38419
38420    "Statistical Distributions", Third Edition, Evans, Hastings,
38421    and Peacock, Wiley, 2000, pp. 114-116.
38422
38423Applications:
38424    Distributional Modeling
38425
38426Implementation Date:
38427    1990/5: Original implementation
38428    2003/12: Modified to treat mu as a shape parameter instead of
38429             a location parameter
38430
38431Program:
38432    X1LABEL Probability
38433    Y1LABEL X
38434    LABEL CASE ASIS
38435    X1LABEL DISPLACEMENT 12
38436    Y1LABEL DISPLACEMENT 12
38437    MULTIPLOT SCALE FACTOR 2
38438    MULTIPLOT 2 2
38439    MULTIPLOT CORNER COORDINATES 0 0 100 95
38440    TITLE GAMMA = 2, MU = 1
38441    PLOT RIGPPF(P,2,1) FOR P = 0  0.01  0.99
38442    TITLE GAMMA = 5, MU = 1
38443    PLOT RIGPPF(P,5,1) FOR P = 0  0.01  0.99
38444    TITLE GAMMA = 2, MU = 2
38445    PLOT RIGPPF(P,2,2) FOR P = 0  0.01  0.99
38446    TITLE GAMMA = 5, MU = 2
38447    PLOT RIGPPF(P,5,2) FOR P = 0  0.01  0.99
38448    END OF MULTIPLOT
38449    JUSTIFICATION CENTER
38450    MOVE 50 97
38451    CASE ASIS
38452    TEXT Reciprocal Inverse Gaussian Percent Point
38453
38454-----RING BELL-------------------------------------------------------
38455
38456RING BELL
38457
38458Name:
38459    RING BELL
38460
38461Type:
38462    Diagrammatic Graphics Command
38463
38464Purpose:
38465    Rings the bell (immediately).
38466
38467Syntax:
38468    RING BELL   <number>
38469    where <number> is an integer number or parameter that specifies
38470              the number of times to ring the bell.
38471
38472Examples:
38473    RING BELL
38474    RING BELL 3
38475
38476Note:
38477    RING BELL with no arguments is equivalent ot RING BELL 1.
38478
38479Default:
38480    None
38481
38482Synonyms:
38483    None
38484
38485Related Commands:
38486    ERASE     = Erases the screen (immediately).
38487    COPY      = Copies the screen (immediately).
38488    BELL      = Sets the automatic bell switch for plots.
38489    PRE-ERASE = Sets the automatic pre-erase switch for plots.
38490    HARDCOPY  = Sets the automatic copy switch for plots.
38491    SEQUENCE  = Sets the automatic sequence switch for plots.
38492
38493Applications:
38494    XX
38495
38496Implementation Date:
38497    Pre-1987
38498
38499Program:
38500    XX
38501
38502-----RLP (LET)-----------------------------------------
38503
38504RLP
38505
38506Name:
38507    RLP (LET)
38508
38509Type:
38510    Let Subcommand
38511
38512Purpose:
38513    Given a response variable containing z-scores and an associated
38514    variable containing the material-id, compute the relative laboratory
38515    performance (RLP) of a variable.
38516
38517Description:
38518    One scenario for proficiency testing described in the ISO 13528
38519    standard is for the case where there are multiple rounds of testing.
38520    The proficiency data typically consists of
38521
38522         Z        - a variable containing the response data in z-score
38523                    units
38524         MATID    - a variable containing the material-id
38525         ROUNDID  - a variable containing the round-id
38526         LABID    - a variable containing the lab-id
38527
38528    For ISO 13528 multi-round proficiency studies, the relative
38529    laboratory performance (RLP) for a given laboratory with N z-scores
38530    (Z(i)) is defined as
38531
38532         RLP = SQRT{SUM[i=1 to N][Z(I)**2]/NMAT}
38533
38534    where NMAT is the number of materials.  An RLP near 1 indicates
38535    average performance and an RLP greater than 1.5 indicates that
38536    the laboratory may be problematic.  An advantage of this
38537    statistic is that z-scores of opposite sign do not cancel each
38538    other out.  A disadvantage is that this statistic is suspectible
38539    to outliers in the z-scores.
38540
38541    The RLP statistic is discussed in Uhlig and Lischer (1998).  The RLP
38542    statistic is an examples of a combination score (i.e., the statistic
38543    is a combination of many individual z-scores).  Although the
38544    ISO 13528 standard recommends against using combination scores, these
38545    can be helpful in judging the overall performance of a
38546    laboratory.  These combination scores can be used to identify
38547    laboratories that are potentially problematic.  These
38548    laboratories can then be examined more carefully.  For
38549    example: is the poor performance due to one or a few outliers?
38550    is the lab consistently high or consistently low?  does the
38551    laboratory need to carefully examine their procedures?
38552
38553    This statistic is used to compute the RLP for a single
38554    laboratory.  Note that the material-id variable is only
38555    used to determine the number of materials (NMAT in the
38556    above formula).
38557
38558    The most typical use of this statistic is with the
38559    TABULATE command or the STATISTIC PLOT command where the
38560    group-id variable is the laboratory-id variable.  For
38561    example, the command
38562
38563         RLP PLOT Z MATID LABID
38564
38565    can be used to generate a plot of the RLP values for each
38566    laboratory.
38567
38568Syntax:
38569    LET <par> = RLP <z> <matid>   <SUBSET/EXCEPT/FOR qualification>
38570    where <z> is the response variable containing z-scores;
38571          <matid> is a variable containing the material-id's;
38572          <par> is a parameter where the computed rlp is saved;
38573    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
38574
38575    The SUBSET clause can be used to specify a specific laboratory
38576    for which to compute the statistic.
38577
38578Examples:
38579    LET A = RLP Z MAT
38580    LET A = RLP Z MAT  SUBSET LAB = 23
38581    TABULATE RLP Z MATID LABID
38582    RLP PLOT Z MATID LABID
38583
38584Note:
38585    The ISO 13528 standard defines a number of methods for computing the
38586    z-scores (enter HELP ISO 13528 ZSCORE, HELP ISO 13528 ZPRIME SCORE,
38587    and HELP ISO 13528 ZETA SCORE for details).  For this reason, the
38588    ISO 13528 RLP PLOT command does not automatically compute the
38589    z-scores from the original response data.
38590
38591Note:
38592    In some applications it may be desired to cap the value
38593    of outliers.  This is most common when the response variable
38594    is a z-score or some other standardized score.
38595
38596    To specify this value, enter the command
38597
38598        LET CAPVALUE = <value>
38599
38600    where <value> is typically 3 or 4 (if the reponse data are
38601    z-scores or z-score type data).  Note that the value represents
38602    an absolute value.  For example, if CAPVALUE is 4, values greater
38603    than 4 will be set to 4 and values less than -4 will be set to -4.
38604
38605Note:
38606    Dataplot statistics can be used in a number of commands.  For
38607    details, enter
38608
38609         HELP STATISTICS
38610
38611Default:
38612    None
38613
38614Synonyms:
38615    None
38616
38617Related Commands:
38618    ISO 13528 RLP PLOT       = Generate a plot of relative laboratory
38619                               performance against the rescaled sums.
38620    ISO 13528 PLOT           = Generate an ISO 13528 plot.
38621    ISO 13528 ZSCORE PLOT    = Generate an ISO 13528 zscore plot.
38622    ISO 13528 CONTROL CHART  = Generate an ISO 13528 control chart.
38623    ISO 13528 ZSCORE         = Compute z-scores as defined in the
38624                               ISO 13528 standard.
38625    ISO 13528 ZPRIME SCORE   = Compute z-prime scores as defined in the
38626                               ISO 13528 standard.
38627    ISO 13528 ZETA SCORE     = Compute zeta scores as defined in the
38628                               ISO 13528 standard.
38629    TABULATE                 = Compute a statistic for one or more
38630                               group variables.
38631    STATISTIC PLOT           = Generate a statistic versus index plot.
38632
38633References:
38634    Uhlig and Lischer (1998), "Statistically-based Performance
38635    Characteristics in Laboratory Performance Studies", Analyst,
38636    123, pp. 167-172.
38637
38638    ISO 13528 (2005), "Statistical Methods for use in proficiency
38639    testing by interlaboratory comparisons," First Edition,
38640    2005-09-01.
38641
38642Applications:
38643    Multiple Round Proficiency Testing
38644
38645Implementation Date:
38646    2015/2
38647
38648Program 1:
38649    . Step 1:   Read the data
38650    .
38651    dimension 40 columns
38652    skip 25
38653    read turner.dat labid z year quarter matid matave
38654    skip 0
38655    let labcoded = code labid
38656    .
38657    . Step 2:   Set plot control setting
38658    .
38659    case asis
38660    title case asis
38661    title offset 2
38662    label case asis
38663    y1label Relative Laboratory Performance
38664    x1label Laboratory
38665    title RLP Versus Laboratory for TURNER.DAT
38666    y1tic mark label decimal 1
38667    tic mark offset units data
38668    x1tic mark offset 2 0
38669    y1tic mark offset 0.2 0.5
38670    ylimits 0 3
38671    .
38672    line blank
38673    character circle
38674    character hw 0.5 0.375
38675    character fill on
38676    .
38677    . Step 3:   Generate plot of RLP vs Lab
38678    .
38679    rlp plot z matid labcoded
38680    line dash
38681    line color blue
38682    drawsdsd 15 1.5 85 1.5
38683    line color red
38684    drawsdsd 15 3.0 85 3.0
38685    .
38686    . Step 4:   Tabulate RLP values for each laboratory
38687    .
38688    set write decimals 4
38689    tabulate rlp z matid labid
38690
38691-----RM-------------------------------------------------------
38692
38693RM
38694RMDIR
38695
38696Name:
38697    RM
38698    RMDIR
38699
38700Type:
38701    Support Command
38702
38703Purpose:
38704    This command deletes one or more files or directories.
38705
38706Description:
38707    This command uses an operating system command to delete
38708    one or more files or one or more directories.
38709
38710    For Unix/Linux/MacOS systems, the RM command issues a
38711
38712        rm ....
38713
38714    command to the operating system and the RMDIR command issues a
38715
38716        rm -r ...
38717
38718    command to the operating system.
38719
38720    For Windows systems, the RM command issues an
38721
38722        ERASE ....
38723
38724    command to the operating system and the RMDIR command issues a
38725
38726        DELTRE ...
38727
38728    command to the operating system.
38729
38730    The RMDIR command will remove any files or sub-directories
38731    under the directory being removed.
38732
38733    The string that follows the RM or RMDIR on the command line
38734    is passed to the operating system as is.  Dataplot does no
38735    error checking of this string.
38736
38737    This command should be used with caution so that files
38738    are not accidentally deleted.
38739
38740    This is a system dependent command.  It is currently supported
38741    for Unix/Linux/MacOS and Windows platforms.
38742
38743Syntax 1:
38744    RM <file-list>
38745    where <file-list> is a string containing a list of one or more
38746               files to delete.
38747
38748Syntax 2:
38749    RMDIR <file-list>
38750    where <file-list> is a string containing a list of one or more
38751               directories to delete.
38752
38753Examples:
38754    RM  *.ps
38755    RM  macro.out  macro.ps  macro.pdf
38756    RMDIR  macros tmp
38757
38758Note:
38759    The RM capability can be implemented by direct use of the
38760    SYSTEM command.  For example, under Linux do something like
38761
38762         system  rm  junk*.out
38763
38764    The motivation for adding this as a separate command is to
38765    allow the capability to be implemented in an operating
38766    system independent way.  This can be useful when writing
38767    general purpose macros that may be used on different
38768    operating systems.
38769
38770Default:
38771    None
38772
38773Synonyms:
38774    None (we have not added DELETE or ERASE as synonyms as these
38775    commands are already used in Dataplot)
38776
38777Note:
38778    Dataplot does no checking to ensure that a valid file name
38779    or directory name was specified.  The entered string is
38780    passed to the operating system as entered.
38781
38782Note:
38783    File names are case sensitive on Unix/Linux/MacOS file
38784    systems.  For this reason, case is preserved in passing the
38785    file list to the operating system.
38786
38787Related Commands:
38788    SYSTEM      = Enter an operating system command within a
38789                  Dataplot session.
38790    CD          = Change the current working directory.
38791    PWD         = Retrieve the current working directory.
38792    CAT         = List the contents of a file.
38793    MKDIR       = Create a new directory.
38794    DIR         = List the contents of a directory.
38795
38796Applications:
38797    Interactive Usage
38798
38799Implementation Date:
38800    2019/09
38801
38802Program:
38803    . Automatically convert Postscript output to PDF and then
38804    . delete the original Postscript file
38805    .
38806    SKIP 25
38807    READ BERGER1.DAT Y X
38808    .
38809    SET POSTSCRIPT CONVERT PDF
38810    SET IPL1NA PLOT.PS
38811    CHARACTER X
38812    LINE BLANK
38813    .
38814    PLOT Y X
38815    .
38816    DEVICE 2 CLOSE
38817    RM PLOT.PS
38818
38819-----ROBUST POOLED STANDARD DEVIATION (LET)-----------------------------
38820
38821ROBUST POOLED STANDARD DEVIATION
38822
38823Name:
38824    ROBUST POOLED STANDARD DEVIATION (LET)
38825
38826Type:
38827    Let Subcommand
38828
38829Purpose:
38830    Compute the robust pooled standard deviation of a variable.
38831
38832Description:
38833    The definition for the robust pooled standard deviation from
38834    the ISO 13528 standard.  It is computed as follows.
38835
38836    Let w1, w2, ... , wp be the standard deviations from the p labs.
38837    The degrees of freedom for w(i) = n(i) - 1 where n(i) is the number
38838    of replications for lab i.
38839
38840    Compute
38841
38842        Limit Factor = LF = SQRT(CHSPPF(0.9,nu)/nu)
38843
38844        Adjustment Factor = AF = 1/SQRT(CHSCDF(nu*LF**2),nu+2) + 0.1*LF**2)
38845
38846    The limit factor and adjustment factor assume that each lab has the
38847    same number of replications.  If the number of replications are not
38848    equal, Dataplot will use the average number of replications.
38849
38850    The initual value of w* is set to the median of the w(i)'s.
38851
38852    To update the value of w*, compute
38853
38854       psi = limit factor times w*
38855
38856    For each w(i),
38857
38858       w(i)* = psi    if w(i) >  psi
38859             = w(i)   if w(i) <= psi
38860
38861    The updated value of w* is
38862
38863       w* = Adjustment Factor * SQRT(SUM[i=1 to p][(w(i))**2]/p)
38864
38865    The value of w* is iterated until the difference between two
38866    successive values of w* is sufficiently small.
38867
38868    The ISO 13528 standard also allows this computation to be performed
38869    on the lab ranges.  In this case, the robust pooled range uses the
38870    same computation as above with the exception that the degrees of
38871    freedom, nu, is set to 1.
38872
38873Syntax 1:
38874    LET <par> = ROBUST POOLED STANDARD DEVIATION  <y>  <x>
38875                <SUBSET/EXCEPT/FOR qualification>
38876    where <y> is the response variable;
38877          <x> is the lab-id variable;
38878          <par> is a parameter where the computed robust pooled sd
38879              is saved;
38880    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
38881
38882Syntax 2:
38883    LET <par> = ROBUST POOLED RANGE  <y>  <x>
38884                <SUBSET/EXCEPT/FOR qualification>
38885    where <y> is the response variable;
38886          <x> is the lab-id variable;
38887          <par> is a parameter where the computed robust pooled range
38888              is saved;
38889    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
38890
38891Examples:
38892    LET SD = ROBUST POOLED STANDARD DEVIATION Y X
38893    LET SD = ROBUST POOLED STANDARD DEVIATION Y X  SUBSET TAG > 2
38894    LET SD = ROBUST POOLED RANGE Y X
38895
38896Note:
38897    Dataplot statistics can be used in a number of commands.  For
38898    details, enter
38899
38900         HELP STATISTICS
38901
38902Default:
38903    None
38904
38905Synonyms:
38906    ROBUST POOLED SD is a synonym for ROBUST POOLED STANDARD DEVIATION
38907
38908Related Commands:
38909    MEAN                   = Compute the mean of a variable.
38910    MEDIAN                 = Compute the median of a variable.
38911    RANGE                  = Compute the range of a variable.
38912    STANDARD DEVIATION     = Compute the standard deviation of a variable.
38913    H15 SCALE              = Compute the H15 scale estimate of a variable.
38914    WEIGHTED STAND DEVI    = Compute the weighted standard deviation of
38915                             a variable.
38916    HOMOSCEDASTICITY PLOT  = Compute the standard deviation of a variable.
38917
38918Applications:
38919    Data Analysis, Proficiency Analysis
38920
38921Reference:
38922    ISO 13528 (2005), "Statistical Methods for use in proficiency
38923    testing by interlaboratory comparisons," Section C.2 Algorithm S.
38924
38925Implementation Date:
38926    2010/12
38927
38928Program:
38929    SKIP 25
38930    READ GEAR.DAT Y X
38931    .
38932    SET LET CROSS TABULATE COLLAPSE
38933    LET YSD = CROSS TABULATE SD Y X
38934    LET NSIZE = CROSS TABULATE SIZE X
38935    LET NREPL = MEAN NSIZE
38936    .
38937    LET A = ROBUST POOLED STANDARD DEVIATION Y X
38938
38939-----ROC CURVE (LET)--------------------------------
38940
38941ROC CURVE
38942
38943Name:
38944    ROC CURVE (LET)
38945
38946Type:
38947    Graphics Command
38948
38949Purpose:
38950    Generate a Reciever Operating Characterisitc (ROC) curve.
38951
38952Description:
38953    Given two variables with n parired observations where each
38954    variable has exactly two possible outcomes, we can generate
38955    the following 2x2 table:
38956
38957                      |       Variable 2        |
38958        Variable 1    |   Success      Failure  |  Row Total
38959        ====================================================
38960        Success       |   N11            N12    |  N11 + N12
38961        Failure       |   N21            N22    |  N21 + N22
38962        ====================================================
38963        Column Total  |   N11+N21      N12+N22  |  N11+N12+N21+N22
38964
38965    The parameters N11, N12, N21, and N22 denote the counts
38966    for each category.
38967
38968    Success and failure can denote any binary response.
38969    Dataplot expects "success" to be coded as "1" and "failure"
38970    to be coded as "0".  Some typical examples would be:
38971
38972       1) Variable 1 denotes whether or not a patient has a
38973          disease (1 denotes disease is present, 0 denotes
38974          disease not present).  Variable 2 denotes the result
38975          of a test to detect the disease (1 denotes a positive
38976          result and 0 denotes a negative result).
38977
38978       2) Variable 1 denotes whether an object is present or
38979          not (1 denotes present, 0 denotes absent). Variable 2
38980          denotes a detection device (1 denotes object detected
38981          and 0 denotes object not detected).
38982
38983    In these examples, the "ground truth" is typically given
38984    as variable 1 while some estimator of the ground truth is
38985    given as variable 2.
38986
38987    In the above table, we can define the following
38988    quantities:
38989
38990        1) True Positives  = N11 (i.e., number of cases where
38991                             disease present and test detects it)
38992
38993        2) True Negatives  = N22 (i.e., number of cases where
38994                             disease not present and test did not
38995                             detect it)
38996
38997        3) False Positives = N21 (i.e., number of cases where
38998                             disease not present and test detects
38999                             it)
39000
39001        4) False Negatives = N12 (i.e., number of cases where
39002                             disease is present and test does not
39003                             detect it)
39004
39005        5) Sensitivity     = N11/(N11+N12) (i.e., the probability
39006                             that the test detects the disease
39007                             given that the disease is present)
39008
39009        6) Specificity     = N21/(N21+N22) (i.e., the probability
39010                             that the test detects the disease
39011                             given that the disease is not
39012                             present)
39013
39014    The ROC curve is a plot of the sensitivity versus
39015    1 - the specificity.  Points in the upper left corner
39016    (i.e., high sensitivity and high specificity) are
39017    desirable.
39018
39019    We have two typical scenarios for generating the
39020    ROC curve.
39021
39022       1) We have a medical test and we want to determine
39023          an optimal level for deciding whether the disease
39024          is present.  Setting the level too low results
39025          in too many false negatives (i.e., we fail to
39026          detect the disease when it is in fact present).
39027          This is low sensitivity.  On the other hand, if
39028          we set the level too high we may obtain too many
39029          false positives (i.e., we detect the disease when
39030          it is in fact not present).  This is low specificity.
39031
39032          In this case, we typically want to generate the
39033          ROC curve as a connected line to show the
39034          tradeoff between sensitivity and specificity
39035          as we change the threshold level.
39036
39037       2) We are testing sensors to determine which provides
39038          the best performance in detecting some substances.
39039
39040          Since these are distinct devices, we would typically
39041          want to plot these as distinct points rather than
39042          as a connected curve.
39043
39044    You can also combine these scenarios.  That is, we may
39045    testing multiple devices (scenario 2) where each device
39046    may have multiple settings.
39047
39048Syntax 1:
39049    ROC CURVE <y1> <y2> <x>     <SUBSET/EXCEPT/FOR qualification>
39050    where <y1> is the first  response variable;
39051          <y2> is the second response variable;
39052          <x> is a group-id variable;
39053    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
39054
39055    This syntax is used for the cases where
39056
39057       a) we have multiple settings for a single machine
39058       b) we have multiple machines each with a single setting
39059
39060Syntax 2:
39061    ROC CURVE <y1> <y2> <x1> <x2>    <SUBSET/EXCEPT/FOR qualification>
39062    where <y1> is the first  response variable;
39063          <y2> is the second response variable;
39064          <x1> is a group-id variable;
39065          <x2> is a variable that identifies the setting within
39066               the group;
39067    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
39068
39069    This syntax is used for the case where we have multiple
39070    settings for multiple machines.
39071
39072Examples:
39073    ROC CURVE Y1 Y2 X
39074    ROC CURVE Y1 Y2 X  SUBSET X > 2
39075    ROC CURVE Y1 Y2 X1 X2
39076    ROC CURVE Y1 Y2 X1 X2 SUBSET X1 > 2
39077
39078Note:
39079    Some guidelines for interperting the ROC curve are:
39080
39081      1) Points in the upper left corner denote high
39082         accuracy.
39083
39084      2) Dataplot draws a line from the (0,0) point to the
39085         (1,1) point.  This is referred to as the no
39086         discrimination line.  Points falling on this line
39087         indicate a test that is no better than flipping a
39088         coin.
39089
39090      For the case where we are changing the threshold of a
39091      test, the ROC curves does an excellent job of demonstrating
39092      the tradeoff between specificity and sensitivity.  That is,
39093      as we decrease the chance of a false negative (i.e., we do
39094      not miss detection), we inevitably increase the chance of
39095      a false positive.  So what we are looking for is a test
39096      that follows the left x-axis and then the top y-axis.  In
39097      other words, the closer the curve is to the no discrimination
39098      line, the poorer the test.
39099
39100Note:
39101    The three (or four) variables must have the same number of
39102    elements.
39103
39104Note:
39105    There are two ways you can define the response variables:
39106
39107       1) Raw data - in this case, the variables contain
39108          0's and 1's.
39109
39110          If the data is not coded as 0's and 1's, Dataplot
39111          will check for the number of distinct values.  If
39112          there are two distinct values, the minimum value
39113          is converted to 0's and the maximum value is
39114          converted to 1's.  If there is a single distinct
39115          value, it is converted to 0's if it is less than
39116          0.5 and to 1's if it is greater than or equal to
39117          0.5.  If there are more than two distinct values,
39118          an error is returned.
39119
39120       2) Summary data - if there are two observations for
39121          a group, the data is assummed to be the 2x2 summary
39122          table.  That is,
39123
39124              Y1(1) = N11
39125              Y1(2) = N21
39126              Y2(1) = N12
39127              Y2(2) = N22
39128
39129Note:
39130    As noted above, there are two distinct cases for which ROC
39131    curves can be used.  Consider the example where we are testing
39132    whether an instrument can detect some specified object.
39133
39134       1) In one case, we may want to compare instruments from
39135          different vendors.  In this case, the ROC curve
39136          would be used to help determine which vendor
39137          has the best instrument.
39138
39139       2) In the other case, we may be able to change the
39140          level at which we determine whether or not we
39141          have detected the object.  In this case, the
39142          ROC curve can be used to help determine an
39143          optimal setting for the instrument.  In this case,
39144          there is typically a trade-off between sensitivity
39145          and specificity (i.e., as our instrument becomes
39146          more sensitive to the prescence of the object,
39147          we also increase the probability of a false
39148          positive).
39149
39150    Of course, we can have a combination of these cases
39151    (i.e., multiple instruments each with multiple possible
39152    settings).
39153
39154Note:
39155    You can control the appearance of the plot using the
39156    LINE and CHARACTER (and their various attribute setting
39157    commands).
39158
39159    For Syntax 1, the following traces are generated for the
39160    plot:
39161
39162       1) trace 1  - a line from (0,0) to (1,1).  This is the
39163                     "no discrimination line".
39164
39165       2) trace 2  - a curve containing all the points on the
39166                     ROC curve.
39167
39168       3) trace 3 and above - each point is drawn as a separate
39169                              trace.  This is useful for the case
39170                              when each point represents a distinct
39171                              instrument.
39172
39173    For Syntax 2, the following traces are generated for the
39174    plot:
39175
39176       1) trace 1  - a line from (0,0) to (1,1).  This is the
39177                     "no discrimination line".
39178
39179       2) trace 2 and above  - each curve contains all the settings
39180                               for one group (i.e., trace 2 contains
39181                               the settings for group 1, trace 3
39182                               contains the settings for group 2, and
39183                               so on).
39184
39185Note:
39186    Dataplot automatically returns the area under the curve
39187    as the parameter AUC (points are added at (0,0) and (1,1)).
39188    This area is determined by numerical integration.
39189
39190    This statistic is only meaningful for the case where we
39191    are plotting different settings of the same instrument.
39192
39193    For the case where we have multiple settings for multiple
39194    vendors, we write the AUC statistic to the file
39195    dpst1f.dat (in the current directory).  Column 1 contains
39196    the group-id value and column 2 contains the value of the
39197    AUC statistic for that group.
39198
39199Default:
39200    None
39201
39202Synonyms:
39203    None
39204
39205Related Commands:
39206    ROSE PLOT                  = Generate a Rose plot.
39207    BINARY TABULATION PLOT     = Generate a binary tabulation plot.
39208    TEST SPECIFICITY           = Compute the test specificity.
39209    TEST SENSITIVITY           = Compute the test sensitivity.
39210    FALSE NEGATIVES            = Compute the proportion of
39211                                 false negatives.
39212    FALSE POSITIVES            = Compute the proportion of
39213                                 false positives.
39214    TRUE NEGATIVES             = Compute the proportion of
39215                                 true negatives.
39216    TRUE POSITIVES             = Compute the proportion of
39217                                 true positives.
39218    ODDS RATIO                 = Compute the bias corrected
39219                                 log(odds ratio).
39220    ODDS RATIO STANDARD ERROR  = Compute the standard error of the
39221                                 bias corrected log(odds ratio).
39222    RELTIVE RISK               = Compute the relative risk.
39223
39224Reference:
39225    Hosmer and Lemeshow (2000), "Applied Logistic Regression",
39226    Second Edition, Wiley, pp. 160-164.
39227
39228Applications:
39229    Categorical Data Analysis
39230
39231Implementation Date:
39232    2007/7: Support for syntax 2 added
39233
39234Program 1:
39235    let n = 1
39236    .
39237    let p = 0.2
39238    let y1 = binomial rand numb for i = 1 1 100
39239    let p = 0.1
39240    let y2 = binomial rand numb for i = 1 1 100
39241    .
39242    let p = 0.4
39243    let y1 = binomial rand numb for i = 101 1 200
39244    let p = 0.08
39245    let y2 = binomial rand numb for i = 101 1 200
39246    .
39247    let p = 0.15
39248    let y1 = binomial rand numb for i = 201 1 300
39249    let p = 0.18
39250    let y2 = binomial rand numb for i = 201 1 300
39251    .
39252    let p = 0.6
39253    let y1 = binomial rand numb for i = 301 1 400
39254    let p = 0.45
39255    let y2 = binomial rand numb for i = 301 1 400
39256    .
39257    let p = 0.3
39258    let y1 = binomial rand numb for i = 401 1 500
39259    let p = 0.1
39260    let y2 = binomial rand numb for i = 401 1 500
39261    .
39262    let x = sequence 1 100 1 5
39263    .
39264    limits 0  1
39265    major xtic mark number 6
39266    minor xtic mark number 1
39267    tic mark offset 0.05 0.05
39268    .
39269    label case asis
39270    title case asis
39271    title offset 2
39272    x1label 1 - Specificity
39273    y1label Sensitivity
39274    character blank blank 1 2 3 4 5
39275    line blank all
39276    line dotted
39277    roc curve y1 y2 x
39278
39279Program 2:
39280    .  Following sample data from Wikipedia site
39281    read y1 y2 x
39282    63 37 1
39283    28 72 1
39284    77 23 2
39285    77 23 2
39286    24 76 3
39287    88 12 3
39288    88 12 4
39289    24 76 4
39290    end of data
39291    .
39292    character blank blank A B C D
39293    line blank all
39294    line dotted
39295    limits 0 1
39296    major tic mark number 6
39297    minor tic mark number 1
39298    tic mark offset 0.05 0.05
39299    .
39300    label case asis
39301    title case asis
39302    title offset 2
39303    title ROC Curve
39304    y1label Sensitivity
39305    x1label 1 - Specificity
39306    .
39307    roc curve y1 y2 x
39308
39309-----ROOTS (LET)-------------------------------------------------
39310
39311ROOTS
39312
39313Name:
39314    ROOTS (LET)
39315
39316Type:
39317    Let Subcommand
39318
39319Purpose:
39320    Determine the real roots of a function.
39321
39322Syntax:
39323    LET <resp> = ROOTS <func>  WRT <var> FOR <var> = <lower> <upper>
39324    where <func> is the name of a previously defined function or a
39325              functional expression;
39326          <var> is the variable for which the roots are being computed;
39327          <lower> is a number or parameter defining the lower limit for
39328              finding roots;
39329          <upper> is a number or parameter defining the upper limit for
39330              finding roots;
39331          <resp> is a parameter where the computed roots are stored.
39332
39333Examples:
39334    LET A = ROOTS X**2+2*X**2-4*X+5 WRT X FOR X = -10 10
39335    LET A = ROOTS F1 WRT X FOR X = 0 B
39336
39337Note:
39338    DATAPLOT uses an inward bracketing followed by bisection algorithm
39339    to find roots.  The Numerical Recipes book listed in the REFERENCE
39340    gives a description of these methods (although DATAPLOT does not
39341    use their implementation).
39342
39343Note:
39344    DATAPLOT uses the following convergence test:
39345        value = delta x / x
39346    where delta x is the difference between two iterations in the root
39347    finding algorithm and x is the current value of the root.
39348    Convergence is assumed when this value is smaller than a specified
39349    cutoff (hard-coded to 0.000001).
39350
39351Default:
39352    None
39353
39354Synonyms:
39355    None
39356
39357Related Commands:
39358    POLYNOMIAL ROOTS  = Compute the roots of a polynomial.
39359    DERIVATIVE        = Compute the derivative of a function.
39360    INTEGRAL          = Compute the integral of a function.
39361    RUNGE KUTTA       = Runge Kutta differential equation solver.
39362    INTERPOLATE       = Interpolate a function.
39363
39364Reference:
39365    "A First Course in Numerical Analysis", 2nd ed., Ralston and
39366    Rabinowitz, 1978, McGraw-Hill.
39367
39368    "Numerical Recipes: The Art of Scientific Computing (FORTRAN
39369    Version)", Press, Flannery, Teukolsky, and Vetterling.  Cambridge
39370    University Press, 1989 (chapter 9).
39371
39372Applications:
39373    XX
39374
39375Implementation Date:
39376    XX
39377
39378Program:
39379    LET FUNCTION F1 = X**3+2*X**2-4*X+5
39380    PLOT F1 FOR X = -10  0.1   10
39381    LET A1 = ROOTS F1 WRT X FOR X = -10 10
39382
39383-----ROOT ACCURACY---------------------------------------------------
39384
39385ROOT ACCURACY
39386
39387Note:
39388    This command is currently ignored by the ROOTS command.  The ROOTS
39389    command uses a hard-coded value of 0.000001.
39390
39391Name:
39392    ROOT ACCURACY
39393
39394Type:
39395    Support Command
39396
39397Purpose:
39398    Specify the root accuracy for the ROOTS command.
39399
39400Description:
39401    When DATAPLOT finds roots, it computes
39402        delta x / x
39403    where delta x is the difference between two iterations in the root
39404    finding algorithm and x is the current value of the root.  If this
39405    value is less than the root accuracy, then convergence is assumed.
39406
39407Syntax:
39408    ROOT ACCURACY  <val>
39409    where <val> is a number or parameter that specifies the root
39410                accuracy.
39411
39412Examples:
39413    ROOT ACCURACY 0.001
39414    ROOT ACCURACY 0.00001
39415
39416Default:
39417    0.000001
39418
39419Synonyms:
39420    XX
39421
39422Related Commands:
39423    ROOTS         = Find the real roots of an equation.
39424    COMPLEX ROOTS = Find the complex roots of a polynomial.
39425
39426Applications:
39427    Mathematics
39428
39429Implementation Date:
39430    Pre-1987
39431
39432Program:
39433    XX
39434
39435-----ROOT MEAN SQUARE ERROR (LET)-----------------------------------------
39436
39437ROOT MEAN SQUARE ERROR
39438
39439Name:
39440    ROOT MEAN SQUARE ERROR (LET)
39441
39442Type:
39443    Let Subcommand
39444
39445Purpose:
39446    Compute the root means square error of a variable.
39447
39448Description:
39449    The root mean square error has the formula:
39450
39451         RMS = SQRT(SUM[i=1 to N][X(i)**2]/N)
39452
39453Syntax 1:
39454    LET <par> = ROOT MEAN SQUARE ERROR <y>
39455                <SUBSET/EXCEPT/FOR qualification>
39456    where <y> is the response variable;
39457          <par> is a parameter where the computed root mean square error
39458              is saved;
39459    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
39460
39461Syntax 2:
39462    LET <par> = DIFFERENCE OF ROOT MEAN SQUARE ERROR <y1> <y2>
39463                <SUBSET/EXCEPT/FOR qualification>
39464    where <y1> is the first response variable;
39465          <y2> is the second response variable;
39466          <par> is a parameter where the computed difference of
39467              root mean square errors is saved;
39468    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
39469
39470    This syntax computes the root mean square error of <y1> and
39471    <y2> and then computes the difference of the two root mean
39472    square error values.
39473
39474Examples:
39475    LET A = ROOT MEAN SQUARE ERROR Y1
39476    LET A = ROOT MEAN SQUARE ERROR Y1  SUBSET TAG > 2
39477    LET A = DIFFERENCE OF ROOT MEAN SQUARE ERROR Y1 Y2
39478
39479Note:
39480    Dataplot statistics can be used in a number of commands.  For
39481    details, enter
39482
39483         HELP STATISTICS
39484
39485Default:
39486    None
39487
39488Synonyms:
39489    ROOT MEAN SQUARE
39490    RMS
39491
39492Related Commands:
39493    MEAN                 = Compute the mean of a variable.
39494    RANGE                = Compute the range of a variable.
39495    STANDARD DEVIATION   = Compute the standard deviation of a variable.
39496    VARIANCE             = Compute the variance of a variable.
39497
39498Applications:
39499    Statistics
39500
39501Implementation Date:
39502    2010/1
39503
39504Program:
39505    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
39506    LET RMS = ROOT MEAN SQUARE ERROR Y1
39507
39508-----ROOTOGRAM-------------------------------------------------------
39509
39510ROOTOGRAM
39511
39512Name:
39513    ... ROOTOGRAM
39514
39515Type:
39516    Graphics Command
39517
39518Purpose:
39519    Generates a rootogram.
39520
39521Description:
39522    A rootogram is a graphical data analysis technique for summarizing
39523    the distributional information of a variable.  It consists of:
39524      Vertical   axis = square root of frequencies or relative
39525                        frequencies;
39526      Horizontal axis = response variable.
39527    There are 4 types of rootograms:
39528          1) rootogram (absolute counts);
39529          2) relative rootogram (converts counts to proportions);
39530          3) cumulative rootogram;
39531          4) cumulative relative rootogram.
39532    The rootogram is a modified version of a histogram.  It plots the
39533    square roots of the frequencies rather than the raw frequencies.
39534    Many univariate data sets can be normalized with a square root
39535    transformation (particularly counts or measurement data that have
39536    a lower bound and tend to be skewed at the upper tail).
39537
39538Syntax 1:
39539    ROOTOGRAM   <x>                   <SUBSET/EXCEPT/FOR qualification>
39540    RELATIVE ROOTOGRAM   <x>          <SUBSET/EXCEPT/FOR qualification>
39541    CUMULATIVE ROOTOGRAM   <x>        <SUBSET/EXCEPT/FOR qualification>
39542    CUMULATIVE RELATIVE ROOTOGRAM <x> <SUBSET/EXCEPT/FOR qualification>
39543    where <x> is the variable of raw data values which will appear on
39544              the horizontal axis;
39545    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
39546
39547    This syntax is used when you have raw data only.
39548
39549Syntax 2:
39550    ROOTOGRAM <y> <x>                 <SUBSET/EXCEPT/FOR qualification>
39551    RELATIVE ROOTOGRAM <y> <x>        <SUBSET/EXCEPT/FOR qualification>
39552    CUMULATIVE ROOTOGRAM <y> <x>      <SUBSET/EXCEPT/FOR qualification>
39553    CUMULATIVE RELATIVE ROOTOGRAM <y> <x>
39554                                      <SUBSET/EXCEPT/FOR qualification>
39555    where <y> is the variable of pre-computed frequencies to appear on
39556              the vertical axis;
39557          <x> is the variable of raw data values which will appear on
39558              the horizontal axis;
39559    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
39560
39561    This syntax is used when you have pre-computed frequencies at each
39562    horizontal axis value.
39563
39564Examples:
39565    ROOTOGRAM TEMP
39566    RELATIVE ROOTOGRAM TEMP
39567    CUMULATIVE ROOTOGRAM TEMP
39568    CUMULATIVE RELATIVE ROOTOGRAM TEMP
39569    ROOTOGRAM COUNTS STATE
39570    RELATIVE ROOTOGRAM COUNTS STATE
39571    CUMULATIVE ROOTOGRAM COUNTS STATE
39572    CUMULATIVE RELATIVE ROOTOGRAM COUNTS STATE
39573
39574Note:
39575    The appearance of the bars on the rootogram (i.e., whether they are
39576    filled or not, the line width of the bar border, etc.) are
39577    controlled by the various bar attribute commands.  A few are listed
39578    in the RELATED COMMANDS section below.  See the documentation for
39579    the BAR command for a complete list of the bar attribute commands.
39580
39581Note:
39582    Although DATAPLOT does not have a FREQUENCY TABLE command, one can
39583    be generated with the following commands:
39584       HISTOGRAM Y
39585       LET YFREQ = YPLOT
39586       LET XVAL = XPLOT
39587    Then the variables YFREQ and XVAL essentially contain a frequency
39588    table.  There is a LET subcommand called FREQUENCY.  However, it
39589    does not generate a frequency table in the sense that a histogram
39590    or a frequency plot does.  The frequency table can also be
39591    generated by replacing HISTOGRAM with ROOTOGRAM in the above
39592    sequence.  However, be aware that this generates the square roots
39593    of the frequencies, not the raw frequencies.
39594
39595Note:
39596    By default, DATAPLOT uses a class width of 0.3 X the standard
39597    deviation of the variable.  Use the CLASS WIDTH command to override
39598    this default.  DATAPLOT also tends to generate a large number of
39599    zero frequency classes at the lower and upper tails.  This tends to
39600    compress the histogram on the horizontal axis.  Use the XLIMITS
39601    command or the CLASS LOWER and CLASS UPPER commands to avoid
39602    plotting these zero frequency classes.
39603
39604Default:
39605    None
39606
39607Synonyms:
39608    A synonym for CUMULATIVE RELATIVE ROOTOGRAM is RELATIVE CUMULATIVE
39609    ROOTOGRAM
39610
39611Related Commands:
39612    HISTOGRAM          = Generate a histogram.
39613    FREQUENCY PLOT     = Generates a frequency plot.
39614    PIE CHART          = Generates a pie chart.
39615    PERCENT POINT PLOT = Generates a percent point plot.
39616    PROBABILITY PLOT   = Generates a probability plot.
39617    PPCC PLOT          = Generates probability plot correlation
39618                         coefficient plot.
39619    CLASS LOWER        = Sets the lower class minimum for histograms,
39620                         frequency plots, and pie charts.
39621    CLASS UPPER        = Sets the upper class maximum for histograms,
39622                         frequency plots, and pie charts.
39623    CLASS WIDTH        = Sets the class width for histograms, frequency
39624                         plots, and pie charts.
39625    MINIMUM            = Sets the frame minima for all plots.
39626    MAXIMUM            = Sets the frame maxima for all plots.
39627    LIMITS             = Sets the frame limits for all plots.
39628    PLOT               = Generates a data or function plot.
39629    BARS               = Sets the on/off switches for plot bars.
39630    BAR WIDTH          = Sets the widths for plot bars.
39631    BAR FILL           = Sets the on/off switches for plot bar fills.
39632    BAR PATTERN        = Sets the types for bar fill patterns.
39633    BAR BORDER LINE    = Sets the types for bar border lines.
39634
39635Reference:
39636    Most introductory statistics book discuss frequency polygons and
39637    histograms.  The rootogram is described in "Exploratory Data
39638    Analysis", John Tukey, Addison-Wesley, 1977.
39639
39640Applications:
39641    XX
39642
39643Implementation Date:
39644    XX
39645
39646Program:
39647    LET Y = NORMAL RANDOM NUMBERS FOR I = 1 1 1000
39648    MULTIPLOT 2 2
39649    MULTIPLOT CORNER COORDINATES 0 0 100 100
39650    XLIMITS -5 5
39651    ROOTOGRAM Y
39652    BAR FILL ON
39653    RELATIVE ROOTOGRAM Y
39654    BAR FILL OFF
39655    BAR BORDER THICKNESS 0.3
39656    CUMULATIVE ROOTOGRAM Y
39657    BAR FILL ON
39658    BAR PATTERN D1
39659    BAR PATTERN SPACING 3
39660    CUMULATIVE RELATIVE ROOTOGRAM Y
39661    END OF MULTIPLOT
39662
39663-----ROSE PLOT-------------------------------------------------------
39664
39665ROSE PLOT
39666
39667Name:
39668    ROSE PLOT
39669
39670Type:
39671    Graphics Command
39672
39673Purpose:
39674    Generate a rose plot.
39675
39676Description:
39677    The rose plot is a variation of the common pie chart.  For
39678    both, we have k data points where each point denotes a
39679    frequency or a count.  Pie charts and rose plots both use
39680    the area of segments of a circle to convey amounts.  The
39681    pie chart uses a common radius and varies the central angle
39682    according to the data.  That is, the angle is proportional
39683    to the frequency.  So if the ith point has count X and the
39684    total count is N, the ith angle is 360*(X/N).  For the rose
39685    plot, the angle is constant (i.e., divide 360 by the number
39686    of groups, k) and it is the square root of the radius that is
39687    proportional to the data.
39688
39689    According to Wainer (1997), the use of a common angle is the
39690    strength of the rose plot since it allows us to easily compare
39691    a sequence of rose plots (i.e., the corresponding segments in
39692    different rose plots are always in the same relative
39693    position).  In particular, this makes rose plots an effective
39694    technique for displaying the data in contingency tables.
39695
39696    Friendly (2000) refers to the special case of 2x2 tables as
39697    the fourfold plot.  As with the general case, an effective
39698    use of these plots is when we have a sequence of related 2x2
39699    tables.  Using the MULTIPLOT command, Dataplot can easily
39700    generate the sequence of rose plots or fourfold plots on a
39701    single page.
39702
39703    As an interesting historical note, Wainer points out that
39704    rose plots were used by Florence Nightingale (she referred to
39705    them as coxcombs).
39706
39707Syntax 1:
39708    ROSE PLOT  <x>    <SUBSET/EXCEPT/FOR qualification>
39709    where <x> is the variable containing counts;
39710    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
39711
39712    Use this syntax when you have a single variable of
39713    counts (or proportions).
39714
39715Syntax 2:
39716    ROSE PLOT  <y1>  <y2>   <SUBSET/EXCEPT/FOR qualification>
39717    where <y1> is the first response variable;
39718          <y2> is the second response variable;
39719    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
39720
39721    With this syntax, the <y1> and <y2> variables are
39722    cross-tabulated to generate a 2x2 table.  The rose plot
39723    is then generated from this 2x2 table.
39724
39725Examples:
39726    ROSE PLOT X
39727    ROSE PLOT X  SUBSET TAG > 2
39728    ROSE PLOT Y1 Y2
39729
39730Note:
39731    Each wedge is drawn with a common set of attributes.  The
39732    attributes of the wedge borders are set with the LINE,
39733    LINE COLOR, and LINE THICKNESS commands (typically they are
39734    all set the same).  The attributes of the interior are set
39735    with the various REGION commands.  Any labels for the wedges
39736    must be set with the LEGEND or TEXT commands.  The CROSS HAIR
39737    command can help in positioning labels.  The program example
39738    below shows how to set the attributes.  Dataplot does not
39739    support features such as 3d rose plots or exploding slices
39740    that are common in many business graphics programs.
39741
39742Note:
39743    You can use the CONDITION PLOT command for the case where
39744    you want to generate rose plots for a series of 2x2 tables.
39745    This is demomstrated in the program examples below.
39746
39747Default:
39748    None
39749
39750Synonyms:
39751    None
39752
39753Related Commands:
39754    PIE CHART          = Generates a pie chart.
39755    HISTOGRAM          = Generates a histogram.
39756    PERCENT POINT PLOT = Generates a percent point plot.
39757    PLOT               = Generates a plot (including bar plots).
39758    LINE               = Sets the types for plot lines.
39759    LINE COLOR         = Sets the colors for plot lines.
39760    LINE THICKNESS     = Sets the thicknesses for plot lines.
39761    REGION             = Sets the types for plot regions.
39762    REGION FILL        = Sets on/off switches for region fills.
39763
39764Reference:
39765    Wainer (1997), "Visual Revelations: Graphical Tales of Fate
39766    and Deception from Napolean Bonaporte to Ross Perot",
39767    Copernicus, Chapter 11.
39768
39769    Friendly (2000), "Visualizing Categorical Data", SAS Institute
39770    Inc., p. 90.
39771
39772Applications:
39773    Categorical Data Analysis
39774
39775Implementation Date:
39776    2007/4
39777
39778Program 1:
39779    let y = data 48 12 53 7
39780    .
39781    region fill on on on on
39782    region fill color black blue red green
39783    rose plot y
39784    .
39785    case asis
39786    justification left
39787    move 15 90
39788    text Truecr()Positives
39789    move 15 10
39790    text Falsecr()Positives
39791    move 75 90
39792    text Falsecr()Negatives
39793    move 75 10
39794    text Truecr()Negatives
39795
39796Program 2:
39797    let n = 1
39798    let x = sequence 1 100 1 5
39799    .
39800    let p = 0.8
39801    let y1 = binomial rand numb for i = 1 1 100
39802    let p = 0.92
39803    let y2 = binomial rand numb for i = 1 1 100
39804    .
39805    let p = 0.6
39806    let y1 = binomial rand numb for i = 101 1 200
39807    let p = 0.95
39808    let y2 = binomial rand numb for i = 101 1 200
39809    .
39810    let p = 0.96
39811    let y1 = binomial rand numb for i = 201 1 300
39812    let p = 0.98
39813    let y2 = binomial rand numb for i = 201 1 300
39814    .
39815    let p = 0.3
39816    let y1 = binomial rand numb for i = 301 1 400
39817    let p = 0.2
39818    let y2 = binomial rand numb for i = 301 1 400
39819    .
39820    let p = 0.9
39821    let y1 = binomial rand numb for i = 401 1 500
39822    let p = 0.2
39823    let y2 = binomial rand numb for i = 401 1 500
39824    .
39825    region fill on on on on
39826    region color black blue red green
39827    rose plot y1 y2 subset x = 5
39828    .
39829    set conditioning plot type two variable rose
39830    region fill off on on on on
39831    region color white black blue red green
39832    condition plot y1 y2 x
39833
39834Program 3:
39835    orientation square
39836    .
39837    .  Berkeley Admissions Data from p. 391 of
39838    .  Friendly (2000), "Visualizing Categorical Data",
39839    .  SAS Institute Inc.
39840    .
39841    read y1 y2 x
39842    512 313 1
39843    353 207 1
39844     89  19 2
39845     17   8 2
39846    120 205 3
39847    138 279 3
39848    202 391 4
39849    131 244 4
39850     53 138 5
39851     22 351 5
39852     94 299 6
39853     24 317 6
39854    end of data
39855    .
39856    multiplot corner coordinates 0 0 100 95
39857    multiplot scale factor 2
39858    multiplot 3 3
39859    .
39860    legend case asis
39861    legend justification left
39862    legend 2 justification right
39863    legend 4 justification right
39864    legend 1 coordinates 17 83
39865    legend 2 coordinates 83 83
39866    legend 3 coordinates 17 22
39867    legend 4 coordinates 83 22
39868    .
39869    region fill on on on on
39870    region fill color black blue red green
39871    box shadow hw 0 0
39872    .
39873    label case asis
39874    title case asis
39875    y1label Admit = Yes
39876    y2label Admit = No
39877    x1label Sex: Female
39878    x2label Sex: Male
39879    x2label displacement -74
39880    .
39881    let string t1 = Department A
39882    let string t2 = Department B
39883    let string t3 = Department C
39884    let string t4 = Department D
39885    let string t5 = Department E
39886    let string t6 = Department F
39887    .
39888    let icnt = 0
39889    let icnt2 =0
39890    loop for k = 1 1 6
39891       let icnt = icnt+1
39892       let atemp = y1(icnt)
39893       legend 1 ^atemp
39894       let atemp = y2(icnt)
39895       legend 2 ^atemp
39896       let icnt = icnt+1
39897       let atemp = y1(icnt)
39898       legend 3 ^atemp
39899       let atemp = y2(icnt)
39900       legend 4 ^atemp
39901       title ^t^k
39902       let icnt2 = icnt2 + 1
39903       if k = 3
39904          let icnt2 = icnt2 + 1
39905       end of if
39906       if k = 5
39907          let icnt2 = icnt2 + 1
39908       end of if
39909       multiplot 3 3 icnt2
39910       rose plot y1 y2 subset x = k
39911       box 15 20 85 90
39912    end of loop
39913    .
39914    end of multiplot
39915    .
39916    case asis
39917    justification center
39918    move 30 97
39919    text Rose Plots for Berkeley Admissions Data
39920
39921-----ROTATE EYE--------------------------------------------------
39922
39923ROTATE EYE
39924
39925Name:
39926    ROTATE EYE
39927
39928Type:
39929    Plot Control Command
39930
39931Purpose:
39932    Specifies a direction and angle to rotate the current eye
39933    coordinates for 3-d plots.
39934
39935Description:
39936    Changing the viewing position allows you to view a 3-d plot from
39937    a different perspective.  This can sometimes allow you to see more
39938    clearly certain structures that are hidden in the default viewing
39939    position.  The ROTATE EYE command can be used to do this
39940    automatically.  It is often used in conjunction with the LOOP
39941    command.
39942
39943    The rotation has both a direction and an angle.  The direction can
39944    be one of the following:
39945        LEFT    - rotate left (in the XY plane);
39946        RIGHT   - rotate right (in the XY plane);
39947        UP      - rotate up (this case not implemented yet);
39948        DOWN    - rotate down (this case not implemented yet);
39949        XY      - rotate in the XY plane (equivalent to RIGHT);
39950        XZ      - rotate in the XZ plane;
39951        YZ      - rotate in the YZ plane.
39952    The angle is specified in degrees.
39953
39954Syntax:
39955    ROTATE EYE  <dir>  <angle>
39956    where <dir> is one of the character strings listed above that
39957               specifies the desired direction;
39958    and   <angle> is a number or parameter that specifies the number of
39959               degrees to rotate the eye coordinates.
39960
39961Examples:
39962    ROTATE
39963    ROTATE EYE
39964    ROTATE EYE 20
39965    ROTATE EYE RIGHT
39966    ROTATE EYE RIGHT 40
39967
39968Default:
39969    If the <dir> argument is omitted, LEFT is used.  If the <angle>
39970    argument is omitted, 10 degrees is used.
39971
39972Synonyms:
39973    ROTATE is a synonym for ROTATE EYE.
39974
39975Related Commands:
39976    EYE COORDINATES    = Specifies the eye coordinates for a 3d plot.
39977    3D-PLOT            = Generates a 3-d data or function plot.
39978    3D-FRAME           = Specifies what type of 3D frame is drawn.
39979
39980Applications:
39981    XX
39982
39983Implementation Date:
39984    93/10
39985
39986Program:
39987    LET FUNCTION F = SIN(X+COS(Y))
39988    3DFRAME 3PLANE
39989    FEEDBACK OFF
39990    .
39991    MULTIPLOT 4 4; MULTIPLOT CORNER COORDINATES 0 0 100 100
39992    LOOP FOR K = 1 1 16
39993       ROTATE
39994       3DPLOT F FOR X = -2 .2 2 FOR Y = -2 .2 2
39995    END LOOP
39996
39997-----ROUND (LET)--------------------------------
39998
39999ROUND
40000
40001Name:
40002    ROUND (LET)
40003
40004Type:
40005    Library Function
40006
40007Purpose:
40008    Compute the rounded value of a number to a user specified number of
40009    decimal places.
40010
40011Syntax:
40012    LET <y2> = ROUND(<y1>,<n>)  <SUBSET/EXCEPT/FOR qualification>
40013    where <y1> is a variable or a parameter containing decimal numbers
40014               to be rounded;
40015          <n>  is a number or parameter that specifies the number of
40016               decimal places to use for the rounding;
40017          <y2> is a variable or a parameter (depending on what <y1> is)
40018               where the computed rounded values are stored;
40019    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
40020
40021Examples:
40022    LET A = ROUND(14.2835,1)
40023    LET A = ROUND(A1,2)
40024    LET X2 = ROUND(X1,1)
40025    LET X2 = ROUND(X1-4,2)
40026
40027Note:
40028    Library functions are distinguished from let subcommands
40029    in the following ways.
40030    1) Functions enclose the input value in parenthesis.  Let
40031       subcommands use spaces.
40032    2) Functions can accept (and return) either parameters
40033       (i.e., single values) or variables (i.e., an array of
40034       values) while let subcommands are specific in which they
40035       accept as input and what they return as output.
40036    3) Functions can accept expressions while let subcommands
40037       do not.  For example, the following is legal:
40038           LET Y2 = ABS(Y1-INT(Y1))
40039       For let subcommands, you typically have to do something
40040       like the following:
40041           LET YTEMP = Y**2 + 8
40042           LET A = SUM YTEMP
40043
40044Default:
40045    None
40046
40047Synonyms:
40048    None
40049
40050Related Commands:
40051    INT    = Compute the integer portion of number.
40052    FRACT  = Compute the fractional portion of number.
40053    OCTDEC = Perform an octal to decimal conversion.
40054    MOD    = Compute the modulo function.
40055
40056Applications:
40057    Data Transformations
40058
40059Implementation Date:
40060    Pre-1987
40061
40062Program:
40063    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
40064    LET Y2 = ROUND(Y1,1)
40065    PRINT Y1 Y2
40066
40067-----ROWLABEL-------------------------------------------------
40068
40069ROWLABEL
40070
40071Name:
40072    ROWLABEL (LET)
40073
40074Type:
40075    Subcommand under LET
40076
40077Purpose:
40078    Converts previously read character data to row labels.
40079
40080Description:
40081    The command READ ROW LABELS can be used to read the row labels
40082    from a file.  Alternatively, Dataplot can read character data
40083    using the
40084
40085        SET CONVERT CHARACTER ON
40086
40087    command.  This command stores the character fields in the
40088    file "dpchzf.dat".
40089
40090    The two primary uses of character data are:
40091
40092       1) Provide a row identifier for the data.
40093
40094       2) Define a group (or factor) variable.  For example, we
40095          can identify sex by coding males as M and females as F.
40096
40097    The ROWLABEL command (Syntax 1) is used to convert one of the
40098    previosuly read character variables to a row label.
40099
40100    You can also copy a string to a specific row (Syntax 2 or
40101    Syntax 3).
40102
40103    Once a row label has been defined, you can use the
40104
40105        CHARACTER ROWLABEL
40106
40107    command to label plot points.  Additional uses for row labels
40108    are anticipated in future releases of Dataplot.
40109
40110Syntax 1:
40111    LET ROWLABEL = <ix>
40112    where <ix> specifies the name of the character variable in
40113               the file dpzchf.dat.
40114
40115    The character variable is originally created with a READ
40116    command where the SET CONVERT CHARACTER ON was entered prior
40117    to the READ.
40118
40119Syntax 2:
40120    LET ROWLABEL = STRING TO ROW LABEL <irow>  <s>
40121    where <s> is a previously defined string;
40122    and   <irow> is a parameter that identifies which row to set.
40123
40124    This syntax is used to set a specific row of the row labels to
40125    a previously defined string.
40126
40127Syntax 3:
40128    LET ROWLABEL <ival> = <string>
40129    where <string> is a literal string;
40130    and   <ival> is a parameter which specifies the row number.
40131
40132    This syntax copies <string> into the <ival>-th row of the row
40133    labels.
40134
40135Syntax 4:
40136    LET ROWLABEL = DELETE
40137
40138    This syntax re-initializes all row labels to blank.
40139    labels.
40140
40141Syntax 5:
40142    LET ROWLABEL = SHIFT LEFT <ival>
40143    where <ival> is a parameter.
40144
40145    This syntax shifts all row labels left (= down) by <ival> rows.
40146    Vacated row labels will be set blank.
40147
40148Syntax 6:
40149    LET ROWLABEL = SHIFT RIGHT <ival>
40150    where <ival> is a parameter.
40151
40152    This syntax shifts all row labels right (= up) by <ival> rows.
40153    Vacated row labels will be set blank.
40154
40155Examples:
40156    SET CONVERT CHARACTER ON
40157    READ TEST.DAT  Y X IX
40158    LET IG = ROW LABEL IX
40159
40160Note:
40161    Row labels can be up to 24 characters long.
40162
40163Note:
40164    Row labels can also be defined using the READ ROW LABELS
40165    command.
40166
40167Default:
40168    None
40169
40170Synonyms:
40171    None
40172
40173Related Commands:
40174    READ                        = Carries out a column-wise input of
40175                                  data.
40176    CONVERT CHARACTER           = Specify how Dataplot will handle
40177                                  character data.
40178    CHARACTER CODE              = Converts character data to a coded
40179                                   numeric variable.
40180    GROUP LABELS                = Define row labels from character
40181                                  data.
40182
40183Applications:
40184    Input/Output
40185
40186Implementation Date:
40187    2004/1
40188    2012/08: Support for Syntax 2 - Syntax 6 added.
40189
40190Program 1:
40191    let rowlabel 1 = 100101
40192    let rowlabel 2 = 100102
40193    let rowlabel 3 = 100103
40194    let rowlabel 4 = 100104
40195    let rowlabel 5 = 100105
40196    let rowlabel 6 = 100106
40197    let rowlabel 7 = 100107
40198    let rowlabel 8 = 100108
40199    let rowlabel 9 = 100109
40200    let rowlabel 10 = 100110
40201    .
40202    tic mark offset units screen
40203    tic mark offset 5 5
40204    character rowlabel
40205    plot x**2 for x = 1 1 10
40206
40207Program 2:
40208    skip 25
40209    read antibody.dat lab  ymean  ysd  nrep
40210    .
40211    title case asis
40212    label case asis
40213    x1label Mean
40214    y1label Standard Deviation
40215    .
40216    xlimits 0.8  2.4
40217    major xtic mark number 9
40218    minor xtic mark number 1
40219    ylimits 0    1.6
40220    major ytic mark number 9
40221    minor ytic mark number 1
40222    .
40223    system rm dpzchf.dat
40224    let rowlabel = lab
40225    character blank all
40226    character blank blank blank rowlabel
40227    line blank all
40228    line solid dash dotted
40229    .
40230    title Highlight/Summary Form of Homoscedasticity Plot with Contour Linescr() ...
40231    for ANTIBODY.DAT
40232    set homo plot circle technique on
40233    summary homoscedasticity plot ymean ysd nrep
40234
40235-----ROW LIMITS-------------------------------------------------------
40236
40237ROW LIMITS
40238
40239Name:
40240    ROW LIMITS
40241
40242Type:
40243    Support Command
40244
40245Purpose:
40246    Specifies the row limits in a file between which the read scan is
40247    restricted during subsequent READ and SERIAL READ commands.
40248
40249Description:
40250    The specified rows and all rows in between are included in the
40251    data read.
40252
40253Syntax:
40254    ROW LIMITS   <row 1>   <row 2>
40255    where <row 1> is a number or parameter that specifies the desired
40256               starting row;
40257    and   <row 2> is a number or parameter that specifies the desired
40258                ending row;
40259
40260Examples:
40261    ROW LIMITS 10 30
40262    ROW LIMITS 1 15
40263    ROW LIMITS 50 63
40264
40265Note:
40266    The NLIST command can be used to list a file with row numbers.
40267    This can sometimes be useful when setting row limits.
40268
40269Default:
40270    All rows in the file are read.
40271
40272Synonyms:
40273    None
40274
40275Related Commands:
40276    READ           = Reads data (column-wise) into variables.
40277    SERIAL READ    = Reads data (row-wise) into variables.
40278    COLUMN LIMITS  = Sets the file columns to be included in the read.
40279    SKIP           = Sets the number of lines to skip over before the
40280                     read.
40281    WRITE          = Writes variables, parameters, and functions to
40282                     the screen or to a file.
40283    LIST           = Lists a file or the last 20 commands.
40284    NLIST          = Lists a file with row numbers.
40285
40286Applications:
40287    Data Input
40288
40289Implementation Date:
40290    Pre-1987
40291
40292Program:
40293    XX
40294
40295-----RPOCDF (LET)--------------------------------
40296
40297RPOCDF
40298
40299Name:
40300    RPOCDF (LET)
40301
40302Type:
40303    Library Function
40304
40305Purpose:
40306    Compute the reflected power cumulative distribution function
40307    with shape parameter c.
40308
40309Description:
40310    The standard reflected power distribution has the
40311    following cumulative distribution function:
40312
40313       F(x;c) = 1 - (1-x)**c
40314                0 <= x <= 1, c > 0
40315
40316    with c denoting the shape parameter.
40317
40318    This distribution can be extended with lower and upper
40319    bound parameters.  If a and b denote the lower and upper
40320    bounds, respectively, then the location and scale
40321    parameters are:
40322
40323        location = a
40324        scale    = b - a
40325
40326    The general form of the distribution can then be found
40327    by using the relation
40328
40329        F(x;c,a,b) = F((x-a)/(b-a);c,0,1)
40330
40331    The reflected power distribution is a special case of the
40332    beta distribution where the first shape parameter = 1
40333    (the power distribution is a special case of beta
40334    distribution where the second shape parameter = 1).
40335
40336Syntax:
40337    LET <y> = RPOCDF(<x>,<c>,<a>,<b>)
40338              <SUBSET/EXCEPT/FOR qualification>
40339    where <x> is a number, parameter, or variable containing
40340              values in the interval (a,b);
40341          <y> is a variable or a parameter (depending on what
40342              <x> is) where the computed reflected power cdf value
40343              is stored;
40344          <c> is a positive number, parameter, or variable that
40345              specifies the shape parameter;
40346          <a> is a number, parameter, or variable that
40347              specifies the lower limit;
40348          <b> is a number, parameter, or variable that
40349              specifies the upper limit;
40350    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
40351
40352    If <a> and <b> are omitted, they default to 0 and 1,
40353    respectively.
40354
40355Examples:
40356    LET A = RPOCDF(0.3,0.2)
40357    LET Y = RPOCDF(X,0.5,0,5)
40358    PLOT RPOCDF(X,2.3) FOR X = 0  0.01  1
40359
40360Note:
40361    Library functions are distinguished from let subcommands
40362    in the following ways.
40363    1) Functions enclose the input value in parenthesis.  Let
40364       subcommands use spaces.
40365    2) Functions can accept (and return) either parameters
40366       (i.e., single values) or variables (i.e., an array of
40367       values) while let subcommands are specific in which they
40368       accept as input and what they return as output.
40369    3) Functions can accept expressions while let subcommands
40370       do not.  For example, the following is legal:
40371           LET Y2 = ABS(Y1-INT(Y1))
40372       For let subcommands, you typically have to do something
40373       like the following:
40374           LET YTEMP = Y**2 + 8
40375           LET A = SUM YTEMP
40376
40377Default:
40378    None
40379
40380Synonyms:
40381    None
40382
40383Related Commands:
40384    RPOPDF  = Compute the reflected power probability density
40385              function.
40386    RPOPPF  = Compute the reflected power percent point function.
40387    RPOHAZ  = Compute the reflected power hazard function.
40388    RPOCHAZ = Compute the reflected power cumulative hazard
40389              function.
40390    POWPDF  = Compute the power probability density function.
40391    BETPDF  = Compute the beta probability density function.
40392    TOPPDF  = Compute the Topp and Leone probability density
40393              function.
40394    RGTPDF  = Compute the generalized reflected Topp and Leone
40395              probability density function.
40396    GTLPDF  = Compute the generalized Topp and Leone probability
40397              density function.
40398    TSPPDF  = Compute the two-sided power probability density
40399              function.
40400    TRIPDF  = Compute the triangular probability density function.
40401    TRAPDF  = Compute the trapezoid probability density function.
40402    UNIPDF  = Compute the uniform probability density function.
40403    JSBPDF  = Compute the Johnson SB probability density function.
40404
40405Reference:
40406    Samuel Kotz and J. Rene Van Dorp 2004, "Beyond Beta:
40407    Other Continuous Families of Distributions with Bounded
40408    Support and Applications", World Scientific, pp. 199-201.
40409
40410Applications:
40411    Distributional Modeling
40412
40413Implementation Date:
40414    2007/12
40415
40416Program:
40417    LABEL CASE ASIS
40418    TITLE CASE ASIS
40419    TITLE OFFSET 2
40420    .
40421    MULTIPLOT 2 2
40422    MULTIPLOT CORNER COORDINATES 0 0 100 95
40423    MULTIPLOT SCALE FACTOR
40424    .
40425    LET C  = 0.5
40426    TITLE C = ^c
40427    PLOT RPOCDF(X,C) FOR X = 0  0.01  1
40428    .
40429    LET C  = 1
40430    TITLE C = ^c
40431    PLOT RPOCDF(X,C) FOR X = 0  0.01  1
40432    .
40433    LET C  = 1.5
40434    TITLE C = ^c
40435    PLOT RPOCDF(X,C) FOR X = 0  0.01  1
40436    .
40437    LET C  = 2
40438    TITLE C = ^c
40439    PLOT RPOCDF(X,C) FOR X = 0  0.01  1
40440    .
40441    END OF MULTIPLOT
40442    .
40443    JUSTIFICATION CENTER
40444    MOVE 50 97
40445    TEXT Reflected Power Cumulative Distribution Functions
40446
40447-----RPOCHAZ (LET)--------------------------------
40448
40449RPOCHAZ
40450
40451Name:
40452    RPOCHAZ (LET)
40453
40454Type:
40455    Library Function
40456
40457Purpose:
40458    Compute the reflected power cumulative hazard function
40459    with shape parameter c.
40460
40461Description:
40462    The standard reflected power distribution has the
40463    following cumulative hazard function:
40464
40465       H(x;c) = -LOG((1-x)**c)
40466                0 <= x <= 1, c > 0
40467
40468    with c denoting the shape parameter.
40469
40470    This distribution can be extended with lower and upper
40471    bound parameters.  If a and b denote the lower and upper
40472    bounds, respectively, then the location and scale
40473    parameters are:
40474
40475        location = a
40476        scale    = b - a
40477
40478    The general form of the distribution can then be found
40479    by using the relation
40480
40481        H(x;c,a,b) = H((x-a)/(b-a);c,0,1)
40482
40483    The reflected power distribution is a special case of the
40484    beta distribution where the first shape parameter = 1
40485    (the power distribution is a special case of beta
40486    distribution where the second shape parameter = 1).
40487
40488Syntax:
40489    LET <y> = RPOCHAZ(<x>,<c>,<a>,<b>)
40490              <SUBSET/EXCEPT/FOR qualification>
40491    where <x> is a number, parameter, or variable containing
40492              values in the interval (a,b);
40493          <y> is a variable or a parameter (depending on what
40494              <x> is) where the computed reflected power cumulative
40495              hazard value is stored;
40496          <c> is a positive number, parameter, or variable that
40497              specifies the shape parameter;
40498          <a> is a number, parameter, or variable that
40499              specifies the lower limit;
40500          <b> is a number, parameter, or variable that
40501              specifies the upper limit;
40502    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
40503
40504    If <a> and <b> are omitted, they default to 0 and 1,
40505    respectively.
40506
40507Examples:
40508    LET A = RPOCHAZ(0.3,0.2)
40509    LET Y = RPOCHAZ(X,0.5,0,5)
40510    PLOT RPOCHAZ(X,2.3) FOR X = 0  0.01  0.99
40511
40512Note:
40513    Library functions are distinguished from let subcommands
40514    in the following ways.
40515    1) Functions enclose the input value in parenthesis.  Let
40516       subcommands use spaces.
40517    2) Functions can accept (and return) either parameters
40518       (i.e., single values) or variables (i.e., an array of
40519       values) while let subcommands are specific in which they
40520       accept as input and what they return as output.
40521    3) Functions can accept expressions while let subcommands
40522       do not.  For example, the following is legal:
40523           LET Y2 = ABS(Y1-INT(Y1))
40524       For let subcommands, you typically have to do something
40525       like the following:
40526           LET YTEMP = Y**2 + 8
40527           LET A = SUM YTEMP
40528
40529Default:
40530    None
40531
40532Synonyms:
40533    None
40534
40535Related Commands:
40536    RPOPDF  = Compute the reflected power probability density
40537              function.
40538    RPOCDF  = Compute the reflected power cumulative distribution
40539              function.
40540    RPOPPF  = Compute the reflected power percent point function.
40541    RPOHAZ  = Compute the reflected power hazard function.
40542    POWPDF  = Compute the power probability density function.
40543    BETPDF  = Compute the beta probability density function.
40544    TOPPDF  = Compute the Topp and Leone probability density
40545              function.
40546    RGTPDF  = Compute the generalized reflected Topp and Leone
40547              probability density function.
40548    GTLPDF  = Compute the generalized Topp and Leone probability
40549              density function.
40550    TSPPDF  = Compute the two-sided power probability density
40551              function.
40552    TRIPDF  = Compute the triangular probability density function.
40553    TRAPDF  = Compute the trapezoid probability density function.
40554    UNIPDF  = Compute the uniform probability density function.
40555    JSBPDF  = Compute the Johnson SB probability density function.
40556
40557Reference:
40558    Samuel Kotz and J. Rene Van Dorp 2004, "Beyond Beta:
40559    Other Continuous Families of Distributions with Bounded
40560    Support and Applications", World Scientific, pp. 199-201.
40561
40562Applications:
40563    Distributional Modeling
40564
40565Implementation Date:
40566    2007/12
40567
40568Program:
40569    LABEL CASE ASIS
40570    TITLE CASE ASIS
40571    TITLE OFFSET 2
40572    .
40573    MULTIPLOT 2 2
40574    MULTIPLOT CORNER COORDINATES 0 0 100 95
40575    MULTIPLOT SCALE FACTOR
40576    .
40577    LET C  = 0.5
40578    TITLE C = ^c
40579    PLOT RPOCHAZ(X,C) FOR X = 0  0.01  0.99
40580    .
40581    LET C  = 1
40582    TITLE C = ^c
40583    PLOT RPOCHAZ(X,C) FOR X = 0  0.01  0.99
40584    .
40585    LET C  = 1.5
40586    TITLE C = ^c
40587    PLOT RPOCHAZ(X,C) FOR X = 0  0.01  0.99
40588    .
40589    LET C  = 2
40590    TITLE C = ^c
40591    PLOT RPOCHAZ(X,C) FOR X = 0  0.01  0.99
40592    .
40593    END OF MULTIPLOT
40594    .
40595    JUSTIFICATION CENTER
40596    MOVE 50 97
40597    TEXT Reflected Power Cumulative Hazard Functions
40598
40599-----RPOHAZ (LET)--------------------------------
40600
40601RPOHAZ
40602
40603Name:
40604    RPOHAZ (LET)
40605
40606Type:
40607    Library Function
40608
40609Purpose:
40610    Compute the reflected power hazard function with
40611    shape parameter c.
40612
40613Description:
40614    The standard reflected power distribution has the
40615    following hazard function:
40616
40617       h(x;c) = c/(1-x)
40618                0 <= x <= 1, c > 0
40619
40620    with c denoting the shape parameter.
40621
40622    This distribution can be extended with lower and upper
40623    bound parameters.  If a and b denote the lower and upper
40624    bounds, respectively, then the location and scale
40625    parameters are:
40626
40627        location = a
40628        scale    = b - a
40629
40630    The general form of the distribution can then be found
40631    by using the relation
40632
40633        h(x;c,a,b) = (1/(b-a))*h((x-a)/(b-a);c,0,1)
40634
40635    The reflected power distribution is a special case of the
40636    beta distribution where the first shape parameter = 1
40637    (the power distribution is a special case of beta
40638    distribution where the second shape parameter = 1).
40639
40640Syntax:
40641    LET <y> = RPOHAZ(<x>,<c>,<a>,<b>)
40642              <SUBSET/EXCEPT/FOR qualification>
40643    where <x> is a number, parameter, or variable containing
40644              values in the interval (a,b);
40645          <y> is a variable or a parameter (depending on what
40646              <x> is) where the computed reflected power hazard
40647              value is stored;
40648          <c> is a positive number, parameter, or variable that
40649              specifies the shape parameter;
40650          <a> is a number, parameter, or variable that
40651              specifies the lower limit;
40652          <b> is a number, parameter, or variable that
40653              specifies the upper limit;
40654    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
40655
40656    If <a> and <b> are omitted, they default to 0 and 1,
40657    respectively.
40658
40659Examples:
40660    LET A = RPOHAZ(0.3,0.2)
40661    LET Y = RPOHAZ(X,0.5,0,5)
40662    PLOT RPOHAZ(X,2.3) FOR X = 0  0.01  1
40663
40664Note:
40665    Library functions are distinguished from let subcommands
40666    in the following ways.
40667    1) Functions enclose the input value in parenthesis.  Let
40668       subcommands use spaces.
40669    2) Functions can accept (and return) either parameters
40670       (i.e., single values) or variables (i.e., an array of
40671       values) while let subcommands are specific in which they
40672       accept as input and what they return as output.
40673    3) Functions can accept expressions while let subcommands
40674       do not.  For example, the following is legal:
40675           LET Y2 = ABS(Y1-INT(Y1))
40676       For let subcommands, you typically have to do something
40677       like the following:
40678           LET YTEMP = Y**2 + 8
40679           LET A = SUM YTEMP
40680
40681Default:
40682    None
40683
40684Synonyms:
40685    None
40686
40687Related Commands:
40688    RPOPDF  = Compute the reflected power probability density
40689              function.
40690    RPOCDF  = Compute the reflected power cumulative distribution
40691              function.
40692    RPOPPF  = Compute the reflected power percent point function.
40693    RPOCHAZ = Compute the reflected power cumulative hazard
40694              function.
40695    POWPDF  = Compute the power probability density function.
40696    BETPDF  = Compute the beta probability density function.
40697    TOPPDF  = Compute the Topp and Leone probability density
40698              function.
40699    RGTPDF  = Compute the generalized reflected Topp and Leone
40700              probability density function.
40701    GTLPDF  = Compute the generalized Topp and Leone probability
40702              density function.
40703    TSPPDF  = Compute the two-sided power probability density
40704              function.
40705    TRIPDF  = Compute the triangular probability density function.
40706    TRAPDF  = Compute the trapezoid probability density function.
40707    UNIPDF  = Compute the uniform probability density function.
40708    JSBPDF  = Compute the Johnson SB probability density function.
40709
40710Reference:
40711    Samuel Kotz and J. Rene Van Dorp 2004, "Beyond Beta:
40712    Other Continuous Families of Distributions with Bounded
40713    Support and Applications", World Scientific, pp. 199-201.
40714
40715Applications:
40716    Distributional Modeling
40717
40718Implementation Date:
40719    2007/12
40720
40721Program:
40722    LABEL CASE ASIS
40723    TITLE CASE ASIS
40724    TITLE OFFSET 2
40725    .
40726    MULTIPLOT 2 2
40727    MULTIPLOT CORNER COORDINATES 0 0 100 95
40728    MULTIPLOT SCALE FACTOR
40729    .
40730    LET C  = 0.5
40731    TITLE C = ^c
40732    PLOT RPOHAZ(X,C) FOR X = 0.01  0.01  0.99
40733    .
40734    LET C  = 1
40735    TITLE C = ^c
40736    PLOT RPOHAZ(X,C) FOR X = 0.01  0.01  0.99
40737    .
40738    LET C  = 1.5
40739    TITLE C = ^c
40740    PLOT RPOHAZ(X,C) FOR X = 0.01  0.01  0.99
40741    .
40742    LET C  = 2
40743    TITLE C = ^c
40744    PLOT RPOHAZ(X,C) FOR X = 0.01  0.01  0.99
40745    .
40746    END OF MULTIPLOT
40747    .
40748    JUSTIFICATION CENTER
40749    MOVE 50 97
40750    TEXT Reflected Power Hazard Functions
40751
40752-----RPOPDF (LET)--------------------------------
40753
40754RPOPDF
40755
40756Name:
40757    RPOPDF (LET)
40758
40759Type:
40760    Library Function
40761
40762Purpose:
40763    Compute the reflected power probability density function
40764    with shape parameter c.
40765
40766Description:
40767    The standard reflected power distribution has the
40768    following probability density function:
40769
40770       f(x;c) = c*(1-x)**(c-1)
40771                0 <= x <= 1, c > 0
40772
40773    with c denoting the shape parameter.
40774
40775    This distribution can be extended with lower and upper
40776    bound parameters.  If a and b denote the lower and upper
40777    bounds, respectively, then the location and scale
40778    parameters are:
40779
40780        location = a
40781        scale    = b - a
40782
40783    The general form of the distribution can then be found
40784    by using the relation
40785
40786        f(x;c,a,b) = f((x-a)/(b-a);c,0,1)/(b-a)
40787
40788    The reflected power distribution is a special case of the
40789    beta distribution where the first shape parameter = 1
40790    (the power distribution is a special case of the beta
40791    distribution where the second shape parameter = 1).
40792
40793Syntax:
40794    LET <y> = RPOPDF(<x>,<c>,<a>,<b>)
40795              <SUBSET/EXCEPT/FOR qualification>
40796    where <x> is a number, parameter, or variable containing
40797              values in the interval (a,b);
40798          <y> is a variable or a parameter (depending on what
40799              <x> is) where the computed reflected power pdf value
40800              is stored;
40801          <c> is a positive number, parameter, or variable that
40802              specifies the shape parameter;
40803          <a> is a number, parameter, or variable that
40804              specifies the lower limit;
40805          <b> is a number, parameter, or variable that
40806              specifies the upper limit;
40807    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
40808
40809    If <a> and <b> are omitted, they default to 0 and 1,
40810    respectively.
40811
40812Examples:
40813    LET A = RPOPDF(0.3,0.2)
40814    LET Y = RPOPDF(X,0.5,0,5)
40815    PLOT RPOPDF(X,2.3) FOR X = 0  0.01  1
40816
40817Note:
40818    Reflected power random numbers, probability plots, and
40819    goodness of fit tests can be generated with the commands:
40820
40821       LET C = <value>
40822       LET A = <value>
40823       LET B = <value>
40824       LET Y = REFLECTED POWER RANDOM NUMBERS FOR I = 1 1 N
40825       REFLECTED POWER PROBABILITY PLOT Y
40826       REFLECTED POWER PROBABILITY PLOT Y2 X2
40827       REFLECTED POWER PROBABILITY PLOT Y3 XLOW XHIGH
40828       REFLECTED POWER KOLMOGOROV SMIRNOV GOODNESS OF FIT Y
40829       REFLECTED POWER CHI-SQUARE GOODNESS OF FIT Y2 X2
40830       REFLECTED POWER CHI-SQUARE GOODNESS OF FIT Y3 XLOW XHIGH
40831
40832    The following commands can be used to estimate the c
40833    shape parameter for the reflected power distribution:
40834
40835       LET C1 = <value>
40836       LET C2 = <value>
40837       REFLECTED POWER PPCC PLOT Y
40838       REFLECTED POWER PPCC PLOT Y2 X2
40839       REFLECTED POWER PPCC PLOT Y3 XLOW XHIGH
40840       REFLECTED POWER KS PLOT Y
40841       REFLECTED POWER KS PLOT Y2 X2
40842       REFLECTED POWER KS PLOT Y3 XLOW XHIGH
40843
40844    The default values for C1 and C2 are 0.5 and 25.
40845
40846    The probability plot can then be used to estimate the
40847    lower and upper limits (lower limit = PPA0,
40848    upper limit = PPA0 + PPA1).
40849
40850    The following options may be useful for these commands.
40851
40852       1) Instead of generating the ppcc plot or ks plot on
40853          the original data, we can generate them on
40854          selected percentiles of the data.  For example,
40855          if we have 1,000 points, we can choose to generate
40856          the plots on 100 evenly spaced percentiles with
40857          the command
40858
40859             SET PPCC PLOT DATA POINTS 100
40860
40861          This can be used to speed up the generation of
40862          the plot for larger data sets.
40863
40864          The percent point function for the reflected power
40865          distribution is available in closed form, so
40866          this option is typically not needed.
40867
40868       2) For the ks plot, we can fix the location and scale.
40869          This is equivalent to assuming that the lower and
40870          upper limits are known (e.g., we could use the
40871          data minimum and maximum as the lower and upper
40872          limit values).  Given that the lower and upper
40873          limits are LOWLIM and UPPLIM, enter the commands
40874
40875             LET KSLOC   = LOWLIM
40876             LET KSSCALE = UPPLIM
40877
40878          The ppcc plot is invariant to location and scale,
40879          so we cannot fix the lower and upper limits.
40880
40881    The BOOTSTRAP DISTRIBUTION command can be used to find
40882    uncertainty intervals for the ppcc plot, ks plot, and
40883    maximum likelihood estimates.
40884
40885Note:
40886    Library functions are distinguished from let subcommands
40887    in the following ways.
40888    1) Functions enclose the input value in parenthesis.  Let
40889       subcommands use spaces.
40890    2) Functions can accept (and return) either parameters
40891       (i.e., single values) or variables (i.e., an array of
40892       values) while let subcommands are specific in which they
40893       accept as input and what they return as output.
40894    3) Functions can accept expressions while let subcommands
40895       do not.  For example, the following is legal:
40896           LET Y2 = ABS(Y1-INT(Y1))
40897       For let subcommands, you typically have to do something
40898       like the following:
40899           LET YTEMP = Y**2 + 8
40900           LET A = SUM YTEMP
40901
40902Default:
40903    None
40904
40905Synonyms:
40906    None
40907
40908Related Commands:
40909    RPOCDF  = Compute the reflected power cumulative distribution
40910              function.
40911    RPOPPF  = Compute the reflected power percent point function.
40912    RPOHAZ  = Compute the reflected power hazard function.
40913    RPOCHAZ = Compute the reflected power cumulative hazard
40914    POWPDF  = Compute the power probability density function.
40915    BETPDF  = Compute the beta probability density function.
40916    TOPPDF  = Compute the Topp and Leone probability density
40917              function.
40918    RGTPDF  = Compute the generalized reflected Topp and Leone
40919              probability density function.
40920    GTLPDF  = Compute the generalized Topp and Leone probability
40921              density function.
40922    TSPPDF  = Compute the two-sided power probability density
40923              function.
40924    TRIPDF  = Compute the triangular probability density function.
40925    TRAPDF  = Compute the trapezoid probability density function.
40926    UNIPDF  = Compute the uniform probability density function.
40927    JSBPDF  = Compute the Johnson SB probability density function.
40928
40929Reference:
40930    Samuel Kotz and J. Rene Van Dorp 2004, "Beyond Beta:
40931    Other Continuous Families of Distributions with Bounded
40932    Support and Applications", World Scientific, pp. 199-201.
40933
40934Applications:
40935    Distributional Modeling
40936
40937Implementation Date:
40938    2007/12
40939
40940Program 1:
40941    LABEL CASE ASIS
40942    TITLE CASE ASIS
40943    TITLE OFFSET 2
40944    .
40945    MULTIPLOT 2 2
40946    MULTIPLOT CORNER COORDINATES 0 0 100 95
40947    MULTIPLOT SCALE FACTOR
40948    .
40949    LET C  = 0.5
40950    TITLE C = ^c
40951    PLOT RPOPDF(X,C) FOR X = 0  0.01  0.99
40952    .
40953    LET C  = 1
40954    TITLE C = ^c
40955    PLOT RPOPDF(X,C) FOR X = 0  0.01  1
40956    .
40957    LET C  = 1.5
40958    TITLE C = ^c
40959    PLOT RPOPDF(X,C) FOR X = 0  0.01  1
40960    .
40961    LET C  = 2
40962    TITLE C = ^c
40963    PLOT RPOPDF(X,C) FOR X = 0  0.01  1
40964    .
40965    END OF MULTIPLOT
40966    .
40967    JUSTIFICATION CENTER
40968    MOVE 50 97
40969    TEXT Reflected Power Probability Density Functions
40970
40971Program 2:
40972    let c = 2.2
40973    let y = reflected power rand numb for i = 1 1 200
40974    let csav = c
40975    .
40976    let c1 = 0.5
40977    let c2 = 4
40978    reflected power ppcc plot y
40979    just center
40980    move 50 5
40981    let c = shape
40982    text maxppcc = ^maxppcc, C = ^c
40983    move 50 2
40984    text Csav = ^csav
40985    .
40986    char x
40987    line blank
40988    reflected power prob plot y
40989    move 50 5
40990    text PPA0 = ^ppa0, PPA1 = ^ppa1
40991    move 50 2
40992    let upplim = ppa0 + ppa1
40993    text Lower Limit = ^ppa0, Upper Limit = ^upplim
40994    char blank
40995    line solid
40996    .
40997    class lower 0
40998    class upper 1
40999    class width 0.05
41000    relative hist y
41001    line color blue
41002    limits freeze
41003    pre-erase off
41004    let a = ppa0
41005    let b = a + (ppa1 - ppa0)
41006    plot rpopdf(x,c,a,b) for x = a 0.01 b
41007    limits
41008    pre-erase on
41009    line color black all
41010    .
41011    let ksloc = ppa0
41012    let ksscale = upplim
41013    reflected power kolm smir goodness of fit y
41014
41015-----RPOPPF (LET)--------------------------------
41016
41017RPOPPF
41018
41019Name:
41020    RPOPPF (LET)
41021
41022Type:
41023    Library Function
41024
41025Purpose:
41026    Compute the reflected power percent point function
41027    with shape parameter c.
41028
41029Description:
41030    The standard reflected power distribution has the
41031    following percent point function:
41032
41033       G(p;c) = 1 - (1-p)**(1/c)
41034                0 <= p <= 1, c > 0
41035
41036    with c denoting the shape parameter.
41037
41038    This distribution can be extended with lower and upper
41039    bound parameters.  If a and b denote the lower and upper
41040    bounds, respectively, then the location and scale
41041    parameters are:
41042
41043        location = a
41044        scale    = b - a
41045
41046    The general form of the distribution can then be found
41047    by using the relation
41048
41049        G(p;c,a,b) = a + (b-a)*G(p;c,0,1)
41050
41051    The reflected power distribution is a special case of the
41052    beta distribution where the first shape parameter = 1
41053    (the power distribution is a special case of beta
41054    distribution where the second shape parameter = 1).
41055
41056Syntax:
41057    LET <y> = RPOPPF(<p>,<c>,<a>,<b>)
41058              <SUBSET/EXCEPT/FOR qualification>
41059    where <p> is a number, parameter, or variable containing
41060              values in the interval (0,1);
41061          <y> is a variable or a parameter (depending on what
41062              <p> is) where the computed reflected power ppf value
41063              is stored;
41064          <c> is a positive number, parameter, or variable that
41065              specifies the shape parameter;
41066          <a> is a number, parameter, or variable that
41067              specifies the lower limit;
41068          <b> is a number, parameter, or variable that
41069              specifies the upper limit;
41070    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
41071
41072    If <a> and <b> are omitted, they default to 0 and 1,
41073    respectively.
41074
41075Examples:
41076    LET A = RPOPPF(0.95,0.2)
41077    LET Y = RPOPPF(X,0.5,0,5)
41078    PLOT RPOPPF(X,2.3) FOR X = 0  0.01  1
41079
41080Note:
41081    Library functions are distinguished from let subcommands
41082    in the following ways.
41083    1) Functions enclose the input value in parenthesis.  Let
41084       subcommands use spaces.
41085    2) Functions can accept (and return) either parameters
41086       (i.e., single values) or variables (i.e., an array of
41087       values) while let subcommands are specific in which they
41088       accept as input and what they return as output.
41089    3) Functions can accept expressions while let subcommands
41090       do not.  For example, the following is legal:
41091           LET Y2 = ABS(Y1-INT(Y1))
41092       For let subcommands, you typically have to do something
41093       like the following:
41094           LET YTEMP = Y**2 + 8
41095           LET A = SUM YTEMP
41096
41097Default:
41098    None
41099
41100Synonyms:
41101    None
41102
41103Related Commands:
41104    RPOPDF  = Compute the reflected power probability density
41105              function.
41106    RPOCDF  = Compute the reflected power cumulative distribution
41107              function.
41108    RPOHAZ  = Compute the reflected power hazard function.
41109    RPOCHAZ = Compute the reflected power cumulative hazard
41110              function.
41111    POWPDF  = Compute the power probability density function.
41112    BETPDF  = Compute the beta probability density function.
41113    TOPPDF  = Compute the Topp and Leone probability density
41114              function.
41115    RGTPDF  = Compute the generalized reflected Topp and Leone
41116              probability density function.
41117    GTLPDF  = Compute the generalized Topp and Leone probability
41118              density function.
41119    TSPPDF  = Compute the two-sided power probability density
41120              function.
41121    TRIPDF  = Compute the triangular probability density function.
41122    TRAPDF  = Compute the trapezoid probability density function.
41123    UNIPDF  = Compute the uniform probability density function.
41124    JSBPDF  = Compute the Johnson SB probability density function.
41125
41126Reference:
41127    Samuel Kotz and J. Rene Van Dorp 2004, "Beyond Beta:
41128    Other Continuous Families of Distributions with Bounded
41129    Support and Applications", World Scientific, pp. 199-201.
41130
41131Applications:
41132    Distributional Modeling
41133
41134Implementation Date:
41135    2007/12
41136
41137Program:
41138    LABEL CASE ASIS
41139    TITLE CASE ASIS
41140    TITLE OFFSET 2
41141    .
41142    MULTIPLOT 2 2
41143    MULTIPLOT CORNER COORDINATES 0 0 100 95
41144    MULTIPLOT SCALE FACTOR
41145    .
41146    LET C  = 0.5
41147    TITLE C = ^c
41148    PLOT RPOPPF(P,C) FOR P = 0.01  0.01  1
41149    .
41150    LET C  = 1
41151    TITLE C = ^c
41152    PLOT RPOPPF(P,C) FOR P = 0  0.01  1
41153    .
41154    LET C  = 1.5
41155    TITLE C = ^c
41156    PLOT RPOPPF(P,C) FOR P = 0  0.01  1
41157    .
41158    LET C  = 2
41159    TITLE C = ^c
41160    PLOT RPOPPF(P,C) FOR P = 0  0.01  1
41161    .
41162    END OF MULTIPLOT
41163    .
41164    JUSTIFICATION CENTER
41165    MOVE 50 97
41166    TEXT Reflected Power Percent Point Functions
41167
41168-----RSCRIPT-------------------------------------------------------
41169
41170RSCRIPT
41171
41172Name:
41173    RSCRIPT
41174
41175Type:
41176    Support Command
41177
41178Purpose:
41179    Run an R script within a Dataplot session.
41180
41181Description:
41182    It may on occassion be useful to run an R script within a Dataplot
41183    session.  Note that Dataplot assumes that R is already installed on
41184    your local system.  Also, any R packages that your script needs should
41185    already be installed.  Dataplot does not initiate an install of R if
41186    it not already installed.
41187
41188    If R is not installed on your default path, you can specify it
41189    using the SET R PATH command.  For example, the following can
41190    be used for version 3.6.1 under Windows
41191
41192       set r path "c:\program files\r\r-3.6.1\bin\"
41193
41194    On Linux systems, R is typically installed in "/usr/bin" which is in
41195    the default path on most systems.  So for Linux systems, the
41196    SET R PATH command is typically not required.  However, if R is not
41197    in the default path, you can use the SET R PATH command.
41198
41199    On Windows platforms, the RSCRIPT command is equivalent to entering
41200
41201        set system persist off
41202        set system hidden on
41203        system <r-path>\rscript.exe <r-script-file>  <arg-list>
41204
41205    Note that if either the R path or the <r-script-file> contains
41206    spaces (and so will be quoted), then "set system hidden" will be
41207    set to "off".
41208
41209    On Linux platforms, the RSCRIPT command is equivalent to entering
41210
41211        system <r-path>/Rscript  <r-script-file>  <arg-list>
41212
41213    Rscript is a binary front end to R for scripting with R.
41214
41215Syntax:
41216    RSCRIPT <script-file> <arg-list>
41217    where <script-file> contains the name of a file containing an
41218              R script;
41219    and where <arg-list> is an optional list of arguments to the script.
41220
41221Examples:
41222    RSCRIPT  plot.R
41223
41224Note:
41225    This command is host dependent.  It has been tested on Windows
41226    and Linux systems.  Note that the SYSTEM command must be activated
41227    for this command to work.
41228
41229Note:
41230    Dataplot does no error checking on the specified script file.  It
41231    is passed as is to the Rscript (RSCRIPT.EXE) command.
41232
41233Note:
41234    The CAPTURE SCRIPT command can be used to generate the R script
41235    within a Dataplot macro.  This is demonstrated in the Program
41236    example below.
41237
41238Note:
41239    The name of the script file is case sensitive on Linux and MacOS
41240    systems.  It is not case sensitive on Windows systems.
41241
41242    If Dataplot does not find the R script file, it will search for
41243    it in the "scripts" sub-directory in the Dataplot auxiliary
41244    directory.  Currently (2019/12), there are no R scripts in that
41245    directory, although this may change in future releases of Dataplot.
41246
41247Note:
41248    Dataplot does not support R as a synonym for RSCRIPT.  This is
41249    due to the fact that R has long been used as a synonym for the
41250    REPEAT command.
41251
41252Default:
41253    None
41254
41255Synonyms:
41256    None
41257
41258Related Commands:
41259    SYSTEM          = Issue an operating system command within Dataplot.
41260    PYTHON          = Run a Python script within Dataplot.
41261    CAPTURE SCRIPT  = Create a script file within Dataplot.
41262    PSVIEW          = View Postscript, PDF and image files.
41263    LIST            = View the contents of a file.
41264
41265Applications:
41266    Run R scripts
41267
41268Implementation Date:
41269    2019/12
41270
41271Program:
41272    . Step 1: Create the R script using "capture script"
41273    .
41274    rm rout.txt  rout.pdf  r_test.r
41275    .
41276    capture script r_test.r
41277    # This is R program file     r_test.r     11/4/19
41278    # Purpose: Generate a sequence, square it, and plot it
41279    # Date: 11/4/19
41280    #
41281    # -----start point-----
41282    #
41283    x=seq(1,20,length.out=20)
41284    y=x^2
41285    both=c(x,y)
41286
41287    sink("rout.txt")
41288       both
41289    sink()
41290
41291    pdf("rout.pdf")
41292    plot(x,y)
41293    dev.off()
41294    end of capture
41295    .
41296    list r_test.r
41297    .
41298    . Step 2:   Determine if running on Windows or Linux and set R path
41299    .
41300    let computer = 1
41301    probe iopsy1
41302    if probeval = 1
41303       let computer = 2
41304    end of if
41305    .
41306    .           May need to tweak path for R based on version and
41307    .           optionally set desired Postscript viewer
41308    .
41309    if computer = 1
41310       set r path "c:\program files\r\r-3.6.1\bin\"
41311    end of if
41312    .
41313    . Step 3:   Run the R script
41314    .
41315    rscript  r_test.r
41316    .
41317    . Step 4:   Display the outputs in Dataplot
41318    .
41319    list rout.txt
41320    .
41321    psview rout.pdf
41322
41323-----RUKHIN 1 TEST (LET)--------------------------
41324
41325RUKHIN 1 TEST
41326
41327Name:
41328    RUKHIN 1 TEST (LET)
41329
41330Type:
41331    Let Subcommand
41332
41333Purpose:
41334    For three binomial proportions, compute the p-value and lower and
41335    upper confidence limits for
41336
41337        H0: p1 = p2*p3
41338
41339    where p1, p2, and p3 are the four binomial proportions.
41340
41341Description:
41342    For each of the binomial proportions, we actually use the
41343    correction terms
41344
41345        p(i) = (x(i) + 0.5)/(n(i) + 1)
41346
41347    with p(i), x(i), and n(i) denoting the binomial proportion,
41348    the number of successes and the number of trials for the i-th
41349    binomial proportion.
41350
41351    The computed test statistic is
41352
41353        p1 - p2*p3
41354
41355    and the associated standard error is
41356
41357        SE = SQRT(term1 + term2 + term3)
41358
41359    where
41360
41361        term1 = p1*(1 - p1)/n1
41362        term2 = (p3**2)*p2*(1 - p2)/n2
41363        term3 = (p2**2)*p3*(1 - p3)/n3
41364
41365    The p-value for a lower tailed test is
41366
41367        1 - NORCDF((p2*p3 - p1)/SE)
41368
41369    The p-value for an upper tailed test is
41370
41371        1 - NORCDF((p1 - p2*p3)/SE)
41372
41373    The p-value for a two tailed test is
41374
41375        2*(1 - NORCDF((p1 - p2*p3)/SE)
41376
41377    The confidence interval is
41378
41379        (p1 - p2*p3) +/- NORPPF(ALPHA/2)*SE
41380
41381    Although this is a fairly specialized test, it does have
41382    applicability in the following test scenario.  Suppose we are
41383    testing scanning devices to see if they can detect certain
41384    radionuclides.  Further suppose that in one case we have a "primary"
41385    screening device and then a "secondary" screening device.  For
41386    example, the "primary" device may be an alarm which then sends the
41387    object to a more accurate (but more costly or more time consuming)
41388    device to perform an id.  In this case, the binomial success for the
41389    primary device is that it alarms when the radionuclide is present and
41390    the binomial success for the secondary device is that it returns the
41391    correct id.  The RUKHIN 1 test could then be used to compare the
41392    performance of the primary/secondary device relative to using the
41393    secondary device only.  In this testing scenario, it is common for
41394    the primary device to be "moving" while the secondary device is
41395    typically "stationary".  So the more accurate device may not
41396    perform as well when it is used as a primary device relative to
41397    its use as a secondary device.
41398
41399Syntax 1:
41400    LET <pval> <lowlim> <upplim> = RUKHIN 1 TEST
41401               <p1> <n1> <p2> <n2> <p3> <n3> <alpha>
41402               <SUBSET/EXCEPT/FOR qualification>
41403    where <p1> is constant, parameter, or variable that contains the
41404              proportion of successes for the first sample;
41405          <n1> is constant, parameter, or variable that contains the
41406              number of trials for the first sample;
41407          <p2> is constant, parameter, or variable that contains the
41408              proportion of successes for the second sample;
41409          <n2> is constant, parameter, or variable that contains the
41410              number of trials for the second sample;
41411          <p3> is constant, parameter, or variable that contains the
41412              proportion of successes for the third sample;
41413          <n3> is constant, parameter, or variable that contains the
41414              number of trials for the third sample;
41415          <alpha> is constant or parameter that contains the significance
41416              level;
41417          <pval> contains the returned p-value;
41418          <lowlim> contains the computed lower confidence limit;
41419          <upplim> contains the computed upper confidence limit;
41420    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
41421
41422    This syntax performs a two-tailed hypothesis test.
41423
41424    The <p1>, <n1>, <p2>, <n2>, <p3>, and <n3> arguments can be either
41425    parameters or variables.  If they are variables, then the variables
41426    must have the same number of elements.  The <alpha> argument is
41427    always assumed to be either a constant or a parameter.
41428
41429    If the arguments are all parameters, then <pval>, <lowlim> and
41430    <upplim> will be parameters.  Otherwise, they will be variables.
41431
41432Syntax 2:
41433    LET <pval> <lowlim> <upplim> = RUKHIN 1 LOWER TAIL TEST
41434               <p1> <n1> <p2> <n2> <p3> <n3> <alpha>
41435               <SUBSET/EXCEPT/FOR qualification>
41436    where <p1> is constant, parameter, or variable that contains the
41437              proportion of successes for the first sample;
41438          <n1> is constant, parameter, or variable that contains the
41439              number of trials for the first sample;
41440          <p2> is constant, parameter, or variable that contains the
41441              proportion of successes for the second sample;
41442          <n2> is constant, parameter, or variable that contains the
41443              number of trials for the second sample;
41444          <p3> is constant, parameter, or variable that contains the
41445              proportion of successes for the third sample;
41446          <n3> is constant, parameter, or variable that contains the
41447              number of trials for the third sample;
41448          <alpha> is constant or parameter that contains the significance
41449              level;
41450          <pval> contains the returned p-value;
41451          <lowlim> contains the computed lower confidence limit;
41452          <upplim> contains the computed upper confidence limit;
41453    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
41454
41455    This syntax performs a lower-tailed hypothesis test.  However,
41456    the confidence limits correspond to the two-tailed test.
41457
41458    The <p1>, <n1>, <p2>, <n2>, <p3>, and <n3> arguments can be either
41459    parameters or variables.  If they are variables, then the variables
41460    must have the same number of elements.  The <alpha> argument is
41461    always assumed to be either a constant or a parameter.
41462
41463    If the arguments are all parameters, then <pval>, <lowlim> and
41464    <upplim> will be parameters.  Otherwise, they will be variables.
41465
41466Syntax 3:
41467    LET <pval> <lowlim> <upplim> = RUKHIN 1 UPPER TAIL TEST
41468               <p1> <n1> <p2> <n2> <p3> <n3> <alpha>
41469               <SUBSET/EXCEPT/FOR qualification>
41470    where <p1> is constant, parameter, or variable that contains the
41471              proportion of successes for the first sample;
41472          <n1> is constant, parameter, or variable that contains the
41473              number of trials for the first sample;
41474          <p2> is constant, parameter, or variable that contains the
41475              proportion of successes for the second sample;
41476          <n2> is constant, parameter, or variable that contains the
41477              number of trials for the second sample;
41478          <p3> is constant, parameter, or variable that contains the
41479              proportion of successes for the third sample;
41480          <n3> is constant, parameter, or variable that contains the
41481              number of trials for the third sample;
41482          <alpha> is constant or parameter that contains the significance
41483              level;
41484          <pval> contains the returned p-value;
41485          <lowlim> contains the computed lower confidence limit;
41486          <upplim> contains the computed upper confidence limit;
41487    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
41488
41489    This syntax performs an upper-tailed hypothesis test.  However,
41490    the confidence limits correspond to the two-tailed test.
41491
41492    The <p1>, <n1>, <p2>, <n2>, <p3>, and <n3> arguments can be either
41493    parameters or variables.  If they are variables, then the variables
41494    must have the same number of elements.  The <alpha> argument is
41495    always assumed to be either a constant or a parameter.
41496
41497    If the arguments are all parameters, then <pval>, <lowlim> and
41498    <upplim> will be parameters.  Otherwise, they will be variables.
41499
41500Examples:
41501    LET PVAL AL AU = RUKHIN 1 TEST P1 N1 P2 N2 P3 N3 ALPHA
41502    LET PVAL AL AU = RUKHIN 1 LOWER TAILED TEST P1 N1 P2 N2 P3 N3 ALPHA
41503    LET PVAL AL AU = RUKHIN 1 UPPER TAILED TEST P1 N1 P2 N2 P3 N3 ALPHA
41504
41505Default:
41506    None
41507
41508Synonyms:
41509    None
41510
41511Related Commands:
41512    RUKHIN 3 TEST                   = Test binomial proportions
41513                                      p1*p2 = p3*p4.
41514    RUKHIN 2 TEST                   = Test binomial proportions
41515                                      p1 = 0.5*p2.
41516    BINOMIAL RATIO CONF LIMITS      = Compute confidence limits for
41517                                      the ratio of two binomial
41518                                      proportions.
41519    BINOMIAL PRODUCT CONF LIMITS    = Compute confidence limits for
41520                                      the product of two binomial
41521                                      proportions.
41522    AGRESTI-COULL CONF LIMITS       = Compute the Agresti-Coull confidence
41523                                      limits for binomial proportions.
41524    EXACT BINOMIAL CONF LIMITS      = Compute the exact binomial confidence
41525                                      limits for binomial proportions.
41526    DIFFERENCE OF PROP CONF LIMITS  = Compute the confidence limtis for
41527                                      the difference of two binomial
41528                                      proportions.
41529    BINOMIAL PROPORTION             = Compute the binomial proportion
41530                                      statistic.
41531    AGRESTI-COULL                   = Compute Agresti-Coull confidence
41532                                      limits statistic for binomial
41533                                      proportions.
41534    BINOMIAL PROPORTION TEST        = Perform a binomial proportions test.
41535    CROSS TABULATE (LET)            = Perform a cross tabulation for a
41536                                      specified statistic.
41537
41538Reference:
41539    Private communication with Andrew Rukhin and Bill Strawderman.
41540
41541Applications:
41542    Statistics
41543
41544Implementation Date:
41545    2008/09
41546
41547Program:
41548    LET P1 = 0.8
41549    LET N2 = 40
41550    LET P2 = 0.95
41551    LET N2 = 40
41552    LET P3 = 0.6
41553    LET N3 = 40
41554    LET ALPHA = 0.90
41555    .
41556    LET PVAL AL AU = RUKHIN 1 TEST P1 N1 P2 N2 P3 N3 ALPHA
41557
41558-----RUKHIN 2 TEST (LET)--------------------------
41559
41560RUKHIN 2 TEST
41561
41562Name:
41563    RUKHIN 2 TEST (LET)
41564
41565Type:
41566    Let Subcommand
41567
41568Purpose:
41569    For two binomial proportions, compute the p-value and lower and
41570    upper confidence limits for
41571
41572        H0: p1 = 0.5*p2
41573
41574    where p1 and p2 are the two binomial proportions.
41575
41576Description:
41577    For each of the binomial proportions, we actually use the
41578    correction terms
41579
41580        p(i) = (x(i) + 0.5)/(n(i) + 1)
41581
41582    with p(i), x(i), and n(i) denoting the binomial proportion,
41583    the number of successes and the number of trials for the i-th
41584    binomial proportion.
41585
41586    The computed test statistic is
41587
41588        p1 - 0.5*p2
41589
41590    and the associated standard error is
41591
41592        SE = SQRT(term1 + term2)
41593
41594    where
41595
41596        term1 = p1*(1 - p1)/n1
41597        term2 = p2*(1 - p2)/(4*n2)
41598
41599    The p-value for a lower tailed test is
41600
41601        1 - NORCDF((0.5*p2 - p1)/SE)
41602
41603    The p-value for an upper tailed test is
41604
41605        1 - NORCDF((p1 - 0.5*p2)/SE)
41606
41607    The p-value for a two tailed test is
41608
41609        2*(1 - NORCDF((p1 - 0.5*p2)/SE)
41610
41611    The confidence interval is
41612
41613        (p1 - 0.5*p2) +/- NORPPF(ALPHA/2)*SE
41614
41615Syntax 1:
41616    LET <pval> <lowlim> <upplim> = RUKHIN 2 TEST
41617               <p1> <n1> <p2> <n2> <alpha>
41618               <SUBSET/EXCEPT/FOR qualification>
41619    where <p1> is constant, parameter, or variable that contains the
41620              proportion of successes for the first sample;
41621          <n1> is constant, parameter, or variable that contains the
41622              number of trials for the first sample;
41623          <p2> is constant, parameter, or variable that contains the
41624              proportion of successes for the second sample;
41625          <n2> is constant, parameter, or variable that contains the
41626              number of trials for the second sample;
41627          <alpha> is constant or parameter that contains the significance
41628              level;
41629          <pval> contains the returned p-value;
41630          <lowlim> contains the computed lower confidence limit;
41631          <upplim> contains the computed upper confidence limit;
41632    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
41633
41634    This syntax performs a two-tailed hypothesis test.
41635
41636    The <p1>, <n1>, <p2>, and <n2> arguments can be either parameters
41637    or variables.  If they are variables, then the variables must have
41638    the same number of elements.  The <alpha> argument is always assumed
41639    to be either a constant or a parameter.
41640
41641    If the arguments are all parameters, then <pval>, <lowlim> and
41642    <upplim> will be parameters.  Otherwise, they will be variables.
41643
41644Syntax 2:
41645    LET <pval> <lowlim> <upplim> = RUKHIN 2 LOWER TAIL TEST
41646               <p1> <n1> <p2> <n2> <alpha>
41647               <SUBSET/EXCEPT/FOR qualification>
41648    where <p1> is constant, parameter, or variable that contains the
41649              proportion of successes for the first sample;
41650          <n1> is constant, parameter, or variable that contains the
41651              number of trials for the first sample;
41652          <p2> is constant, parameter, or variable that contains the
41653              proportion of successes for the second sample;
41654          <n2> is constant, parameter, or variable that contains the
41655              number of trials for the second sample;
41656          <alpha> is constant or parameter that contains the significance
41657              level;
41658          <pval> contains the returned p-value;
41659          <lowlim> contains the computed lower confidence limit;
41660          <upplim> contains the computed upper confidence limit;
41661    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
41662
41663    This syntax performs a lower-tailed hypothesis test.  However,
41664    the confidence limits correspond to the two-tailed test.
41665
41666    The <p1>, <n1>, <p2>, and <n2> arguments can be either parameters
41667    or variables.  If they are variables, then the variables must have
41668    the same number of elements.  The <alpha> argument is always assumed
41669    to be either a constant or a parameter.
41670
41671    If the arguments are all parameters, then <pval>, <lowlim> and
41672    <upplim> will be parameters.  Otherwise, they will be variables.
41673
41674Syntax 3:
41675    LET <pval> <lowlim> <upplim> = RUKHIN 2 UPPER TAIL TEST
41676               <p1> <n1> <p2> <n2> <alpha>
41677               <SUBSET/EXCEPT/FOR qualification>
41678    where <p1> is constant, parameter, or variable that contains the
41679              proportion of successes for the first sample;
41680          <n1> is constant, parameter, or variable that contains the
41681              number of trials for the first sample;
41682          <p2> is constant, parameter, or variable that contains the
41683              proportion of successes for the second sample;
41684          <n2> is constant, parameter, or variable that contains the
41685              number of trials for the second sample;
41686          <alpha> is constant or parameter that contains the significance
41687              level;
41688          <pval> contains the returned p-value;
41689          <lowlim> contains the computed lower confidence limit;
41690          <upplim> contains the computed upper confidence limit;
41691    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
41692
41693    This syntax performs an upper-tailed hypothesis test.  However,
41694    the confidence limits correspond to the two-tailed test.
41695
41696    The <p1>, <n1>, <p2>, and <n2> arguments can be either parameters
41697    or variables.  If they are variables, then the variables must have
41698    the same number of elements.  The <alpha> argument is always assumed
41699    to be either a constant or a parameter.
41700
41701    If the arguments are all parameters, then <pval>, <lowlim> and
41702    <upplim> will be parameters.  Otherwise, they will be variables.
41703
41704Examples:
41705    LET PVAL AL AU = RUKHIN 2 TEST P1 N1 P2 N2 ALPHA
41706    LET PVAL AL AU = RUKHIN 2 LOWER TAILED TEST P1 N1 P2 N2 ALPHA
41707    LET PVAL AL AU = RUKHIN 2 UPPER TAILED TEST P1 N1 P2 N2 ALPHA
41708
41709Default:
41710    None
41711
41712Synonyms:
41713    None
41714
41715Related Commands:
41716    RUKHIN 1 TEST                   = Test binomial proportions
41717                                      p1 = p2*p3.
41718    RUKHIN 3 TEST                   = Test binomial proportions
41719                                      p1*p2 = p3*p4.
41720    BINOMIAL RATIO CONF LIMITS      = Compute confidence limits for
41721                                      the ratio of two binomial
41722                                      proportions.
41723    BINOMIAL PRODUCT CONF LIMITS    = Compute confidence limits for
41724                                      the product of two binomial
41725                                      proportions.
41726    AGRESTI-COULL CONF LIMITS       = Compute the Agresti-Coull confidence
41727                                      limits for binomial proportions.
41728    EXACT BINOMIAL CONF LIMITS      = Compute the exact binomial confidence
41729                                      limits for binomial proportions.
41730    DIFFERENCE OF PROP CONF LIMITS  = Compute the confidence limtis for
41731                                      the difference of two binomial
41732                                      proportions.
41733    BINOMIAL PROPORTION             = Compute the binomial proportion
41734                                      statistic.
41735    AGRESTI-COULL                   = Compute Agresti-Coull confidence
41736                                      limits statistic for binomial
41737                                      proportions.
41738    BINOMIAL PROPORTION TEST        = Perform a binomial proportions test.
41739    CROSS TABULATE (LET)            = Perform a cross tabulation for a
41740                                      specified statistic.
41741
41742Reference:
41743    Private communication with Andrew Rukhin and Bill Strawderman.
41744
41745Applications:
41746    Statistics
41747
41748Implementation Date:
41749    2008/09
41750
41751Program:
41752    LET P1 = 0.9
41753    LET N2 = 40
41754    LET P2 = 0.6
41755    LET N2 = 40
41756    LET ALPHA = 0.90
41757    .
41758    LET PVAL AL AU = RUKHIN 2 TEST P1 N1 P2 N2 ALPHA
41759
41760-----RUKHIN 3 TEST (LET)--------------------------
41761
41762RUKHIN 3 TEST
41763
41764Name:
41765    RUKHIN 3 TEST (LET)
41766
41767Type:
41768    Let Subcommand
41769
41770Purpose:
41771    For four binomial proportions, compute the p-value and lower and
41772    upper confidence limits for
41773
41774        H0: p1*p2 = p3*p4
41775
41776    where p1, p2, p3, and p4 are the four binomial proportions.
41777
41778Description:
41779    For each of the binomial proportions, we actually use the
41780    correction terms
41781
41782        p(i) = (x(i) + 0.5)/(n(i) + 1)
41783
41784    with p(i), x(i), and n(i) denoting the binomial proportion,
41785    the number of successes and the number of trials for the i-th
41786    binomial proportion.
41787
41788    The computed test statistic is
41789
41790        p1*p2 - p3*p4
41791
41792    and the associated standard error is
41793
41794        SE = SQRT(term1 + term2 + term3 + term4)
41795
41796    where
41797
41798        term1 = (p2**2)*p1*(1 - p1)/n1
41799        term2 = (p1**2)*p2*(1 - p2)/n2
41800        term3 = (p4**2)*p3*(1 - p3)/n3
41801        term4 = (p3**2)*p4*(1 - p4)/n4
41802
41803    The p-value for a lower tailed test is
41804
41805        1 - NORCDF((p3*p4 - p1*p2)/SE)
41806
41807    The p-value for an upper tailed test is
41808
41809        1 - NORCDF((p1*p2 - p3*p4)/SE)
41810
41811    The p-value for a two tailed test is
41812
41813        2*(1 - NORCDF((p3*p4 - p1*p2)/SE)
41814
41815    The confidence interval is
41816
41817        (p1*p2 - p3*p4) +/- NORPPF(ALPHA/2)*SE
41818
41819    Although this is a fairly specialized test, it does have
41820    applicability in the following test scenario.  Suppose we are
41821    testing scanning devices to see if they can detect certain
41822    radionuclides.  Further suppose we have a "primary" screening
41823    device and then a "secondary" screening device.  For example, the
41824    "primary" device may be an alarm which then sends the object to a
41825    more accurate (but more costly or more time consuming) device to
41826    perform an id.  In this case, the binomial success for the primary
41827    device is that it alarms when the radionuclide is present and the
41828    binomial success for the secondary device is that it returns the
41829    correct id.  The RUKHIN 3 test could then be used to compare the
41830    performance of two different sets of primary/secondary devices.
41831
41832Syntax 1:
41833    LET <pval> <lowlim> <upplim> = RUKHIN 3 TEST
41834               <p1> <n1> <p2> <n2> <p3> <n3> <p4> <n4> <alpha>
41835               <SUBSET/EXCEPT/FOR qualification>
41836    where <p1> is constant, parameter, or variable that contains the
41837              proportion of successes for the first sample;
41838          <n1> is constant, parameter, or variable that contains the
41839              number of trials for the first sample;
41840          <p2> is constant, parameter, or variable that contains the
41841              proportion of successes for the second sample;
41842          <n2> is constant, parameter, or variable that contains the
41843              number of trials for the second sample;
41844          <p3> is constant, parameter, or variable that contains the
41845              proportion of successes for the third sample;
41846          <n3> is constant, parameter, or variable that contains the
41847              number of trials for the third sample;
41848          <p4> is constant, parameter, or variable that contains the
41849              proportion of successes for the fourth sample;
41850          <n4> is constant, parameter, or variable that contains the
41851              number of trials for the fourth sample;
41852          <alpha> is constant or parameter that contains the significance
41853              level;
41854          <pval> contains the returned p-value;
41855          <lowlim> contains the computed lower confidence limit;
41856          <upplim> contains the computed upper confidence limit;
41857    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
41858
41859    This syntax performs a two-tailed hypothesis test.
41860
41861    The <p1>, <n1>, <p2>, <n2>, <p3>, <n3>, <p4> and <n4> arguments
41862    can be either parameters or variables.  If they are variables, then
41863    the variables must have the same number of elements.  The <alpha>
41864    argument is always assumed to be either a constant or a parameter.
41865
41866    If the arguments are all parameters, then <pval>, <lowlim> and
41867    <upplim> will be parameters.  Otherwise, they will be variables.
41868
41869Syntax 2:
41870    LET <pval> <lowlim> <upplim> = RUKHIN 3 LOWER TAIL TEST
41871               <p1> <n1> <p2> <n2> <p3> <n3> <p4> <n4> <alpha>
41872               <SUBSET/EXCEPT/FOR qualification>
41873    where <p1> is constant, parameter, or variable that contains the
41874              proportion of successes for the first sample;
41875          <n1> is constant, parameter, or variable that contains the
41876              number of trials for the first sample;
41877          <p2> is constant, parameter, or variable that contains the
41878              proportion of successes for the second sample;
41879          <n2> is constant, parameter, or variable that contains the
41880              number of trials for the second sample;
41881          <p3> is constant, parameter, or variable that contains the
41882              proportion of successes for the third sample;
41883          <n3> is constant, parameter, or variable that contains the
41884              number of trials for the third sample;
41885          <p4> is constant, parameter, or variable that contains the
41886              proportion of successes for the fourth sample;
41887          <n4> is constant, parameter, or variable that contains the
41888              number of trials for the fourth sample;
41889          <alpha> is constant or parameter that contains the significance
41890              level;
41891          <pval> contains the returned p-value;
41892          <lowlim> contains the computed lower confidence limit;
41893          <upplim> contains the computed upper confidence limit;
41894    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
41895
41896    This syntax performs a lower-tailed hypothesis test.  However,
41897    the confidence limits correspond to the two-tailed test.
41898
41899    The <p1>, <n1>, <p2>, <n2>, <p3>, <n3>, <p4> and <n4> arguments
41900    can be either parameters or variables.  If they are variables, then
41901    the variables must have the same number of elements.  The <alpha>
41902    argument is always assumed to be either a constant or a parameter.
41903
41904    If the arguments are all parameters, then <pval>, <lowlim> and
41905    <upplim> will be parameters.  Otherwise, they will be variables.
41906
41907Syntax 3:
41908    LET <pval> <lowlim> <upplim> = RUKHIN 3 UPPER TAIL TEST
41909               <p1> <n1> <p2> <n2> <p3> <n3> <p4> <n4> <alpha>
41910               <SUBSET/EXCEPT/FOR qualification>
41911    where <p1> is constant, parameter, or variable that contains the
41912              proportion of successes for the first sample;
41913          <n1> is constant, parameter, or variable that contains the
41914              number of trials for the first sample;
41915          <p2> is constant, parameter, or variable that contains the
41916              proportion of successes for the second sample;
41917          <n2> is constant, parameter, or variable that contains the
41918              number of trials for the second sample;
41919          <p3> is constant, parameter, or variable that contains the
41920              proportion of successes for the third sample;
41921          <n3> is constant, parameter, or variable that contains the
41922              number of trials for the third sample;
41923          <p4> is constant, parameter, or variable that contains the
41924              proportion of successes for the fourth sample;
41925          <n4> is constant, parameter, or variable that contains the
41926              number of trials for the fourth sample;
41927          <alpha> is constant or parameter that contains the significance
41928              level;
41929          <pval> contains the returned p-value;
41930          <lowlim> contains the computed lower confidence limit;
41931          <upplim> contains the computed upper confidence limit;
41932    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
41933
41934    This syntax performs an upper-tailed hypothesis test.  However,
41935    the confidence limits correspond to the two-tailed test.
41936
41937    The <p1>, <n1>, <p2>, <n2>, <p3>, <n3>, <p4> and <n4> arguments
41938    can be either parameters or variables.  If they are variables, then
41939    the variables must have the same number of elements.  The <alpha>
41940    argument is always assumed to be either a constant or a parameter.
41941
41942    If the arguments are all parameters, then <pval>, <lowlim> and
41943    <upplim> will be parameters.  Otherwise, they will be variables.
41944
41945Examples:
41946    LET PVAL AL AU = RUKHIN 3 TEST P1 N1 P2 N2 P3 N3 P4 N4 ALPHA
41947    LET PVAL AL AU = RUKHIN 3 LOWER TAILED TEST ...
41948                     P1 N1 P2 N2 P3 N3 P4 N4 ALPHA
41949    LET PVAL AL AU = RUKHIN 3 UPPER TAILED TEST ...
41950                     P1 N1 P2 N2 P3 N3 P4 N4 ALPHA
41951
41952Default:
41953    None
41954
41955Synonyms:
41956    None
41957
41958Related Commands:
41959    RUKHIN 1 TEST                   = Test binomial proportions
41960                                      p1 = p2*p3.
41961    RUKHIN 2 TEST                   = Test binomial proportions
41962                                      p1 = 0.5*p2.
41963    BINOMIAL RATIO CONF LIMITS      = Compute confidence limits for
41964                                      the ratio of two binomial
41965                                      proportions.
41966    BINOMIAL PRODUCT CONF LIMITS    = Compute confidence limits for
41967                                      the product of two binomial
41968                                      proportions.
41969    AGRESTI-COULL CONF LIMITS       = Compute the Agresti-Coull confidence
41970                                      limits for binomial proportions.
41971    EXACT BINOMIAL CONF LIMITS      = Compute the exact binomial confidence
41972                                      limits for binomial proportions.
41973    DIFFERENCE OF PROP CONF LIMITS  = Compute the confidence limtis for
41974                                      the difference of two binomial
41975                                      proportions.
41976    BINOMIAL PROPORTION             = Compute the binomial proportion
41977                                      statistic.
41978    AGRESTI-COULL                   = Compute Agresti-Coull confidence
41979                                      limits statistic for binomial
41980                                      proportions.
41981    BINOMIAL PROPORTION TEST        = Perform a binomial proportions test.
41982    CROSS TABULATE (LET)            = Perform a cross tabulation for a
41983                                      specified statistic.
41984
41985Reference:
41986    Private communication with Andrew Rukhin and Bill Strawderman.
41987
41988Applications:
41989    Statistics
41990
41991Implementation Date:
41992    2010/06
41993
41994Program:
41995    LET P1 = 0.95
41996    LET N1 = 40
41997    LET P2 = 0.8
41998    LET N2 = 40
41999    LET P3 = 0.95
42000    LET N3 = 40
42001    LET P4 = 0.6
42002    LET N4 = 40
42003    LET ALPHA = 0.90
42004    .
42005    LET PVAL AL AU = RUKHIN 3 TEST P1 N1 P2 N2 P3 N3 P4 N4 ALPHA
42006
42007-----RUNGE KUTTA (LET)-------------------------------------------------
42008
42009RUNGE KUTTA
42010
42011Name:
42012    RUNGE KUTTA (LET)
42013
42014Type:
42015    Let Subcommand
42016
42017Purpose:
42018    Solve first and second order initial value ordinary differential
42019    equations via Runge Kutta methods.
42020
42021Description:
42022    Differential equations are those which involve a relation between
42023    derivatives.  For example, the equation
42024       y = x**2
42025    can be expressed as the differential equation
42026       dy/dx = 2x
42027    In this case, instead of giving a value of y for each value of x,
42028    the differential equation gives the slope at each value of x.
42029
42030    The following should be noted:
42031    1) The term ordinary refers to the fact that only ordinary
42032       derivatives are involved (that is, no partial derivatives).
42033       DATAPLOT does not currently support any methods for solving
42034       partial differential equations.
42035    2) The dependent variable is the variable being differentiated and
42036       the independent variable is the variable with respect to which
42037       the differentiations are taken.  In the example dy/dx = 2x, x is
42038       the independent variable and y is the dependent variable.
42039    3) The order is the order of the highest derivative.  Currently,
42040       the RUNGE KUTTA command is limited to first and second order
42041       differential equations.  First order differential equations are
42042       often expressed as:
42043           dy/dx = F(x,y)
42044       while second order differential equations are often expressed as:
42045           d**2y/dx = G(x, y, dy/dx)
42046       Higher order differential equations can be expressed in a similar
42047       manner.
42048    4) The degree is the power to which the highest order derivative is
42049       raised.  The RUNGE KUTTA command only deals with first degree
42050       differential equations.
42051    5) An analytic solution is an equation of the form
42052           y = F(x)
42053       which results in the original differential equation when it is
42054       differentiated.  Although the RUNGE KUTTA command does not
42055       provide an analytic solution (that is, the function F), it can
42056       generate the y value for any corresponding x value.  The RUNGE
42057       KUTTA command returns y values (and dy/dx values for the second
42058       order case) for a given set of X values.
42059    6) Differential equations are complicated by the fact that there is
42060       an infinite number of solutions (this is due to the fact that the
42061       derivative of any constant is zero).  However, if the solution is
42062       required to pass through a specific point (x0,y0), then the
42063       solution is unique.  This point is referred to as an initial
42064       value.  Boundary value problems are those in which more than
42065       one initial point is specified.  The RUNGE KUTTA command can
42066       solve initial value problems, but it does not solve boundary
42067       value problems.  DATAPLOT does not currently provide any methods
42068       for solving boundary value problems.
42069
42070Syntax 1: (for first order differential equations)
42071    LET <y> = RUNGE KUTTA <f> <x1> <SUBSET/EXCEPT/FOR qualification>
42072    where <f> is a function or functional expression that defines the
42073              differential equation (this function often contains <y>);
42074          <x1> is a variable that defines the desired grid of X values;
42075          <y> is a variable where the computed solution to the
42076              differential equation is saved (the first element of this
42077              variable must be previously defined);
42078    and where the <SUBSET/EXCEPT/FOR qualification> is optional and
42079              rarely used in this context.
42080
42081    The initial value (x0, y0) is specified by the first elements of
42082    <x1> and <y> respectively.  These points must be specified before
42083    entering the RUNGE KUTTA command.  The solution is the set of
42084    points <y> and <x1>.
42085
42086Syntax 2: (for second order differential equations)
42087    LET <y> <yd> = RUNGE KUTTA  <f> <x1>
42088                   <SUBSET/EXCEPT/FOR qualification>
42089    where <f> is a function or functional expression that defines the
42090              differential equation (this function often contains <y>
42091              and <yd>);
42092          <x1> is a variable that defines the desired grid of X values;
42093          <y> is the variable where the computed values for the
42094              dependent variable are saved (the first element of this
42095              variable must be previously defined);
42096          <yd> is the variable where the computed values for the dy/dx
42097              term are saved (the first element of this variable must
42098              be previously defined);
42099    and where the <SUBSET/EXCEPT/FOR qualification> is optional and
42100              rarely used in this context.
42101
42102    The initial value (x0, y0, yd0) is specified by the first elements
42103    of <x1>, <y>, and <yd> respectively.  These points must be
42104    specified before entering the RUNGE KUTTA command.  The solution is
42105    the set of points <y>, <yd>, and <x1>.
42106
42107Examples:
42108    LET Y = RUNGE KUTTA 2*X  X1
42109    LET Y = RUNGE KUTTA F  X1
42110    LET Y YD = RUNGE KUTTA F  X1
42111
42112Note:
42113    DATAPLOT uses a fourth order Runge-Kutta algorithm.  This algorithm
42114    is documented in the Numerical Recipes book.  It is also covered in
42115    most numerical analysis textbooks.  Runge-Kutta methods have the
42116    advantage of almost always succeeding, but they do not always
42117    have as high an accuracy or the computational efficiency as more
42118    sophisticated methods such as Bulirsch-Stoer or predictor-corrector
42119    methods.
42120
42121    Runge-Kutta methods are not appropriate for stiff differential
42122    equations.
42123
42124Default:
42125    None
42126
42127Synonyms:
42128    None
42129
42130Related Commands:
42131    DERIVATIVE     = Compute the derivative of a function.
42132    INTEGRAL       = Compute the integral of a function.
42133    ROOTS          = Compute the roots of a function.
42134    INTERPOLATE    = Interpolate a function.
42135
42136Reference:
42137    "Numerical Recipes: The Art of Scientific Computing (FORTRAN
42138    Version)", Press, Flannery, Teukolsky, and Vetterling.  Cambridge
42139    University Press, 1989 (chapter 14).
42140
42141Applications:
42142    Differential Equations
42143
42144Implementation Date:
42145    87/10
42146
42147Program 1: (first order example)
42148    . THIS IS THE DATAPLOT PROGRAM FILE     RAIN.DP
42149    . PURPOSE--DETERMINE THE EQUATION OF MOTION OF A RAINDROP
42150    .          WITH SEVERAL DIFFERENT AIR RESISTANCE VALUES.
42151    . ANALYSIS TECHNIQUE--RUNGE-KUTTA SOLUTION TO DIFFERENTIAL EQUATION.
42152    . NOTE--Y = SPEED AFTER TIME X
42153    .       X = TIME (IN SECONDS)
42154    .       M = MASS
42155    .       C = AIR RESISTANCE
42156    . START POINT-----------------------------------
42157    .      STEP 1--DEFINE THE RIGHT-HAND SIDE FUNCTION OF Y' = F
42158    .              DEFINE THE DESIRED GRID OF X VALUES
42159    .              DEFINE INITIAL CONDITION
42160    .              DEFINE A TABLE OF VALUES FOR C
42161    LET FUNCTION F = 32-(C/M)*Y**2
42162    LET X = 0 .1 5
42163    LET Y(1)=0
42164    LET M = 1
42165    LET CTAB = DATA 2 1 .5 .1 .01 0
42166    .      STEP 2--SOLVE THE DIFFERENTIAL EQUATION FOR EACH VALUE OF C
42167    LOOP FOR K = 1 1 6
42168        LET C = CTAB(K)
42169        LET Y = RUNGE-KUTTA F X
42170        LET Y^K = Y
42171    END OF LOOP
42172    .      STEP 3--PLOT OUT THE 6 TRACES
42173    Y1LABEL SPEED
42174    XLABEL TIME (IN SECONDS)
42175    X2LABEL STARTING SPEED = 0
42176    X3LABEL AIR RESISTANCE = 2, 1, .5, .1, .01, 0
42177    PLOT Y1 Y2 Y3 Y4 Y5 Y6 VS X
42178
42179Program 2: (second order example)
42180    . THIS IS THE DATAPLOT PROGRAM FILE     BEAM.DP
42181    . PURPOSE--DETERMINE DEFLECTION VS DISTANCE TRACE OF ELASTIC BEAM
42182    .          ANCHORED AT ONE END AND WITH A LOAD AT THE OTHER END
42183    .          (CANTILEVER).
42184    . TECHNIQUE--RUNGE-KUTTA SOLUTION OF 2ND ORDER DIFFERENTIAL EQUATION
42185    . APPLICATION--STRUCTURAL ENGINEERING
42186    . SOURCE--DORN, WILLIAM S. AND MCCRACKEN, DANIEL D., NUMERICAL
42187    .         METHODS WITH FORTRAN IV CASE STUDIES, JOHN WILEY AND SONS
42188    .         NEW YORK, 1972, PAGES 391-401.
42189    . TO FIND--DEFLECTION VALUE FOR VARIOUS DISTANCES OUT ONTO THE BEAM
42190    . NOTE--THE ELASTIC DEFLECTION SATISFIES THE DIFFERENTIAL EQUATION--
42191    .       Y'' / (1 + (Y')**2 )**(3/2)   =   P*(L-X) / (E*I)
42192    .       Y'' = P*(L-X) / (E*I)     *    (1 + (Y')**2 )**(3/2)
42193    .       WITH Y(0) = 0 AND Y'(0) = 0
42194    .       WHERE
42195    .          Y = DEFLECTION FROM HORIZONTAL (IN INCHES)
42196    .          X = DISTANCE OUT ONTO BEAM (X = 0, 2, 4, 6, ..., 100
42197    .              INCHES)
42198    .          P = LOAD (IN POUNDS) AT FREE END (HERE = 64)
42199    .          L = LENGTH (IN INCHES) OF BEAM (HERE = 100)
42200    .          E = YOUNG'S MODULUS (= 6 * 10**6)
42201    .          I = MOMENT OF INERTIA OF CROSS SECTION (HERE = 0.128
42202    .              INCHES**4)
42203    .
42204    .      STEP 1--DEFINE THE PHYSICAL PARAMETERS OF THE BEAM
42205    LET P = 64
42206    LET L = 100
42207    LET E = 6*10**6
42208    LET I = 0.128
42209    .      STEP 2--DEFINE THE RIGHT-SIDE FUNCTION OF Y''(X) = F
42210    LET FUNCTION F1 = P*(L-X)/(E*I)
42211    LET FUNCTION F2 = (1+YP**2)**(3/2)
42212    LET FUNCTION F = F1*F2
42213    .      STEP 3--DEFINE INITIAL CONDITIONS AND THE DESIRED SEQUENCE
42214    .              OF POINTS AT WHICH TO COMPUTE THE SOLUTION CURVE.
42215    LET Y(1) = 0
42216    LET YP(1) = 0
42217    LET X = SEQUENCE 0 2 100
42218    .      STEP 4--SOLVE THE DIFFERENTIAL EQUATION
42219    LET Y YP = RUNGE-KUTTA F X
42220    MULTIPLOT 2 1; MULTIPLOT CORNER COORDINATES 0 0 100 100
42221    PLOT Y X
42222    PRINT X Y YP
42223    .      STEP 5--PLOT OUT THE SOLUTION CURVE
42224    LET YBE = (P/(6*E*I))*(X**2)*(3*L-X)
42225    TITLE PLOT THE SOLUTION CURVE
42226    LINES SOLID DOTTED
42227    PLOT Y YBE VS X
42228    END OF MULTIPLOT
42229
42230-----RUNS---------------------------------------------------
42231
42232RUNS
42233
42234Name:
42235    RUNS
42236
42237Type:
42238    Analysis Command
42239
42240Purpose:
42241    Perform a runs test.
42242
42243Description:
42244    This test is designed to test the hypothesis that a sample has been
42245    drawn at random.  The data is split into 2 mutually exclusive
42246    groups.  A run is a series of values that fall into the same group.
42247    The number of runs of a given length are computed and compared to
42248    the expected number from a random sample.
42249
42250Syntax:
42251    RUNS <x1>            <SUBSET/EXCEPT/FOR qualification>
42252    where <x1> is the variable for which the runs test is to be
42253              performed;
42254    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
42255
42256Examples:
42257    RUNS Y1
42258    RUNS Y1  SUBSET TAG > 0
42259
42260Note:
42261    A runs test divides the data into 2 mutually exclusive sets.  For
42262    quantitative data, this usually means data are split into groups
42263    above the mean and below the mean.
42264
42265Default:
42266    None
42267
42268Synonyms:
42269    None
42270
42271Related Commands:
42272    PROBABILITY PLOT   = Generates a probability plot.
42273    LET                = Computes data transformations.
42274    RUN SEQUENCE PLOT  = Generates a run sequence plot.
42275
42276Applications:
42277    XX
42278
42279Implementation Date:
42280    XX
42281
42282Program:
42283    LET = Y1 NORMAL RANDOM NUMBERS FOR I = 1 1 100
42284    RUNS Y1
42285
42286-----RUN SEQUENCE PLOT-----------------------------------------------
42287
42288RUN SEQUENCE PLOT
42289
42290Name:
42291    RUN SEQUENCE PLOT
42292
42293Type:
42294    Graphics Command
42295
42296Purpose:
42297    Generates a run sequence plot.
42298
42299Description:
42300    A run sequence plot is a graphical data analysis technique for
42301    preliminary scanning of the data.  It consists of:
42302       Vertical   axis = i-th observation;
42303       Horizontal axis = dummy index i.
42304    The runs sequence plot is thus a plot of the raw data plotted in
42305    the same order that it resides in the variable.  This is a useful
42306    first step in the analysis of any data (not just time series data)
42307    in that it provides information about trends, patterns in
42308    variation, and outliers.  It also gives the analyst an excellent
42309    "feel" for the data.
42310
42311Syntax:
42312    RUN SEQUENCE PLOT   <x>   <SUBSET/EXCEPT/FOR qualification>
42313    where <x> is the variable of raw data values under analysis;
42314    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
42315
42316Examples:
42317    RUN SEQUENCE PLOT Y
42318    RUN SEQUENCE PLOT Y2
42319
42320Note:
42321    Plot points can be plotted as characters, connected lines, spikes,
42322    or bars.  These are set independently of each other.  The default
42323    is to plot each trace as a connected line with no symbol, no bar,
42324    and no spike.  The LINE, CHARACTER, SPIKE, and BAR commands are
42325    used to set the switches for plotting a given trace as a connected
42326    line, a character, a spike, or a bar respectively.
42327
42328    There are attribute setting commands for lines, characters, spikes,
42329    and bars.  See the documentation for LINE, CHARACTER, SPIKE, and
42330    BAR for a complete list of these commands.  Attributes are set
42331    giving a list of values.  The first trace uses the first setting,
42332    the second trace uses the second setting, and so on.  For example,
42333    CHARACTER SIZE 2.0 3.0 1.5 sets the character size for trace 1 to
42334    2.0, the character size for trace 2 to 3.0, and the character size
42335    for trace 3 to 1.5.  Attributes can be set for up to 100 traces.
42336
42337Default:
42338    None
42339
42340Synonyms:
42341    PLOT Y is equivalent to RUN SEQUENCE PLOT Y.
42342
42343Related Commands:
42344    CHARACTERS          = Sets the types for plot characters.
42345    LINES               = Sets the types for plot lines.
42346    SPIKES              = Sets the on/off switches for plot spikes.
42347    BARS                = Sets the on/off switches for plot bars.
42348    TITLE               = Sets the plot title.
42349    LABEL               = Sets the plot axis labels.
42350    LEGEND              = Sets the plot legends.
42351    MULTIPLOT           = Generate multiple plots per page.
42352    PLOT                = Generates a data or function plot.
42353
42354Applications:
42355    XX
42356
42357Implementation Date:
42358    XX
42359
42360Program:
42361    SKIP 25
42362    READ BOXJE142.DAT YIELD
42363    .
42364    TITLE AUTOMATIC
42365    Y1LABEL YIELD
42366    X1LABEL SEQUENCE NUMBER
42367    XLIMITS 0 70
42368    XTIC OFFSET 2 2
42369    PLOT YIELD
42370
42371-------------------------------------------------------------
42372
42373
42374
42375
42376
42377
42378
42379
42380
42381
42382
42383
42384
42385
42386
42387
42388
42389
42390
42391
42392
42393
42394
42395
42396
42397
42398
42399
42400
42401
42402
42403
42404
42405
42406
42407
42408
42409
42410
42411
42412
42413
42414
42415
42416
42417
42418
42419
42420
42421
42422
42423
42424
42425
42426
42427
42428
42429
42430
42431
42432
42433
42434
42435
42436
42437
42438
42439
42440
42441
42442
42443
42444
42445
42446
42447
42448
42449
42450
42451
42452
42453
42454
42455
42456
42457
42458
42459
42460
42461
42462
42463
42464
42465
42466
42467
42468
42469
42470
42471
42472
42473
42474
42475
42476
42477
42478
42479
42480
42481
42482
42483
42484
42485
42486
42487
42488
42489
42490
42491
42492
42493
42494
42495
42496
42497
42498
42499
42500-------------------------  *S*  ZZZZZ--------------------
42501
42502-----S CHART-----------------------------------------------------
42503
42504S CHART
42505
42506Name:
42507    S CHART
42508
42509Type:
42510    Graphics Command
42511
42512Purpose:
42513    Generates a standard deviation control chart.
42514
42515Description:
42516    A standard deviation control chart is a data analysis analysis
42517    technique for determining if a measurement process has gone out of
42518    statistical control.  The S chart is sensitive to changes in
42519    variation in the measurement process.  It consists of:
42520       Vertical   axis = the standard deviation for each sub-group.
42521       Horizontal axis = sub-group designation.
42522    In addition, horizontal lines are drawn at the mean standard
42523    deviation value and at the upper and lower control limits.
42524
42525Syntax:
42526    S CHART   <y>   <x>     <SUBSET/EXCEPT/FOR/qualification>
42527    where <y> is the response (= dependent) variable (containing the
42528              raw data values);
42529          <x> is an independent variable (containing the
42530              sub-group identifications);
42531    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
42532
42533Examples:
42534    S CHART Y X
42535
42536Note:
42537    The distribution of the response variable is assumed to be normal.
42538    This assumption is the basis for calculating the upper and lower
42539    control limits.
42540
42541Note:
42542    The attributes of the 4 traces can be controlled by the standard
42543    LINES, CHARACTERS, BARS, and SPIKES commands.  Trace 1 is the
42544    response variable, trace2 is the mean line, and traces 3 and 4 are
42545    the control limits.  Some analysts prefer to draw the response
42546    variable as a spike or character rather than a connected line.
42547
42548Note:
42549    Versions prior to December 1993 have a bug in that the S CHART
42550    command conflicts with the SAVE command.  Use the SD CHART or the
42551    SD CONTROL CHART syntax (see SYNONYMS section below) for these
42552    versions.
42553
42554Default:
42555    None
42556
42557Synonyms:
42558    SD CHART for S CHART
42559    S CONTROL CHART for S CHART
42560    SD CONTROL CHART for S CHART
42561
42562Related Commands:
42563    R CHART             = Generates a range control chart.
42564    X CHART             = Generates a mean control chart.
42565    P CHART             = Generates a p control chart.
42566    NP CHART            = Generates a Np control chart.
42567    U CHART             = Generates a U control chart.
42568    C CHART             = Generates a C control chart.
42569    CHARACTERS          = Sets the types for plot characters.
42570    LINES               = Sets the types for plot lines.
42571    SPIKES              = Sets the on/off switches for plot spikes.
42572    BARS                = Sets the on/off switches for plot bars.
42573    PLOT                = Generates a data or function plot.
42574    LAG PLOT            = Generates a lag plot.
42575    4-PLOT              = Generates 4-plot univariate analysis.
42576    STANDARD DEVI PLOT  = Generates a standard deviation (vs subset)
42577                          plot.
42578
42579Applications:
42580    Quality Control
42581
42582Implementation Date:
42583    88/2
42584
42585Program:
42586    SKIP 25
42587    READ GEAR.DAT DIAMETER BATCH
42588    .
42589    LINE SOLID SOLID DOT DOT
42590    TITLE AUTOMATIC
42591    X1LABEL GROUP-ID
42592    Y1LABEL STANDARD DEVIATION
42593    SD CHART DIAMETER BATCH
42594
42595-----SAMPLE RANDOM PERMUTATION (LET)-----------------------------------
42596
42597SAMPLE RANDOM PERMUTATION
42598
42599Name:
42600    SAMPLE RANDOM PERMUTATION (LET)
42601
42602Type:
42603    Let Subcommand
42604
42605Purpose:
42606    Generate a series of random permutations where possibly
42607    only a subset of the random permutations will be retained
42608    and where a specified proportion of the permutation values
42609    are allowed.
42610
42611Description:
42612    For a given size N, to generate a random permutation the integers
42613    from 1 to N are randomly sampled (without replacement) until all
42614    elements have been selected.  This is implemented with the command
42615
42616        LET Y = RANDOM PERMUTATION FOR I = 1 1 N
42617
42618    This SAMPLE RANDOM PERMUTATION command was motivated by the desire to
42619    simulate the following problem.
42620
42621    Given a worm that has infected a single computer, simulate
42622    the following:
42623
42624        1. The infected machine will propogate to NKEEP IP addresses
42625           from a master list of NPOP IP addresses.
42626
42627        2. Of the NPOP addresses, only a proportion, p, denote
42628           addresses corresponding to an actual machine.  That is,
42629           there will be p*NPOP valid addresses.
42630
42631        3. Each newly infected machine will likewise attempt
42632           to propogate to NKEEP addresses.
42633
42634    This process will be repated until all IP addresses corresponding
42635    to valid machines are infected.
42636
42637    The Program 1 example demonstrates how this simulation can be
42638    implemented using the SAMPLE RANDOM PERMUTATION command.
42639
42640Syntax:
42641    LET <y> <tag> = SAMPLE RANDOM PERMUTATION <npop> <nkeep> <p> <niter>
42642    where <npop> is a number or parameter that specifies the size of
42643              the random permutation;
42644          <nkeep> is a number of parameter that specifies how many
42645              permutated values are kept at each step;
42646          <p> is a parameter or number (greater than 0 and less than
42647              or equal to 1) that specifies the proportion of
42648              valid permutation values;
42649          <niter> is a number of parameter (less than or equal to
42650              <npop>) that specifies how many sets of randon
42651              permutations are generated;
42652          <y> is a variable where the permutated values are saved;
42653          <tag> is a variable that identifies which iteration generated
42654              the permuted values.
42655
42656Examples:
42657    LET Y TAG = SAMPLE RANDOM PERMUTATION NPOP NKEEP P NITER
42658
42659Note:
42660    The SEED command can be used to specify a seed for the random
42661    number generation.  The SET RANDOM NUMBER GENERATOR command can be
42662    used to specify which random number generator to use.
42663
42664Note:
42665    By default, only the unique permutation values in the output variable
42666    are saved.  If you want all permutation values to be saved, then
42667    enter the command
42668
42669       SET SAMPLE RANDOM PERMUTATION DISTINCT OFF
42670
42671    This is demonstrated in the Program 2 and Program 3 examples below.
42672
42673Note:
42674    Although this command was implemented with a specific simulation
42675    scenario in mind, it does have wider applicability.
42676
42677    Specifically, it can be used to efficiently implement two sample
42678    permutation tests.  The Program 2 and Program 3 examples below
42679    demonstrate a two sample permutation test for the difference between
42680    the means of two samples.  These examples can be easily adapted to
42681    test for the difference between other location statistics such as
42682    the median or the trimmed mean.
42683
42684    Based on extensive simulation studies, Higgins recommends that
42685    1,600 random permutations should be sufficient for most purposes.
42686
42687Note:
42688    This routine uses a random permutation algorithm suggested by Knuth.
42689    Specifically, it adapts the RANDPERM routine of Knoble.
42690
42691Default:
42692    None
42693
42694Synonyms:
42695    None
42696
42697Related Commands:
42698    LET                      = Generate data transformations.
42699    RANDOM PERMUTATION       = Generate a random permutation.
42700    SEED                     = Specify the seed for random number
42701                               generation.
42702    RANDOM NUMBER GENERATOR  = Specify the random number generator to
42703                               use.
42704    RANDOM NUMBER            = Generate random numbers from a specified
42705                               distribution.
42706    BOOTSTRAP SAMPLE         = Generate a bootstrap sample.
42707
42708References:
42709    Knuth (1998), "The Art of Computer Programming: Volume 2 Seminumerical
42710    Algorithms, Third Edition", Section 3.4.2, Addison-Wesley.
42711
42712    Knoble RANDPERM algorithm downloaded from:
42713    "http://coding.derkeiler.com/Archive/Fortran/comp.lang.fortran/
42714    2006-03/msg00748.html"
42715
42716    Higgins (2004), "Introduction to Modern Nonparametric Statistics",
42717    Duxbury Press, Chapter 2.
42718
42719Applications:
42720    Simulation, Permutation Tests
42721
42722Implementation Date:
42723    2017/08
42724
42725Program 1:
42726    set random number generator fibbonacci congruential
42727    seed 56791
42728    .
42729    let npop  = 64000
42730    let nkeep = 10
42731    let p     = 0.25
42732    let maxiter = 20
42733    let maxit2  = 19
42734    let nmax = p*npop
42735    .
42736    let y(1) = 1
42737    let nyv(1) = 1
42738    let y = 0 for i = 2 1 maxiter
42739    let iterv = sequence 0 1 maxit2
42740    .
42741    loop for k = 1 1 maxiter
42742        let niter = size y
42743        let ynew tag = sample random permutation npop nkeep p niter
42744        let ny = size y
42745        let nyv(k) = ny
42746        let y = combine y ynew
42747        let y = distinct y
42748        if ny >= nmax
42749           break loop
42750        end of if
42751    end of loop
42752    .
42753    set write decimals 0
42754    print iterv nyv
42755
42756Program 2:
42757    set random number generator fibbonacci congruential
42758    seed 32119
42759    .
42760    .           Read the data
42761    .
42762    dimension 15 columns
42763    .
42764    skip 25
42765    read auto83b.dat y1 y2
42766    retain y2 subset y2 >= 0
42767    let y = comb y1 y2
42768    let n1 = size y1
42769    let n2 = size y2
42770    skip 0
42771    .
42772    .           Compute the statistic for the original sample
42773    .
42774    let mean1 = mean y1
42775    let mean2 = mean y2
42776    let statval = mean1 - mean2
42777    .
42778    .           Generate the random permutations
42779    .
42780    let npop  = n1 + n2
42781    let nkeep = npop
42782    let p     = 1
42783    let niter = 1600
42784    let ntot = npop*niter
42785    let repeat = data n1 n2
42786    let val = data 1 2
42787    let tag2 = sequence val repeat for i = 1 1 ntot
42788    set sample random permutation distinct off
42789    .
42790    let yindx tag1 = sample random permutation npop nkeep p niter
42791    let ynew = gather y yindx
42792    .
42793    .           Now compute the statistic for the permutations
42794    .
42795    set let cross tabulate collapse
42796    let ynew2 = ynew
42797    let tag12 = tag1
42798    retain ynew2 tag12 subset tag2 = 1
42799    let ym1 = cross tabulate mean ynew2 tag12
42800    let ynew2 = ynew
42801    let tag12 = tag1
42802    retain ynew2 tag12 subset tag2 = 2
42803    let ym2 = cross tabulate mean ynew2 tag12
42804    let ydiff = ym1 - ym2
42805    .
42806    .           Now plot the results of the permutation test
42807    .
42808    let xq = 0.025
42809    let low025 = quantile ydiff
42810    let low025 = round(low025,2)
42811    let xq = 0.975
42812    let upp975 = quantile ydiff
42813    let upp975 = round(upp975,2)
42814    .
42815    let xq = 0.025
42816    let low025 = quantile ydiff
42817    let low025 = round(low025,2)
42818    let xq = 0.975
42819    let upp975 = quantile ydiff
42820    let upp975 = round(upp975,2)
42821    .
42822    title offset 2
42823    title case asis
42824    label case asis
42825    y1label Count
42826    x1label Difference of Means for Permutations
42827    let statval = round(statval,2)
42828    x2label color red
42829    x2label Difference of Means for Original Sample: ^statval
42830    x3label color blue
42831    x3label 2.5 Percentile: ^low025, 97.5 Percentile: ^upp975
42832    xlimits -15 15
42833    title Histogram of Difference of Means for ^niter Permutations (AUTO83B.DAT)
42834    .
42835    histogram ydiff
42836    .
42837    line color red
42838    line dash
42839    drawdsds statval 20 statval 90
42840    line color blue
42841    line dash
42842    drawdsds low025 20 low025 90
42843    drawdsds upp975 20 upp975 90
42844
42845Program 3:
42846    set random number generator fibbonacci congruential
42847    seed 32119
42848    .
42849    .           Read the data
42850    .
42851    dimension 15 columns
42852    .
42853    let y1 = norm rand numb for i = 1 1 200
42854    let y2 = norm rand numb for i = 1 1 80
42855    let y2 = y2 + 0.1
42856    let y = comb y1 y2
42857    let n1 = size y1
42858    let n2 = size y2
42859    skip 0
42860    .
42861    .           Generate the random permutations
42862    .
42863    let mean1 = mean y1
42864    let mean2 = mean y2
42865    let statval = mean1 - mean2
42866    .
42867    let npop  = n1 + n2
42868    let nkeep = npop
42869    let p     = 1
42870    let niter = 1600
42871    let ntot = npop*niter
42872    let repeat = data n1 n2
42873    let val = data 1 2
42874    let tag2 = sequence val repeat for i = 1 1 ntot
42875    set sample random permutation distinct off
42876    .
42877    let yindx tag1 = sample random permutation npop nkeep p niter
42878    let ynew = gather y yindx
42879    .
42880    .           Now compute the statistic for the permutations
42881    .
42882    set let cross tabulate collapse
42883    let ynew2 = ynew
42884    let tag12 = tag1
42885    retain ynew2 tag12 subset tag2 = 1
42886    let ym1 = cross tabulate mean ynew2 tag12
42887    let ynew2 = ynew
42888    let tag12 = tag1
42889    retain ynew2 tag12 subset tag2 = 2
42890    let ym2 = cross tabulate mean ynew2 tag12
42891    let ydiff = ym1 - ym2
42892    .
42893    .           Now plot the results of the permutation test
42894    .
42895    let xq = 0.025
42896    let low025 = quantile ydiff
42897    let low025 = round(low025,2)
42898    let xq = 0.975
42899    let upp975 = quantile ydiff
42900    let upp975 = round(upp975,2)
42901    .
42902    title offset 2
42903    title case asis
42904    label case asis
42905    y1label Count
42906    x1label Difference of Means for Permutations
42907    let statval = round(statval,2)
42908    x2label color red
42909    x2label Difference of Means for Original Sample: ^statval
42910    x3label color blue
42911    x3label 2.5 Percentile: ^low025, 97.5 Percentile: ^upp975
42912    xlimits -0.5 0.5
42913    title Histogram of Difference of Means for ^niter Permutations
42914    .
42915    histogram ydiff
42916    .
42917    line color red
42918    line dash
42919    drawdsds statval 20 statval 90
42920    line color blue
42921    line dash
42922    drawdsds low025 20 low025 90
42923    drawdsds upp975 20 upp975 90
42924
42925-----SAVE-------------------------------------------------------
42926
42927SAVE
42928
42929Name:
42930    SAVE
42931
42932Type:
42933    Support Command
42934
42935Purpose:
42936    Selectively save one of, or a set of, the last 20 DATAPLOT
42937    commands that had been entered.
42938
42939Description:
42940    The saved commands can be re-executed by entering the command /
42941    (i.e., the slash character) at any later time in the current
42942    DATAPLOT session.
42943
42944Syntax 1:
42945    SAVE  <id1>   <id2>
42946    where <id1> is the line number of the first command to re-execute;
42947    and   <id2> is the line number of the last command to re-execute.
42948
42949    The line numbers are obtained by preceding the SAVE command by a
42950    list command with no arguments.  All the commands between the
42951    first and last line are re-executed as well.
42952
42953Syntax 2:
42954    SAVE  <list>
42955    where <list> is a list of 3 or more commands to save.
42956
42957    The line numbers are obtained by preceding the SAVE command by a
42958    list command with no arguments.  Only the commands listed are
42959    saved.
42960
42961Syntax 3:
42962    SAVE  <file>  <id1>   <id2>
42963    where <file> is the name of a file where the saved commands are
42964              written;
42965          <id1> is the line number of the first command to re-execute;
42966    and   <id2> is the line number of the last command to re-execute.
42967
42968    The line numbers are obtained by preceding the SAVE command by a
42969    list command with no arguments.  All the commands between the
42970    first and last line are re-executed as well.  This syntax is useful
42971    for saving more than one command sequence.  The / command
42972    re-executes the most recently entered SAVE sequence.  However,
42973    the CALL <file> command can be used to execute any SAVE sequence
42974    that was written to a file.
42975
42976Syntax 4:
42977    SAVE  <file>  <list>
42978    where <file> is the name of a file where the saved commands are
42979              written;
42980    and   <list> is a list of 3 or more commands to save.
42981
42982    The line numbers are obtained by preceding the SAVE command by a
42983    list command with no arguments.  Only the commands listed are
42984    saved.  This syntax is useful for saving more than one command
42985    sequence.  The / command re-executes the most recently entered SAVE
42986    sequence.  However, the CALL <file> command can be used to execute
42987    any SAVE sequence that was written to a file.
42988
42989Examples:
42990    SAVE 6 3            --to save commands 6, 5, 4, and 3 ago
42991    SAVE 3 6            --to save commands 6, 5, 4, and 3 ago
42992    SAVE 6 6            --to save command 6 ago
42993    SAVE 6              --to save command 6 ago
42994    SAVE 1              --to save the last command ago
42995    SAVE                --to save the last command ago
42996    SAVE 2 5 8          --to save commands 2, 5, and 8 ago
42997    SAVE COMM.DP 2 5 8  --to save commands 2, 5, and 8 ago to a file
42998    SAVE COMM.DP  6 3   --to save commands 2, 5, and 8 ago to a file
42999
43000Default:
43001    If only one argument is entered, then only that command is
43002    saved.
43003    If no arguments are entered, then the last command is saved.
43004
43005Synonyms:
43006    S
43007
43008Note:
43009    The SAVE command is almost always preceded by the LIST command
43010    (with no arguments).  LIST will print the last 20 commands that
43011    were entered.  Based on that list, the analyst can then enter the
43012    SAVE command to selectively save one or more of those commands.
43013    For example,
43014
43015       LIST
43016       SAVE 6 3
43017
43018    would list the last 20 commands and then save the sixth, fifth,
43019    fourth, and third commands ago.  See the LIST command for details.
43020
43021Note:
43022    DATAPLOT actually saves the last 200 (50 in earlier versions)
43023    commands.  Enter the command SET LIST LINES <n> where <n> is
43024    between 1 and 200 to control the number of commands that LIST
43025    prints.
43026
43027Note:
43028    The SAVE command is commonly used for the re-execution of long
43029    complicated commands (e.g., PLOT with a complicated mathematical
43030    expression).  The saved commands can be re-executed at any time by
43031    entering the command /.
43032
43033Note:
43034    The S synonym for the SAVE command is heavily used.
43035
43036Note:
43037    DATAPLOT has no restrictions on the file name other than it be a
43038    valid file name on the local operating system and that it contain
43039    a period "." in the file name itself or as a trailing character.
43040    DATAPLOT strips off trailing periods on those systems where it is
43041    appropriate to do so.  On systems where trailing periods can be a
43042    valid file name (e.g., Unix), DATAPLOT opens the file with the
43043    trailing period.
43044
43045    Some users prefer to give all macro files a ".DP" or ".dp"
43046    extension.  Although this is a useful method for keeping track of
43047    macro files, it is strictly a user convention and is not enforced
43048    by DATAPLOT in any way.
43049
43050Note:
43051    File names are case sensitive on Unix file systems.  For Unix,
43052    DATAPLOT opens the file as given.  All other currently supported
43053    systems are not case sensitive regarding file names.
43054
43055    As a further caution for Unix hosts, certain expansion characters
43056    (specifically ~ to refer to your home directory) are interpreted
43057    by the shell and are not recognized by the Fortran compiler.  These
43058    expansion characters are interpreted as literal characters and do
43059    not yield the intended file name.
43060
43061Default:
43062    If only one argument is entered, then only that command is
43063    saved.
43064    If no arguments are entered, then the last command is saved.
43065
43066Synonyms:
43067    S
43068
43069Related Commands:
43070    /       = Re-execute previously saved commands.
43071    LIST    = List the previously entered commands.
43072    REPEAT  = Selectively re-execute previously entered commands.
43073    CALL    = Execute commands stored in a file.
43074    CREATE  = Echo entered commands to a file.
43075
43076Applications:
43077    Interactive Usage
43078
43079Implementation Date:
43080    Pre-1987
43081
43082Program:
43083    XX
43084
43085-----SAVE MEMORY--------------------------------------------------
43086
43087SAVE MEMORY
43088
43089Name:
43090    SAVE MEMORY
43091
43092Type:
43093    Support Command
43094
43095Purpose:
43096    Writes out all internal DATAPLOT parameters, variables, functions,
43097    and switches to a file.
43098
43099Description:
43100    The SAVE MEMORY command allows the analyst to interrupt a DATAPLOT
43101    run (due to a meeting, lunch, etc.) without loss.  The RESTORE
43102    MEMORY command allows the analyst to reload the settings and resume
43103    at the point of interruption.
43104
43105Syntax:
43106    SAVE MEMORY   <file name>
43107    where <file name> is the name of a file where the internal settings
43108               are saved.
43109
43110    If the file name does not contain a period, place a period (no
43111    spaces) at the end of the file name.
43112
43113Examples:
43114    SAVE MEMORY OUT.
43115    SAVE MEMORY SCRATCH.
43116    SAVE MEMORY TEMP.
43117
43118Note:
43119    DATAPLOT has no restrictions on the file name other than it be a
43120    valid file name on the local operating system and that it contain
43121    a period "." in the file name itself or as a trailing character.
43122    DATAPLOT strips off trailing periods on those systems where it is
43123    appropriate to do so.  On systems where trailing periods can be a
43124    valid file name (e.g., Unix), DATAPLOT opens the file with the
43125    trailing period.
43126
43127Note:
43128    File names are case sensitive on Unix file systems.  For Unix,
43129    DATAPLOT opens the file as given.  All other currently supported
43130    systems are not case sensitive regarding file names.
43131
43132    As a further caution for Unix hosts, certain expansion characters
43133    (specifically ~ to refer to your home directory) are interpreted
43134    by the shell and are not recognized by the Fortran compiler.  These
43135    expansion characters are interpreted as literal characters and do
43136    not yield the intended file name.
43137
43138Default:
43139    None
43140
43141Synonyms:
43142    None
43143
43144Related Commands:
43145    RESTORE MEMORY = Restore all internal DATAPLOT settings from a
43146                     previously saved file.
43147    RESET          = Reset internal DATAPLOT settings to their default
43148                     values.
43149
43150Applications:
43151    Interactive Usage
43152
43153Implementation Date:
43154    Pre-1987
43155
43156Program:
43157    XX
43158
43159-----SAVE PLOT--------------------------------------------------
43160
43161SAVE PLOT
43162
43163Name:
43164    SAVE PLOT
43165
43166Type:
43167    Support Command
43168
43169Purpose:
43170    Save the current plot for later recall via the REPEAT PLOT
43171    command.
43172
43173Description:
43174    The SAVE PLOT and REPEAT PLOT commands allow you to save and
43175    recall graphs.  The primary use of this is to compare the current
43176    graph to previously created graphs.
43177
43178    This command is host dependent.  It is currently supported for
43179    the following platforms:
43180
43181       1) Unix platforms via the X11 device driver;
43182       2) Windows 95/98/NT command line version built with the
43183          Microsoft Fortran compiler (saved in Windows bitmap format);
43184       3) Dataplot GUI (both Unix and Windows 95/98/NT).
43185
43186Syntax 1:
43187    SAVE  PLOT <file>
43188    where <file> is the name of a file in which the current graph
43189          will be saved.
43190
43191    This syntax saves the current plot in the specified file.
43192    If the file name is omitted, the plot is saved in the
43193    file "pixmap.<n>" where <n> is a counter.  The counter
43194    starts at 1 for each new Dataplot session.
43195
43196Syntax 2:
43197    SAVE  PLOT <file> AUTOMATIC
43198    where <file> is the name of a file in which the current graph
43199          will be saved.
43200
43201    This syntax saves all subsequent plots in the specified file.
43202    The current plot is not saved, only plots subsequent to
43203    when the SAVE PLOT command is entered.
43204
43205    A counter is added to the file name, that is, if the file
43206    name specified was SCATPLOT, then the saved graphs are in
43207    SCATPLOT.1, SCATPLOT.2, etc.  If the file name is omitted,
43208    the plot is saved in the file "pixmap.<n>" where <n> is
43209    the counter.
43210
43211    The counter starts at 1 for each new Dataplot session.
43212
43213Examples:
43214    READ FILE.DAT Y1 Y2 Y3
43215    HISTOGRAM Y1
43216    SAVE PLOT HIST.1
43217    HISTOGRAM Y2
43218    SAVE PLOT HIST.2
43219    HISTOGRAM Y3
43220    SAVE PLOT HIST.3
43221
43222Default:
43223    The default file name is "pixmap.<n>" where <n> is a
43224    counter (reset to 1 for each new Dataplot session).
43225
43226Synonyms:
43227    SAVE GRAPH, SP, and SG are all synonyms for SAVE PLOT.
43228
43229Note:
43230    The saved plots are essentially screen dumps.  There is
43231    currently no "linking" in the sense that if a given variable
43232    is changed the saved plots are automatically updated.
43233
43234Note:
43235    As a technical note for the X11 implementation, the plots
43236    are saved in X11 "bitmap" format.  This is distinct from
43237    the X11 image format that is used by xwd to save a screen
43238    image.  This choice was made for performance reasons (xlib
43239    provides direct routines for reading and writing bitmaps,
43240    but not for reading and writing images).  The primary
43241    limitations are:
43242
43243      i) Color is not supported for X11 bitmaps.  Elements drawn
43244         in color will not be saved in the bitmap.
43245
43246     ii) You cannot use the X11 tools xwd and xwud to view the
43247         saved plots independently of Dataplot.  However, they
43248         can be viewed by any software the reads X11 bitmaps.
43249
43250Note:
43251    Be aware that for SAVE GRAPH AUTOMATIC the saving for a given
43252    plot is not executed until the next screen erase (typically the
43253    next plot) is encountered to allow for multi-plotting and the
43254    addition of diagrammatic graphics to a plot.
43255
43256Note:
43257    The REPEAT PLOT command is used to display a plot saved
43258    with SAVE PLOT.  The LIST PLOT command lists the currently
43259    saved plots (by sequence number, file name, and title).
43260    The CYCLE PLOT command allows you to cycle through the
43261    pixmaps in the current list by clicking mouse buttons.
43262    The PIXMAP TITLE command allows you to specify the title
43263    for a saved plot.  This title is simply for ease of
43264    identification in listing the saved plots and is not
43265    saved as part of the plot.
43266
43267Related Commands:
43268    LIST PLOT    = List saved plots.
43269    REPEAT PLOT  = Draw a previously saved graph.
43270    CYCLE PLOT   = Cycle through previously saved graphs using
43271                   mouse buttons.
43272    PIXMAP TITLE = Provide a temporary name for a saved graph.
43273
43274Applications:
43275    Interactive Usage
43276
43277Implementation Date:
43278    7/1997
43279
43280Program:
43281    READ BERGER1.DAT Y X
43282    FIT Y X
43283    4-PLOT RES
43284    SAVE PLOT RES.1
43285    QUADRATIC FIT Y X
43286    4-PLOT RES
43287    SAVE PLOT RES.2
43288    REPEAT PLOT RES.1
43289    REPEAT PLOT RES.2
43290
43291-----SCATTER PLOT MATRIX--------------------------------------
43292
43293SCATTER PLOT MATRIX
43294
43295Name:
43296    SCATTER PLOT MATRIX
43297
43298Type:
43299    Graphics Command
43300
43301Purpose:
43302    Generates a scatter plot matrix.
43303
43304Description:
43305    A scatter plot matrix of Y1, Y2, ... , Yk is a matrix of
43306    all the pairwise scatter plots between Y1, Y2, ...., Yk.
43307    This is a simple, but powerful, technique for viewing all the
43308    pairwise relationships between the variables.
43309
43310    The pairwise plots need not be limited to scatter plots.
43311    Dataplot allows you to generate the pairwise plots for
43312    approximately 10 different plot types (and additional plot
43313    types will be added in future implementations).
43314
43315    There are a number of alternatives for the appearance of this
43316    plot.  Dataplot tries to balance simplicity with flexibility
43317    by using default settings, but providing numerous SET commands
43318    to control the appearance of the plot.  These are described in
43319    detail in the NOTES section below.
43320
43321Syntax 1:
43322    SCATTER PLOT MATRIX  <y1> <y2> ... <yk>  <SUBSET/EXCEPT/FOR qualification>
43323    where <y1> through <yk> are the response variables;
43324    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
43325
43326    Up to 25 response variables can be specified.
43327
43328Syntax 2:
43329    YOUDEN MATRIX PLOT <y1> <y2> ... <yk> <tag> <SUBSET/EXCEPT/FOR qualification>
43330    where <y1> through <yk> are the response variables;
43331          <tag> is a group id variable (and is always given last);
43332    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
43333
43334    This is a special form of the command that plots
43335
43336         PLOT Yi Yj TAG
43337
43338    for the individual plots.
43339
43340Syntax 3:
43341    DEX <stat> INTERACTION PLOT <y1> <y2> ... <yk> <SUBSET/EXCEPT/FOR qualification>
43342    where <y1> through <yk> are the response variables;
43343          <stat> defines a statistic, such as MEAN or MEDIAN, for
43344               the plot;
43345    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
43346
43347    This is a special form of the command that plots
43348
43349         DEX <stat> INTERACTION PLOT Yi Yj TAG
43350
43351    for the individual plots.  <stat> is optional.
43352
43353Examples:
43354    SCATTER PLOT MATRIX Y1 Y2 Y3 Y4 Y5
43355    SCATTER PLOT MATRIX Y1 Y2 Y3 Y4 Y5 SUBSET TAG > 2
43356
43357Note:
43358    The concept of the scatter plot matrix generalizes quite
43359    nicely to any plot type for two variables.  Dataplot
43360    supports the scatter plot matrix for a number of different plot
43361    types.  The type of plot generated is controlled by the following
43362    command:
43363
43364        SET SCATTER PLOT MATRIX TYPE <value>
43365
43366    where <value> is one of the following.
43367
43368    The folllowing plot two variables (e.g., BIHISTOGRAM Y1 Y2).
43369
43370        PLOT    - generate scatter plots (this is the default).
43371                  The x and y axis labels are automatically set
43372                  to the appropriate variable name.
43373
43374        QUANTILE-QUANTILE - generate quantile-quantile plots.  This
43375                  degenerates to percent point plots on the diagonal.
43376                  The x and y axis labels are automatically set
43377                  to the appropriate variable name.
43378
43379        BIHISTOGRAM - generate relative bihistograms.  This
43380                  degenerates to relative histograms on the diagonal.
43381                  We recommend that you enter
43382                  SET RELATIVE HISTOGRAM PERCENT to generate more
43383                  consistent y-axis scales.  The X1LABEL is set
43384                  to the first variable name and the X2LABEL is set to
43385                  the second variable name.  If no YLABEL is
43386                  already defined, the YLABEL is set to "Frequency".
43387
43388        CORRELATION  - generate a cross-correlation plot.  This
43389                  degenerates to an autocorrelation plot on the
43390                  diagonal.  If X1LABEL and Y1LABEL are not
43391                  previously defined, they are automatically set
43392                  to "Lag" and "Correlation" respectively.  The
43393                  X2LABEL is set to "X1*X2" where X1 and X2
43394                  represent the variable names.
43395
43396        LAG     - generate a cross-lag plot.  This degenerates to a
43397                  lag plot on the diagonal.  If X1LABEL and Y1LABEL
43398                  are not previously defined, they are automatically
43399                  set to "I+1" and "I" respectively.  The
43400                  X2LABEL is set to "X1*X2" where X1 and X2
43401                  represent the variable names.
43402
43403        SPECTRAL - generate a cross-spectral plot.  This degenerates
43404                  to a spectral plot on the diagonal.  If X1LABEL and
43405                  Y1LABEL are not previously defined, they are
43406                  automatically set to "Power" and "Frequency"
43407                  respectively.  The X2LABEL is set to "X1*X2" where
43408                  X1 and X2 represent the variable names.
43409
43410        YOUDEN - this generates a Youden plot.  That is,
43411                 PLOT Y1 Y2 TAG where TAG is a group id variable.
43412                 The TAG variable is the last variable listed on the
43413                 SCATTER PLOT MATRIX command and is the same for all
43414                 the plots.
43415
43416    The folllowing plot Y X1 X2 (e.g., DEX CONTOUR PLOT Y X1 X2).
43417    That is, the response variable is the first variable in the
43418    list, and it remains constant for all the pairwise plots.
43419
43420        DEX CONTOUR   - this generates a dex contour plot.  The
43421                 diagonal plot is empty.  The X2LABEL is set to
43422                 "X1*X2" where X1 and X2 represent the variable names.
43423                 No automatic labels are generated for X1LABEL and
43424                 Y1LABEL.
43425
43426        DEX INTERACTION - generate a DEX INTERACTION PLOT.
43427                 The X1LABEL is set to "X1*X2" where X1 and X2
43428                 represent the variable names.  No automatic labels
43429                 are generated for X2LABEL and Y1LABEL.
43430
43431        DEX <statistic> INTERACTION  - generate a DEX <statistic>
43432                 INTERACTION PLOT.  The X1LABEL is set to
43433                 "X1*X2" where X1 and X2 represent the variable names.
43434                 No automatic labels are generated for X2LABEL and
43435                 Y1LABEL.
43436
43437        CROSS TABULATE <statistic> - generate a CROSS TABULATE
43438                 <statistic> plot.  This generates to a
43439                 <statistic> STATISTIC plot on the diagonal.
43440                 The X1LABEL is set to "X1*X2" where X1 and X2
43441                 represent the variable names.  No automatic labels
43442                 are generated for X2LABEL and Y1LABEL.
43443
43444                 If no <statistic> is given, then a special form
43445                 of the CROSS TABULATE PLOT is generated.  For this
43446                 case, there is no response variable
43447                 (i.e., CROSS TABULATE PLOT X1 X2 as oppossed to
43448                 CROSS TABULATE MEAN PLOT Y X1 X2).  The X1LABEL
43449                 and Y1LABEL are set to the appropriate variable
43450                 name.
43451
43452    A few of the above plots support a <statistic> option.  This
43453    can be one of 30+ supported statistics (the supported statistics
43454    are identical to those for the STATISTIC PLOT and the BOOTSTRAP
43455    PLOT).  It is typically a location statistic (e.g., MEAN,
43456    MEDIAN) or a scale statistic (e.g., STANDARD DEVIATION, VARIANCE,
43457    MAD).
43458
43459    Dataplot automatically defines X1LABEL, X2LABEL, and YLABEL
43460    commands for these plots.  You can control the attributes
43461    of these labels with the standard label setting commands.
43462    If you have defined variable labels (with the VARIABLE LABEL
43463    command), these will automatically be substituted for variable
43464    names in the labels.
43465
43466    If you have defined variable labels with the VARIABLE LABEL
43467    command and you want to suppress the automatic expansion
43468    of the variable name to the variable label, enter
43469
43470        SET VARIABLE LABEL EXPAND OFF
43471
43472    To restore the default that variable names will be expanded to
43473    the corresponding variable label, enter
43474
43475        SET VARIABLE LABEL EXPAND ON
43476
43477Note:
43478    The following option controls which axis tic marks, tic mark
43479    labels, and axis labels are plotted.
43480
43481        SET SCATTER PLOT MATRIX LABELS <ON/OFF/XON/YON/BOX>
43482
43483    OFF means that all axis labels are suppressed (this can be
43484    useful if a large number of variables are being plotted).  ON
43485    means that both X and Y axis labels are printed.  XON only
43486    plots the x axis labels and YON only plots the y axis labels.
43487
43488    BOX is a special option that creates an extra column on the
43489    left and an extra row on the bottom.  The axis label is
43490    printed in this box.
43491
43492    The default is ON (both x and y axis labels are printed).
43493
43494Note:
43495    The following option controls where the x axis tic marks,
43496    tic mark labels, and axis label are printed.
43497
43498        SET SCATTER PLOT MATRIX X AXIS <BOTTOM/TOP/ALTERNATE>
43499
43500    BOTTOM specifies that the x axis labels are printed on the
43501    bottom axis (on the last row only).  TOP specifies that
43502    the x axis labels are printed on the top axis (first row
43503    only).  ALTERNATE specifies that the x axis labels alternate
43504    between the top (first row) and bottom axis (last row).
43505    We recommend using the TIC OFFSET command to avoid overlap
43506    of axis labels and tic marks.
43507
43508    The default is ALTERNATE.
43509
43510Note:
43511    The following option controls where the y axis tic marks,
43512    tic mark labels, and axis label are printed.
43513
43514        SET SCATTER PLOT MATRIX Y AXIS <LEFT/RIGHT/ALTERNATE>
43515
43516    LEFT specifies that the y axis labels are printed on the
43517    left axis (on the first column only).  RIGHT specifies that
43518    the y axis labels are printed on the right axis (last column
43519    only).  ALTERNATE specifies that the y axis labels alternate
43520    between the left (first column) and right axis (last column).
43521    We recommend using the TIC OFFSET command to avoid overlap
43522    of axis labels and tic marks.
43523
43524    The default is ALTERNATE.
43525
43526Note:
43527    Users have different preferences in terms of whether the
43528    plot frames for neighboring plots are connected or not.
43529    This is controlled with the following option.
43530
43531        SET SCATTER PLOT MATRIX FRAME <DEFAULT/CONNECTED/USER>
43532
43533    DEFAULT connects neighboring frames (i.e., the FRAME CORNER
43534    COORDINATES are set to 0 0 100 100).  USER uses whatever
43535    frame coordinates are currently set (15 20 85 90 by default)
43536    and makes no special provisions for axis labels and tic marks
43537    (i.e., you set them as you normally would, each plot uses
43538    whatever you have set).  CONNECTED uses whatever frame
43539    coordinates have been set by the user, but it draws the axis
43540    labels and tic marks as if DEFAULT were being used (that is, as
43541    determined by the SET SCATTER PLOT MATRIX <LABELS/X AXIS/Y AXIS>
43542    commands described above).  Typically, CONNECTED is used to
43543    put a small bit of space between plots.  For example, you
43544    might use FRAME CORNER COORDINATES  3 3 97 97 before the
43545    SCATTER PLOT MATRIX command.
43546
43547    The default is DEFAULT.
43548
43549Note:
43550    When the tic marks and tic mark labels are all plotted on the
43551    same side (i.e., SET SCATTER PLOT MATRIX Y AXIS is
43552    set to LEFT or RIGHT or SET SCATTER PLOT MATRIX X AXIS is
43553    set to BOTTOM or TOP), then overlap between plots is possible.
43554    The TIC OFFSET command can be used to avoid this.  In addition,
43555    you can stagger the tic labels with the following command:
43556
43557        SET SCATTER PLOT MATRIX LABEL DISPLACEMENT
43558                <NORMAL/STAGGERED/VALUE>
43559
43560    NORMAL means that all tic labels are plotted at a distance
43561    determined by the TIC LABEL DISPLACEMENT command.  STAGGERED
43562    means that alternating plots will be staggered.  That is, one
43563    will use the standard displacement while the next uses a
43564    staggered value.  Entering this command with a numeric value
43565    specifies the amount of the displacement for the staggered
43566    tic labels.  For example,
43567
43568        TIC MARK LABEL DISPLACEMENT 10
43569        SET SCATTER PLOT MATRIX LABEL DISPLACEMENT STAGGERED
43570        SET SCATTER PLOT MATRIX LABEL DISPLACEMENT 25
43571
43572    These commands specify that the default tic label displacement
43573    is 10 and the staggered tic mark label displacement is 25.
43574
43575Note:
43576    It is often helpful on scatter plot matrices to overlay a
43577    fitted line on the plots.  The following command is used
43578    to specify the type of fit.
43579
43580        SET SCATTER PLOT MATRIX FIT <NONE/LOWESS/LINE/QUAD/SMOOTH>
43581
43582    NONE means that no fitted line is plotted.  LOWESS means
43583    that a locally weighted least squares line will be overlaid.
43584    LINE means that a linear fit (Y = A0 + A1*X) will be overlaid.
43585    QUAD means that a quadratic fit (Y = A0 + A1*X + A2*X**2) will
43586    be overlaid.  SMOOTH means that a least squares smoothing will
43587    be overlaid.
43588
43589    For LOWESS, it is recommended that the lowess fraction be set
43590    fairly high (e.g., LOWESS FRACTION 0.6).
43591
43592    The fitted line is currently only generated if the scatter plot
43593    matrix plot type is PLOT.
43594
43595    The default is for no fitted line to be overlaid on the plot.
43596    If a overlaid fit is desired, the most common choice is to use
43597    LOWESS.
43598
43599Note:
43600    Dataplot supports a special plot type
43601
43602        PLOT Y X TAG
43603
43604    In this form of the plot command, TAG is a group identifier
43605    variable.  Points belonging to the same group are plotted with
43606    the same attributes (controlled by the CHARACTER and LINE commands
43607    and their various attribute setting commands).
43608
43609    Using a tag variable has two common purposes:
43610
43611    1) If your data has natural groups (e.g., batch 1 and batch 2).
43612    2) To identify certain points.  The most common application
43613       would be to flag outliers.
43614
43615    You can specify that the scatter plot matrix use the form
43616    of the PLOT command by using the command
43617
43618        SET SCATTER PLOT MATRIX TAG <ON/OFF>
43619
43620    OFF specifies that the standard plot command (PLOT Y1 Y2) will
43621    be used.  ON specifies that the last variable on the
43622    SCATTER PLOT MATRIX command is a tag variable.  That is, it is
43623    not plotted directly, but is instead the third variable on
43624    all the plot commands generated by the scatter plot matrix.
43625
43626    Currently, this command only applies if the scatter plot matrix
43627    plot type is set to PLOT.
43628
43629    This form is common enough that the command
43630
43631        YOUDEN MATRIX PLOT Y1 Y2 ... YK TAG
43632
43633    implements this automatically.  That is, YOUDEN MATRIX PLOT
43634    is equivalent to
43635
43636        SET SCATTER PLOT MATRIX TAG ON
43637        SCATTER PLOT MATRIX Y1 Y2 ... YK TAG
43638
43639    In some cases, you may want to use a tag variable for both
43640    purposes.  That is, you may have natural groups in your data,
43641    but you also want to flag certain outlying points.  You can
43642    do this by using a SUBSET clauuse.  For example,
43643
43644        LIMITS 0 120
43645        SET SCATTER PLOT MATRIX TAG ON
43646        CHARACTER CIRCLE SQUARE TRIANGLE
43647        CHARACTER FILL OFF OFF OFF
43648        SCATTER PLOT MATRIX Y1 Y2 Y3 Y4 TAG  SUBSET Y2 <= 100
43649        PRE-ERASE OFF
43650        CHARACTER FILL ON ON ON
43651        SCATTER PLOT MATRIX Y1 Y2 Y3 Y4 TAG  SUBSET Y2 > 100
43652
43653    The SET SCATTER PLOT MATRIX LIMITS command, discussed below,
43654    can be used to control the axis limits for the individual plots.
43655
43656    The default is OFF.
43657
43658Note:
43659    Dataplot allows you to set axis limits with the LIMITS command.
43660    For the scatter plot matrix, it is often desirable to set
43661    the axis limits for each plot.  This can be done with the
43662    command
43663
43664        SET SCATTER PLOT MATRIX LIMITS <LOW1> <UPP1> <LOW2> <UPP2> ...
43665
43666    Note that the pairs of limits correspond to the variable list
43667    in the SCATTER PLOT MATRIX command.  That is, if Y3 is the
43668    third variable in the command, Dataplot will set the YLIMITS
43669    when Y3 is plotted on the y axis and the XLIMITS when Y3 is
43670    plotted on the x axis.
43671
43672    This command is particularly useful if you want to overlay
43673    scatter plot matrices (the example discussed for the
43674    SET SCATTER PLOT MATRIX TAG command gives an example of where
43675    you might want to do this).
43676
43677    The default is to allow the axis limits to float with the data.
43678
43679Note:
43680    Dataplot supports a subregion capability.  This is used to
43681    draw "engineering limits" on a plot.  For a scatter plot matrix,
43682    if you specify engineering limits, you typically want these
43683    limits to vary with each plot.  They can be specified with the
43684    command
43685
43686        SET SCATTER PLOT MATRIX SUBREGION LIMITS <LOW1> <UPP1>
43687            <LOW2> <UPP2> ...
43688
43689    This command is similar to the SET SCATTER PLOT MATRIX LIMITS
43690    command in that the list corresponds to the variables entered
43691    on the SCATTER PLOT MATRIX command.
43692
43693    Only one set of subregion limits can be set for each variable.
43694
43695    The default is that no subregion limits are set.
43696
43697Note:
43698    For a scatter plot matrix, there are numerous choices for what
43699    to plot on the diagonal.  This is controlled with the command
43700
43701        SET SCATTER PLOT MATRIX DIAGONAL <BLANK/LINE/HISTOGRAM/BOXPLOT>
43702
43703    If BLANK, an empty plot is generated and the variable label
43704    is plotted in the center of the empty plot.  If LINE, a
43705    PLOT Y1 Y1 is generated (this will simply be a 45 degree line,
43706    but it does give some indication of the univariate distribution
43707    of the variable).  If HISTOGRAM, a relative histogram of the
43708    variable is generated.  For the HISTOGRAM, the axis labels do
43709    not apply to the histogram plot.  A relative histogram is drawn
43710    to make comparisons more meaningful.  If BOXPLOT, a box plot of
43711    the variable is generated.  The BOXPLOT only applies if the
43712    SET SCATTER PLOT MATRIX TAG ON command is entered. That is, the
43713    box plot is only used if there are groups in the data.  For the
43714    box plot, the y axis limtis are valid, but the x axis limits
43715    are not.
43716
43717    This command only applies if the scatter plot matrix plot
43718    type is PLOT, CROSS TABULATE, or DEX CONTOUR.
43719
43720    The default is BLANK.
43721
43722Note:
43723    The scatter plot matrix is redundant in the sense that
43724    PLOT Y1 Y2 is equivalent to PLOT Y2 Y1 (with the axes reversed).
43725    For this reason, some analysts prefer to omit plots below the
43726    diagonal.  This can be controlled with the command
43727
43728        SET SCATTER PLOT MATRIX LOWER DIAGONAL <ON/OFF>
43729
43730    If OFF, the plots below the diagonal are omitted.  If ON, the
43731    plots below the diagonal are drawn.
43732
43733    The default is ON.
43734
43735Note:
43736    You can specify a special X2LABEL for the plots with the
43737    following command
43738
43739        SET SCATTER PLOT MATRIX X2LABEL <OFF/
43740              CORRELATION/PERCENT CORRELATION/EFFECT/
43741              PERCENT ACCEPT/NUMBER ACCEPT/ACCEPT TOTAL>
43742
43743    where
43744        OFF      - no special X2LABEL is drawn.
43745        CORRELATION - the correlation of the points on the plot
43746                   is printed with the X2LABEL.  This option
43747                   is typically used with the plot type PLOT.
43748        PERCENT CORRELATION - this is the same as CORRELATION, except
43749                   that the correlation is printed as a percent.
43750        EFFECT   - the difference between the low and high value
43751                   is printed.  This option is typically used with
43752                   the plot type DEX <stat> INTERACTION (and doesn't
43753                   really make any sense with the other plot types).
43754        PERCENT ACCEPT - this option prints the percentage of points
43755                   inside the first subregion.  If no subregions are
43756                   defined, this option makes no sense.  It is
43757                   typically used to specify the percentage of points
43758                   within engineering limits.
43759        NUMBER ACCEPT - this option is similar to PERCENT ACCEPT.
43760                   However, the number of points rather than the
43761                   percentage is printed.
43762        ACCEPT TOTAL - this option is similar to NUMBER ACCEPT.
43763                   However, it prints the number accepted first,
43764                   then the total number of points.
43765        ACCEPT TOTAL PERCENT - this option is similar to ACCEPT TOTAL.
43766                   However, after printing the number accepted and
43767                   the total number, it prints the percentage
43768                   accepted.
43769
43770
43771    The following commands can be used to add a prefix and suffix
43772    to the X2LABEL.  For example, you might want the PERCENT
43773    CORRELATION to append a "%" after the percent correlation
43774    and to start with "CORR = ".
43775
43776        SET X2LABEL PREFIX <prefix>
43777        SET X2LABEL SUFFIX <suffix>
43778
43779    The appearance and location of the X2LABEL are controlled
43780    with the standard X2LABEL attribute setting commands.
43781
43782    There are occassions where you may want to use the values
43783    computed in the X2LABEL for additional numeric computations.
43784    These values are automatically written to the file
43785    "dpst5f.dat".  The values are printed in the order the plots
43786    are generated.
43787
43788Note:
43789    You can use standard plot control commands to control the
43790    appearance of the scatter plot matrix.
43791
43792    For example,
43793
43794       MULTIPLOT CORNER COORDINATES 5 5 95 95
43795       MULTIPLOT SCALE FACTOR 3
43796       TIC OFFSET UNITS SCREEN
43797       TIC OFFSET 5 5
43798
43799    is a fairly typical set of commands commonly used with
43800    scatter plot matrices.
43801
43802Default:
43803    None
43804
43805Synonyms:
43806    MATRIX PLOT is a synonym for SCATTER PLOT MATRIX.
43807    SET MATRIX PLOT is a synonym for SET SCATTER PLOT MATRIX.
43808
43809Related Commands:
43810    PLOT               = Generates a data or function plot.
43811    FACTOR PLOT        = Generate a factor plot.
43812    CONDITIONAL PLOT   = Generate a conditional (subset) plot.
43813
43814Reference:
43815    "Visualizing Data", Cleveland, William S., Hobart Press, 1993.
43816
43817    "Graphical Exploratory Data Analysis", du Toit, Steyn, and Stumpf,
43818    Springer-Verlang, 1986.
43819
43820Applications:
43821    Exploratory Data Analysis, Multivariate Data Analysis
43822
43823Implementation Date:
43824    2000/1
43825
43826Program:
43827    read iris.dat y1 y2 y3 y4 tag
43828    multiplot corner coordinates 10 10 90 90
43829    multiplot scale factor 4
43830    tic offset units screen
43831    tic offset 5 5
43832    line blank blank blank
43833    character 1 2 3
43834    set matrix plot tag on
43835    matrix plot y1 y2 y3 y4 tag
43836
43837-----SCATTER (LET)-------------------------------------
43838
43839SCATTER
43840
43841Name:
43842    SCATTER (LET)
43843
43844Type:
43845    Let Subcommand
43846
43847Purpose:
43848    Save rows of a variable based on index values
43849    contained in another variable.
43850
43851Description:
43852    The GATHER command (HELP GATHER for details) can be used
43853    to extract specific rows of a variable based on an index
43854    variable.
43855
43856    The SCATTER command is most often used after a GATHER
43857    command.  That is, we use GATHER to extract specific rows
43858    of a variable, perform operations that modify these extracted
43859    values, and then use SCATTER to save these modfied values
43860    back in the original variable.
43861
43862Syntax:
43863    LET <y> = SCATTER <x>  <index>
43864    where <x> is a response variable;
43865          <index> is a variable containing row numbers;
43866    and   <y> is a variable where the values of <x> will be saved.
43867
43868Examples:
43869    LET Y = SCATTER X INDEX
43870
43871Default:
43872    None
43873
43874Synonyms:
43875    None
43876
43877Related Commands:
43878    GATHER             = Extract specified rows of data from a variable
43879                         based on an index variable.
43880    SEQUENCE           = Generate a patterned sequence of values.
43881    SORT               = Sort a column of numbers.
43882    RANK               = Rank a column of numbers.
43883    CODE               = Code a column of numbers.
43884    SUBSET             = Specifies a subset to be included in a plot,
43885                         analysis, or LET command.
43886    RETAIN             = Retain specified rows or a subset of a
43887                         variable.
43888
43889Applications:
43890    Data Transformation
43891
43892Implementation Date:
43893    2008/11
43894
43895Program:
43896    let n = 30
43897    let xseq = sequence 1 1 n
43898    let x = normal rand numb for i = 1 1 n
43899    let iindex = data 10  14  8  23  19
43900    .
43901    let y = -10 for i = 1 1 n
43902    let y = scatter x iindex
43903    set write decimals 3
43904    print xseq  x  y iindex
43905
43906-----SEARCH-------------------------------------------------------
43907
43908SEARCH
43909
43910Name:
43911    SEARCH
43912
43913Type:
43914    Support Command
43915
43916Purpose:
43917    Search a file for a string.
43918
43919Syntax 1:
43920    SEARCH  <file name>  <string>
43921    where <file name> is the file to be searched;
43922    and   <string> is the string to search for.
43923
43924    This syntax prints all lines where a match is found.
43925
43926Syntax 2:
43927    SEARCH1   <file name>    <string>
43928    where <file name> is the file to be searched;
43929    and where <string> is the string to search for.
43930
43931    This syntax prints the first line where a match is found.
43932
43933Syntax 3:
43934    SEARCHB   <file name>    <string>
43935    where <file name> is the file to be searched;
43936    and   <string> is the string to search for.
43937
43938    This syntax prints from the first line where a match is found to
43939    the next blank line.
43940
43941Syntax 4:
43942    SEARCHDA  <file name>    <string>
43943    where <file name> is the file to be searched;
43944    and   <string> is the string to search for.
43945
43946    This syntax prints from the first line where a match is found to
43947    the next dashed line.
43948
43949Syntax 5:
43950    SEARCH  REFERENCE    <string>
43951    where <string> is the string to search for.
43952
43953    This syntax searches the file refman.tex located in the Dataplot
43954    HELP directory.  This file is used by the WEB HELP command to access
43955    the Dataplot reference manual on the Dataplot web pages.
43956
43957Syntax 6:
43958    SEARCH  HANDBOOK    <string>
43959    where <string> is the string to search for.
43960
43961    This syntax searches the file handbk.tex located in the Dataplot
43962    HELP directory.  This file is used by the WEB HANDBOOK command to
43963    access the NIST/SEMATECH e-Handbook of Statistics web pages.
43964
43965Syntax 7:
43966    SEARCH  DIRECTORY    <string>
43967    where <string> is the string to search for.
43968
43969    This syntax searches the file dpdirf.tex located in the Dataplot
43970    HELP directory.  This file contains a one line description of
43971    Dataplot commands sorted by category.
43972
43973Syntax 8:
43974    SEARCH  DICTIONARY    <string>
43975    where <string> is the string to search for.
43976
43977    This syntax searches the file dpdicf.tex located in the Dataplot
43978    HELP directory.  This file contains a one line description of
43979    Dataplot commands sorted alphabetically.
43980
43981Examples:
43982    SEARCH PLOTCALIB.  PLOT
43983    SEARCH PROG.PLOTLAB  READ
43984    SEARCH REFERENCE MEAN PLOT
43985    SEARCH HANDBOOK RELIABILITY
43986
43987Note:
43988    In versions prior to 2018/04, only the first word of
43989    <string> was matched.  For example,
43990    SEARCH REFERENCE MEAN PLOT would find all lines in
43991    refman.tex that contain the word MEAN.
43992
43993    Starting with the 2018/04 version,
43994    SEARCH REFERENCE MEAN PLOT will now only match the lines
43995    containing the phrase MEAN PLOT.  Note that words MEAN PLOT must
43996    appear contiguously (i.e., as a single phrase) on the line.
43997    It does not do a separate search for MEAN and then for
43998    PLOT and it does not match lines where MEAN and PLOT do not
43999    appear together.  For example, "MEAN OF THE PLOT" would not be
44000    a match for "MEAN PLOT".
44001Note:
44002    Dataplot will save the line number of the first match in the
44003    parameter LINENUMB.
44004
44005Note:
44006    Only the first 80 characters of the line will be printed.
44007
44008Note:
44009    The search is not case sensitive.
44010
44011Note:
44012    The FOR clause can be used to search a restricted part of the
44013    file.  For example,
44014
44015         SEARCH PROG.PLOTLAB  PLOT  FOR I = 1 1 200
44016
44017    searches only the first 200 lines of the file.
44018
44019Note:
44020    DATAPLOT has no restrictions on the file name other than it be a
44021    valid file name on the local operating system and that it contain
44022    a period "." in the file name itself or as a trailing character.
44023    DATAPLOT strips off trailing periods on those systems where it is
44024    appropriate to do so.  On systems where trailing periods can be a
44025    valid file name (e.g., Unix), DATAPLOT tries to open the file with
44026    the trailing period.  If this fails, it then tries to open the file
44027    with the trailing period stripped off.
44028
44029Note:
44030    File names are case sensitive on Unix file systems.  For Unix,
44031    DATAPLOT attempts to open the file as given.  If this fails, it
44032    attempts to open the file as all upper case characters.  If this
44033    fails, it attempts to open the file as all lower case characters.
44034    All other currently supported systems are not case sensitive
44035    regarding file names.
44036
44037    As a further caution for Unix hosts, certain expansion characters
44038    (specifically ~ to refer to your home directory) are interpreted
44039    by the shell and are not recognized by the Fortran compiler.  These
44040    expansion characters are interpreted as literal characters and do
44041    not yield the intended file name.
44042
44043Default:
44044    None
44045
44046Synonyms:
44047    SEARCHALL is a synonym for SEARCH.
44048
44049    ? is a synonym for SEARCH REFERENCE
44050    SEARCH is a synonym for SEARCH REFERENCE
44051    SEARCH RM is a synonym for SEARCH REFERENCE
44052
44053    ??? is a synonym for SEARCH HANDBOOK
44054    SEARCH HB is a synonym for SEARCH HANDBOOK
44055    SEARCH HANDBK is a synonym for SEARCH HANDBOOK
44056
44057    SEARCH DIR is a synonym for SEARCH DIRECTORY
44058    SEARCH DIRE is a synonym for SEARCH DIRECTORY
44059    SEARCH DIC is a synonym for SEARCH DICTIONARY
44060    SEARCH DICT is a synonym for SEARCH DICTIONARY
44061
44062Related Commands:
44063    LIST          = Print the contents of the file.
44064    WEB HELP      = Access Dataplot's web-based documentation.
44065    WEB HANDBOOK  = Access the NIST/SEMATECH Handbook of Statistical
44066                    Methods web pages.
44067
44068Applications:
44069    Documentation
44070
44071Implementation Date:
44072    1988/01
44073    1988/08: Support for DICTIONARY and DIRECTORY searches
44074    1994/01: Support for SEARCH1 option
44075    2003/02: Support for saving LINENUMB
44076    2018/04: Support for REFERENCE and HANDBOOK searches
44077    2018/04: Support for multi-word searches
44078    2018/04: Add various synonyms
44079
44080Program:
44081    SEARCH REFERENCE MEAN PLOT
44082    WEB HELP MEAN PLOT
44083
44084-----SEARCH DIRECTORY (SET)--------------------------------------------
44085
44086SEARCH DIRECTORY
44087
44088Name:
44089    SEARCH DIRECTORY (SET)
44090
44091Type:
44092    Set Subcommand
44093
44094Purpose:
44095    Specify the name of the directory where Dataplot will look for files.
44096
44097Description:
44098    When Dataplot encounters a file name (on the LIST, READ, WRITE, or CALL
44099    commands), it will do the following:
44100
44101       1. It will first look for the file in the current directory (you
44102          can enter the PWD command if you are not sure what that is).
44103
44104       2. If the command
44105
44106             SET HOME PATH ON
44107
44108          has been given, then your home directory will be searched next.
44109
44110       3. If it does not find the file, it will look for the file in
44111          the Dataplot auxillary directory.  By default, this will be
44112          "C:\Program Files (x86)\NIST\DATAPLOT" under Windows systems
44113          and "/usr/local/lib/dataplot" under Unix/Linux/Mac OS X
44114          systems.  However, this may be different on your platform.
44115
44116          Dataplot first searches this directory and then the following
44117          sub-directories "help", "data", "dex", "10step", "macros",
44118          "programs", "text", "menu", "ps", and "scripts" are searched
44119          (in the order given).
44120
44121    Note that under Unix/Linux/Mac OS X systems, which are case sensitive,
44122    Datatplot will first try to open the file name as given.  If the file
44123    is not found, then Dataplot will convert the file name to all upper
44124    case and try to open the file.  If the file is not found, then Dataplot
44125    will convert the file name to all lower case and try to open the
44126    file.  Note that this file name conversion is performed in each
44127    directory before moving to the next directory.
44128
44129    Some users may find it convenient to keep macros and datasets that will
44130    be used in subsequent Dataplot sessions in a common directory.  The
44131    SEARCH DIRECTORY command allows you to specify a directory to be
44132    searched for file names.  This directory will be searched after the
44133    current directory but before the Dataplot auxillary directories.
44134
44135    Currently, this command is limited to a single directory.
44136
44137    Note: The 2020/05 version of Dataplot added the SET SEARCH2 DIRECTORY,
44138          SET SEARCH3 DIRECTORY, SET SEARCH4 DIRECTORY,
44139          SET SEARCH5 DIRECTORY and SET SEARCH6 DIRECTORY commands to
44140          allow up to six user specified directories to be searched.
44141
44142          The 2 to 6 suffix specifies the order in which the directories
44143          are searched.  However, you do not have to define them in any
44144          particular order.  For example, you can enter a SET SEARCH4
44145          DIRECTORY command without entering a SET SEARCH3 DIRECTORY or
44146          a SET SEARCH2 DIRECTORY command.
44147
44148Syntax 1:
44149    SET SEARCH DIRECTORY <string>
44150    where <string> specifies the desired directory name.
44151
44152Syntax 2:
44153    SET SEARCH2 DIRECTORY <string>
44154    where <string> specifies the desired directory name.
44155
44156    This specifies a second user specified directory.
44157
44158Syntax 3:
44159    SET SEARCH3 DIRECTORY <string>
44160    where <string> specifies the desired directory name.
44161
44162    This specifies a third user specified directory.
44163
44164Syntax 4:
44165    SET SEARCH4 DIRECTORY <string>
44166    where <string> specifies the desired directory name.
44167
44168    This specifies a fourth user specified directory.
44169
44170Syntax 5:
44171    SET SEARCH5 DIRECTORY <string>
44172    where <string> specifies the desired directory name.
44173
44174    This specifies a fifth user specified directory.
44175
44176Syntax 6:
44177    SET SEARCH6 DIRECTORY <string>
44178    where <string> specifies the desired directory name.
44179
44180    This specifies a sixth user specified directory.
44181
44182Examples:
44183    SET SEARCH DIRECTORY C:\DATAPLOT_MACROS
44184    SET SEARCH DIRECTORY C:\DATAPLOT_DATASETS
44185    SET SEARCH DIRECTORY /home/heckert/dataplot_macros
44186    SET SEARCH2 DIRECTORY C:\MY_DATAPLOT_FILES
44187
44188Default:
44189    None
44190
44191Synonyms:
44192    SET SEARCH PATH
44193
44194Related Commands:
44195    SET PATH   = Define the location for Dataplot's auxillary files.
44196    LIST       = List the contents of a file.
44197    READ       = Read data from a file.
44198    WRITE      = Write data to a file.
44199    CALL       = Execute commands stored in a file.
44200
44201Applications:
44202    File Usage
44203
44204Implementation Date:
44205    2014/10
44206    2020/05: Added SEARCH2, SEARCH3, SEARCH4, SEARCH5 and SEARCH6 options
44207
44208Program:
44209    . Assume "sample.dp" is in the /home/heckert/dataplot/macros directory
44210    .
44211    SET SEARCH DIRECTORY /home/heckert/dataplot/macros
44212    CALL sample.dp
44213
44214-----SEASONAL LOWESS-----------------------------------------------
44215
44216SEASONAL LOWESS
44217
44218Name:
44219    SEASONAL LOWESS
44220
44221Type:
44222    Analysis Command
44223
44224Purpose:
44225    The SEASONAL LOWESS command decomposes a time series into
44226    trend, seasonal, and residual components using techniques
44227    based on locally weighted least squares.  That is,
44228
44229       X(t) = TREND(t) + SEAS(t) + RES(t)
44230
44231Description:
44232    There are a number of time series techniques that are
44233    based on decomposing time series into a trend, seasonal,
44234    and residual component.  The most popular of these is
44235    based on exponential smoothing.  Seasonal lowess is a
44236    decomposition method based on locally weighted least
44237    squares.
44238
44239    In general, these methods are an alternative to
44240    autoregressive/moving average (ARMA) models.  Decomposition
44241    methods are a preferrable approach when the trend and seasonal
44242    components dominate the series.
44243
44244    The seasonal and trend components are written to the file
44245    DPST1F.DAT (dpst1f.dat on Unix systems) and can be read
44246    back into Dataplot for further plotting and analysis.  The
44247    internal variable RES contains the residual component and
44248    the internal variable PRED contains the trend plus the
44249    seasonality component.  The sample program below demonstrates
44250    a common plot for displaying these components.
44251
44252    The SEASONAL LOWESS command accepts a number of options
44253    which can be defined by LET commands.  The most important is
44254    the PERIOD parameter which identifies the number of seasons
44255    (e.g., 12 for monthly data).  PERIOD defaults to 12.  The
44256    STLWIDTH parameter identifies the number of data points to use
44257    in the LOWESS steps and defaults to N/10.  It is similar to
44258    specifying the LOWESS FRACTION for standard LOWESS smoothing.
44259    The more points used, the more smoothing that occurs.  The
44260    STLSDEG and STLTDEG parameters identify the polynomial degree
44261    used in the lowess for the seasonal and trend components
44262    respectively.  By default, the
44263    seasonal lowess performs some robustness iterations.  Enter
44264
44265       LET STLROBST = 1 to suppress this.
44266
44267    The mathematical details of this technique is described in
44268
44269       Cleveland, Cleveland, McRae, and Terpenning, "STL: A
44270       Seasonal-Trend Decomposition Procedure Based on Loess",
44271       Statistics Research Report, AT&T Bell Laboratories.
44272
44273    Dataplot uses the source code provided by these authors to
44274    implement the SEASONAL LOWESS command.
44275
44276Syntax:
44277    LET PERIOD = <value>
44278    LET STLWIDTH = <value>
44279    LET STLSDEG = <0/1/2>
44280    LET STLTDEG = <0/1/2>
44281    LET STLROBST = <0/1>
44282    SEASONAL LOWESS   <y>   <SUBSET/EXCEPT/FOR qualification>
44283    READ DPST1F.DAT SEAS TREND
44284    where <y> is the variable containing the raw data for which
44285              a seasonal lowess is to be performed;
44286    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
44287
44288    The LET commands are described in the Description section
44289    above.  The READ DPST1F.DAT command is used to read the
44290    seasonal and trend components back into Dataplot.
44291
44292Examples:
44293    LET PERIOD = 12
44294    LET STLWIDTH = 24
44295    LET STLSDEG = 1
44296    LET STLTDEG = 1
44297    LET STLROBST = 0
44298    SEASONAL LOWESS Y
44299
44300Default:
44301    There is no default for the SEASONAL LOWESS command itself.
44302    The defaults for the various LET commands are given in the
44303    Description section.
44304
44305Synonyms:
44306    SEASONAL LOESS is a synonym for SEASONAL LOWESS.
44307
44308Related Commands:
44309    LOWESS SMOOTH      = Perform a lowess smooth.
44310    ARMA               = Perform an ARMA fit.
44311    FIT                = Carries out a least squares fit.
44312
44313Reference:
44314    "STL: A Seasonal-Trend Decomposition Procedure Based on Loess",
44315    Cleveland, Cleveland, McRae, and Terpenning, Statistics
44316    Research Report, AT&T Bell Laboratories.
44317
44318    "Visualizing Data", Cleveland, William S., Hobart Press, 1993.
44319
44320Applications:
44321    Robust Time Series Analysis
44322
44323Implementation Date:
44324    2000/1
44325
44326Program:
44327    skip 25
44328    read mlco2mon.dat co2 date year month
44329    .
44330    .  Perform Seasonal Lowess
44331    .
44332    let period = 12
44333    let stlsdeg = 1
44334    let stltdeg = 1
44335    seasonal lowess co2
44336    skip 0
44337    read dpst1f.dat seas trend
44338    .
44339    .  Generate plot
44340    .
44341    multiplot 4 1
44342    multiplot scale factor 3
44343    multiplot corner coordinates 0 10 100 95
44344    frame corner coordinates 15 0 85 100
44345    xlimits 0 150
44346    tic offset units data
44347    xtic offset 0 15
44348    major xtic mark number 4
44349    xtic marks off
44350    xtic mark labels off
44351    .
44352    ylimits 320 360
44353    major ytic mark number 5
44354    ytic offser 10 10
44355    y1label raw data
44356    plot co2
44357    y1label trend
44358    plot trend
44359    major ytic mark number 5
44360    ylimits -4 4
44361    ytic offser 0.5 0.5
44362    y1label seasonal
44363    plot seas
44364    y1label residuals
44365    x1tic marks on
44366    x1tic mark labels on
44367    plot res
44368    end of multiplot
44369    .
44370    justification center
44371    move 50 97
44372    text SEASONAL LOWESS DECOMPOSITION FOR CO2 CONCENTRATIONS
44373
44374-----SEASONAL SUBSERIES PLOT--------------------------------------
44375
44376SEASONAL SUBSERIES PLOT
44377
44378Name:
44379    SEASONAL SUBSERIES PLOT
44380
44381Type:
44382    Graphics Command
44383
44384Purpose:
44385    Generates a seasonal subseries plot.
44386
44387Description:
44388    A seasonal subseries plot is used to determine if there is
44389    significant seasonality in a time series.  Instead of a straight
44390    time order plot, it splits the plot into the corresponding
44391    seasons (or periods).  For example, for monthly data, all the
44392    January values are plotted, then all the February values, and
44393    so on.  Reference lines are drawn at the seasonal means.
44394
44395Syntax:
44396    LET PERIOD = <value>
44397    LET START = <value>
44398    SEASONAL SUBSERIES PLOT  <y>  <SUBSET/EXCEPT/FOR qualification>
44399    where <y> is the variable of raw data values for which the
44400              the seasonal subseries will be plotted;
44401    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
44402
44403    The LET command is uses to define the period (e.g., the period
44404    for monthly data is typically 12) and the start value.   The
44405    start value is used when the data do not start in the first
44406    unit of the period (e.g., if you have monthly data that starts
44407    in March instead of January, you would use LET START = 3).
44408
44409
44410Examples:
44411    LET PERIOD = 12
44412    LET START = 3
44413    SEASONAL SUBSERIES PLOT Y
44414
44415    LET PERIOD = 4
44416    LET START = 1
44417    SEASONAL SUBSERIES PLOT Y
44418
44419Note:
44420    The sample program below shows how to use various plot control
44421    commands to label the plot.
44422
44423Default:
44424    None
44425
44426Synonyms:
44427    None
44428
44429Related Commands:
44430    RUN SEQUENCE PLOT     = Generates a run sequence plot.
44431    SPECTRAL PLOT         = Generate a spectral plot.
44432    AUTOCORRELATION PLOT  = Generate an autocorrelation plot.
44433    ARMA                  = Fit an ARMA model.
44434    SEASONAL LOWESS       = Generate a lowess based trend/seasonality/
44435                            residual decomposition of a time series.
44436
44437Reference:
44438    "Visualizing Data", Cleveland, William S., Hobart Press, 1993.
44439
44440Applications:
44441    Time Series Analysis
44442
44443Implementation Date:
44444    2000/1
44445
44446Program:
44447    skip 25
44448    read mlco2mon.dat co2 date year month
44449    .
44450    .  Linear Fit to Detrend Data
44451    .
44452    fit co2 date
44453    let co2res = res
44454    .
44455    .  Seasonal Subseries Plot
44456    .
44457    xlimits 7 167
44458    xtic offset 7 7
44459    major xtic mark number 12
44460    minor xtic mark number 0
44461    x1tic mark label format alpha
44462    x1tic mark label content Jan Feb Mar Apr May June July Aug Sep ...
44463    Oct Nov Dec
44464    x1label Month
44465    y1label CO2 Concentrations
44466    let period = 12
44467    let start = 5
44468    title Seasonal Subseries Plot of CO2 Concentrations
44469    seasonal subseries plot co2res
44470
44471-----SEC (LET)---------------------------------------------------
44472
44473SEC
44474
44475Name:
44476    SEC (LET)
44477
44478Type:
44479    Library Function
44480
44481Purpose:
44482    Compute the secant (the reciprocal of the cosine) for a variable or
44483    parameter.
44484
44485Description:
44486    The secant is defined for all real numbers except PI/2 +/- K*PI
44487    where K is an integer.  The range is 1 to plus infinity and -1 to
44488    negative infinity.  By default, the angle is specified in radian
44489    units.  To use degree values, enter the command ANGLE UNITS DEGREES
44490    (ANGLE UNITS RADIANS resets it).
44491
44492Syntax:
44493    LET <y2> = SEC(<y1>)  <SUBSET/EXCEPT/FOR qualification>
44494    where <y1> is a variable or a parameter;
44495          <y2> is a variable or a parameter (depending on what <y1> is)
44496               where the computed secant value is stored;
44497    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
44498
44499Examples:
44500    LET A = SEC(-2)
44501    LET A = SEC(A1)
44502    LET X2 = SEC(X1)
44503    LET X2 = SEC(PI/2)
44504
44505Note:
44506    Library functions are distinguished from let subcommands
44507    in the following ways.
44508    1) Functions enclose the input value in parenthesis.  Let
44509       subcommands use spaces.
44510    2) Functions can accept (and return) either parameters
44511       (i.e., single values) or variables (i.e., an array of
44512       values) while let subcommands are specific in which they
44513       accept as input and what they return as output.
44514    3) Functions can accept expressions while let subcommands
44515       do not.  For example, the following is legal:
44516           LET Y2 = ABS(Y1-INT(Y1))
44517       For let subcommands, you typically have to do something
44518       like the following:
44519           LET YTEMP = Y**2 + 8
44520           LET A = SUM YTEMP
44521
44522Default:
44523    None
44524
44525Synonyms:
44526    None
44527
44528Related Commands:
44529    SIN      = Compute the sine.
44530    COS      = Compute the cosine.
44531    TAN      = Compute the tangent.
44532    COT      = Compute the cotangent.
44533    CSC      = Compute the cosecant.
44534    ARCCOS   = Compute the arccosine.
44535    ARCSIN   = Compute the arcsine.
44536    ARCTAN   = Compute the arctangent.
44537    ARCCOT   = Compute the arccotangent.
44538    ARCSEC   = Compute the arcsecant.
44539    ARCCSC   = Compute the arcsecant.
44540
44541Reference:
44542    Consult any standard trigonometry or pre-calculus textbook.
44543
44544Applications:
44545    XX
44546
44547Implementation Date:
44548    XX
44549
44550Program:
44551    TITLE PLOT SECANT FROM -3.1 TO 3.1
44552    X1LABEL ANGLE (IN RADIANS)
44553    Y1LABEL SECANT VALUE
44554    READ X Y TAG
44555    -3.1   1   1
44556     3.1   1   1
44557    -3.1  -1   2
44558     3.1  -1   2
44559     1.57  20  3
44560     1.57 -20  3
44561    -1.57  20  4
44562    -1.57 -20  4
44563    END OF DATA
44564    YLIMITS -20 20
44565    XLIMITS -3 3
44566    XTIC OFFSET .4 .4
44567    LINES SOLID SOLID SOLID SOLID DOT DOT DOT DOT DOT
44568    PLOT SEC(X) FOR X = .01 .01 1.56 AND
44569    PLOT SEC(X) FOR X = 1.58 .01 3.10 AND
44570    PLOT SEC(X) FOR X =- .01 -.01 -1.56 AND
44571    PLOT SEC(X) FOR X = -1.58 -.01 -3.10 AND
44572    PLOT Y X TAG
44573
44574-----SECH (LET)---------------------------------------------------
44575
44576SECH
44577
44578Name:
44579    SECH (LET)
44580
44581Type:
44582    Library Function
44583
44584Purpose:
44585    Compute the hyperbolic secant for a variable or parameter.
44586
44587Description:
44588    The equation for the hyperbolic secant is:
44589        sech(x) = 1/(e**x + e**-x)
44590    The hyperbolic secant is defined for all real numbers.  The range is
44591    zero to one.
44592
44593Syntax:
44594    LET <y2> = SECH(<y1>)  <SUBSET/EXCEPT/FOR qualification>
44595    where <y1> is a variable or a parameter;
44596          <y2> is a variable or a parameter (depending on what <y1> is)
44597               where the computed hyperbolic secant value is stored;
44598    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
44599
44600Examples:
44601    LET A = SECH(-2)
44602    LET A = SECH(A1)
44603    LET X2 = SECH(X1)
44604    LET X2 = SECH(PI/2)
44605
44606Note:
44607    Library functions are distinguished from let subcommands
44608    in the following ways.
44609    1) Functions enclose the input value in parenthesis.  Let
44610       subcommands use spaces.
44611    2) Functions can accept (and return) either parameters
44612       (i.e., single values) or variables (i.e., an array of
44613       values) while let subcommands are specific in which they
44614       accept as input and what they return as output.
44615    3) Functions can accept expressions while let subcommands
44616       do not.  For example, the following is legal:
44617           LET Y2 = ABS(Y1-INT(Y1))
44618       For let subcommands, you typically have to do something
44619       like the following:
44620           LET YTEMP = Y**2 + 8
44621           LET A = SUM YTEMP
44622
44623Default:
44624    None
44625
44626Synonyms:
44627    None
44628
44629Related Commands:
44630    SIN      = Compute the sine.
44631    COS      = Compute the cosine.
44632    TAN      = Compute the tangent.
44633    COT      = Compute the cotangent.
44634    SEC      = Compute the secant.
44635    CSC      = Compute the cosecant.
44636    ARCCOS   = Compute the arccosine.
44637    ARCSIN   = Compute the arcsine.
44638    ARCTAN   = Compute the arctangent.
44639    ARCCOT   = Compute the arccotangent.
44640    ARCSEC   = Compute the arcsecant.
44641    ARCCSC   = Compute the arcsecant.
44642    SINH     = Compute the hyperbolic sine.
44643    COSH     = Compute the hyperbolic cosine.
44644    TANH     = Compute the hyperbolic tangent.
44645    COTH     = Compute the hyperbolic cotangent.
44646    SECH     = Compute the hyperbolic secant.
44647    CSCH     = Compute the hyperbolic cosecant.
44648    ARCCOSH  = Compute hyperbolic arccosine.
44649    ARCCOTH  = Compute hyperbolic arccotangent.
44650    ARCCSCH  = Compute hyperbolic arccosecant.
44651    ARCSECH  = Compute hyperbolic arcsecant.
44652    ARCSINH  = Compute hyperbolic arcsine.
44653    ARCTANH  = Compute hyperbolic arctangent.
44654
44655Applications:
44656    Trigonometry
44657
44658Implementation Date:
44659    Pre-1987
44660
44661Program:
44662    TITLE AUTOMATIC
44663    PLOT SECH(X) FOR X = -3.1 .05 3.1
44664
44665-----SDECDF (LET)--------------------------------
44666
44667SDECDF
44668
44669Name:
44670    SDECDF (LET)
44671
44672Type:
44673    Library Function
44674
44675Purpose:
44676    Compute the skew double exponential cumulative distribution
44677    function.
44678
44679Description:
44680    The skew double exponential distribution has the following
44681    cumulative distribution function:
44682
44683       F(x,lambda)=0.5*EXP((1+lambda)*x)/(1+LAMBDA)
44684                                                  - infinity < x <= 0
44685                  =1 + EXP(-x) - 0.5/(EXP((1+lambda)*x)*(-1-lambda))
44686                                                  0 < x < infinity
44687                                                  lambda >= 0
44688
44689    For lambda = 0, the skew double exponential reduces to the
44690    double exponential distribution.  As lambda goes to infinity,
44691    the skew double exponential tends to the exponential
44692    distribution.
44693
44694    The standard skew double exponential distribution can be
44695    generalized with location and scale parameters.
44696
44697    The skew double exponential distribution is also known as
44698    the skew Laplace distribution.
44699
44700Syntax:
44701    LET <y> = SDECDF(<x>,<lambda>,<loc>,<scale>)
44702                                <SUBSET/EXCEPT/FOR qualification>
44703    where <x> is a variable or a parameter;
44704          <lambda> is a number of parameter that specifies the
44705              value of the shape parameter;
44706          <loc> is an optional number or parameter that specifies the
44707              value of the location parameter;
44708          <scale> is an optional positive number or parameter that
44709              specifies the value of the scale parameter;
44710          <y> is a variable or a parameter (depending on what <x> is)
44711               where the computed skew double exponential cdf value
44712               is stored;
44713    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
44714
44715Examples:
44716    LET Y = SDECDF(3,1)
44717    LET Y = SDECDF(X1,LAMBDA)
44718    PLOT SDECDF(X,LAMBDA) FOR X = -5 0.1 5
44719
44720Note:
44721    Library functions are distinguished from let subcommands
44722    in the following ways.
44723    1) Functions enclose the input value in parenthesis.  Let
44724       subcommands use spaces.
44725    2) Functions can accept (and return) either parameters
44726       (i.e., single values) or variables (i.e., an array of
44727       values) while let subcommands are specific in which they
44728       accept as input and what they return as output.
44729    3) Functions can accept expressions while let subcommands
44730       do not.  For example, the following is legal:
44731           LET Y2 = ABS(Y1-INT(Y1))
44732       For let subcommands, you typically have to do something
44733       like the following:
44734           LET YTEMP = Y**2 + 8
44735           LET A = SUM YTEMP
44736
44737Default:
44738    None
44739
44740Synonyms:
44741    None
44742
44743Related Commands:
44744    SDEPDF = Compute the skew double exponential probability density
44745             function.
44746    SDEPPF = Compute the skew double exponential percent point
44747             function.
44748    ADEPDF = Compute the asymmetric double exponential probability density
44749             function.
44750    DEXCDF = Compute the double exponential probability density
44751             function.
44752    EXPCDF = Compute the exponential probability density function.
44753    SNCDF  = Compute the skew normal probability density function.
44754    STCDF  = Compute the skew t probability density function.
44755
44756Reference:
44757    "The Laplace Distribution and Generalizations: A Revisit with
44758    Applications to Communications, Economics, Engineering, and
44759    Finance", Birkhauser, 2001, p. 136.
44760
44761    "A Class of Distributions Which Includes the Normal Ones",
44762    Azzalini, Scandinavian Journal of Statistics, 12, 171-178.
44763
44764Applications:
44765    Distributional Modeling
44766
44767Implementation Date:
44768    6/2004
44769
44770Program:
44771    Y1LABEL Probability
44772    X1LABEL X
44773    LABEL CASE ASIS
44774    TITLE CASE ASIS
44775    CASE ASIS
44776    MULTIPLOT 2 2
44777    MULTIPLOT CORNER COORDINATES 0 0 100 95
44778    MULTIPLOT SCALE FACTOR 2
44779    TITLE Lambda = 0
44780    PLOT SDECDF(X,0) FOR X = -5 0.1 5
44781    TITLE Lambda = 1
44782    PLOT SDECDF(X,1) FOR X = -5 0.1 5
44783    TITLE Lambda = 5
44784    PLOT SDECDF(X,5) FOR X = -5 0.1 5
44785    TITLE Lambda = 10
44786    PLOT SDECDF(X,10) FOR X = -5 0.1 5
44787    END OF MULTIPLOT
44788    MOVE 50 97
44789    JUSTIFICATIONC CENTER
44790    TEXT Skew Double Exponential Distribution
44791
44792-----SDEPDF (LET)--------------------------------
44793
44794SDEPDF
44795
44796Name:
44797    SDEPDF (LET)
44798
44799Type:
44800    Library Function
44801
44802Purpose:
44803    Compute the skew double exponential probability density
44804    function.
44805
44806Description:
44807    The skew double exponential distribution has the following
44808    probability density function:
44809
44810       f(x,lambda)=0.5*EXP((1+lambda)*x)     - infinity < x <= 0
44811                  =EXP(-x) - 0.5*EXP(-(1+lambda)*x)  0 < x < infinity
44812                                             lambda >= 0
44813
44814    For lambda = 0, the skew double exponential reduces to the
44815    double exponential distribution.  As lambda goes to infinity,
44816    the skew double exponential tends to the exponential
44817    distribution.
44818
44819    The standard skew double exponential distribution can be
44820    generalized with location and scale parameters.
44821
44822    The skew double exponential distribution is also known as
44823    the skew Laplace distribution.
44824
44825Syntax:
44826    LET <y> = SDEPDF(<x>,<lambda>,<loc>,<scale>)
44827                                <SUBSET/EXCEPT/FOR qualification>
44828    where <x> is a variable or a parameter;
44829          <lambda> is a number of parameter that specifies the
44830              value of the shape parameter;
44831          <loc> is an optional number or parameter that specifies the
44832              value of the location parameter;
44833          <scale> is an optional positive number or parameter that
44834              specifies the value of the scale parameter;
44835          <y> is a variable or a parameter (depending on what <x> is)
44836               where the computed skew double exponential pdf value
44837               is stored;
44838    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
44839
44840Examples:
44841    LET Y = SDEPDF(3,1)
44842    LET Y = SDEPDF(X1,LAMBDA)
44843    PLOT SDEPDF(X,LAMBDA) FOR X = -5 0.01 5
44844
44845Note:
44846    To generate skew double exponential random numbers, enter
44847    the commands
44848
44849        LET LAMBDA = <value>
44850        LET Y = SKEW DOUBLE EXPONENTIAL RANDOM NUMBERS FOR I = 1 1 N
44851
44852    To generate a skew double exponential probability plot or a
44853    skew double exponential Kolmogorov-Smirnov or chi-square
44854    goodness of fit test, enter the following commands
44855
44856        LET LAMBDA = <value>
44857        SKEW DOUBLE EXPONENTIAL PROBABILITY PLOT Y
44858        SKEW DOUBLE EXPONENTIAL KOLMOGOROV SMIRNOV GOODNESS OF FIT Y
44859        SKEW DOUBLE EXPONENTIAL CHI-SQUARE GOODNESS OF FIT Y
44860
44861    To generate a PPCC or Kolmogorov-Smirnov plot, enter the
44862    following commands
44863
44864        LET LAMBDA1 = <value>
44865        LET LAMBDA2 = <value>
44866        SKEW DOUBLE EXPONENTIAL PPCC PLOT Y
44867        SKEW DOUBLE EXPONENTIAL KS PLOT Y
44868
44869    The default values for LAMBDA1 and LAMBDA2 are 0 and 10.
44870
44871Note:
44872    Library functions are distinguished from let subcommands
44873    in the following ways.
44874    1) Functions enclose the input value in parenthesis.  Let
44875       subcommands use spaces.
44876    2) Functions can accept (and return) either parameters
44877       (i.e., single values) or variables (i.e., an array of
44878       values) while let subcommands are specific in which they
44879       accept as input and what they return as output.
44880    3) Functions can accept expressions while let subcommands
44881       do not.  For example, the following is legal:
44882           LET Y2 = ABS(Y1-INT(Y1))
44883       For let subcommands, you typically have to do something
44884       like the following:
44885           LET YTEMP = Y**2 + 8
44886           LET A = SUM YTEMP
44887
44888Default:
44889    None
44890
44891Synonyms:
44892    SKEW LAPLACE is a synonym for SKEW DOUBLE EXPONENTIAL
44893
44894Related Commands:
44895    SDECDF = Compute the skew double exponential cumulative
44896             distribution function.
44897    SDEPPF = Compute the skew double exponential percent point
44898             function.
44899    ADEPDF = Compute the asymmetric double exponential probability density
44900             function.
44901    DEXPDF = Compute the double exponential probability density
44902             function.
44903    EXPPDF = Compute the exponential probability density function.
44904    SNPDF  = Compute the skew normal probability density function.
44905    STPDF  = Compute the skew t probability density function.
44906
44907Reference:
44908    "The Laplace Distribution and Generalizations: A Revisit with
44909    Applications to Communications, Economics, Engineering, and
44910    Finance", Birkhauser, 2001, p. 136.
44911
44912    "A Class of Distributions Which Includes the Normal Ones",
44913    Azzalini, Scandinavian Journal of Statistics, 12, 171-178.
44914
44915Applications:
44916    Distributional Modeling
44917
44918Implementation Date:
44919    6/2004
44920
44921Program:
44922    Y1LABEL Probability
44923    X1LABEL X
44924    LABEL CASE ASIS
44925    TITLE CASE ASIS
44926    CASE ASIS
44927    MULTIPLOT 2 2
44928    MULTIPLOT CORNER COORDINATES 0 0 100 95
44929    MULTIPLOT SCALE FACTOR 2
44930    TITLE Lambda = 0
44931    PLOT SDEPDF(X,0) FOR X = -5 0.1 5
44932    TITLE Lambda = 1
44933    PLOT SDEPDF(X,1) FOR X = -5 0.1 5
44934    TITLE Lambda = 5
44935    PLOT SDEPDF(X,5) FOR X = -5 0.1 5
44936    TITLE Lambda = 10
44937    PLOT SDEPDF(X,10) FOR X = -5 0.1 5
44938    END OF MULTIPLOT
44939    MOVE 50 97
44940    JUSTIFICATIONC CENTER
44941    TEXT Skew Double Exponential Distribution
44942
44943-----SDEPPF (LET)--------------------------------
44944
44945SDEPPF
44946
44947Name:
44948    SDEPPF (LET)
44949
44950Type:
44951    Library Function
44952
44953Purpose:
44954    Compute the skew double exponential percent point function.
44955
44956Description:
44957    The skew double exponential distribution has the following
44958    probability density function:
44959
44960       f(x,lambda)=0.5*EXP((1+lambda)*x)     - infinity < x <= 0
44961                  =EXP(-x) - 0.5*EXP(-(1+lambda)*x)  0 < x < infinity
44962                                             lambda >= 0
44963
44964
44965    To compute the percent point function, Dataplot computes
44966    the cumulative distribution function for X = 0.  If this
44967    value is PCUT and P is the input probability value, then
44968
44969        G(p,lambda) = LOG[2*p*(1-lambda)]/(1+lambda)]  p <= PCUT
44970
44971    If P is greater than PCUT, then Dataplot computes the percent
44972    point function by numerically inverting the cumulative
44973    distribution function.
44974
44975    For lambda = 0, the skew double exponential reduces to the
44976    double exponential distribution.  As lambda goes to infinity,
44977    the skew double exponential tends to the exponential
44978    distribution.
44979
44980    The standard skew double exponential distribution can be
44981    generalized with location and scale parameters.
44982
44983    The skew double exponential distribution is also known as
44984    the skew Laplace distribution.
44985
44986Syntax:
44987    LET <y> = SDEPPF(<p>,<lambda>,<loc>,<scale>)
44988                                <SUBSET/EXCEPT/FOR qualification>
44989    where <p> is a variable, a number or a parameter in the
44990              interval (0,1);
44991          <lambda> is a number of parameter that specifies the
44992              value of the shape parameter;
44993          <loc> is an optional number or parameter that specifies the
44994              value of the location parameter;
44995          <scale> is an optional positive number or parameter that
44996              specifies the value of the scale parameter;
44997          <y> is a variable or a parameter (depending on what <x> is)
44998               where the computed skew double exponential ppf value
44999               is stored;
45000    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
45001
45002Examples:
45003    LET A = SDEPPF(0.95,1)
45004    LET X = SDEPPF(P1,LAMBDA)
45005    PLOT SDEPPF(P,LAMBDA) FOR P = 0.01 0.01 0.99
45006
45007Note:
45008    Library functions are distinguished from let subcommands
45009    in the following ways.
45010    1) Functions enclose the input value in parenthesis.  Let
45011       subcommands use spaces.
45012    2) Functions can accept (and return) either parameters
45013       (i.e., single values) or variables (i.e., an array of
45014       values) while let subcommands are specific in which they
45015       accept as input and what they return as output.
45016    3) Functions can accept expressions while let subcommands
45017       do not.  For example, the following is legal:
45018           LET Y2 = ABS(Y1-INT(Y1))
45019       For let subcommands, you typically have to do something
45020       like the following:
45021           LET YTEMP = Y**2 + 8
45022           LET A = SUM YTEMP
45023
45024Default:
45025    None
45026
45027Synonyms:
45028    None
45029
45030Related Commands:
45031    SDECDF = Compute the skew double exponential cumulative
45032             distribution function.
45033    SDEPDF = Compute the skew double exponential probability density
45034             function.
45035    ADEPDF = Compute the asymmetric double exponential probability density
45036             function.
45037    DEXPDF = Compute the double exponential probability density
45038             function.
45039    EXPPDF = Compute the exponential probability density function.
45040    SNPDF  = Compute the skew normal probability density function.
45041    STPDF  = Compute the skew t probability density function.
45042
45043Reference:
45044    "The Laplace Distribution and Generalizations: A Revisit with
45045    Applications to Communications, Economics, Engineering, and
45046    Finance", Birkhauser, 2001, p. 136.
45047
45048    "A Class of Distributions Which Includes the Normal Ones",
45049    Azzalini, Scandinavian Journal of Statistics, 12, 171-178.
45050
45051Applications:
45052    Distributional Modeling
45053
45054Implementation Date:
45055    6/2004
45056
45057Program:
45058    X1LABEL Probability
45059    Y1LABEL X
45060    LABEL CASE ASIS
45061    TITLE CASE ASIS
45062    X1LABEL DISPLACEMENT 12
45063    CASE ASIS
45064    MULTIPLOT 2 2
45065    MULTIPLOT CORNER COORDINATES 0 0 100 95
45066    MULTIPLOT SCALE FACTOR 2
45067    TITLE Lambda = 0
45068    PLOT SDEPPF(P,0) FOR P = 0.01 0.01 0.99
45069    TITLE Lambda = 1
45070    PLOT SDEPPF(P,1) FOR P = 0.01 0.01 0.99
45071    TITLE Lambda = 5
45072    PLOT SDEPPF(P,5) FOR P = 0.01 0.01 0.99
45073    TITLE Lambda = 10
45074    PLOT SDEPPF(P,10) FOR P = 0.01 0.01 0.99
45075    END OF MULTIPLOT
45076    MOVE 50 97
45077    JUSTIFICATIONC CENTER
45078    TEXT Skew Double Exponential Distribution
45079
45080-----SEED-------------------------------------------------------
45081
45082SEED
45083
45084Name:
45085    SEED
45086
45087Type:
45088    Support Command
45089
45090Purpose:
45091    Specify the seed for random number generation.
45092
45093Description:
45094    Each distinct seed generates a different sequence of random numbers
45095    (the seed allows the random number generator to duplicate the same
45096    sequence of random numbers).
45097
45098    Dataplot supports several different random number generators.
45099    The desired generator can be set with the command
45100
45101        SET RANDOM NUMBER GENERATOR <generator>
45102
45103    where <generator> is one of the following:
45104
45105        FIBONACCI
45106        LINEAR CONGRUENTIAL
45107        MULTIPLICATIVE CONGRUENTIAL
45108        GFSR
45109        FUSHIMI
45110        AS183
45111        GENZ
45112        LUXURY
45113        FIBONACCI CONGRUENTIAL
45114
45115    The deault generator is the FIBONACCI CONGRUENTIAL generator
45116    (the default prior to 2018/05 was the FIBONACCI generator).
45117
45118    The seed value applies to the following generators
45119
45120        FIBONACCI
45121        FIBONACCI CONGRUENTIAL
45122        MULTIPLICATIVE CONGRUENTIAL
45123        AS183
45124
45125    For the FIBONACCI and FIBONACCI CONGRUENTIAL generators, the
45126    minimum seed value should be 305 and the seed should be an
45127    odd number.  Values of the seed less than 305 are equivalent
45128    to 305 and even values of the seed are equivalent to the
45129    nearest odd number.
45130
45131    For the other generators, if you want to obtain a different
45132    sequence of random numbers you can do something like the
45133    following
45134
45135        LET ISKIP = 50000
45136        LET NRAND = 10000
45137        LET YJUNK = UNIFORM RANDOM NUMBERS FOR I = 1 1 ISKIP
45138        LET Y = UNIFORM RANDOM NUMBERS FOR I = 1 1 NRAND
45139
45140    This example will first generate 50,000 random numbers that
45141    will not be used.  It then generates 10,000 random numbers
45142    that will be used.  To obtain a different sequence of random
45143    numbers, modify the value of ISKIP.
45144
45145Syntax:
45146    SEED    <iseed>
45147    where <iseed> is an integer number or parameter that defines the
45148               seed.
45149
45150Examples:
45151    SEED 55671
45152    SEED DEFAULT
45153
45154Note:
45155    To return the current value of the seed, enter
45156
45157        PROBE SEED
45158
45159Default:
45160    305 (Pre-2019/03)
45161    3005 (2019/03)
45162
45163Synonyms:
45164    None
45165
45166Related Commands:
45167    RANDOM NUMBERS (LET)  = Generate random numbers for various
45168                            distributions..
45169
45170Applications:
45171    Random Number Generation
45172
45173Implementation Date:
45174    Pre-1987
45175
45176Program:
45177    SEED 4021
45178    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
45179    SEED 34201
45180    LET Y2 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
45181    SEED 19793
45182    LET Y3 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
45183    SEED 46987
45184    LET Y4 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
45185    LINE COLOR BLACK BLUE RED GREEN
45186    MULTIPLE KERNEL DENSITY PLOT Y1 Y2 Y3 Y4
45187
45188-----SEGMENT COLOR----------------------------------------------------
45189
45190SEGMENT COLOR
45191
45192Name:
45193    SEGMENT ... COLOR
45194
45195Type:
45196    Plot Control Command
45197
45198Purpose:
45199    Specifies the color for the line segments to appear on subsequent
45200    plots.
45201
45202Description:
45203    Segments are straight lines that the analyst can position anywhere
45204    on the plot.  The segments appear on all subsequent plots until
45205    blanked out or overridden with new segment coordinates.  The
45206    segment colors hold for all subsequent plots until defaulted or
45207    overridden with new colors.  Up to 100 such line segments can be
45208    specified.
45209
45210    Segments are most typically used in legend boxes to identify
45211    curves.
45212
45213Syntax:
45214    SEGMENT   <id>   COLOR   <color>
45215    where <id> is an integer number or parameter in the range 1 to 100
45216            that specifies the segment identifier;
45217    and   <color> is a character string or index number that specifies
45218            the desired color.
45219
45220Examples:
45221    SEGMENT 2 COLOR GREEN
45222    SEGMENT 2 COLOR BLUE
45223
45224Note:
45225    A SEGMENT ... COLOR command with no arguments reverts the line
45226    segment color to default; thus SEGMENT 1 COLOR with no arguments
45227    reverts the color for line segment 1 to default.  A SEGMENT ...
45228    COLOR command with no <id> refers to all 100 line segments; thus
45229    SEGMENT COLOR GREEN assigns the color green to all 100 line
45230    segments.  SEGMENT COLOR with no <id> and no arguments reverts the
45231    color to default for all 100 line segments.
45232
45233Default:
45234    All line segments are drawn in black.
45235
45236Synonyms:
45237    None
45238
45239Related Commands:
45240    SEGMENT COORDINATES    = Specify a segment location.
45241    SEGMENT PATTERN        = Specify the line type for a segment.
45242    SEGMENT THICKNESS      = Specify the line thickness for a segment.
45243    LEGEND                 = Specify a legend for a subsequent plot.
45244    ARROW COORDINATES      = Specify the location of an arrow.
45245    BOX COORDINATES        = Specify the location of a box.
45246
45247Applications:
45248    Presentation Graphics
45249
45250Implementation Date:
45251    XX
45252
45253Program:
45254    . POLLUTION SOURCE ANALYSIS, LLOYD CURRIE, DATE--1990
45255    . SUBSET OF CURRIE.DAT REFERENCE FILE
45256    .
45257    SERIAL READ LEAD
45258    164 426 59 98 312 263 607 497 213 54 160 262 547 325 419 94 70
45259    END OF DATA
45260    SERIAL READ POT
45261    106 175 61 79 94 121 424 328 107 218 140 179 246 231 245 339 99
45262    END OF DATA
45263    LET N = SIZE LEAD; LET X = SEQUENCE 1 1 N
45264    .
45265    LINE COLOR G20 G80
45266    LINE THICKNESS 0.3 ALL
45267    SEGMENT 1 COORDINATES 17 87 22 87
45268    SEGMENT 2 COORDINATES 17 83 22 83
45269    SEGMENT 1 COLOR G20
45270    SEGMENT 2 COLOR G80
45271    SEGMENT THICKNESS 0.3
45272    LEGEND 1 COORDINATES 23 86; LEGEND 1 POTASSIUM
45273    LEGEND 2 COORDINATES 23 82; LEGEND 2 LEAD
45274    TITLE DEMONSTRATE SEGMENT COLOR
45275    PLOT POT LEAD VS X
45276
45277-----SEGMENT COORDINATES----------------------------------------------
45278
45279SEGMENT COORDINATES
45280
45281Name:
45282    SEGMENT ... COORDINATES
45283
45284Type:
45285    Plot Control Command
45286
45287Purpose:
45288    Specifies the location of a line segment to appear on subsequent
45289    plots.
45290
45291Description:
45292    Segments are straight lines that the analyst can position anywhere
45293    on the plot.  The segments appear on all subsequent plots until
45294    blanked out or overridden with new segment coordinates.  The
45295    segment colors hold for all subsequent plots until defaulted or
45296    overridden with new colors.  Up to 100 such line segments can be
45297    specified.
45298
45299    The SEGMENT COORDINATES command defines the (x,y) values for the
45300    start and the end points respectively of the line segment.
45301
45302    Segments are most typically used in legend boxes to identify
45303    curves.
45304
45305Syntax:
45306    SEGMENT  <id>  COORDINATES  <x1>  <y1>  <x2>  <y2>
45307    where <id> is an integer number or parameter in the range 1 to 100
45308              that specifies the segment identifier;
45309          <x1> is a number or parameter in the decimal range 0 to 100
45310              that specifies the x coordinate of the start point;
45311          <y1> is a number or parameter in the decimal range 0 to 100
45312              that specifies the y coordinate of the start point;
45313          <x2> is a number or parameter in the decimal range 0 to 100
45314              that specifies the x coordinate of the stop point;
45315    and   <y2> is a number or parameter in the decimal range 0 to 100
45316              that specifies the y coordinate of the stop point.
45317
45318Examples:
45319    SEGMENT 2 COORDINATES 20 80 60 60
45320    SEGMENT 2 COORDINATES 20 60 40 80
45321
45322Note:
45323    A SEGMENT ... COORDINATES command with no arguments omits the line
45324    segment from subsequent plots; thus SEGMENT 1 COORDINATES with no
45325    arguments omits line segment 1 from subsequent plots.  A SEGMENT
45326    ... COORDINATES command with no <id> refers to all 100 line
45327    segments; thus SEGMENT COORDINATES 30 80 40 60 assigns the
45328    coordinates (30,80) and (40,60) to all 100  line segments (but
45329    this has no practical use).  SEGMENT COORDINATES with no <id> and
45330    no arguments omits all 100 line segments from subsequent plots.
45331
45332Default:
45333    No line segments are drawn.
45334
45335Synonyms:
45336    None
45337
45338Related Commands:
45339    SEGMENT COLOR          = Specify the color for a segment.
45340    SEGMENT PATTERN        = Specify the line type for a segment.
45341    SEGMENT THICKNESS      = Specify the line thickness for a segment.
45342    LEGEND                 = Specify a legend for a subsequent plot.
45343    LEGEND COORDINATES     = Specify the location of a legend for a
45344                             subsequent plot.
45345    ARROW COORDINATES      = Specify the location of an arrow.
45346    BOX COORDINATES        = Specify the location of a box.
45347
45348Applications:
45349    Presentation Graphics
45350
45351Implementation Date:
45352    XX
45353
45354Program:
45355    . POLLUTION SOURCE ANALYSIS, LLOYD CURRIE, DATE--1990
45356    . SUBSET OF CURRIE.DAT REFERENCE FILE
45357    .
45358    SERIAL READ LEAD
45359    164 426 59 98 312 263 607 497 213 54 160 262 547 325 419 94 70
45360    END OF DATA
45361    SERIAL READ POT
45362    106 175 61 79 94 121 424 328 107 218 140 179 246 231 245 339 99
45363    END OF DATA
45364    LET N = SIZE LEAD; LET X = SEQUENCE 1 1 N
45365    .
45366    LINE SOLID DASH
45367    SEGMENT 1 COORDINATES 17 87 22 87
45368    SEGMENT 2 COORDINATES 17 83 22 83
45369    SEGMENT 2 PATTERN DASH
45370    LEGEND 1 COORDINATES 23 86; LEGEND 1 POTASSIUM
45371    LEGEND 2 COORDINATES 23 82; LEGEND 2 LEAD
45372    TITLE SEGMENT COORDINATES COMMAND
45373    PLOT POT LEAD VS X
45374
45375-----SEGMENT PATTERN-------------------------------------------------
45376
45377SEGMENT PATTERN
45378
45379Name:
45380    SEGMENT ... PATTERN
45381
45382Type:
45383    Plot Control Command
45384
45385Purpose:
45386    Specifies the line pattern for the line segments to appear on
45387    subsequent plots.
45388
45389Description:
45390    Segments are straight lines that the analyst can position anywhere
45391    on the plot.  The segments appear on all subsequent plots until
45392    blanked out or overridden with new segment coordinates.  The
45393    segment colors hold for all subsequent plots until defaulted or
45394    overridden with new colors.  Up to 100 such line segments can be
45395    specified.
45396
45397    Segments are most typically used in legend boxes to identify
45398    curves.
45399
45400Syntax:
45401    SEGMENT   <id>   PATTERN  <pattern>
45402    where <id> is an integer number or parameter in the range 1 to 100
45403             that specifies the segment identifier;
45404    and   <pattern> is a character string that specifies the desired
45405             line pattern.
45406
45407Examples:
45408    SEGMENT 2 PATTERN SOLID
45409    SEGMENT 2 PATTERN DASH
45410
45411Note:
45412    A SEGMENT ... PATTERN command with no arguments reverts the line
45413    segment pattern to default; thus SEGMENT 1 PATTERN with no
45414    arguments reverts the pattern for line segment 1 to default.  A
45415    SEGMENT ... PATTERN command with no <id> refers to all 100 line
45416    segments; thus SEGMENT PATTERN SOLID assigns the pattern solid to
45417    all 100 line segments.  SEGMENT PATTERN with no <id> and no
45418    arguments reverts the pattern to default for all 100 line segments.
45419
45420Default:
45421    All segments are drawn with solid lines.
45422
45423Synonyms:
45424    None
45425
45426Related Commands:
45427    SEGMENT COLOR          = Specify the color for a segment.
45428    SEGMENT COORDINATES    = Specify a segment location.
45429    SEGMENT THICKNESS      = Specify the line thickness for a segment.
45430    LEGEND                 = Specify a legend for a subsequent plot.
45431    ARROW COORDINATES      = Specify the location of an arrow.
45432    BOX COORDINATES        = Specify the location of a box.
45433
45434Applications:
45435    Presentation Graphics
45436
45437Implementation Date:
45438    XX
45439
45440Program:
45441    . POLLUTION SOURCE ANALYSIS, LLOYD CURRIE, DATE--1990
45442    . SUBSET OF CURRIE.DAT REFERENCE FILE
45443    .
45444    SERIAL READ LEAD
45445    164 426 59 98 312 263 607 497 213 54 160 262 547 325 419 94 70
45446    END OF DATA
45447    SERIAL READ POT
45448    106 175 61 79 94 121 424 328 107 218 140 179 246 231 245 339 99
45449    END OF DATA
45450    LET N = SIZE LEAD; LET X = SEQUENCE 1 1 N
45451    .
45452    LINE DASH DOT
45453    SEGMENT 1 COORDINATES 17 87 22 87
45454    SEGMENT 2 COORDINATES 17 83 22 83
45455    SEGMENT 1 PATTERN DASH
45456    SEGMENT 2 PATTERN DOT
45457    LEGEND 1 COORDINATES 23 86; LEGEND 1 POTASSIUM
45458    LEGEND 2 COORDINATES 23 82; LEGEND 2 LEAD
45459    TITLE SEGMENT COORDINATES COMMAND
45460    PLOT POT LEAD VS X
45461
45462-----SEGMENT THICKNESS-------------------------------------------------
45463
45464SEGMENT THICKNESS
45465
45466Name:
45467    SEGMENT ... THICKNESS
45468
45469Type:
45470    Plot Control Command
45471
45472Purpose:
45473    Specifies the thickness for the line segments to appear on
45474    subsequent plots.
45475
45476Description:
45477    Segments are straight lines that the analyst can position anywhere
45478    on the plot.  The segments appear on all subsequent plots until
45479    blanked out or overridden with new segment coordinates.  The
45480    segment colors hold for all subsequent plots until defaulted or
45481    overridden with new colors.  Up to 100 such line segments can be
45482    specified.
45483
45484    The thickness is specified in DATAPLOT 0 to 100 coordinates (i.e.,
45485    as a percentage of the vertical device size).  A value of 0.1
45486    yields a single line width on most devices.  Typical values are
45487    between 0.05 and 0.3.
45488
45489    Segments are most typically used in legend boxes to identify
45490    curves.
45491
45492Syntax:
45493    SEGMENT   <id>   THICKNESS   <thickness>
45494    where <id> is an integer number or parameter in the range 1 to 100
45495            that specifies the segment identifier;
45496    and   <thickness> is a decimal number or parameter in the range 0
45497              to 100 that specifies the desired line thickness.
45498
45499Examples:
45500    SEGMENT 2 THICKNESS 0.2
45501    SEGMENT 2 THICKNESS 0.3
45502
45503Note:
45504    A SEGMENT ... THICKNESS command with no arguments reverts the line
45505    segment thickness to default; thus SEGMENT 1 THICKNESS with no
45506    arguments reverts the thickness for line segment 1 to default.  A
45507    SEGMENT ... THICKNESS command with no <id> refers to all 100 line
45508    segments; thus SEGMENT THICKNESS 0.2 assigns the thickness 0.2 to
45509    all 100 line segments.  SEGMENT THICKNESS with no <id> and no
45510    arguments reverts the thickness to default for all 100 line
45511    segments.
45512
45513Default:
45514    All segment line thicknesses are 0.1.
45515
45516Synonyms:
45517    None
45518
45519Related Commands:
45520    SEGMENT COLOR          = Specify the color for a segment.
45521    SEGMENT COORDINATES    = Specify a segment location.
45522    SEGMENT PATTERN        = Specify the line type for a segment.
45523    LEGEND                 = Specify a legend for a subsequent plot.
45524    ARROW COORDINATES      = Specify the location of an arrow.
45525    BOX COORDINATES        = Specify the location of a box.
45526
45527Applications:
45528    Presentation Graphics
45529
45530Implementation Date:
45531    XX
45532
45533Program:
45534    . POLLUTION SOURCE ANALYSIS, LLOYD CURRIE, DATE--1990
45535    . SUBSET OF CURRIE.DAT REFERENCE FILE
45536    .
45537    SERIAL READ LEAD
45538    164 426 59 98 312 263 607 497 213 54 160 262 547 325 419 94 70
45539    END OF DATA
45540    SERIAL READ POT
45541    106 175 61 79 94 121 424 328 107 218 140 179 246 231 245 339 99
45542    END OF DATA
45543    LET N = SIZE LEAD; LET X = SEQUENCE 1 1 N
45544    .
45545    LINE THICKNESS 0.1 0.3
45546    SEGMENT 1 COORDINATES 17 87 22 87
45547    SEGMENT 2 COORDINATES 17 83 22 83
45548    SEGMENT 1 THICKNESS 0.1
45549    SEGMENT 2 THICKNESS 0.3
45550    LEGEND 1 COORDINATES 23 86; LEGEND 1 POTASSIUM
45551    LEGEND 2 COORDINATES 23 82; LEGEND 2 LEAD
45552    TITLE DEMONSTRATE SEGMENT THICKNESS
45553    PLOT POT LEAD VS X
45554
45555-----SEMCDF (LET)--------------------------------
45556
45557SEMCDF
45558
45559Name:
45560    SEMCDF (LET)
45561
45562Type:
45563    Library Function
45564
45565Purpose:
45566    Compute the semi-circular cumulative distribution function.
45567
45568Description:
45569    The semi-circular distribution is the distribution onto one axis
45570    of the points uniformly distributed within the unit circle.  As
45571    such, it is useful for testing 2-dimensional uniformity.
45572
45573    The formula for the cumulative distribution function is:
45574
45575       F(x;mu,r) = 0.5 + x*SQRT(r**2 - (x-mu)**2)/(PI*r**2) +
45576                   ARCSIN((x-mu)/r)/PI
45577                   -r <= x <= r
45578
45579    with mu and r denoting the location and scale parameters,
45580    respectively.
45581
45582    The case where mu = 0 and r = 1 is referred to as the
45583    standard semi-circular distribution.
45584
45585Syntax:
45586    LET <y> = SEMCDF(<x>,<mu>,<r>)    <SUBSET/EXCEPT/FOR qualification>
45587    where <x> is a variable, number, or parameter;
45588          <mu> is a variable, number, or parameter that specifies
45589               the location parameter;
45590          <r> is a variable, number, or parameter that specifies
45591               the scale parameter;
45592          <y> is a variable or a parameter (depending on what <x> is)
45593              where the computed semi-circular cdf value is stored;
45594    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
45595
45596    If <mu> and <r> are omitted, they default to 0 and 1,
45597    respectively.
45598
45599Examples:
45600    LET A = SEMCDF(0.5)
45601    LET A = SEMCDF(0.5,0,5)
45602    LET X2 = SEMCDF(X1)
45603
45604Note:
45605    Library functions are distinguished from let subcommands
45606    in the following ways.
45607    1) Functions enclose the input value in parenthesis.  Let
45608       subcommands use spaces.
45609    2) Functions can accept (and return) either parameters
45610       (i.e., single values) or variables (i.e., an array of
45611       values) while let subcommands are specific in which they
45612       accept as input and what they return as output.
45613    3) Functions can accept expressions while let subcommands
45614       do not.  For example, the following is legal:
45615           LET Y2 = ABS(Y1-INT(Y1))
45616       For let subcommands, you typically have to do something
45617       like the following:
45618           LET YTEMP = Y**2 + 8
45619           LET A = SUM YTEMP
45620
45621Default:
45622    None
45623
45624Synonyms:
45625    None
45626
45627Related Commands:
45628    SEMPDF = Compute the semi-circular probability density function.
45629    SEMPPF = Compute the semi-circular percent point function.
45630    UNIPDF = Compute the uniform probability density function.
45631    UNICDF = Compute the uniform cumulative distribution function.
45632    UNIPPF = Compute the uniform percent point function.
45633    NORCDF = Compute the normal cumulative distribution function.
45634    NORPDF = Compute the normal probability density function.
45635    NORPPF = Compute the normal percent point function.
45636
45637Reference:
45638    "Continuous Univariate Distributions - 2", Johnson and Kotz,
45639    Houghton Mifflin, 1970 (chapter 25).
45640
45641    "Simple and Robust Linear Estimation of the Location Parameter of
45642    a Symmetric Distribution", Filliben, unpublished Ph.d dissertation,
45643    Princeton University, 1969 (pp. 21-44, 229-231).
45644
45645Applications:
45646    Distributional Modeling
45647
45648Implementation Date:
45649    1994/4: Implemented for the standard case
45650    2006/10: Implemented for the general case
45651
45652Program:
45653    YLIMITS 0 1
45654    MAJOR YTIC NUMBER 6
45655    MINOR YTIC NUMBER 1
45656    YTIC DECIMAL 1
45657    XLIMITS -1 1
45658    XTIC OFFSET 0.1 0.1
45659    TITLE AUTOMATIC
45660    PLOT SEMCDF(X) FOR X = -1 0.01 1
45661
45662-----SEMI CIRCLE-------------------------------------------------------
45663
45664SEMI CIRCLE
45665
45666Name:
45667    SEMI-CIRCLE
45668
45669Type:
45670    Diagrammatic Graphics Command
45671
45672Purpose:
45673    Draws a semi-circle.
45674
45675Description:
45676    The 2 pairs of coordinates define the (x,y) values for one end and
45677    the other end (respectively) of the diameter of the semi-circle.
45678
45679Syntax:
45680    SEMI-CIRCLE   <x1>   <y1>   <x2>   <y2>
45681    where <x1> is a decimal number or parameter in the range 0 to 100
45682              that specifies the horizontal coordinate of one end;
45683          <y1> is a decimal number or parameter in the range 0 to 100
45684              that specifies the vertical coordinate of one end;
45685          <x2> is a decimal number or parameter in the range 0 to 100
45686              that specifies the horizontal coordinate of the other
45687              end;
45688    and   <y2> is a decimal number or parameter in the range 0 to 100
45689              that specifies the vertical coordinate of the other end.
45690
45691Examples:
45692    SEMI-CIRCLE 50 50 60 60
45693    SEMI-CIRCLE 50 50 60 50
45694    SEMI-CIRCLE 20 20 30 30
45695    SEMI-CIRCLE 50 20 60 20
45696
45697Note:
45698    The line style (i.e., solid, dash), color, and thickness are
45699    controlled by the LINE, LINE COLOR, and LINE THICKNESS commands.
45700    The REGION FILL command can be used to generate solid filled
45701    circles while the REGION PATTERN command can be used to generate
45702    hatch filled patterns.
45703
45704Default:
45705    None
45706
45707Synonyms:
45708    None
45709
45710Related Commands:
45711    CIRCLE           = Draws a circle.
45712    POINT            = Draws a point.
45713    ARROW            = Draws an arrow.
45714    TRIANGLE         = Draws a triangle.
45715    BOX              = Draws a box.
45716    HEXAGON          = Draws a hexagon.
45717    SEMI-CIRCLE      = Draws a semi-circle.
45718    ARC              = Draws an arc.
45719    ELLIPSE          = Draws an ellipse.
45720    OVAL             = Draws an oval.
45721    DIAMOND          = Draws a diamond.
45722    DRAW             = Draws a line.
45723    MOVE             = Moves to a point.
45724    LINES            = Sets the line type for figures and plot lines.
45725    LINE THICKNESSES = Sets the line thickness for figures and  plot
45726                       lines.
45727    LINE COLOR       = Sets the line colors for figures and plot lines.
45728    CROSS-HAIR       = Activates and reads the cross-hair.
45729    TEXT             = Writes a text string.
45730
45731Applications:
45732    XX
45733
45734Implementation Date:
45735    XX
45736
45737Program:
45738    SEMI-CIRCLE 10 10 20 20
45739    SEMI-CIRCLE 60 10 80 30
45740    .
45741    THICKNESS 0.7
45742    SEMI-CIRCLE 10 30 20 40
45743    THICKNESS 0.2
45744    .
45745    LINE DASH
45746    SEMI-CIRCLE 10 50 20 60
45747    LINE SOLID
45748    .
45749    LINE COLOR G50
45750    SEMI-CIRCLE 10 80 20 90
45751    LINE COLOR BLACK
45752    .
45753    REGION FILL ON
45754    SEMI-CIRCLE 30 30 35 35
45755    REGION FILL COLOR G50
45756    SEMI-CIRCLE 40 40 60 60
45757    .
45758    REGION FILL COLOR BLACK
45759    REGION PATTERN D1D2
45760    REGION PATTERN SPACING 3
45761    SEMI-CIRCLE 75 60 90 72
45762
45763-----SEMI INTERQUARTILE RANGE (LET)-------------------------------
45764
45765SEMI INTERQUARTILE RANGE
45766LOWER SEMI INTERQUARTILE RANGE
45767UPPER SEMI INTERQUARTILE RANGE
45768
45769Name:
45770    SEMI INTERQUARTILE RANGE (LET)
45771
45772Type:
45773    Let Subcommand
45774
45775Purpose:
45776    Compute either the lower semi-interquartile range or the upper
45777    semi-interquartile range for a variable.
45778
45779Description:
45780    The interquartile range is:
45781
45782        IQ = UPPER QUARTILE - LOWER QUARTILE
45783
45784    That is, it is the difference betweeen the 75th and 25th
45785    percentiles of a variable.
45786
45787    The lower semi-interquartile range is:
45788
45789        SIQR(L) = q2 - q1
45790
45791    and the upper semi-interquartile range is:
45792
45793        SIQR(U) = q3 - q2
45794
45795    with q1, q2, and q3 denoting the lower quartile, median, and
45796    upper quartile respectively.
45797
45798    The semi-interquartile range is sometimes used in place of the
45799    interquartile range when there is significant skewness in the
45800    data.  For example, it can be used to provide an alternate
45801    definition of the fences in a box plot.
45802
45803Syntax 1:
45804    LET <par> = LOWER SEMI INTERQUARTILE RANGE <y>
45805                <SUBSET/EXCEPT/FOR qualification>
45806    where <y> is the response variable;
45807          <par> is a parameter where the computed lower semi-interquartile
45808               range is stored;
45809    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
45810
45811Syntax 2:
45812    LET <par> = UPPER SEMI INTERQUARTILE RANGE <y>
45813                <SUBSET/EXCEPT/FOR qualification>
45814    where <y> is the response variable;
45815          <par> is a parameter where the computed upper semi-interquartile
45816               range is stored;
45817    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
45818
45819Examples:
45820    LET A = LOWER SEMI INTERQUARTILE RANGE Y1
45821    LET A = UPPER SEMI INTERQUARTILE RANGE Y1
45822    LET A = UPPER SEMI INTERQUARTILE RANGE Y1 SUBSER TAG > 2
45823    LET A = INTERQUARTILE RANGE Y1 SUBSET TAG > 2
45824
45825Note:
45826    Dataplot statistics can be used in a number of commands.  For
45827    details, enter
45828
45829        HELP STATISTICS
45830
45831Default:
45832    None
45833
45834Synonyms:
45835    None
45836
45837Related Commands:
45838    INTERQUARTILE RANGE    = Compute the interquartile range of a variable.
45839    BOX PLOT               = Generate a box plot.
45840
45841References:
45842    Walker, Dovedo, Chakraborti and Hilton (2019), "An Improved Boxplot
45843    for Univariate Data". American Statistician, Vol. 72, No. 4,
45844    pp. 348-353.
45845
45846Applications:
45847    Robust Data Analysis
45848
45849Implementation Date:
45850    2019/08
45851
45852Program:
45853    LET NU = 1
45854    LET Y = CHISQUARE RANDOM NUMBERS FOR I = 1 1 100
45855    LET SIQRL = LOWER SEMI INTERQUARTILE RANGE Y
45856    LET SIQRU = UPPER SEMI INTERQUARTILE RANGE Y
45857    PRINT SIQRL SIQRU
45858
45859-----SEMPDF (LET)--------------------------------
45860
45861SEMPDF
45862
45863Name:
45864    SEMPDF (LET)
45865
45866Type:
45867    Library Function
45868
45869Purpose:
45870    Compute the semi-circular probability density function.
45871
45872Description:
45873    The semi-circular distribution is the distribution onto one axis
45874    of the points uniformly distributed within the unit circle.  As
45875    such, it is useful for testing 2-dimensional uniformity.
45876
45877    The probability density function for the semi-circular
45878    distribution is:
45879
45880       f(x;mu,r) = 2*sqrt(r**2 - (x-mu)**2)/(PI*r**2)  -r <= x <= r
45881
45882    with mu and r denoting the location and scale parameters,
45883    respectively.  The scale parameter, r, is the radius of
45884    the semi-circle (or ellipse if r not equal to 1).
45885
45886    The case where mu = 0 and r = 1 is referred to as the
45887    standard semi-circular distribution and has the following
45888    probability density function:
45889
45890       f(x) = 2*sqrt(1-x**2)/PI      -1 <= x <= 1
45891
45892    This distribution has mean 0 and standard deviation r/2.
45893
45894Syntax:
45895    LET <y> = SEMPDF(<x>,<mu>,<r>)    <SUBSET/EXCEPT/FOR qualification>
45896    where <x> is a variable, number, or parameter;
45897          <mu> is a variable, number, or parameter that specifies
45898               the location parameter;
45899          <r> is a variable, number, or parameter that specifies
45900               the scale parameter;
45901          <y> is a variable or a parameter (depending on what <x> is)
45902              where the computed semi-circular pdf value is stored;
45903    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
45904
45905    If <mu> and <r> are omitted, they default to 0 and 1,
45906    respectively.
45907
45908Examples:
45909    LET A = SEMPDF(0.5)
45910    LET A = SEMPDF(1.2,0,5)
45911    LET X2 = SEMPDF(X1)
45912
45913Note:
45914    Semi-circular random numbers, probability plots, and
45915    goodness of fit tests can be generated with the commands:
45916
45917       LET Y = SEMI-CIRCULAR RANDOM NUMBERS FOR I = 1 1 N
45918       SEMI-CIRCULAR PROBABILITY PLOT Y
45919       SEMI-CIRCULAR PROBABILITY PLOT Y2 X2
45920       SEMI-CIRCULAR PROBABILITY PLOT Y3 XLOW XHIGH
45921       SEMI-CIRCULAR KOLMOGOROV SMIRNOV GOODNESS OF FIT Y
45922       SEMI-CIRCULAR CHI-SQUARE GOODNESS OF FIT Y2 X2
45923       SEMI-CIRCULAR CHI-SQUARE GOODNESS OF FIT Y3 XLOW XHIGH
45924
45925    The location and scale estimates can be obtained from the
45926    probability plot (location = PPA0 and scale = PPA1).
45927
45928    The BOOTSTRAP DISTRIBUTION command can be used to find
45929    uncertainty intervals for the location and scale parameters
45930    based on the probability plot.
45931
45932Note:
45933    Library functions are distinguished from let subcommands
45934    in the following ways.
45935    1) Functions enclose the input value in parenthesis.  Let
45936       subcommands use spaces.
45937    2) Functions can accept (and return) either parameters
45938       (i.e., single values) or variables (i.e., an array of
45939       values) while let subcommands are specific in which they
45940       accept as input and what they return as output.
45941    3) Functions can accept expressions while let subcommands
45942       do not.  For example, the following is legal:
45943           LET Y2 = ABS(Y1-INT(Y1))
45944       For let subcommands, you typically have to do something
45945       like the following:
45946           LET YTEMP = Y**2 + 8
45947           LET A = SUM YTEMP
45948
45949Default:
45950    None
45951
45952Synonyms:
45953    None
45954
45955Related Commands:
45956    SEMCDF = Compute the semi-circular cumulative distribution
45957             function.
45958    SEMPPF = Compute the semi-circular percent point function.
45959    UNIPDF = Compute the uniform probability density function.
45960    UNICDF = Compute the uniform cumulative distribution function.
45961    UNIPPF = Compute the uniform percent point function.
45962    NORCDF = Compute the normal cumulative distributoin function.
45963    NORPDF = Compute the normal probability density function.
45964    NORPPF = Compute the normal percent point function.
45965
45966Reference:
45967    "Continuous Univariate Distributions - 2", Johnson and Kotz,
45968    Houghton Mifflin, 1970 (chapter 25).
45969
45970    "Simple and Robust Linear Estimation of the Location Parameter of
45971    a Symmetric Distribution", Filliben, unpublished Ph.d dissertation,
45972    Princeton University, 1969 (pp. 21-44, 229-231).
45973
45974Applications:
45975    Distributional Modeling
45976
45977Implementation Date:
45978    94/4: Implemented for the standard case
45979    2006/10: Updated to support the general case
45980
45981Program:
45982    XLIMITS -1 1
45983    XTIC OFFSET 0.1 0.1
45984    TITLE AUTOMATIC
45985    PLOT SEMPDF(X) FOR X = -1 0.01 1
45986
45987-----SEMPPF (LET)--------------------------------
45988
45989SEMPPF
45990
45991Name:
45992    SEMPPF (LET)
45993
45994Type:
45995    Library Function
45996
45997Purpose:
45998    Compute the semi-circular percent point function.
45999
46000Description:
46001    The semi-circular distribution has the following cumulative
46002    distribution function:
46003
46004       F(x;mu,r) = 0.5 + x*SQRT(r**2 - (x-mu)**2)/(PI*r**2) +
46005                   ARCSIN((x-mu)/r)/PI
46006                   -r <= x <= r
46007
46008    with mu and r denoting the location and scale parameters,
46009    respectively.
46010
46011    The percent point function is computed by numerically
46012    inverting the cumulative distribution function.
46013
46014Syntax:
46015    LET <y> = SEMPPF(<p>,<mu>,<r>)    <SUBSET/EXCEPT/FOR qualification>
46016    where <p> is a variable, number, or parameter in the interval
46017              (0,1);
46018          <mu> is a variable, number, or parameter that specifies
46019               the location parameter;
46020          <r> is a variable, number, or parameter that specifies
46021               the scale parameter;
46022          <y> is a variable or a parameter (depending on what <p> is)
46023              where the computed semi-circular ppf value is stored;
46024    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
46025
46026    If <mu> and <r> are omitted, they default to 0 and 1,
46027    respectively.
46028
46029Examples:
46030    LET A = SEMPPF(0.99)
46031    LET A = SEMPPF(0.99,0,5)
46032    LET X2 = SEMPPF(X1)
46033
46034Note:
46035    Library functions are distinguished from let subcommands
46036    in the following ways.
46037    1) Functions enclose the input value in parenthesis.  Let
46038       subcommands use spaces.
46039    2) Functions can accept (and return) either parameters
46040       (i.e., single values) or variables (i.e., an array of
46041       values) while let subcommands are specific in which they
46042       accept as input and what they return as output.
46043    3) Functions can accept expressions while let subcommands
46044       do not.  For example, the following is legal:
46045           LET Y2 = ABS(Y1-INT(Y1))
46046       For let subcommands, you typically have to do something
46047       like the following:
46048           LET YTEMP = Y**2 + 8
46049           LET A = SUM YTEMP
46050
46051Default:
46052    None
46053
46054Synonyms:
46055    None
46056
46057Related Commands:
46058    SEMCDF = Compute the semi-circular cumulative distribution
46059             function.
46060    SEMPDF = Compute the semi-circular probability density function.
46061    UNIPDF = Compute the uniform probability density function.
46062    UNICDF = Compute the uniform cumulative distribution function.
46063    UNIPPF = Compute the uniform percent point function.
46064    NORCDF = Compute the normal cumulative distributoin function.
46065    NORPDF = Compute the normal probability density function.
46066    NORPPF = Compute the normal percent point function.
46067
46068Reference:
46069    "Continuous Univariate Distributions - 2", Johnson and Kotz,
46070    Houghton Mifflin, 1970 (chapter 25).
46071
46072    "Simple and Robust Linear Estimation of the Location Parameter of
46073    a Symmetric Distribution", Filliben, unpublished Ph.d dissertation,
46074    Princeton University, 1969 (pp. 21-44, 229-231).
46075
46076Applications:
46077    Distributional Modeling
46078
46079Implementation Date:
46080    1994/4: Implemented for the standard case
46081    2006/10: Implemented for the general case
46082
46083Program:
46084    XLIMITS 0 1
46085    MAJOR XTIC NUMBER 6
46086    MINOR XTIC NUMBER 1
46087    XTIC DECIMAL 1
46088    YLIMITS -1 1
46089    YTIC OFFSET 0.1 0.1
46090    TITLE AUTOMATIC
46091    PLOT SEMPPF(P) FOR P = 0  0.01  1
46092
46093-----SEQUENCE-------------------------------------------------------
46094
46095SEQUENCE
46096
46097Name:
46098    SEQUENCE (LET)
46099
46100Type:
46101    Let Subcommand
46102
46103Purpose:
46104    Generate a sequence of values.
46105
46106Description:
46107    This command is useful for generating variables that have constant
46108    increments.  Increments can be either positive or negative.
46109    Increments can also be real numbers (i.e., they are not restricted
46110    to integers).
46111
46112    Specifically, you specify a start value, an increment, and
46113    a stop value.  You can also optionally specify a repeat factor
46114    (this defaults to 1 if not specified).
46115
46116    The 2010/11 version of Dataplot updated this command to support
46117    variable arguments for the start, increment, stop, and repeat
46118    factors.  If more than one of these is a variable (as oppossed
46119    to a constant/parameter), then these variable must have the
46120    same length.  If a variable is used for one or more of the
46121    arguments, then we essentially create k separate sequences
46122    (where k is the number of elements in the variable) and
46123    append the results together.  Arguments that are entered as
46124    constants or parameters will use the same value for each sequence.
46125
46126    In addition, a new syntax was added where the first argument
46127    is a list of values and the second argument is the number of
46128    times that each value is repeated.  This syntax is useful when
46129    you want to generate a simple sequence with repeat values
46130    where the number of repeats is variable.
46131
46132    See the Note section below for some examples of using this new
46133    syntax.
46134
46135Syntax 1:
46136    LET <resp> = SEQUENCE <start>  <inc>  <stop>
46137    where <start> is a constant, parameter, or variable that specifies
46138             the beginning value for the sequence;
46139          <inc> is a constant, parameter, or variable that specifies
46140             the increment value of the sequence;
46141          <stop> is a constant, parameter, or variable that specifies
46142             the ending value of the sequence;
46143    and   <resp> is a variable where the generated sequence is saved.
46144
46145    This is the most common syntax for this command.
46146
46147Syntax 2:
46148    LET <resp> = SEQUENCE <start>  <inc>  <stop>
46149                 FOR I = <start2>   <inc2>  <stop2>
46150    where <start> is a constant, parameter, or variable that specifies
46151             the beginning value for the sequence;
46152          <inc> is a constant, parameter, or variable that specifies
46153             the increment value of the sequence;
46154          <stop> is a constant, parameter, or variable that specifies
46155             the ending value of the sequence;
46156          <start2> is a number or parameter that identifies the
46157              first row of <resp> in which the sequence is saved
46158              (typically it has a value of 1);
46159          <inc2> is a number or parameter that identifies the row
46160              increment of <resp> in which the sequence is saved
46161              (typically it has a value of 1);
46162          <stop2> is a number or parameter that identifies the last row
46163              of <resp> in which the sequence is saved;
46164    and   <resp> is a variable where the generated sequence is saved.
46165
46166    This syntax is similar to syntax 1 except that the generated
46167    sequence is repeated until the rows of <resp> are filled as
46168    specified by the FOR clause.
46169
46170Syntax 3:
46171    LET <resp> = SEQUENCE <start>  <repeat>  <inc>  <stop>
46172    where <start> is a constant, parameter, or variable that specifies
46173             the beginning value for the sequence;
46174          <repeat> is a constant, parameter, or variable that specifies
46175                the number of times each value in the sequence is
46176                repeated;
46177          <inc> is a constant, parameter, or variable that specifies
46178             the increment value of the sequence;
46179          <stop> is a constant, parameter, or variable that specifies
46180             the ending value of the sequence;
46181    and   <resp> is a variable where the generated sequence is saved.
46182
46183    This syntax is useful for generating sequence like 1 1 1 2 2 2
46184    3 3 3 4 4 4.
46185
46186Syntax 4:
46187    LET <resp> = SEQUENCE <start>  <repeat>  <inc>  <stop>
46188                 FOR I = <start2> <inc2> <stop2>
46189    where <start> is a constant, parameter, or variable that specifies
46190             the beginning value for the sequence;
46191          <repeat> is a constant, parameter, or variable that specifies
46192                the number of times each value in the sequence is
46193                repeated;
46194          <inc> is a constant, parameter, or variable that specifies
46195             the increment value of the sequence;
46196          <stop> is a constant, parameter, or variable that specifies
46197             the ending value of the sequence;
46198          <start2> is a number or parameter that identifies the first
46199              row of <resp> in which the sequence is saved (typically it
46200              has a value of 1);
46201          <inc2> is a number or parameter that identifies the row
46202              increment of <resp> in which the sequence is saved
46203              (typically it has a value of 1);
46204          <stop2> is a number or parameter that identifies the last row
46205              of <resp> in which the sequence is saved;
46206    and   <resp> is a variable where the generated sequence is saved.
46207
46208    This syntax is similar to syntax 3 except that the generated
46209    sequence is repeated until the rows of <resp> are filled as
46210    specified by the FOR clause.
46211
46212Syntax 5:
46213    LET <resp> = SEQUENCE <values>  <repeat>
46214    where <values> is a constant, parameter, or variable that specifies
46215             the values for the sequence;
46216          <repeat> is a constant, parameter, or variable that specifies
46217                the number of times each value in <values> is
46218                repeated;
46219    and   <resp> is a variable where the generated sequence is saved.
46220
46221    This syntax is useful when the number of repeated values varies.
46222    For example, you can do something like
46223
46224        LET VAL = SEQUENCE 1 1 5
46225        LET REP = DATA 3 3 2 4 4
46226
46227    to generate the sequence
46228
46229        1 1 1 2 2 2 3 3 4 4 4 4 5 5 5 5
46230
46231Examples:
46232    LET X = SEQUENCE 1 1 100
46233    LET X = SEQUENCE 1 1 10 FOR I = 1 1 100
46234    LET X = SEQUENCE -4 9 1 4
46235    LET X = SEQUENCE 1 50 1 2 FOR I = 1 1 100
46236
46237Note:
46238    To generate the sequence
46239
46240       1, 2, 3, 4, 5, 31, 32, 33, 61, 62, 63, 64, 65, 66, 67
46241
46242    you can enter the commands
46243
46244       LET START = DATA 1 31 61
46245       LET STOP = DATA 5 33 67
46246       LET Y = SEQUENCE START 1 STOP
46247
46248    To generate the sequence
46249
46250       1 1 1 2 2 3 3 3 3 4 4 4 4 4
46251
46252    you can enter the command
46253
46254       LET VAL = SEQUENCE 1 1 4
46255       LET REP = DATA 3 2 4 5
46256       LET Y = SEQUENCE VAL REP
46257
46258    Additional examples of using the variables with the SEQUENCE
46259    command are given in the Program section below.
46260
46261Default:
46262    None
46263
46264Synonyms:
46265    The word SEQUENCE can be omitted from the command.
46266
46267Related Commands:
46268    PATTERN             = Generate numbers with a specific pattern.
46269    DATA                = Place numbers in a variable.
46270    COMBINE             = Combine constants, parameters, and variables
46271                          into a single variable.
46272    FIBONNACCI NUMBERS  = Generate Fibonnacci numbers.
46273    LOGISTIC NUMBERS    = Generate numbers from a logistic sequence.
46274
46275Applications:
46276    Data Management
46277
46278Implementation Date:
46279    Pre-1987
46280    2010/11: Added support for variables as arguments
46281    2010/11: Added support for Syntax 5
46282
46283Program 1:
46284    LET X = SEQUENCE -4 1 4 FOR I = 1 1 81
46285    LET Y = SEQUENCE -4 9 1 4
46286    LET Z = X**2+Y**2-X*Y
46287    LET Z0 = SEQUENCE 5 5 40
46288    CONTOUR PLOT Z X Y Z0
46289
46290Program 2:
46291    set write decimals 1
46292    .
46293    .  Step 1: First test basic current usage
46294    .
46295    let y = sequence 1 1 10
46296    print y
46297    pause
46298    delete y
46299    .
46300    let y = sequence 1 3 1 10
46301    print y
46302    pause
46303    delete y
46304    .
46305    .  Step 2: Now test "variable" syntax
46306    .
46307    let rep = data 1 2 3 1 2 3 1 2 3 1
46308    let y = sequence 1 rep 1 10
46309    print y
46310    pause
46311    delete y rep
46312    .
46313    let stop = sequence 10 1 1
46314    let y = sequence 1 2 1 stop
46315    print y
46316    pause
46317    delete y stop
46318    .
46319    let start = data 1 100 1000
46320    let inc   = data 1  10  100
46321    let stop  = data 10 1000 10000
46322    let rep   = data 3 2 1
46323    let y = sequence start rep inc stop
46324    print y
46325    pause
46326    delete y start rep inc stop
46327    .
46328    let start = data 1 2 3 4 5
46329    let rep   = data 5 3 1 4 2
46330    let y = sequence start rep
46331    print y
46332    pause
46333    delete y start rep
46334
46335
46336SEQUENCE
46337
46338Name:
46339    SEQUENCE
46340
46341Type:
46342    Plot Control Command
46343
46344Purpose:
46345    Specifies that a sequence number be automatically inscribed in the
46346    upper right corner of subsequent plots.
46347
46348Description:
46349    This is useful for the ordering of the plot hardcopies after a
46350    session where many plots have been generated.
46351
46352Syntax:
46353    SEQUENCE   <ON or OFF>   <start>
46354    where ON specifies that sequence numbers are generated on
46355             subsequent plots and OFF specifies that they are not;
46356    and   <start> specifies a starting number for the sequence (only
46357             used if ON specified).
46358
46359Examples:
46360    SEQUENCE ON
46361    SEQUENCE OFF
46362    SEQUENCE
46363    SEQUENCE ON 11
46364
46365Note:
46366    SEQUENCE ON with no <start> specified is equivalent to SEQUENCE ON
46367    1 .  SEQUENCE with no arguments is equivalent to SEQUENCE ON 1 .
46368
46369Default:
46370    Sequence numbers are not generated.
46371
46372Synonyms:
46373    None
46374
46375Related Commands:
46376    PLOT      = Generates a data or function plot.
46377    BELL      = Sets the automatic bell switch for plots.
46378    PRE-ERASE = Sets the automatic pre-erase switch for plots.
46379    HARDCOPY  = Sets the automatic copy switch for plots.
46380    RING      = Rings the bell (immediately).
46381    ERASE     = Erases the screen (immediately).
46382    COPY      = Copies the screen (immediately).
46383
46384Applications:
46385    Presentation Graphics
46386
46387Implementation Date:
46388    Pre-1987
46389
46390Program:
46391    . POLLUTION SOURCE ANALYSIS, LLOYD CURRIE, DATE--1990
46392    . SUBSET OF CURRIE.DAT REFERENCE FILE
46393    .
46394    LET ID2 = DATA 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2
46395    LET LEAD = DATA ...
46396       164 426 59 98 312 263 607 497 213 54 160 262 547 325 419 94 70
46397    LET POT = DATA ...
46398       106 175 61 79 94 121 424 328 107 218 140 179 246 231 245 339 99
46399    .
46400    SEQUENCE ON
46401    MULTIPLOT 2 2; MULTIPLOT CORNER COORDINATES 0 0 100 100
46402    TITLE SCATTER PLOT; X1LABEL LEAD; Y1LABEL POTASSIUM
46403    LINE BLANK ALL; CHARACTER CIRCLE; CHARACTER FILL ON
46404    PLOT POT LEAD
46405    .
46406    CHARACTER CIRCLE SQUARE; CHARACTER FILL OFF ALL
46407    TITLE SCATTER PLOT WITH GROUPS
46408    LEGEND 1 CIRC() - GROUP 1; LEGEND 2 SQUA() - GROUP 2
46409    LEGEND FILL ON; LEGEND FONT DUPLEX
46410    PLOT POT LEAD ID2
46411    .
46412    CHARACTER CIRCLE CIRCLE SQUARE SQUARE; CHARACTER FILL OFF ON OFF ON
46413    LET X = SEQUENCE 1 1 17
46414    LEGEND 1 CIRC() - POTASSIUM; LEGEND 2 SQUA() - LEAD
46415    X1LABEL SEQUENCE; Y1LABEL; TITLE CHARACTER FILL REPRESENTS GROUP ID
46416    PLOT POT X ID2 AND
46417    PLOT LEAD X ID2
46418    .
46419    CHARACTER BLANK ALL; LINE SOLID DASH
46420    SEGMENT 1 COORDINATES 16 85 19 85
46421    SEGMENT 2 COORDINATES 16 81 19 81
46422    SEGMENT 2 PATTERN DASH
46423    TITLE MULTIPLE TRACES AS LINES
46424    PLOT POT LEAD VS X
46425    END OF MULTIPLOT
46426
46427-----SEQUENTIAL DIFFERENCE (LET)-------------------------------------
46428
46429SEQUENTIAL DIFFERENCE
46430
46431Name:
46432    SEQUENTIAL DIFFERENCE (LET)
46433
46434Type:
46435    Let Subcommand
46436
46437Purpose:
46438    Compute the sequential differences (i.e., X(I) - X(I-1)) between
46439    the elements of a variable.
46440
46441Description:
46442    Given a data series with N points, the sequential difference
46443    will contain the points
46444
46445         Y(1) = X(2) - X(1)
46446         Y(2) = X(3) - X(2)
46447              ...
46448         Y(N-1) = X(N) - X(N-1)
46449
46450    If there are less than two points in the series, nothing will be
46451    done.
46452
46453    One use of sequential differencing is to remove trend from
46454    time series data.
46455
46456    The 2016/02 version of Dataplot generalized this command in
46457    the following two ways.
46458
46459       1. In additon to the difference, the following additional
46460          sequential values can also be computed:
46461
46462             SEQUENTIAL SUM      - X(I) + X(I-1)
46463             SEQUENTIAL PRODUCT  - X(I) * X(I-1)
46464             SEQUENTIAL MEAN     - (X(I) + X(I-1))/2
46465             SEQUENTIAL MINIMUM  - MIN(X(I), X(I-1))
46466             SEQUENTIAL MAXIMUM  - MAX(X(I), X(I-1))
46467             SEQUENTIAL LOWER    - X(I-1)
46468             SEQUENTIAL UPPER    - X(I)
46469
46470       2. A group-id variable can be included.  That is, the data
46471          values in each group will differenced.  If there are K
46472          groups, then the differenced series will have N - K
46473          points.
46474
46475          The original data series does not have to be sorted
46476          by group.  However, the output series will be sorted
46477          as follows:
46478
46479             a. The data will be sorted by group in the order that
46480                the groups are detected in the original series.
46481
46482             b. Within a group, the order in the output series
46483                will be based on the order of the input series.
46484
46485          For example, if X is the group-id variable and Y is the
46486          response variable
46487
46488              X(1) = 1
46489              X(2) = 2
46490              X(3) = 3
46491              X(4) = 1
46492              X(5) = 2
46493              X(6) = 3
46494              X(7) = 1
46495              X(8) = 2
46496              X(9) = 3
46497
46498        then the output group-id variable (X2) and differenced
46499        variable will be in the order
46500
46501             X2(1) = 1,   Y2(1) = Y(4) - Y(1)
46502             X2(2) = 1,   Y2(2) = Y(7) - Y(4)
46503             X2(3) = 2,   Y2(3) = Y(5) - Y(2)
46504             X2(4) = 2,   Y2(4) = Y(8) - Y(5)
46505             X2(5) = 3,   Y2(5) = Y(6) - Y(3)
46506             X2(6) = 3,   Y2(6) = Y(9) - Y(6)
46507
46508Syntax 1:
46509    LET <y> = SEQUENTIAL <stat> <x>    <SUBSET/EXCEPT/FOR qualification>
46510    where <x> is the response variable;
46511          <stat> is one of DIFFERENCE, SUM, PRODUCT, MEAN, MINIMUM,
46512                 MAXIMUM, LOWER, or UPPER;
46513          <y> is a variable containing the differenced series;
46514    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
46515
46516Syntax 2:
46517    LET <y2> <x2> = SEQUENTIAL <stat> <y> <x>
46518                    <SUBSET/EXCEPT/FOR qualification>
46519    where <y> is the response variable;
46520          <x> is a the group-id variable;
46521          <stat> is one of DIFFERENCE, SUM, PRODUCT, MEAN, MINIMUM,
46522                 MAXIMUM, LOWER, or UPPER;
46523          <y2> is a variable containing the differenced series;
46524          <x2> is a variable containing the group-id of the
46525                 differenced series;
46526    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
46527
46528Examples:
46529    LET XD = SEQUENTIAL DIFFERENCE PRESSURE
46530    LET XD = SEQUENTIAL MEAN PRESSURE
46531    LET XD = SEQUENTIAL SUM PRESSURE
46532    LET XD = SEQUENTIAL DIFFERENCE PRESSURE  SUBSET X > 4
46533    LET YDIFF X2 = SEQUENTIAL DIFFERENCE Y X
46534
46535Default:
46536    None
46537
46538Synonyms:
46539    DIFFERENCE is a synonym for SEQUENTIAL DIFFERENCE
46540    SEQUENTIAL AVERAGE is a synonym for SEQUENTIAL MEAN
46541    SEQUENTIAL MIN is a synonym for SEQUENTIAL MINIMUM
46542    SEQUENTIAL MAX is a synonym for SEQUENTIAL MAXIMUM
46543
46544Related Commands:
46545    CUMULATIVE SUM = Compute the cumulative sum of the elements of a
46546                     variable.
46547    SORT           = Sort the elements of a variable.
46548    COCODE         = Generate a cocoded variable.
46549    CODE           = Generate a coded variable.
46550    SEQUENCE       = Generate a sequence of numbers.
46551    PATTERN        = Generate numbers with a specific pattern.
46552
46553Applications:
46554    Data Transformations
46555
46556Implementation Date:
46557    Pre-1987
46558    2016/02: Support for SUM, PRODUCT, MEAN, MINIMUM, MAXIMUM,
46559             LOWER, and UPPER
46560    2016/02: Support for group-id variable
46561
46562Program 1:
46563    LET X1 = DATA 12 4 2 3 9 7
46564    LET XD = SEQUENTIAL DIFFERENCE X1
46565
46566    The variable XD will contain the following values:
46567
46568       8, 2, 1, 6, 2
46569
46570Program 2:
46571    . Step 1:   Define the data
46572    .
46573    let y = sequence 1 1 10
46574    .
46575    . Step 2:   Compute the sequential statistics
46576    .
46577    let ydiff = sequential difference y
46578    let ysum  = sequential sum        y
46579    let yprod = sequential product    y
46580    let ymean = sequential mean       y
46581    let ymin  = sequential min        y
46582    let ymax  = sequential max        y
46583    .
46584    . Step 3:   Print the results
46585    .
46586    set write decimals 1
46587    print y ydiff ysum yprod ymean ymin ymax
46588
46589Program 3:
46590    . Step 1:   Define the data
46591    .
46592    dimension 40 columns
46593    let y = sequence 1 1 10
46594    let x = sequence 1 5 1 2
46595    .
46596    . Step 2:   Compute the sequential statistics
46597    .
46598    let ydiff ygroup = sequential difference y x
46599    let ysum  ygroup = sequential sum        y x
46600    let yprod ygroup = sequential product    y x
46601    let ymean ygroup = sequential mean       y x
46602    let ymin  ygroup = sequential min        y x
46603    let ymax  ygroup = sequential max        y x
46604    let ylow  ygroup = sequential lower      y x
46605    let yupp  ygroup = sequential upper      y x
46606    .
46607    . Step 3:   Print the results
46608    .
46609    set write decimals 1
46610    print ygroup ydiff ysum yprod ymean ymin ymax ylow yupp
46611
46612----------SERIAL READ--------------------------------------
46613
46614SERIAL READ
46615
46616Name:
46617    SERIAL READ
46618
46619Type:
46620    Support Command
46621
46622Purpose:
46623    Reads data into variables:
46624       1) from a mass storage file;
46625       2) from within a CALLed DATAPLOT sub-program;
46626       3) from the terminal
46627
46628Description:
46629    The rules regarding SERIAL READ are as follows:
46630       1) If there are k variables listed on the SERIAL READ
46631          statement, then all the data on each line image is read and
46632          sequentially fed into the next available elements of the k
46633          variables.  There is no restriction on the number of data
46634          values on any given line image.  A major difference between
46635          the SERIAL READ command and the READ command is that the
46636          SERIAL READ command reads in all data on a line, whereas the
46637          READ command only reads in the first k data values on a line.
46638          In practice, the READ command is more heavily used than the
46639          SERIAL READ command.  An example of the use of the SERIAL
46640          READ command is
46641             SERIAL READ X Y
46642             1 1 2 4 3 9 4 16 5
46643             25 6 36 7 49
46644             8 64
46645             9
46646             81 10 100
46647             END OF DATA
46648          which results in X containing the 10 elements 1, 2, ... 10;
46649          and Y containing the 10 elements 1, 4, 9, ...  100.
46650       2) The number of variables being read at one time must be
46651           between 1 and 10, inclusive.
46652       3) The full line image is scanned (for reading from a mass
46653          storage file, the full line image is 132 columns; for reading
46654          from within a sub-program and for reading from the terminal,
46655          the full line image is 80 columns).  For variations on this,
46656          see the COLUMN LIMITS command.
46657       4) Data values on a line image must be separated by at least one
46658          blank.
46659       5) Data values can be free-format.  They need not be aligned in
46660          specific columns.
46661       6) The format of individual data values is general.  It can be
46662          integer, floating point, or exponential.  It is stored
46663          internally as a single precision real number.
46664       7) All reads start from the beginning of the file (for
46665          variations of this, see the SKIP and ROW LIMITS commands).
46666       8) The analyst need not be concerned about the number of
46667          observations for each variable.  DATAPLOT automatically
46668          determines and reports this value at the end of the read.
46669       9) The read terminates when a line image is encountered which
46670          consists of
46671             END OF DATA
46672          or
46673             END DATA
46674          or when the end of the file is reached.
46675
46676Syntax 1:
46677    SERIAL READ   <x1>   <x2>   ...   <xk>
46678    where <x1>, <x2>, ..., <xk> are the desired variable names.
46679
46680    This syntax is used to read the data from the terminal or from a
46681    DATAPLOT sub-program.
46682
46683Syntax 2:
46684    SERIAL READ   <file>   <x1>   <x2>   ...   <xk>
46685    where <file> is the name of the mass storage file where the data
46686              resides;
46687    and   <x1>, <x2>, ..., <xk> are the desired variable names.
46688
46689    This syntax is used to read the data from a file.
46690
46691Examples:
46692    SERIAL READ CALIB. PRES TEMP TIME
46693    SERIAL READ ASTM. Y1 Y2 Y3 X DAY LAB
46694    SERIAL READ Y1 Y2 Y3 X DAY LAB
46695    SERIAL READ Y
46696
46697Note:
46698    The most common use of SERIAL READ is to read a large number of
46699    values into a single variable.
46700
46701Note:
46702    By default, DATAPLOT does free format reads.  However, it has the
46703    capability for supporting FORTRAN style formats.  Formatted reads
46704    can be about 10 times faster on many systems which can be helpful
46705    for large data files.  Enter HELP READ FORMAT for more details.
46706
46707Note:
46708    Blank lines in data files are ignored.
46709
46710Note:
46711    DATAPLOT supports the ability to embed comment lines within the
46712    data file.  Enter HELP COMMENT CHECK for details.
46713
46714Note:
46715    In order to determine whether the first argument is a file name or
46716    a variable name, it looks for a period in the name.  If it finds
46717    one, it assumes a file name.  If it does not, it assumes a variable
46718    name.  If your file name does not contain a period, attach a
46719    trailing period (no spaces) to the file name on the READ command.
46720
46721Note:
46722    DATAPLOT has no restrictions on the file name other than it be a
46723    valid file name on the local operating system and that it contain
46724    a period "." in the file name itself or as a trailing character.
46725    DATAPLOT strips off trailing periods on those systems where it is
46726    appropriate to do so.  On systems where trailing periods can be a
46727    valid file name (e.g., Unix), DATAPLOT tries to open the file with
46728    the trailing period.  If this fails, it then tries to open the file
46729    with the trailing period stripped off.
46730
46731    Some users prefer to give all data files a ".DAT" or ".dat"
46732    extension.  Although this is a useful method for keeping track of
46733    data files, it is strictly a user convention and is not enforced
46734    by DATAPLOT in any way.
46735
46736Note:
46737    File names are case sensitive on Unix file systems.  For Unix,
46738    DATAPLOT attempts to open the file as given.  If this fails, it
46739    attempts to open the file as all upper case characters.  If this
46740    fails, it attempts to open the file as all lower case characters.
46741    All other currently supported systems are not case sensitive
46742    regarding file names.
46743
46744    As a further caution for Unix hosts, certain expansion characters
46745    (specifically ~ to refer to your home directory) are interpreted
46746    by the shell and are not recognized by the Fortran compiler.  These
46747    expansion characters are interpreted as literal characters and do
46748    not yield the intended file name.
46749
46750Default:
46751    1) If no file name is specified, and if a CALL is being
46752       executed, then the data values should be listed directly
46753       in the DATAPLOT sub-program immediately after the SERIAL
46754       READ command (do not forget the END OF DATA statement).
46755    2) If no file name is specified, and if commands are being
46756       manually entered/executed one at a time from the terminal,
46757       then the data should be entered directly from the terminal
46758       immediately after the SERIAL READ command (also terminated
46759       by an END OF DATA statement).
46760
46761Synonyms:
46762    None
46763
46764Related Commands:
46765    READ FUNCTION      = Read a function.
46766    READ MATRIX        = Read a matrix.
46767    READ PARAMETER     = Read a parameter.
46768    READ STRING        = Read a string.
46769    READ               = Perform a read.
46770    SET READ FORMAT    = Define a FORTRAN style format for reads.
46771    DATA (LET)         = Enter data values into a variable.
46772
46773Applications:
46774    Data I/O
46775
46776Implementation Date:
46777    Pre-1987
46778
46779Program:
46780    XX
46781
46782-----SET-------------------------------------------------------
46783
46784SET
46785
46786Name:
46787    SET
46788
46789Type:
46790    Support Command
46791
46792Purpose:
46793    Defines the values of certain internal underlying Fortran
46794    variables.
46795
46796Description:
46797    This command allows access to information which can assist in
46798    implementation, tracing and debugging.  Most options are used by
46799    the service group which implements DATAPLOT on your computer.
46800    However some SET options are used by the general DATAPLOT user.
46801    These are documented separately in the HELP file.  The PROBE
46802    command returns the current value of the variables available with
46803    the SET command.
46804
46805Syntax:
46806    SET  <Fortran variable name>  <setting>
46807    where <Fortran variable name> is the name of the underlying Fortran
46808              variable;
46809    and   <settings> is a number, parameter, or character string that
46810              specifies the value to assign to the variable.
46811
46812Examples:
46813    SET IBUGAN ON
46814    SET IBUGA2 ON
46815    SET IBUGSU ON
46816    SET IBUGMA ON
46817    SET IPR 7
46818
46819Note:
46820    The following SET commands are currently available.
46821
46822    SET commands for general users (these are documented
46823    separately, for more details enter HELP <command>):
46824
46825    SET READ FORMAT <string> - specify a FORTRAN format statement
46826        for the READ command.
46827
46828    SET WRITE FORMAT <string> - specify a FORTRAN format
46829        statement for the WRITE command.
46830
46831    SET WRITE DECIMAL <numb> - specify the number of decimal
46832        places for the WRITE and PRINT commands.
46833
46834    SET IPR <file unit number> - specify the unit for DATAPLOT
46835        alphanumeric output.
46836
46837    SET FOURIER WRITE -
46838
46839    SET FOURIER EXPONENT <- or +> -
46840
46841    SET HELP LINES - specify the number of lines printed for a
46842        help screen (a carriage return prints the next screen).
46843
46844    SET LIST LINES - specify the number of lines printed by the
46845        LIST command (a carriage return prints the next screen).
46846
46847    SET READ REWIND <ON/OFF> - specifies whether files are
46848        rewound before being read.
46849
46850    SET WRITE REWIND <ON/OFF> - specifies whether files are
46851        rewound before being written to.
46852
46853    SET PREPLOT <device> - specifies the device that preplot and
46854        postplot definitions apply to.  Equivalent to the PREPOST
46855        command.
46856
46857    SET POSTPLOT <device> - same as SET PREPLOT.
46858
46859    SET IO TERMINAL - used in writing menu macros.  Allows I/O to
46860        take place from the terminal while executing a macro.
46861
46862    SET IO - turns off the SET IO TERMINAL command.
46863
46864    Device specific SET commands.  These are documented in more
46865    detail in the HELP for that device (HELP POSTSCRIPT, HELP
46866    QUIC, HELP CALCOMP, HELP ZETA and HELP GENERAL).
46867
46868    SET GENERAL JUSTIFICATION <ON/OFF>
46869    SET GENERAL REGION FILL <ON/OFF>
46870    SET GENERAL FONT <ON/OFF>
46871    SET GENERAL PEN WIDTH <ON/OFF>
46872    SET GENERAL PEN THICKNESS <number>
46873
46874    SET QUIC FONT <number>
46875    SET QUIC PPI  <number>
46876    SET QUIC [LANDSCAPE/PORTRAIT] MARGIN LEFT     <number>
46877    SET QUIC [LANDSCAPE/PORTRAIT] MARGIN RIGHT    <number>
46878    SET QUIC [LANDSCAPE/PORTRAIT] MARGIN TOP      <number>
46879    SET QUIC [LANDSCAPE/PORTRAIT] MARGIN BOTTOM   <number>
46880
46881    SET QMS FONT <number>
46882    SET QMS PPI  <number>
46883    SET QMS [LANDSCAPE/PORTRAIT] MARGIN LEFT     <number>
46884    SET QMS [LANDSCAPE/PORTRAIT] MARGIN RIGHT    <number>
46885    SET QMS [LANDSCAPE/PORTRAIT] MARGIN TOP      <number>
46886    SET QMS [LANDSCAPE/PORTRAIT] MARGIN BOTTOM   <number>
46887
46888    SET POSTSCRIPT FONT <number>
46889    SET POSTSCRIPT PPI  <number>
46890    SET POSTSCRIPT [LANDSCAPE/PORTRAIT] MARGIN LEFT     <number>
46891    SET POSTSCRIPT [LANDSCAPE/PORTRAIT] MARGIN RIGHT    <number>
46892    SET POSTSCRIPT [LANDSCAPE/PORTRAIT] MARGIN TOP      <number>
46893    SET POSTSCRIPT [LANDSCAPE/PORTRAIT] MARGIN BOTTOM   <number>
46894
46895    SET ZETA COLORS <number>
46896    SET ZETA WIDTH <number>
46897
46898    SET CALCOMP COLORS <number>
46899    SET CALCOMP WIDTH <number>
46900
46901    SET commands for DATAPLOT implementation and debugging.
46902    These are not needed by the general user.  The most common
46903    usage is to turn on the "debugging" variables.  These
46904    print the values of DATAPLOT variables while DATAPLOT is
46905    executing and can be a valuable debugging tool.  Looking at
46906    the bug variables in a given routine can guide which specific
46907    ones to turn on.
46908
46909    SET ISUBRO <string> - turns on debugging for a specific
46910       subroutine.  Enter the last 4 characters of the subroutine
46911       name.
46912    SET IBUGMA <ON/OFF> - machine constants
46913    SET IBUGIN <ON/OFF> - initialization
46914    SET IBUGLS <ON/OFF> -
46915    SET IBUGMS <ON/OFF> -
46916    SET IBUGGC <ON/OFF> -
46917    SET IBUGTY <ON/OFF> -
46918    SET IBUGTE <ON/OFF> -
46919    SET IBUGPC <ON/OFF> - plot control commands
46920    SET IBUGP2 <ON/OFF> - plot control commands
46921    SET IBUGOD <ON/OFF> - output devices
46922    SET IBUGO2 <ON/OFF> - output devices
46923    SET IBUGSU <ON/OFF> - support commands
46924    SET IBUGS2 <ON/OFF> - support commands
46925    SET IBUGGR <ON/OFF> - graphics commands
46926    SET IBUGG2 <ON/OFF> - graphics commands
46927    SET IBUGG3 <ON/OFF> - graphics commands
46928    SET IBUGAN <ON/OFF> - analysis commands
46929    SET IBUGA2 <ON/OFF> - analysis commands
46930    SET IBUGA3 <ON/OFF> - analysis commands
46931    SET IBUGPL <ON/OFF> -
46932    SET IBUGGP <ON/OFF> -
46933    SET IBUGP1 <ON/OFF> -
46934    SET IBUGP3 <ON/OFF> -
46935    SET IBUGDG <ON/OFF> - diagrammatic graphics commands
46936    SET IBUGD2 <ON/OFF> - diagrammatic graphics commands
46937    SET IBUGCO <ON/OFF> -
46938    SET IBUGEV <ON/OFF> -
46939    SET IBUGQ  <ON/OFF> -
46940    SET IBUGRE <ON/OFF> -
46941    SET IBUGWR <ON/OFF> -
46942    SET IBUGSO <ON/OFF> -
46943    SET IBUGTO <ON/OFF> -
46944    SET IBUGUG <ON/OFF> - underlying graphics
46945    SET IBUGU2 <ON/OFF> - underlying graphics
46946    SET IBUGU3 <ON/OFF> - underlying graphics
46947    SET IBUGU4 <ON/OFF> - underlying graphics
46948    SET IBUGEX <ON/OFF> - expert subsystem
46949    SET IBUGE2 <ON/OFF> - expert subsystem
46950    SET IBUGHE <ON/OFF> - help
46951    SET IBUGH2 <ON/OFF> - help
46952
46953    Data variables:
46954
46955    SET MAXNK
46956    SET NK
46957    SET MAXCOL
46958    SET NUMCOL
46959    SET MAXN
46960    SET N
46961    SET MAXCHF
46962    SET NUMCHF
46963    SET MAXFUN
46964    SET NUMFUN
46965    SET MAXCHM
46966    SET NPLOTP
46967    SET ITRANS
46968    SET ICHAPA
46969
46970   Machine constants (use PROBE to retrieve their current value):
46971
46972    SET IRD    - unit for alphanumeric input
46973    SET IPR    - unit for alphanumeric output
46974    SET CPUMIN - smallest real number
46975    SET CPUMAX - largest real number
46976    SET NUMBPC - number of bits per character
46977    SET NUMCPW - number of characters per word
46978    SET NUMBPW - number bits per word
46979    SET IFEEDB - feedback switch
46980    SET IPRINT - print switch
46981    SET IECHO  - echo switch
46982
46983    Housekeeping variables (use PROBE to retrieve their current value):
46984
46985    SET MAXWID
46986    SET IWIDTH
46987    SET MAXWSV
46988    SET IWIDSV
46989    SET ICOM   - the current command (characters 1-4)
46990    SET ICOM2  - the current command (characters 5-8)
46991    SET MAXARG - maximum number of arguments
46992    SET NUMARG - number of arguments in current command
46993    SET IARG   - command arguments in integer format
46994    SET ARG    - command arguments in real format
46995    SET IHARG  - command arguments in character format
46996    SET MAXNAM - maximum number of names
46997    SET NUMNAM - current number of names
46998    SET IHNAME - names (characters 1-4)
46999    SET IHNAM2 - names (characters 5-8)
47000    SET IUSE   -
47001    SET IVALUE -
47002    SET VALUE  -
47003    SET IN     -
47004    SET IVSTAR -
47005    SET IVSTOP -
47006    SET IMESNU - unit for message file
47007    SET INEWNU - unit for news file
47008    SET IMAINU - unit for mail file
47009    SET IHELNU - unit for help file
47010    SET IBUGNU - unit for bugs file
47011    SET IQUENU - unit for query file
47012    SET ILOGNU - unit for log file
47013    SET IREANU - unit for user file to be read
47014    SET IWRINU - unit for user file to be written to
47015    SET ICRENU - unit for create macro file
47016    SET ISAVNU - unit for save memory file
47017    SET ISCRNU - unit for scratch file
47018    SET IDATNU - unit for         file
47019    SET IPL1NU - unit for DEVICE 2 graphics output file
47020    SET IPL2NU - unit for DEVICE 3 graphics output file
47021    SET IMESNA - name for message file
47022    SET INEWNA - name for news file
47023    SET IMAINA - name for mail file
47024    SET IHELNA - name for help file
47025    SET IBUGNA - name for bugs file
47026    SET IQUENA - name for query file
47027    SET ILOGNA - name for log file
47028    SET IREANA - name for user file to be read
47029    SET IWRINA - name for user file to be written to
47030    SET ICRENA - name for create macro file
47031    SET ISAVNA - name for save memory file
47032    SET ISCRNA - name for scratch file
47033    SET IDATNA - name for         file
47034    SET IPL1NA - name for DEVICE 2 graphics output file
47035    SET IPL2NA - name for DEVICE 3 graphics output file
47036    SET IMESST - status of message file
47037    SET INEWST - status of news file
47038    SET IMAIST - status of mail file
47039    SET IHELST - status of help file
47040    SET IBUGST - status of bugs file
47041    SET IQUEST - status of query file
47042    SET ILOGST - status of log file
47043    SET IREAST - status of user file to be read
47044    SET IWRIST - status of user file to be written to
47045    SET ICREST - status of create macro file
47046    SET ISAVST - status of save memory file
47047    SET ISCRST - status of scratch file
47048    SET IDATST - status of         file
47049    SET IPL1ST - status of DEVICE 2 graphics output file
47050    SET IPL2ST - status of DEVICE 3 graphics output file
47051
47052Default:
47053    None
47054
47055Synonyms:
47056    None
47057
47058Related Commands:
47059    PROBE    = Print the value of an underlying Fortran variable.
47060
47061Applications:
47062    Utility Commands
47063
47064Implementation Date:
47065    Pre-1987
47066    New SET commands have been continuously added
47067
47068Program:
47069    XX
47070
47071-----SET COMMANDS (LET)-----------------------------------------------------
47072
47073SET COMMANDS
47074The following are DATAPLOT set commands:
47075    SET CARDINALITY    = Computes a set cardinality.
47076    SET UNION          = Carries out a set union.
47077    SET INTERSECTION   = Carries out a set intersection.
47078    SET COMPLEMENT     = Carries out a set complement.
47079    SET CART PRODUCT   = Carries out a set Cartesian product.
47080    SET ELEMENTS       = Extracts the distinct elements of set.
47081
47082-----SET CARDINALITY (LET)---------------------------------------
47083
47084SET CARDINALITY (LET)
47085
47086Name:
47087    SET CARDINALITY (LET)
47088
47089Type:
47090    Subcommand under LET
47091
47092Purpose:
47093    Compute the total number of elements in a set (with numeric
47094    elements).
47095
47096Description:
47097    This cardinality counts repeats if repeats exist.  The cardinality
47098    of the following set:
47099          1 3 5 7 9 1 4 9 16 1 8 27
47100    is 12.
47101
47102Syntax:
47103    LET <p> = SET CARDINALITY <v>   <SUBSET/EXCEPT/FOR qualification>
47104    where <v> is the variable whose elements are the elements of the
47105              input set;
47106          <p> is a parameter where the computed cardinality is saved;
47107    and where the <SUBSET/EXCEPT/FOR qualification> is optional and
47108              rarely used in this context.
47109
47110Examples:
47111    LET N  = SET CARDINALITY Y
47112    LET N  = SET CARDINALITY Y SUBSET Y1 > 10
47113    LET N  = SET CARDINALITY Y FOR I = 1 1 3
47114
47115Note:
47116    If the elements of a mathematical "set" are numbers (or can be
47117    translated into numbers-- always possible), then a DATAPLOT variable
47118    can be used to store the items of the mathematical "set".  Thus if
47119    the analyst wanted to "store the set" with the 12 elements--
47120          1 3 5 7 11 1 4 9 16 1 8 27
47121    he/she can do so by forming the variable Y via:
47122          SERIAL READ Y
47123          1 3 5 7 11 1 4 9 16 1 8 27
47124          END OF DATA
47125    or
47126          LET Y = DATA 1 3 5 7 11 1 4 9 16 1 8 27
47127
47128Default:
47129    None
47130
47131Synonyms:
47132    SIZE (LET) for SET CARDINALITY (LET)
47133
47134Related Commands:
47135    SET UNION          = Carries out a set union.
47136    SET INTERSECTION   = Carries out a set intersection.
47137    SET COMPLEMENT     = Carries out a set complement.
47138    SET CART PRODUCT   = Carries out a set Cartesian product.
47139    SET ELEMENTS       = Extracts the distinct elements of set.
47140    PLOT               = Plots data or functions.
47141
47142Applications:
47143    Mathematics
47144
47145Implementation Date:
47146    88/7
47147
47148Program:
47149    LET Y = DATA 1 3 5 7 11 1 4 9 16 1 8 27
47150    LET N = SET CARDINALITY Y
47151    SET WRITE DECIMALS 0
47152    WRITE Y N
47153
47154-----SET CARTESIAN PRODUCT (LET)-----------------------------------
47155
47156SET CARTESIAN PRODUCT (LET)
47157
47158Name:
47159    SET CARTESIAN PRODUCT (LET)
47160
47161Type:
47162    Subcommand under LET
47163
47164Purpose:
47165    Carry out the cartesian product of 2 sets (with numeric elements).
47166
47167Description:
47168    The Cartesian product of two sets is the set containing all the
47169    possible element pairs of the 2 original sets.  For example, the
47170    Cartesian product of the 3-element set:
47171          1 3 5
47172    and the 4-element set:
47173          1 4 9 16
47174    is the 12-element pair of sets:
47175          1 1
47176          1 4
47177          1 9
47178          1 16
47179          3 1
47180          3 4
47181          3 9
47182          3 16
47183          5 1
47184          5 4
47185          5 9
47186          5 16
47187
47188Syntax:
47189    LET <v3> <v4> = SET CARTESIAN PRODUCT <v1> <v2>
47190                   <SUBSET/EXCEPT/FOR qualification>
47191    where <v1> is the variable whose elements are the elements of the
47192               first set;
47193          <v2> is the variable whose elements are the elements of the
47194               second set;
47195          <v3> is the variable whose elements are the elements of the
47196               resultant set corresponding to <v1>;
47197          <v4> is the variable whose elements are the elements of the
47198               resultant set corresponding to <v2>;
47199    and where the <SUBSET/EXCEPT/FOR qualification> is optional and
47200              rarely used in this context.
47201
47202Examples:
47203    LET Y3 Y4  = SET CARTESIAN PRODUCT Y1 Y2
47204    LET Y3 Y4  = SET CARTESIAN PRODUCT Y1 Y2 SUBSET Y1 > 10
47205    LET Y3 Y4  = SET CARTESIAN PRODUCT Y1 Y2 FOR I = 1 1 3
47206
47207Note:
47208    If the elements of a mathematical "set" are numbers (or can be
47209    translated into numbers-- always possible), then a DATAPLOT variable
47210    can be used to store the items of the mathematical "set".  Thus if
47211    the analyst wanted to "store the set" with the 12 elements--
47212          1 3 5 7 11 1 4 9 16 1 8 27
47213    he/she can do so by forming the variable Y via:
47214          SERIAL READ Y
47215          1 3 5 7 11 1 4 9 16 1 8 27
47216          END OF DATA
47217    or
47218          LET Y = DATA 1 3 5 7 11 1 4 9 16 1 8 27
47219
47220Default:
47221    None
47222
47223Synonyms:
47224    None
47225
47226Related Commands:
47227    SET CARDINALITY    = Computes the number of elements in a set.
47228    SET UNION          = Carries out a set union.
47229    SET INTERSECTION   = Carries out a set intersection.
47230    SET COMPLEMENT     = Carries out a set complement.
47231    SET DISTINCT       = Extracts the distinct elements of set.
47232    PLOT               = Plots data or functions.
47233    VECTOR DOT PRODUCT = Carries out a vector cross product.
47234    MATRIX MULT        = Carries out a matrix multiplication.
47235
47236Applications:
47237    Mathematics
47238
47239Implementation Date:
47240    87/10
47241
47242Program:
47243    LET Y1 = DATA 1 3 5 7 9
47244    LET Y2 = DATA 1 4 9 16
47245    LET Y3 Y4 = SET CARTESIAN PRODUCT Y1 Y2
47246    SET WRITE DECIMALS 0
47247    WRITE Y3 Y4
47248
47249-----SET COMPLEMENT (LET)----------------------------------------
47250
47251SET COMPLEMENT (LET)
47252
47253Name:
47254    SET COMPLEMENT (LET)
47255
47256Type:
47257    Subcommand under LET
47258
47259Purpose:
47260    Carry out the complement of 2 sets (with numeric elements).
47261
47262Description:
47263    The complement is of set 1 with respect to set 2 (the assumed
47264    superset).  The resultant set is those elements in set 2 which are
47265    not in set 1.  For example, the complement of the 3-element set:
47266          1 5 7
47267    with respect to the 5-element set:
47268          1 3 5 7 9
47269    is the 2-element set:
47270          3 9
47271
47272Syntax:
47273    LET <v3> = SET COMPLEMENT <v1> <v2>
47274              <SUBSET/EXCEPT/FOR qualification>
47275    where <v1> is the variable whose elements are the elements of the
47276               first set;
47277          <v2> is the variable whose elements are the elements of the
47278               second set;
47279          <v3> is the variable whose elements are the elements of the
47280               resultant set;
47281    and where the <SUBSET/EXCEPT/FOR qualification> is optional and
47282              rarely used in this context.
47283
47284Examples:
47285    LET Y3  = SET COMPLEMENT Y1 Y2
47286    LET Y3  = SET COMPLEMENT Y1 Y2 SUBSET Y1 > 10
47287    LET Y3  = SET COMPLEMENT Y1 Y2 FOR I = 1 1 3
47288
47289Note:
47290    If the elements of a mathematical "set" are numbers (or can be
47291    translated into numbers-- always possible), then a DATAPLOT variable
47292    can be used to store the items of the mathematical "set".  Thus if
47293    the analyst wanted to "store the set" with the 12 elements--
47294          1 3 5 7 11 1 4 9 16 1 8 27
47295    he/she can do so by forming the variable Y via:
47296          SERIAL READ Y
47297          1 3 5 7 11 1 4 9 16 1 8 27
47298          END OF DATA
47299    or
47300          LET Y = DATA 1 3 5 7 11 1 4 9 16 1 8 27
47301
47302Default:
47303    None
47304
47305Synonyms:
47306    None
47307
47308Related Commands:
47309    SET CARDINALITY     = Computes the number of elements in a set.
47310    SET UNION           = Carries out a set union.
47311    SET INTERSECTION    = Carries out a set intersection.
47312    SET CART PRODUCT    = Carries out a set Cartesian product.
47313    SET ELEMENTS        = Extracts the distinct elements of set.
47314    PLOT                = Plots data or functions.
47315    COMPLEX SUBTRACTION = Carries out complex subtraction.
47316    POLY  SUBTRACTION   = Carries out polynomial subtraction.
47317    VECTOR SUBTRACTION  = Carries out vector subtraction.
47318    LOGICAL OR          = Carries out logical or.
47319    MATRIX SUBTRACTION  = Carries out matrix subtraction.
47320
47321Applications:
47322    Mathematics
47323
47324Implementation Date:
47325    87/10
47326
47327Program:
47328    LET Y1 = DATA 1 5 7
47329    LET Y2 = DATA 1 3 5 7 9
47330    LET Y3 = SET COMPLEMENT Y1 Y2
47331    SET WRITE DECIMALS 0
47332    WRITE Y1 Y2 Y3
47333
47334-----SET DISTINCT (LET)------------------------------------------
47335
47336SET DISTINCT (LET)
47337
47338Name:
47339    SET DISTINCT (LET)
47340
47341Type:
47342    Subcommand under LET
47343
47344Purpose:
47345    Extract the distinct elements of a set (with numeric elements).
47346
47347Description:
47348    The distinct elements of a set are those elements of the original
47349    set but with multiple occurrences ignored.  The set of distinct
47350    elements of the 12-element set:
47351          1 3 5 7 9 1 4 9 16 1 8 27
47352    is the 9-element resultant set:
47353          1 3 5 7 9 4 16 8 27
47354
47355Syntax:
47356    LET <v2> = SET DISTINCT <v1>  <SUBSET/EXCEPT/FOR qualification>
47357    where <v1> is the variable whose elements are the elements of the
47358               input set;
47359          <v2> is the variable where the resultant set is saved;
47360    and where the <SUBSET/EXCEPT/FOR qualification> is optional and
47361              rarely used in this context.
47362
47363Examples:
47364    LET Y3  = SET DISTINCT Y1
47365    LET Y3  = SET DISTINCT Y1 SUBSET Y1 > 10
47366    LET Y3  = SET DISTINCT Y1 FOR I = 1 1 20
47367
47368Note:
47369    If the elements of a mathematical "set" are numbers (or can be
47370    translated into numbers-- always possible), then a DATAPLOT variable
47371    can be used to store the items of the mathematical "set".  Thus if
47372    the analyst wanted to "store the set" with the 12 elements--
47373          1 3 5 7 11 1 4 9 16 1 8 27
47374    he/she can do so by forming the variable Y via:
47375          SERIAL READ Y
47376          1 3 5 7 11 1 4 9 16 1 8 27
47377          END OF DATA
47378    or
47379          LET Y = DATA 1 3 5 7 11 1 4 9 16 1 8 27
47380
47381Default:
47382    None
47383
47384Synonyms:
47385    DISTINCT for SET DISTINCT (LET)
47386    SET ELEMENTS (LET) for SET DISTINCT (LET)
47387
47388Related Commands:
47389    SET CARDINALITY    = Computes the number of elements in a set.
47390    SET UNION          = Carries out a set union.
47391    SET INTERSECTION   = Carries out a set intersection.
47392    SET COMPLEMENT     = Carries out a set complement.
47393    SET CART PRODUCT   = Carries out a set Cartesian product.
47394    PLOT               = Plots data or functions.
47395
47396Applications:
47397    Mathematics
47398
47399Implementation Date:
47400    88/7
47401
47402Program:
47403    LET Y1 = DATA 1 3 5 7 11 1 4 9 16 1 8 27
47404    LET Y2 = SET DISTINCT Y1
47405    SET WRITE DECIMALS 0
47406    WRITE Y1 Y2
47407
47408-----SET INTERSECTION (LET)--------------------------------------
47409
47410SET INTERSECTION (LET)
47411
47412Name:
47413    SET INTERSECTION (LET)
47414
47415Type:
47416    Subcommand under LET
47417
47418Purpose:
47419    Carry out the intersection of 2 sets (with numeric elements).
47420
47421Description:
47422    The intersection of 2 sets is the set containing the elements
47423    common to both sets.  For example, the intersection of the
47424    5-element set:
47425          1 3 5 7 9
47426    and the 4-element set:
47427          1 4 9 16
47428    is the 2-element set:
47429          1 9
47430
47431Syntax:
47432    LET <v3> = SET INTERSECTION <v1> <v2>
47433              <SUBSET/EXCEPT/FOR qualification>
47434    where <v1> is the variable whose elements are the elements of the
47435               first set;
47436          <v2> is the variable whose elements are the elements of the
47437               second set;
47438          <v3> is the variable whose elements are the elements of the
47439               resultant set;
47440    and where the <SUBSET/EXCEPT/FOR qualification> is optional and
47441              rarely used in this context.
47442
47443Examples:
47444    LET Y3  = SET INTERSECTION Y1 Y2
47445    LET Y3  = SET INTERSECTION Y1 Y2 SUBSET Y1 > 10
47446    LET Y3  = SET INTERSECTION Y1 Y2 FOR I = 1 1 3
47447
47448Note:
47449    If the elements of a mathematical "set" are numbers (or can be
47450    translated into numbers-- always possible), then a DATAPLOT variable
47451    can be used to store the items of the mathematical "set".  Thus if
47452    the analyst wanted to "store the set" with the 12 elements--
47453          1 3 5 7 11 1 4 9 16 1 8 27
47454    he/she can do so by forming the variable Y via:
47455          SERIAL READ Y
47456          1 3 5 7 11 1 4 9 16 1 8 27
47457          END OF DATA
47458    or
47459          LET Y = DATA 1 3 5 7 11 1 4 9 16 1 8 27
47460
47461Default:
47462    None
47463
47464Synonyms:
47465    None
47466
47467Related Commands:
47468    SET CARDINALITY     = Computes the number of elements in a set.
47469    SET UNION           = Carries out a set union.
47470    SET COMPLEMENT      = Carries out a set complement.
47471    SET CART PRODUCT    = Carries out a set Cartesian product.
47472    SET DISTINCT        = Extracts the distinct elements of set.
47473    PLOT                = Plots data or functions.
47474    COMPLEX SUBTRACTION = Carries out a complex subtraction.
47475    POLY  SUBTRACTION   = Carries out a polynomial subtraction.
47476    VECTOR SUBTRACTION  = Carries out a vector subtraction.
47477    LOGICAL OR          = Carries out a logical or.
47478    MATRIX SUBTRACTION  = Carries out a matrix subtraction.
47479
47480Applications:
47481    Mathematics
47482
47483Implementation Date:
47484    93/9
47485
47486Program:
47487    . PURPOSE--DETERMINE THE SOLUTIONS OF A DIOPHANTINE EQUATION--
47488    .          FIND THE INTEGER SOLUTIONS (X AND Y) OF X**2 + 1 = 2*Y**4
47489    .
47490    .      STEP 1--DEFINE THE FUNCTION OF INTEREST IN Y = F(X) FORM.
47491    .      DEFINE A SEQUENCE OF X VALUES AND COMPUTE CORRESPONDING Y.
47492    LET FUNCTION F = ((X**2+1)/2)**0.25
47493    LET X = SEQUENCE 0 1 500
47494    LET Y = F
47495    .      STEP 2--DETERMINE THE INTERSECTION OF THE Y VALUES
47496    .              WITH THE (INTEGER) X VALUES.
47497    LET Y2 = SET INTERSECTION X Y
47498    PRINT Y2
47499    .      STEP 3--IN ANOTHER FASHION, DETERMINE THE Y VALUES WHICH ARE
47500    .              INTEGER AND THE (NECESSARILY INTEGER) X VALUES
47501    LET Y3 = FRACT(Y)
47502    LINE SOLID BLANK
47503    CHARACTER BLANK X
47504    PLOT Y X AND
47505    PLOT Y X SUBSET Y3 0
47506
47507-----SET UNION (LET)---------------------------------------------
47508
47509SET UNION (LET)
47510
47511Name:
47512    SET UNION (LET)
47513
47514Type:
47515    Subcommand under LET
47516
47517Purpose:
47518    Carry out the union of 2 sets (with numeric elements).
47519
47520Description:
47521    The union of two sets is the set containing elements that are in
47522    either of the 2 original sets (but not necessarily both sets).
47523    Repeats are only counted once.  For example, the union of the
47524    5-element set:
47525          1 3 5 7 9
47526    and the 4-element set:
47527          1 4 9 16
47528    is the 9-element set:
47529          1 3 5 7 9 1 4 9 16
47530
47531Syntax:
47532    LET <v3> = SET UNION <v1> <v2>   <SUBSET/EXCEPT/FOR qualification>
47533    where <v1> is the variable whose elements are the elements of the
47534               first set;
47535          <v2> is the variable whose elements are the elements of the
47536               second set;
47537          <v3> is the variable whose elements are the elements of the
47538               resultant set;
47539    and where the <SUBSET/EXCEPT/FOR qualification> is optional and
47540              rarely used in this context.
47541
47542Examples:
47543    LET Y3  = SET UNION Y1 Y2
47544    LET Y3  = SET UNION Y1 Y2 SUBSET Y1 > 10
47545    LET Y3  = SET UNION Y1 Y2 FOR I = 1 1 3
47546
47547Note:
47548    If the elements of a mathematical "set" are numbers (or can be
47549    translated into numbers-- always possible), then a DATAPLOT variable
47550    can be used to store the items of the mathematical "set".  Thus if
47551    the analyst wanted to "store the set" with the 12 elements--
47552          1 3 5 7 11 1 4 9 16 1 8 27
47553    he/she can do so by forming the variable Y via:
47554          SERIAL READ Y
47555          1 3 5 7 11 1 4 9 16 1 8 27
47556          END OF DATA
47557    or
47558          LET Y = DATA 1 3 5 7 11 1 4 9 16 1 8 27
47559
47560Default:
47561    None
47562
47563Synonyms:
47564    None
47565
47566Related Commands:
47567    SET CARDINALITY    = Computes the number of elements in a set.
47568    SET INTERSECTION   = Carries out a set intersection.
47569    SET COMPLEMENT     = Carries out a set complement.
47570    SET CART PRODUCT   = Carries out a set Cartesian product.
47571    SET DISTINCT       = Extracts the distinct elements of set.
47572    PLOT               = Plots data or functions.
47573    COMPLEX ADDITION   = Carries out a complex addition.
47574    POLY  ADDITION     = Carries out a polynomial addition.
47575    VECTOR ADDITION    = Carries out a vector addition.
47576    LOGICAL AND        = Carries out a logical and.
47577    MATRIX ADDITION    = Carries out a matrix addition.
47578
47579Applications:
47580    Mathematics
47581
47582Implementation Date:
47583    87/10
47584
47585Program:
47586    LET Y1 = DATA 1 3 5 7 9
47587    LET Y2 = DATA 1 4 9 16
47588    LET Y3 = SET UNION Y1 Y2
47589    SET WRITE DECIMALS 0
47590    WRITE Y1 Y2 Y3
47591
47592-----SHANNON DIVERSITY INDEX (LET)-------------------------------------
47593
47594SHANNON DIVERSITY INDEX
47595
47596Name:
47597    SHANNON DIVERSITY INDEX (LET)
47598
47599Type:
47600    Let Subcommand
47601
47602Purpose:
47603    Compute the Shannon diversity index.
47604
47605Description:
47606    Diversity indices are statistics used to summarize the diversity of a
47607    population in which each member belongs to a unique group.  For
47608    example, in ecology the groups are typically species.  In ecology,
47609    species richness refers to number of species and species eveness
47610    refers to homogeneity of the species.  That is, the more equal the
47611    proportions for each of the groups, the more homogeneous, or even,
47612    they are.  Different fields of application may use different
47613    terminology for these concepts.
47614
47615    Given a vector of frequencies (counts), f(i), the Shannon diversity
47616    index is computed as
47617
47618        H = {n*LOG(n) - SUM[i=1 to k][f(i)*LOG(f(i))]}/n
47619
47620    with k and n denoting the number of groups and the total count,
47621    respectively.  If f(i) = 0, then the f(i)*LOG(f(i)) term is set
47622    to 0.
47623
47624    The maximum value of the index is LOG(k).  This value occurs when
47625    each group has the same frequency (i.e., maximum eveness).
47626
47627    The Shannon equitability index is simply the Shannon diversity
47628    index divided by the maximum diversity
47629
47630         E(H) = H/LOG(k)
47631
47632    This normalizes the Shannon diversity index to a value between 0 and
47633    1.   Note that lower values indicate more diversity while higher
47634    values indicate less diversity.  Specifically, an index value of 1
47635    means that all groups have the same frequency.  Some analysts
47636    use 1 - E(H) so that higher values indicate higher diversity.
47637    Some analysts also use 1/E(H).
47638
47639    In some cases, you may have proportions rather than counts.  In
47640    this case, the formula for the Shannon diversity index is
47641
47642         H = -SUM[i=1 to k][p(i)*LOG(p(i))]
47643
47644    with p(i) denoting the proportion in group k.  As above, the Shannon
47645    equitability index is computed as
47646
47647         E(H) = H/LOG(k)
47648
47649    You may also have raw data.  That is, each row of the response
47650    variable identifies which group that row belongs to.  In this case,
47651    Dataplot will generate the frequency table and use the formulas
47652    above to compute the index.
47653
47654Syntax 1:
47655    LET <par> = SHANNON <DIVERSITY/EQUITABILITY> INDEX <y>
47656                <SUBSET/EXCEPT/FOR qualification>
47657    where <y> is the response variable;
47658          <DIVERSITY/EQUITABILITY> specifies whether the diversity or
47659                equitability index is computed;
47660          <par> is a parameter where the Shannon diversity index is saved;
47661    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
47662
47663    This syntax is used when the response variable is either a set
47664    of proportions or a set of counts.  Dataplot sums the values in
47665    the response variable.  If the sum equals 1, then it assumes the
47666    response variable contains proportions.  Otherwise, it assumes
47667    the response variable contains frequencies.  In either case,
47668    if negative values are encountered an error is reported.
47669
47670Syntax 2:
47671    LET <par> = RAW SHANNON <DIVERSITY/EQUITABILITY> INDEX <y>
47672                <SUBSET/EXCEPT/FOR qualification>
47673    where <y> is the response variable;
47674          <DIVERSITY/EQUITABILITY> specifies whether the diversity or
47675                equitability index is computed;
47676          <par> is a parameter where the Shannon diversity index is saved;
47677    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
47678
47679    This syntax is used when the response variable is a group-id
47680    variable.  The group frequencies will be computed automatically.
47681
47682Examples:
47683    LET SDI = SHANNON DIVERSITY P
47684    LET SEI = SHANNON EQUITABILITY P
47685
47686Note:
47687    The Shannon diversity/equitability is used in a wide variety of
47688    fields.  It may be referred to by a different name or have a
47689    slightly different formulation in various fields.
47690
47691Note:
47692    Dataplot statistics can be used in a number of commands.  For
47693    details, enter
47694
47695         HELP STATISTICS
47696
47697    The SHANNON DIVERSITY INDEX command is not typically used in the context
47698    of these other commands.
47699
47700Default:
47701    None
47702
47703Synonyms:
47704    SHANNON EVENESS INDEX is a synonym for SHANNON EQUIABILIY INDEX
47705
47706Related Commands:
47707    SIMPSON DIVERSITY INDEX   = Compute the Simpson diversity index.
47708
47709References:
47710    Weaver, W.; C.E. Shannon (1949), "The Mathematical Theory of
47711    Communication," Urbana, Illinois: University of Illinois.
47712
47713    Shannon, C.E. (July and October 1948), "A mathematical theory of
47714    communication," Bell System Technical Journal 27: 379–423 and 623–656.
47715
47716    Brani Vidakovic (2011), "Statistics for Bioengineering
47717    Sciences: With MATLAB and WinBUGS Support," Springer, p. 23.
47718
47719Applications:
47720    Data Management
47721
47722Implementation Date:
47723    2011/12
47724
47725Program:
47726    let p = data 0.25 0.15 0.40 0.20
47727    let nk = size p
47728    .
47729    let a = shannon diversity index p
47730    let b = shannon equitability index p
47731    .
47732    .  Following example from page 23 of:
47733    .
47734    .     Brani Vidakovic (2011), "Statistics for Bioengineering
47735    .     Sciences: With MATLAB and WinBUGS Support", Springer.
47736    .
47737    read y x
47738    115  1
47739    108  1
47740     25  1
47741      6  1
47742     28  1
47743     25  1
47744      6  1
47745      1  1
47746    220  2
47747    134  2
47748    183  2
47749     39  2
47750     12  2
47751      6  2
47752      6  2
47753     12  2
47754     83  3
47755    104  3
47756     16  3
47757      8  3
47758     14  3
47759     18  3
47760      2  3
47761      1  3
47762     99  4
47763     94  4
47764     21  4
47765      8  4
47766     18  4
47767     18  4
47768      5  4
47769      2  4
47770    end of data
47771    .
47772    set write decimals 4
47773    tabulate shannon diversity index y x
47774    tabulate shannon equitability index y x
47775    .
47776    let yn = cross tabulate sum y x
47777    let pn = y/yn
47778    tabulate shannon diversity index pn x
47779    tabulate shannon equitability index pn x
47780
47781-----SHUFFLE GROUPS (LET)---------------------------------------
47782
47783SHUFFLE GROUPS
47784
47785Name:
47786    SHUFFLE GROUPS (LET)
47787
47788Type:
47789    Let Subcommand
47790
47791Purpose:
47792    Given a response variable and a group-id variable, re-arrange the
47793    groups based on an index variable (the response variable is not
47794    randomized within the group).
47795
47796Description:
47797    The motivation for this command is to allow the rows (or columns)
47798    of a matrix or image to be randomly re-arranged.  The randomization
47799    can be either with replacement or without replacement (this is
47800    determined by the index variable).
47801
47802    The size of the index variable should be equal to the number of groups
47803    in the group-id variable.  Although this command was motivated by
47804    cases where the group sizes are equal, this is not required.  If the
47805    group sizes are note equal, the output variable may not be the same
47806    length as the input variable.
47807
47808Syntax:
47809    LET <y2> = SHUFFLE GROUPS <y> <x> <index>
47810               <SUBSET/EXCEPT/FOR qualification>
47811    where <y> is a response variable;
47812          <x> is a group-id variable;
47813          <index> is a variable defining the order for the groups in the
47814               output variable;
47815          <y2> is a response variable containing the re-arranged groups;
47816    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
47817
47818    The response variable and group-id variable should have the same
47819    number of elements.  The index variable must be the same size as the
47820    number of groups in the group-id variable.
47821
47822    If there are k groups in the group-id variable, then the values in
47823    the index variable should be between 1 and k.  An error will be
47824    reported if they are not.
47825
47826Examples:
47827    LET Y2 = SHUFFLE GROUPS Y X XINDEX
47828
47829Default:
47830    None
47831
47832Synonyms:
47833    None
47834
47835Related Commands:
47836    RANDOM PERMUTATION     = Generate a set of random permutations.
47837    MATRIX RENUMBER        = Permute the rows and columns of a matrix.
47838
47839Applications:
47840    Data Manipulation
47841
47842Implementation Date:
47843    2014/07
47844
47845Program:
47846    . Step 1:   Read the data
47847    .
47848    read x y
47849    1   1
47850    1   2
47851    1   3
47852    1   4
47853    1   5
47854    2  11
47855    2  12
47856    2  13
47857    2  14
47858    2  15
47859    3  21
47860    3  22
47861    3  23
47862    3  24
47863    3  25
47864    4  31
47865    4  32
47866    4  33
47867    4  34
47868    4  35
47869    end of data
47870    .
47871    . Step 2:   Now reshuffle the groups
47872    .
47873    let iindex = data 3  1 4  2
47874    let yout = shuffle groups y x iindex
47875    .
47876    . Step 3:   Print the results
47877    .
47878    set write decimals 0
47879    print x y yout
47880
47881-----SIMPSON DIVERSITY INDEX (LET)--------------------------------------
47882
47883SIMPSON DIVERSITY INDEX
47884
47885Name:
47886    SIMPSON DIVERSITY INDEX (LET)
47887
47888Type:
47889    Let Subcommand
47890
47891Purpose:
47892    Compute the Simpson diversity index.
47893
47894Description:
47895    Diversity indices are statistics used to summarize the diversity of a
47896    population in which each member belongs to a unique group.  For
47897    example, in ecology the groups are typically species.  In ecology,
47898    species richness refers to number of species and species eveness
47899    refers to homogeneity of the species.  That is, the more equal the
47900    proportions for each of the groups, the more homogeneous, or even,
47901    they are.  Different fields of application may use different
47902    terminology for these concepts.
47903
47904    Given a vector of frequencies (counts), f(i), the Simpson diversity
47905    index is computed as
47906
47907        D = SUM[i=1 to k][(f(i)/n)**2]
47908
47909    with k and n denoting the number of groups and the total count,
47910    respectively.
47911
47912    This index has a value between 0 and 1.  Lower values indicate more
47913    diversity while higher values indicate less diversity.
47914
47915    In some cases, you may have proportions rather than counts.  In
47916    this case, the formula for the Simpson diversity index is
47917
47918        D = SUM[i=1 to k][p(i)**2]
47919
47920    You may also have raw data.  That is, each row of the response
47921    variable identifies which group that row belongs to.  In this case,
47922    Dataplot will generate the frequency table and use the formulas
47923    above to compute the index.
47924
47925Syntax 1:
47926    LET <par> = SIMPSON DIVERSITY INDEX <y>
47927                <SUBSET/EXCEPT/FOR qualification>
47928    where <y> is the response variable;
47929          <par> is a parameter where the Simpson diversity index is saved;
47930    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
47931
47932    This syntax is used when the response variable is either a set
47933    of proportions or a set of counts.  Dataplot sums the values in
47934    the response variable.  If the sum equals 1, then it assumes the
47935    response variable contains proportions.  Otherwise, it assumes
47936    the response variable contains frequencies.  In either case,
47937    if negative values are encountered an error is reported.
47938
47939Syntax 2:
47940    LET <par> = RAW SIMPSON DIVERSITY INDEX <y>
47941                <SUBSET/EXCEPT/FOR qualification>
47942    where <y> is the response variable;
47943          <par> is a parameter where the Simpson diversity index is saved;
47944    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
47945
47946    This syntax is used when the response variable is a group-id
47947    variable.  The group frequencies will be computed automatically.
47948
47949Examples:
47950    LET SDI = SIMPSON DIVERSITY P
47951
47952Note:
47953    The Simpson diversity is used in a wide variety of fields.  It may be
47954    referred to by a different name or have a slightly different
47955    formulation in various fields.
47956
47957Note:
47958    Dataplot statistics can be used in a number of commands.  For
47959    details, enter
47960
47961         HELP STATISTICS
47962
47963    The SIMPSON DIVERSITY INDEX command is not typically used in the context of these
47964    other commands.
47965
47966Default:
47967    None
47968
47969Synonyms:
47970    None
47971
47972Related Commands:
47973    SHANNON DIVERSITY INDEX   = Compute the Shannon diversity index.
47974
47975References:
47976    Edward H. Simpson (1949), "Measurement of diversity," Nature 163:688.
47977
47978Applications:
47979    Data Management
47980
47981Implementation Date:
47982    2011/12
47983
47984Program:
47985    let p = data 0.25 0.15 0.40 0.20
47986    let nk = size p
47987    .
47988    let a = simpson diversity index p
47989    .
47990    .  Following example from page 23 of:
47991    .
47992    .     Brani Vidakovic (2011), "Statistics for Bioengineering
47993    .     Sciences: With MATLAB and WinBUGS Support", Springer.
47994    .
47995    read y x
47996    115  1
47997    108  1
47998     25  1
47999      6  1
48000     28  1
48001     25  1
48002      6  1
48003      1  1
48004    220  2
48005    134  2
48006    183  2
48007     39  2
48008     12  2
48009      6  2
48010      6  2
48011     12  2
48012     83  3
48013    104  3
48014     16  3
48015      8  3
48016     14  3
48017     18  3
48018      2  3
48019      1  3
48020     99  4
48021     94  4
48022     21  4
48023      8  4
48024     18  4
48025     18  4
48026      5  4
48027      2  4
48028    end of data
48029    .
48030    set write decimals 4
48031    tabulate simpson diversity index y x
48032    .
48033    let yn = cross tabulate sum y x
48034    let pn = y/yn
48035    tabulate simpson diversity index pn x
48036
48037-----SHORTEST HALF MIDMEAN (LET)-----------------------------------------
48038
48039SHORTEST HALF MIDMEAN
48040
48041Name:
48042    SHORTEST HALF MIDMEAN (LET)
48043
48044Type:
48045    Let Subcommand
48046
48047Purpose:
48048    Compute the shortest half midmean for a variable.
48049
48050Description:
48051    The midmean of a variable is the mean of the observations between
48052    the 25th and 75th percentiles.  The shortest half midmean uses the
48053    most compact half of the data rather than the middle half.  This is
48054    essentially an asymetric version of the midmean.  Although it has
48055    rather low efficiency (lower than the median), it is less sensitive
48056    to asymmetrically distributed outliers.  The formula for the shortest
48057    half midmean is
48058
48059        M = SUM[i=k to k+m][X(i)]/m   for the minimum
48060                                      (X(k+m) - X(k))
48061
48062        m = n/2                       n odd
48063        m = INT(n/2) + 1              n even
48064
48065
48066Syntax 1:
48067    LET <par> = SHORTEST HALF MIDMEAN <y>
48068                <SUBSET/EXCEPT/FOR qualification>
48069    where <y> is the response variable;
48070          <par> is a parameter where the computed shortest half midmean
48071              is stored;
48072    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
48073
48074Syntax 2:
48075    LET <par> = DIFFERENCE OF SHORTEST HALF MIDMEAN <y1> <y2>
48076                                      <SUBSET/EXCEPT/FOR qualification>
48077    where <y1> is the first response variable;
48078          <y2> is the second response variable;
48079          <par> is a parameter where the computed difference of shortest
48080               half midmeans is stored;
48081    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
48082
48083Examples:
48084    LET A = SHORTEST HALF MIDMEAN Y1
48085    LET A = SHORTEST HALF MIDMEAN Y1 SUBSET TAG > 2
48086
48087    LET A = DIFFERENCE OF SHORTEST HALFMIDMEAN Y1 Y2
48088
48089Note:
48090    Dataplot statistics can be used in a number of commands.  For
48091    details, enter
48092
48093         HELP STATISTICS
48094
48095Default:
48096    None
48097
48098Synonyms:
48099    SHORTEST HALF MID MEAN is a synonym for SHORTEST HALF MIDMEAN
48100
48101Related Commands:
48102    MIDMEAN                 = Compute the midmean.
48103    SHORTEST HALF MIDRANGE  = Compute the shortest half midrange.
48104    MEAN                    = Compute the mean.
48105    MEDIAN                  = Compute the median.
48106    STANDARD DEVIATION      = Compute the standard deviation.
48107
48108References:
48109    David Duewer (2008), "A Comparison of Location Estimators for
48110    Interlaboratory Data Contaminated with Value and Uncertainty
48111    Outliers", Accredited Quality Assurance, Vol. 13, pp. 193-216.
48112
48113    Andrews, Bickel, Hampel, Huber, Rogers, and Tukey (1972), "Robust
48114    Estimates of Location", Princeton University Press, Princeton.
48115
48116    Rousseeuw (1985), "Multivariate Estimation with High Breakdown
48117    Point", in Grossman, Pflug, Nincze, Wetrz (eds), "Mathematical
48118    Statistics and Applications", Reidel, Dordrecht, The Netherlands,
48119    pp. 283-297.
48120
48121Applications:
48122    Robust Data Analysis
48123
48124Implementation Date:
48125    2017/02
48126    2017/06: Added DIFFERENCE OF SHORTEST HALF MIDMEAN
48127
48128Program 1:
48129    SKIP 25
48130    READ LGN.DAT Y
48131    LET SHMM = SHORTEST HALF MIDMEAN Y
48132
48133Program 2:
48134    . Step 1:   Create the data
48135    .
48136    skip 25
48137    read gear.dat y x
48138    skip 0
48139    .
48140    char X
48141    line blank
48142    y1label Shortest Half Midmean
48143    x1label Group
48144    x1tic mark offset 0.5 0.5
48145    label case asis
48146    title case asis
48147    title Shortest Half Midmean of GEAR.DAT
48148    title offset 2
48149    .
48150    set statistic plot reference line average
48151    shortest half midmean plot y x
48152    .
48153    set write decimals 5
48154    tabulate shortest half midmean y x
48155
48156Program 3:
48157    SKIP 25
48158    READ IRIS.DAT Y1 TO Y4 X
48159    .
48160    LET A = DIFFERENCE OF SHORTEST HALF MIDMEAN Y1 Y2
48161    SET WRITE DECIMALS 4
48162    TABULATE DIFFERENCE OF SHORTEST HALF MIDMEAN Y1 Y2 X
48163    .
48164    XTIC OFFSET 0.2 0.2
48165    X1LABEL GROUP ID
48166    Y1LABEL DIFFERENCE OF SHORTEST HALF MIDMEAN
48167    CHAR X
48168    LINE BLANK
48169    DIFFERENCE OF SHORTEST HALF MIDMEAN PLOT Y1 Y2 X
48170    CHAR X ALL
48171    LINE BLANK ALL
48172    BOOTSTRAP DIFFERENCE OF SHORTEST HALF MIDMEAN PLOT Y1 Y2 X
48173
48174-----SHORTEST HALF MIDRANGE (LET)-----------------------------------------
48175
48176SHORTEST HALF MIDRANGE
48177
48178Name:
48179    SHORTEST HALF MIDRANGE (LET)
48180
48181Type:
48182    Let Subcommand
48183
48184Purpose:
48185    Compute the shortest half midrange for a variable.
48186
48187Description:
48188    The midrange of a variable is the mean of the minimum and
48189    maximum values.  The shortest half midrange is based on the
48190    most compact half of the data.  This is essentially an asymetric
48191    version of the mean of the lower quartile and the upper quartile.
48192    Although it has rather low efficiency (lower than the median), it
48193    is less sensitive to asymmetrically distributed outliers.  The
48194    formula for the shortest half midrange is
48195
48196        M = (X(k) + X(k+m))/2         for the minimum  (X(k+m) - X(k))
48197
48198        m = n/2                       n odd
48199        m = INT(n/2) + 1              n even
48200
48201Syntax 1:
48202    LET <par> = SHORTEST HALF MIDRANGE <y>
48203                <SUBSET/EXCEPT/FOR qualification>
48204    where <y> is the response variable;
48205          <par> is a parameter where the computed shortest half midrange
48206              is stored;
48207    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
48208
48209Syntax 2:
48210    LET <par> = DIFFERENCE OF SHORTEST HALF MIDRANGE <y1> <y2>
48211                <SUBSET/EXCEPT/FOR qualification>
48212    where <y1> is the first response variable;
48213          <y2> is the second response variable;
48214          <par> is a parameter where the computed difference of shortest
48215               half midranges is stored;
48216    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
48217
48218Examples:
48219    LET A = SHORTEST HALF MIDRANGE Y1
48220    LET A = SHORTEST HALF MIDRANGE Y1 SUBSET TAG > 2
48221
48222    LET A = DIFFERENCE OF SHORTEST HALF MIDRANGE Y1 Y2
48223
48224Note:
48225    Dataplot statistics can be used in a number of commands.  For
48226    details, enter
48227
48228         HELP STATISTICS
48229
48230Default:
48231    None
48232
48233Synonyms:
48234    SHORTEST HALF MID RANGE is a synonym for SHORTEST HALF MIDRANGE
48235
48236Related Commands:
48237    MIDRANGE                = Compute the midrange.
48238    SHORTEST HALF MIDMEAN   = Compute the shortest half midmean.
48239    MEAN                    = Compute the mean.
48240    MEDIAN                  = Compute the median.
48241    STANDARD DEVIATION      = Compute the standard deviation.
48242
48243References:
48244    David Duewer (2008), "A Comparison of Location Estimators for
48245    Interlaboratory Data Contaminated with Value and Uncertainty
48246    Outliers", Accredited Quality Assurance, Vol. 13, pp. 193-216.
48247
48248    Andrews, Bickel, Hampel, Huber, Rogers, and Tukey (1972), "Robust
48249    Estimates of Location", Princeton University Press, Princeton.
48250
48251    Rousseeuw (1985), "Multivariate Estimation with High Breakdown
48252    Point", in Grossman, Pflug, Nincze, Wetrz (eds), "Mathematical
48253    Statistics and Applications", Reidel, Dordrecht, The Netherlands,
48254    pp. 283-297.
48255Applications:
48256    Robust Data Analysis
48257
48258Implementation Date:
48259    2017/02
48260    2017/06: Added DIFFERENCE OF SHORTEST HALF MIDRANGE
48261
48262Program 1:
48263    SKIP 25
48264    READ LGN.DAT Y
48265    LET SHMM = SHORTEST HALF MIDRANGE Y
48266
48267Program 2:
48268    . Step 1:   Create the data
48269    .
48270    skip 25
48271    read gear.dat y x
48272    skip 0
48273    .
48274    char X
48275    line blank
48276    y1label Shortest Half Midrange
48277    x1label Group
48278    x1tic mark offset 0.5 0.5
48279    label case asis
48280    title case asis
48281    title Shortest Half Midrange of GEAR.DAT
48282    title offset 2
48283    .
48284    set statistic plot reference line average
48285    shortest half midrange plot y x
48286    .
48287    set write decimals 5
48288    tabulate shortest half midrange y x
48289
48290Program 3:
48291    SKIP 25
48292    READ IRIS.DAT Y1 TO Y4 X
48293    .
48294    LET A = DIFFERENCE OF SHORTEST HALF MIDRANGE Y1 Y2
48295    SET WRITE DECIMALS 4
48296    TABULATE DIFFERENCE OF SHORTEST HALF MIDRANGE Y1 Y2 X
48297    .
48298    XTIC OFFSET 0.2 0.2
48299    X1LABEL GROUP ID
48300    Y1LABEL DIFFERENCE OF SHORTEST HALF MIDRANGE
48301    CHAR X
48302    LINE BLANK
48303    DIFFERENCE OF SHORTEST HALF MIDRANGE PLOT Y1 Y2 X
48304    CHAR X ALL
48305    LINE BLANK ALL
48306    BOOTSTRAP DIFFERENCE OF SHORTEST HALF MIDRANGE PLOT Y1 Y2 X
48307
48308-----SHOW COLORS-------------------------------------------------------
48309
48310SHOW COLORS
48311
48312Name:
48313    SHOW COLORS
48314
48315Type:
48316    Output Devices Command
48317
48318Purpose:
48319    List the colors (and corresponding index numbers) available in
48320    DATAPLOT.
48321
48322Description:
48323    DATAPLOT allows colors to be specified by name or by an index
48324    number.  All devices recognize the same color names and index
48325    numbers  and there is a consistent mapping from an index number to
48326    a color (e.g., index 1 always goes to black, index 2 always goes to
48327    red).  Devices that do not support a given color map it to the
48328    closest available color (closest is an arbitrary choice).
48329    Specifying a device on this command shows the mapping from the
48330    DATAPLOT color to the color that is actually used on the device.
48331
48332Syntax 1:
48333    SHOW COLORS
48334
48335    This syntax lists the color names and their associated index
48336    numbers recognized by DATAPLOT.
48337
48338Syntax 2:
48339    SHOW COLORS <device>
48340    where <device> is one of the following:
48341              CALCOMP
48342              CGM
48343              HP 2622
48344              HPGL
48345              PC
48346              POSTSCRIPT
48347              REGIS
48348              SUN
48349              TEKTRONIX 4115
48350              TEKTRONIX 4662
48351              TEKTRONIX 4027
48352              X11
48353              ZETA.
48354
48355    This syntax shows the mapping from the DATAPLOT color to the
48356    actual color used on the given device.
48357
48358Examples:
48359    SHOW COLORS
48360    SHOW COLORS POSTSCRIPT
48361    SHOW COLORS TEKTRONIX 4115
48362
48363Note:
48364    In previous versions, specifying a color by index would select
48365    the slot number on penplotter devices.  This is no longer the case.
48366    The index number now goes to a specific color, which then goes
48367    to the slot assigned to that color.  While this is less intuitive
48368    for plotters, it allows color names and indices to be treated
48369    consistently across devices (e.g., index 1 means BLACK on all
48370    devices).  The PEN MAP command can still be used to assign a color
48371    to a specific slot number for plotter devices (HPGL, CALCOMP, and
48372    ZETA).
48373
48374Default:
48375    None
48376
48377Synonyms:
48378    None
48379
48380Related Commands:
48381    ZETA                  = Direct graphical output to a Zeta device.
48382    POSTSCRIPT            = Direct graphical output to a Postscript
48383                            device.
48384    TEKTRONIX             = Direct graphical output to a Tektronix
48385                            device.
48386    DEVICE                = Specify certain actions for the graphics
48387                            output.
48388    PEN MAP               = Specify the pen slot to color mapping for
48389                            certain plotter devices.
48390
48391Applications:
48392    Presentation Graphics
48393
48394Implementation Date:
48395    Pre-1987
48396
48397Program:
48398    XX
48399
48400-----SHOW READ FORMAT-------------------------------------------
48401
48402SHOW READ FORMAT
48403
48404Name:
48405    READ FORMAT (SET)
48406
48407Type:
48408    Support Command
48409
48410Purpose:
48411    Show the current setting for the read format.
48412
48413Description:
48414    Formatted reads provide faster performance at the expense of
48415    requiring a structured data file.
48416
48417Syntax:
48418    SHOW READ FORMAT
48419
48420Examples:
48421    SHOW READ FORMAT
48422
48423Default:
48424    Free-format (i.e., no format).
48425
48426Synonyms:
48427    None
48428
48429Related Commands:
48430    READ             = Carries out a column-wise input of data.
48431    SERIAL READ      = Carries out a line-wise input of data.
48432    SET READ FORMAT  = Specifies a Fortran-like format for subsequent
48433                       reads.
48434
48435Applications:
48436    Input/Output
48437
48438Implementation Date:
48439    88/3
48440
48441Program:
48442    XX
48443
48444-----SHIFT PLOT--------------------------------------
48445
48446SHIFT PLOT
48447
48448Name:
48449    SHIFT PLOT
48450
48451Type:
48452    Graphics Command
48453
48454Purpose:
48455    Generates a shift plot.
48456
48457Description:
48458    The shift plot is a plot of
48459
48460        y(q) - x(q) versus x(q)
48461
48462    with y(q) and x(q) denoting the qth quantiles of y and x,
48463    respectively.  Although this plot can be generated for any
48464    pair of variables, the primary usage of this plot is for the
48465    case where x is a control group and y is an experimental
48466    method.  Alternatively, x could represent an "old" method
48467    while y represents a "new" method.  The plot measures how much
48468    the control group must be shifted so that it is comparable to
48469    the expermimental method (relative to the quantiles).
48470
48471    The quantiles of a distribution are the distribution's "percent
48472    points" (e.g., the 0.5 quantile = 50% point = median).
48473
48474    The plot consists of the following:
48475       Vertical axis   = difference in the estimated quantiles
48476                         between data set 1 and data set 2;
48477       Horizontal axis = estimated quantiles from data set 2.
48478
48479    The shift plot is a variation of the quantile-quantile plot
48480    and the Tukey mean-difference plot.
48481
48482Syntax 1:
48483    SHIFT PLOT <y> <x>      <SUBSET/EXCEPT/FOR qualification>
48484    where <y> is the response variable for the experimental group;
48485          <x> is the response variable for the control group;
48486    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
48487
48488    With this syntax, the quantiles correspond to the data points
48489    of the <x> variable.
48490
48491Syntax 2:
48492    SHIFT PLOT <y> <x> <q>     <SUBSET/EXCEPT/FOR qualification>
48493    where <y> is the response variable for the experimental group;
48494          <x> is the response variable for the control group;
48495          <q> is a variable containing values between 0 and 1 that
48496              specifies the desired quantiles to plot;
48497    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
48498
48499    With this syntax, you explicitly give the desired quantiles.
48500
48501Examples:
48502    SHIFT PLOT Y X
48503    SHIFT PLOT Y X  SUBSET X > 1
48504    SHIFT PLOT Y X XQ
48505    SHIFT PLOT Y X  XQ SUBSET X > 1
48506
48507Default:
48508    None
48509
48510Synonyms:
48511    None
48512
48513Related Commands:
48514    CHARACTERS                 = Sets the type for plot characters.
48515    LINES                      = Sets the type for plot lines.
48516    QUANTILE-QUANTILE PLOT     = Generates a q-q plot.
48517    TUKEY MEAN-DIFFERENCE PLOT = Generates a Tukey mean-difference
48518                                 plot.
48519    BIHISTOGRAM                = Generates a bihistogram.
48520    T-TEST                     = Carries out a 2-sample t test.
48521    F-TEST                     = Carries out a 2-sample F test.
48522
48523Reference:
48524    "Introduction to Robust Estimation and Hypothesis Testing",
48525    Rand R. Wilcox, Academic Press, 1997.
48526
48527Applications:
48528    Exploratory Data Analysis
48529
48530Implementation Date:
48531    2003/2
48532
48533Program:
48534    SKIP 25
48535    READ AUTO83B.DAT Y1 Y2
48536    .
48537    DELETE Y2 SUBSET Y2 < 0
48538    LABEL CASE ASIS
48539    Y1LABEL Difference between Y1 and Y2 Quantiles
48540    X1LABEL Quantiles for Y1
48541    CHARACTER X
48542    LINE BLANK
48543    TIC OFFSET 0.3 0.3
48544    TIC OFFSET UNITS DATA
48545    SHIFT PLOT Y2 Y1
48546
48547-----SHIFT (LET)-------------------------------------
48548
48549SHIFT
48550
48551Name:
48552    SHIFT (LET)
48553
48554Type:
48555    Let Subcommand
48556
48557Purpose:
48558    Shift the contents of a variable either up or down.
48559
48560Description:
48561    It is sometimes convenient to move the elements of a
48562    variable either up or down.
48563
48564    For example, to shift the contents of the variable Y that
48565    contains 5 elements up (or right) by one element into the
48566    output vector Y2, we mean
48567
48568       Y(1)    =>     Y2(2)
48569       Y(2)    =>     Y2(3)
48570       Y(3)    =>     Y2(4)
48571       Y(4)    =>     Y2(5)
48572       Y(5)    =>     Y2(6)
48573
48574    To shift the contents of Y down (or left) by one element, we mean
48575
48576       Y(2)    =>     Y2(1)
48577       Y(3)    =>     Y2(2)
48578       Y(4)    =>     Y2(3)
48579       Y(5)    =>     Y2(4)
48580
48581    One question is how do we define the end-point values for Y2
48582    (i.e., Y2(1) for the up shift and Y2(5) for the down shift)?
48583
48584    Dataplot handles this by first doing
48585
48586       Y2 = Y
48587
48588    for all elements.  So for the up shift, Y2(1) = Y1(1) and
48589    for the down shift Y2(5) = Y(5).
48590
48591Syntax:
48592    LET <y> = SHIFT <x>  <nshift>
48593    where <x> is a response variable;
48594          <nshift> is a number or parameter that specifies how
48595              how many elements to shift;
48596    and   <y> is a variable that contains the shifted values.
48597
48598    The sign of NSHIFT specifies the direction.  If NSHIFT is
48599    negative, the shift is down (or left) and if NSHIFT is positive
48600    the shift is up (or right).  If NSHIFT is zero, then Y = X.
48601
48602Examples:
48603    LET Y = SHIFT X NSHIFT
48604
48605Note:
48606    If you want to handle the end points differently, then
48607    this can usually be accomplished with FOR clause.  For
48608    example, the set the end points to zero, do something like
48609
48610       LET NSHIFT =5
48611       LET AVAL = 0
48612       LET Y2 = SHIFT Y NSHIFT
48613       LET Y2 = AVAL FOR I = 1 1 NSHIFT
48614
48615Default:
48616    None
48617
48618Synonyms:
48619    None
48620
48621Related Commands:
48622    CIRCULAR SHIFT     = Perform a circular shift of a variable.
48623    SCATTER            = Save data from a variable to specified
48624                         rows of another variable based on an
48625                         index variable.
48626    SEQUENCE           = Generate a patterned sequence of values.
48627    SORT               = Sort a column of numbers.
48628    RANK               = Rank a column of numbers.
48629    CODE               = Code a column of numbers.
48630    SUBSET             = Specifies a subset to be included in a plot,
48631                         analysis, or LET command.
48632    RETAIN             = Retain specified rows or a subset of a
48633                         variable.
48634
48635Applications:
48636    Data Transformation
48637
48638Implementation Date:
48639    2009/2
48640
48641Program:
48642    let y = normal random numbers for i = 1 1 10
48643    let nshift = 3
48644    let y2 = shift y nshift
48645    let nshift = -3
48646    let y3 = shift y nshift
48647    set write decimals 3
48648    print y y2 y3
48649
48650-----SIEVE PLOT (LET)--------------------------------
48651
48652SIEVE PLOT
48653
48654Name:
48655    SIEVE PLOT (LET)
48656
48657Type:
48658    Graphics Command
48659
48660Purpose:
48661    Generate a sieve plot for a two-way contingency table.
48662
48663Description:
48664    Given two discrete variables where variable one has r
48665    possible values and variable two has c possible values,
48666    we can generate a cross-tabulation of these two variables.
48667    This results in a two-way, or RxC contingency table.
48668
48669    We can define the following values for the contingency
48670    table:
48671
48672       r     = the number of rows in the contingency table
48673       c     = the number of columns in the contingency table
48674       n(ij) = the observed frequency of the ith row and jth column
48675       m(ij) = the expected frequency of the ith row and jth column
48676       n(i+) = the observed frequency for the ith row
48677       n(+j) = the observed frequency for the jth row
48678       n(++) = the total sample size
48679
48680    When the two variables are independent, then the expected
48681    frequency is:
48682
48683       m(ij) = n(i+)*n(+j)/n(++)
48684
48685    In a sieve plot, each m(ij) is represented by a rectangle.
48686    The width of the rectangle is proportional to the total
48687    frequency in each column, n(+j), and the height is
48688    proportional to the total frequency in each row, n(i+).
48689    The area of the rectangle is then proportional to m(ij).
48690
48691    Each rectangle is then cross-ruled based on the observed
48692    frequency.  The deviations from independence are reflected
48693    in the density of the shading.  Denser shading indicates
48694    the observed frequency is greater than expected and
48695    sparse shading indicates the observed frequency is less
48696    than expected.  As an additional cue, positive and negative
48697    departures from independence can be coded with different
48698    colors.
48699
48700Syntax 1:
48701    SIEVE PLOT <y1> <y2>     <SUBSET/EXCEPT/FOR qualification>
48702    where <y1> is the first  response variable;
48703          <y2> is the second response variable;
48704    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
48705
48706    This syntax is used for the case where you have raw data (i.e.,
48707    the data has not yet been cross tabulated into a two-way table).
48708
48709Syntax 2:
48710    SIEVE PLOT <m>    <SUBSET/EXCEPT/FOR qualification>
48711    where <m> is a matrix containing the two-way table;
48712    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
48713
48714    This syntax is used for the case where we the data have already
48715    been cross-tabulated into a two-way contingency table.
48716
48717Syntax 3:
48718    SIEVE PLOT <n11> <n12> <n21> <n22>
48719    where <n11> is a parameter containing the value for row 1,
48720                column 1 of a 2x2 table;
48721          <n12> is a parameter containing the value for row 1,
48722                column 2 of a 2x2 table;
48723          <n21> is a parameter containing the value for row 2,
48724                column 1 of a 2x2 table;
48725          <n22> is a parameter containing the value for row 2,
48726                column 2 of a 2x2 table.
48727
48728    This syntax is used for the special case where you have a
48729    2x2 table.  In this case, you can enter the 4 values directly,
48730    although you do need to be careful that the parameters are
48731    entered in the order expected above.
48732
48733Examples:
48734    SIEVE PLOT Y1 Y2
48735    SIEVE PLOT M
48736    SIEVE PLOT N11 N12 N21 N22
48737
48738Note:
48739    The LINE and LINE COLOR commands can be used to set
48740    the attributes for the sieve plot.
48741
48742       Setting 1  = the line style and color for the frame
48743                    of the rectangles
48744       Setting 2  = the line style and color for the cross-ruled
48745                    lines when the observed frequency is greater
48746                    than the expected frequency
48747
48748       Setting 3  = the line style and color for the cross-ruled
48749                    lines when the observed frequency is less
48750                    than the expected frequency
48751
48752    Although the program example below uses the TIC MARK LABEL
48753    commands to generate row and column labels, you may need
48754    to use the LEGEND or TEXT command to obtain more accurately
48755    centered labels.
48756
48757Default:
48758    None
48759
48760Synonyms:
48761    None
48762
48763Related Commands:
48764    ASSOCIATION PLOT              = Generate an association plot.
48765    ROSE PLOT                     = Generate a Rose plot.
48766    BINARY TABULATION PLOT        = Generate a binary tabulation plot.
48767    ROC CURVE                     = Generate a ROC curve.
48768    CHI-SQUARE INDEPENDENCE TEST  = Perform a chi-square test for
48769                                    independence.
48770    ODDS RATIO INDEPENDENCE TEST  = Perform a log(odds ratio) test for
48771    FISHER EXACT TEST             = Perform Fisher's exact test.
48772
48773References:
48774    Friendly (2000), "Visualizing Categorical Data", SAS Institute
48775    Inc., pp. 85-89.
48776
48777    Riedwyl and Schupbach (1994), "Parquet Diagram to Plot
48778    Contingency Tables".  In Faulbaum, editor, "Softstat '93:
48779    Advances In Statistical Software", pp. 293-299,
48780    Gustav Fischer, New York.
48781
48782Applications:
48783    Graphical Analysis of Categorical Data
48784
48785Implementation Date:
48786    2007/6
48787
48788Program:
48789    . Hair and Eye Color Data from page 61 of Friendly
48790    read matrix m
48791     5  29 14 16
48792    15  54 14 10
48793    20  84 17 94
48794    68 119 26 7
48795    end of data
48796    .
48797    label case asis
48798    tic mark label case asis
48799    title case asis
48800    title offset 2
48801    .
48802    x3label
48803    title Sieve Plot
48804    y1label displacement 12
48805    y1label Eye Color
48806    x1label Hair Color
48807    tic offset units data
48808    xlimits 1 4
48809    major xtic mark number 4
48810    minor xtic mark number 0
48811    xtic mark offset 0.5 0.5
48812    x1tic mark label format alpha
48813    x1tic mark label content Black Brown Red Blond
48814    ylimits 1 4
48815    major ytic mark number 4
48816    minor ytic mark number 0
48817    ytic mark offset 0.5 0.5
48818    y1tic mark label format alpha
48819    y1tic mark label content Green Hazel Blue Brown
48820    y1tic mark label justification right
48821    .
48822    line solid dash dash
48823    line color black blue green
48824    .
48825    sieve plot m
48826
48827-----SIGN (LET)--------------------------------
48828
48829SIGN
48830
48831Name:
48832    SIGN (LET)
48833
48834Type:
48835    Library Function
48836
48837Purpose:
48838    Compute the sign of a number and assign a -1 to negative numbers
48839    and a +1 to positive numbers (zero is treated as a positive
48840    number).
48841
48842Syntax:
48843    LET <y2> = SIGN(<y1>,<n>)  <SUBSET/EXCEPT/FOR qualification>
48844    where <y1> is a variable or a parameter containing decimal
48845               number(s);
48846          <y2> is a variable or a parameter (depending on what <y1> is)
48847               where the computed sign values are stored;
48848    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
48849
48850Examples:
48851    LET A = SIGN(14.2835)
48852    LET A = SIGN(A1)
48853    LET X2 = SIGN(X1)
48854    LET X2 = SIGN(X1-4)
48855
48856Note:
48857    Library functions are distinguished from let subcommands
48858    in the following ways.
48859    1) Functions enclose the input value in parenthesis.  Let
48860       subcommands use spaces.
48861    2) Functions can accept (and return) either parameters
48862       (i.e., single values) or variables (i.e., an array of
48863       values) while let subcommands are specific in which they
48864       accept as input and what they return as output.
48865    3) Functions can accept expressions while let subcommands
48866       do not.  For example, the following is legal:
48867           LET Y2 = ABS(Y1-INT(Y1))
48868       For let subcommands, you typically have to do something
48869       like the following:
48870           LET YTEMP = Y**2 + 8
48871           LET A = SUM YTEMP
48872
48873Default:
48874    None
48875
48876Synonyms:
48877    None
48878
48879Related Commands:
48880    INT    = Compute the integer portion of number.
48881    FRACT  = Compute the fractional portion of number.
48882    ROUND  = Round a number to a specified number of decimal places.
48883    MSD    = Compute the most significant digit of a number.
48884
48885Applications:
48886    XX
48887
48888Implementation Date:
48889    Pre-1987
48890
48891Program:
48892    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
48893    LET Y2 = SIGN(Y1)
48894    PRINT Y1 Y2
48895
48896-----SIGNAL TO NOISE RATIO (LET)------------------------------
48897
48898SIGNAL TO NOISE RATIO
48899
48900Name:
48901    SIGNAL TO NOISE RATIO (LET)
48902
48903Type:
48904    Let Subcommand
48905
48906Purpose:
48907    Compute the signal to noise ratio of a variable.
48908
48909Description:
48910    The sample signal to noise ratio (SNR) is defined as the ratio of
48911    the mean to the standard deviation:
48912
48913         SNR = xbar/s
48914
48915    where s is the sample standard deviation and xbar is the sample
48916    mean.
48917
48918    This is the reciprocal of the coefficient of variation:
48919
48920         cv = s/xbar
48921
48922    That is, it shows the variability, as defined by the standard
48923    deviation, relative to the mean.
48924
48925    This definition of signal to noise ratio should typically only be used
48926    for data measured on a ratio scale.  That is, the data should be
48927    continuous and have a meaningful zero.  Measurement data in the
48928    physical sciences and engineering are often on a ratio scale.
48929    As an example, temperatures measured on a Kelvin scale are on a
48930    ratio scale while temperaturs measured on a Celcius or Farenheit
48931    scale are interval scales rather than ratio scales.  Given a set
48932    of temperature measurements, the signal to noise ratio on the
48933    Celcius scale will be different than the signal to noise ratio
48934    on the Farenheit scale.
48935
48936    Note that this is only one specific definition of the signal to noise
48937    ratio.  There are numerous other definitions in common usage that are
48938    not described here.
48939
48940Syntax 1:
48941    LET <par> = SIGNAL TO NOISE RATIO <y>
48942                <SUBSET/EXCEPT/FOR qualification>
48943    where <y> is a response variable;
48944          <par> is a parameter where the signal to noise ratio value is
48945              saved;
48946    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
48947
48948Syntax 2:
48949    LET <par> = DIFFERENCE OF SIGNAL TO NOISE RATIO <y1> <y2>
48950                <SUBSET/EXCEPT/FOR qualification>
48951    where <y1> is the first response variable;
48952          <y2> is the second response variable;
48953          <par> is a parameter where the difference of the
48954              signal to noise ratios is saved;
48955    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
48956
48957Examples:
48958    LET SNR = SIGNAL TO NOISE RATIO Y1
48959    LET SNR = SIGNAL TO NOISE RATIO Y1  SUBSET TAG > 2
48960
48961    LET SNRDIFF = DIFFERENCE OF SIGNAL TO NOISE RATIO Y1 Y2
48962
48963Note:
48964    Dataplot statistics can be used in a number of commands.  For
48965    details, enter
48966
48967         HELP STATISTICS
48968
48969Default:
48970    None
48971
48972Synonyms:
48973    SNR is a synonym for SIGNAL TO NOISE
48974
48975Related Commands:
48976    COEFFICIENT OF VARIATION   = Compute the coefficient of variation of
48977                                 a variable.
48978    RELATIVE VARIANCE          = Compute the relative variance of a
48979                                 variable.
48980    COEF OF VARI CONF LIMI     = Compute confidence limits for the
48981                                 coefficient of variation.
48982    COEFFICIENT OF DISPERSION  = Compute the coefficient of
48983                                 dispersion of a variable.
48984    MEAN                       = Compute the mean of a variable.
48985    STANDARD DEVIATION         = Compute the standard deviation of a
48986                                 variable.
48987
48988Applications:
48989    Data Analysis
48990
48991Implementation Date:
48992    2017/01
48993    2017/03: Added DIFFERENCE OF SIGNAL TO NOISE
48994
48995Program 1:
48996    . Step 1:   Create the data
48997    .
48998    skip 25
48999    read zarr13.dat y
49000    skip 0
49001    set write decimals 6
49002    .
49003    let snr = signal to noise ratio y
49004    let snr = round(snr,3)
49005    .
49006    . Step 2:   Define plot control
49007    .
49008    title case asis
49009    title offset 2
49010    label case asis
49011    .
49012    y1label Signal to Noise Ratio
49013    x1label Bootstrap Sample
49014    title Bootstrap of Signal to Noise Ratio for ZARR13.DAT
49015    .
49016    bootstrap samples 2000
49017    bootstrap snr plot y
49018    .
49019    let bmean = round(bmean,3)
49020    let bsd   = round(bsd,3)
49021    let b025  = round(b025,3)
49022    let b975  = round(b975,3)
49023    justification center
49024    move 50 6
49025    text Sample SNR: ^snr, Mean of Bootstrap Samples: ^bmean, SD of Bootstrap Samples: ^bsd
49026    move 50 3.5
49027    text 2.5 Percentile: ^B025, 97.5 Percentile: ^B975
49028
49029Program 2:
49030    . Step 1:   Create the data
49031    .
49032    skip 25
49033    read gear.dat y x
49034    skip 0
49035    set write decimals 6
49036    .
49037    . Step 2:   Define plot control
49038    .
49039    title case asis
49040    title offset 2
49041    label case asis
49042    .
49043    y1label Signal to Noise Ratio
49044    x1label Group
49045    title Signal to Noise Ratio for GEAR.DAT
49046    let ngroup = unique x
49047    xlimits 1 ngroup
49048    major x1tic mark number ngroup
49049    minor x1tic mark number 0
49050    tic mark offset units data
49051    x1tic mark offset 0.5 0.5
49052    y1tic mark offset 5 0
49053    .
49054    character X
49055    line blank
49056    .
49057    set statistic plot reference line average
49058    snr plot y x
49059    .
49060    tabulate snr y x
49061
49062Program 3:
49063    SKIP 25
49064    READ IRIS.DAT Y1 TO Y4 X
49065    .
49066    LET A = DIFFERENCE OF SNR Y1 Y2
49067    SET WRITE DECIMALS 4
49068    TABULATE DIFFERENCE OF SNR Y1 Y2 X
49069    .
49070    XTIC OFFSET 0.2 0.2
49071    X1LABEL GROUP ID
49072    Y1LABEL DIFFERENCE OF SNR
49073    CHAR X
49074    LINE BLANK
49075    DIFFERENCE OF SNR PLOT Y1 Y2 X
49076    CHAR X ALL
49077    LINE BLANK ALL
49078    BOOTSTRAP DIFFERENCE OF SNR PLOT Y1 Y2 X
49079
49080-----SIGN TEST--------------------------------------
49081
49082SIGN TEST
49083
49084Name:
49085    SIGN TEST
49086
49087Type:
49088    Analysis Command
49089
49090Purpose:
49091    Perform a one sample or a paired two sample sign test.
49092
49093Description:
49094    The t-test is the standard test for testing that the
49095    difference between population means for two paired
49096    samples are equal.  If the populations are non-normal,
49097    particularly for small samples, then the t-test may not
49098    be valid.  The sign test is an alternative that can be
49099    applied when distributional assumptions are suspect.
49100    However, it is not as powerful as the t-test when the
49101    distributional assumptions are in fact valid.  It can
49102    also be applied in the case where there is no quantitative
49103    scale, but it is possible to order the data (i.e., an
49104
49105    To form the sign test, compute d(i) = X(i) - Y(i) where
49106    X and Y are the two samples.  Count the number of times
49107    d(i) is positive, R+, and the number of times it is
49108    negative, R-.  If the samples have equal means and the
49109    populations are symmetric, then R+ and R- should be
49110    similar.  If there are too many positives (R+) or
49111    negatives (R-), then we reject the hypothesis of
49112    equality.  Ties are excluded from the analysis.  Since
49113    there are only two choices (+ or -) for d(i), the test
49114    statistic for the sign test follows a binomial distribution
49115    with p=0.5.
49116
49117    Note that the binonial distribution is discrete, so the
49118    significane level will typically not be exact.
49119
49120    More formally, the hypothesis test is defined as follows.
49121
49122       H0: u1 = u2
49123       Ha: u1 <> u2
49124       Test Statistic: S- = BINCDF(R-,0.5,N)
49125                       S+ = BINCDF(R+,0.5,N)
49126                       where BINCDF is the cumulative distribution
49127                       for the binomial distribution, R- is the
49128                       number of minus signs (i.e., d(i) < 0), R+
49129                       is the number of plus signs (i.e., d(i) > 0),
49130                       and N is the sample size excluding ties
49131                       between the samples.
49132       Alpha: Typically set to .05.  Due to the discreteness of the
49133              binomial distribution, the actual significance level
49134              will not in most cases be exact.
49135       Critical Region:
49136              S+ < alpha:                  one sided test: MU1 < MU2
49137              S- < alpha:                  one sided test: MU1 > MU2
49138              alpha/2 < S+ < 1 - alpha/2:  two sided test: MU1 = MU2
49139       Conclusion: Reject null hypothesis if test statistic is
49140                   in critical region
49141
49142    Although the above discussion was in terms of a paired two
49143    sample test, it can easily be adapted to the following
49144    additional cases:
49145
49146       1) For the one sample case that the population mean is
49147          equal to a value d0, simply compute d(i) = x(i) - d0
49148          and calculate R+ and R- based on d(i).
49149
49150       2) For the paired two sample case where we want to test
49151          that the difference between the two population means
49152          is equal to d0, compute d(i) = x(i) - y(i) - d0 and
49153          calculate R+ and R- based on d(i).
49154
49155Syntax 1:
49156    <LOWER TAILED/UPPER TAILED> SIGN TEST  <y1>  <mu>
49157                                <SUBSET/EXCEPT/FOR qualification>
49158    where <LOWER TAILED/UPPER TAILED> is an optional keyword that
49159               specifies either a lower tailed or an upper tailed
49160               test;
49161          <y1> is a response variable;
49162          <mu> is an optional number or parameter that is the
49163               hypothesized mean value;
49164    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
49165
49166    This syntax implements the one sample sign test.  If <mu> is
49167    omitted, it will be assumed to be zero.
49168
49169    If neither LOWER TAILED or UPPER TAILED is specified, the
49170    sign test will return the results for the two-tailed case,
49171    the lower tailed case, and the upper tailed case.  If LOWER
49172    TAILED is specified, then only the results for the lower tailed
49173    case will be printed.  If UPPER TAILED is specified, then only
49174    the results for the upper tailed case will be printed.
49175
49176Syntax 2:
49177    <LOWER TAILED/UPPER TAILED> SIGN TEST  <y1>  <y2>
49178                                <SUBSET/EXCEPT/FOR qualification>
49179    where <LOWER TAILED/UPPER TAILED> is an optional keyword that
49180               specifies either a lower tailed or an upper tailed
49181               test;
49182          <y1> is the first response variable;
49183          <y2> is the second response variable;
49184    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
49185
49186    This syntax implements the two sample paired sign test where
49187    the hypothesized difference between the population means for
49188    the two samples is zero.
49189
49190Syntax 3:
49191    SIGN TEST  <y1>  <y2>  <mu>  <SUBSET/EXCEPT/FOR qualification>
49192    where <LOWER TAILED/UPPER TAILED> is an optional keyword that
49193               specifies either a lower tailed or an upper tailed
49194               test;
49195          <y1> is the first response variable;
49196          <y2> is the second response variable;
49197          <mu> is a number or parameter that is the hypothesized
49198               difference between the means of the two samples;
49199    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
49200
49201    This syntax implements the two sample paired sign test where
49202    the hypothesized difference between the population means for
49203    the two samples is not equal to zero.
49204
49205Syntax 4:
49206    <LOWER TAILED/UPPER TAILED> SIGN TEST  <y1>  ... <yk>
49207                                <SUBSET/EXCEPT/FOR qualification>
49208    where <LOWER TAILED/UPPER TAILED> is an optional keyword that
49209               specifies either a lower tailed or an upper tailed
49210               test;
49211          <y1> ... <yk> is a list of 1 to 30 response variables;
49212    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
49213
49214    This syntax will implement all the pairwise sign tests for
49215    the listed response variables.  For example,
49216
49217         SIGN TEST Y1 TO Y4
49218
49219    is equivalent to
49220
49221         SIGN TEST Y1 Y2
49222         SIGN TEST Y1 Y3
49223         SIGN TEST Y1 Y4
49224         SIGN TEST Y2 Y3
49225         SIGN TEST Y2 Y4
49226         SIGN TEST Y3 Y4
49227
49228    If either the first argument or the last argument is a parameter,
49229    this will be interpreted as the hypothesized mean value.
49230
49231Examples:
49232    SIGN TEST Y1  0
49233    SIGN TEST Y1  Y2
49234    SIGN TEST Y1  Y2 MU
49235    SIGN TEST Y1  Y2  SUBSET TAG > 2
49236
49237Note:
49238    The SIGN TEST will accept matrix arguments.  Since this is a
49239    paired test, the total number of elements for each variable
49240    or matrix argument must be the same.  Matrices are parsed in
49241    column order when generating the test.
49242
49243Note:
49244    Dataplot saves the following internal parameters after a
49245    sign test:
49246
49247        STATVAL   = the value of the test statistic
49248        STATCDF   = the CDF of the test statistic
49249        PVALUE    = the p-value for the two-sided test
49250        PVALUELT  = the p-value for the lower tailed test
49251        PVALUEUT  = the p-value for the upper tailed test
49252        CUTLOW50  = the 50% lower tailed critical value
49253        CUTUPP50  = the 50% upper tailed critical value
49254        CUTLOW80  = the 80% lower tailed critical value
49255        CUTUPP80  = the 80% upper tailed critical value
49256        CUTLOW90  = the 90% lower tailed critical value
49257        CUTUPP90  = the 90% upper tailed critical value
49258        CUTLOW95  = the 95% lower tailed critical value
49259        CUTUPP95  = the 95% upper tailed critical value
49260        CUTLOW99  = the 99% lower tailed critical value
49261        CUTUPP99  = the 99% upper tailed critical value
49262        CUTLO999  = the 99.9% lower tailed critical value
49263        CUTUP999  = the 99,9% upper tailed critical value
49264
49265Note:
49266    The following statistics are also supported:
49267
49268        LET A = ONE SAMPLE SIGN TEST                   Y
49269        LET A = ONE SAMPLE SIGN TEST CDF               Y
49270        LET A = ONE SAMPLE SIGN TEST PVALUE            Y
49271        LET A = ONE SAMPLE SIGN TEST LOWER TAIL PVALUE Y
49272        LET A = ONE SAMPLE SIGN TEST UPPER TAIL PVALUE Y
49273
49274        LET A = TWO SAMPLE SIGN TEST                   Y1 Y2
49275        LET A = TWO SAMPLE SIGN TEST CDF               Y1 Y2
49276        LET A = TWO SAMPLE SIGN TEST PVALUE            Y1 Y2
49277        LET A = TWO SAMPLE SIGN TEST LOWER TAIL PVALUE Y1 Y2
49278        LET A = TWO SAMPLE SIGN TEST UPPER TAIL PVALUE Y1 Y2
49279
49280    In addition to the above LET command, built-in statistics are
49281    supported for about 20+ different commands (enter HELP STATISTICS
49282    for details).
49283
49284Default:
49285    None
49286
49287Synonyms:
49288    None
49289
49290Related Commands:
49291    T-TEST                     = Compute a t-test.
49292    SIGNED RANK TEST           = Compute a signed rank test.
49293    CHI-SQUARED 2 SAMPLE TEST  = Compute a two sample chi-square
49294                                 test.
49295    BIHISTOGRAM                = Generates a bihistogram.
49296    QUANTILE-QUANTILE PLOT     = Generate a quantile-quantile plot.
49297    BOX PLOT                   = Generates a box plot.
49298
49299Reference:
49300    Conover (1999), "Practical Non-Parametric Statistics", Third Edition,
49301    Wiley, pp. 157-165.
49302
49303    Snedecor and Cochran (1989), "Statistical Methods", Eigth Edition,
49304    Iowa State University Press, pp. 138-140.
49305
49306Applications:
49307    Confirmatory Data Analysis
49308
49309Implementation Date:
49310    1999/5
49311    2000/8: bug fix for 2-sided interval.  Was actually calculating a
49312            90% interval rather than a 95% interval.
49313    2011/4: support for <LOWER TAILED/UPPER TAILED> option
49314    2011/4: support for Syntax 4 case, support for matrix arguments,
49315            support for TO syntax
49316
49317Program:
49318    SKIP 25
49319    READ NATR332.DAT Y1 Y2
49320    SIGN TEST Y1 Y2
49321
49322-----SIGNED RANK TEST--------------------------------------
49323
49324SIGNED RANK TEST
49325
49326Name:
49327    SIGNED RANK TEST
49328
49329Type:
49330    Analysis Command
49331
49332Purpose:
49333    Perform a one sample or a paired two sample signed rank
49334    test.
49335
49336Description:
49337    The t-test is the standard test for testing that the
49338    difference between population means for two paired
49339    samples are equal.  If the populations are non-normal,
49340    particularly for small samples, then the t-test may not
49341    be valid.  The signed rank test is an alternative that can
49342    be applied when distributional assumptions are suspect.
49343    However, it is not as powerful as the t-test when the
49344    distributional assumptions are in fact valid.
49345
49346    The signed rank test is also commonly called the Wilcoxon
49347    signed rank test or simply the Wilcoxon test.
49348
49349    To form the signed rank test, compute d(i) = X(i) - Y(i)
49350    where X and Y are the two samples.  Rank the d(i) without
49351    regard to sign.  Tied values are not included in the Wilcoxon
49352    test.  After ranking, restore the sign (plus or
49353    minus) to the ranks.  Then compute W+ and W- as the
49354    sums of the positive and negative ranks respectively.
49355    If the two population means are in fact equal, then
49356    the sums of the ranks should also be nearly equal.  If the
49357    difference between the sum of the ranks is too great, we
49358    reject the null hypothesis that the population means are
49359    equal.
49360
49361    Significance levels are based on the fact that if there
49362    is no difference in the population means, then there
49363    are 2**N equally likely ways for the N ranks to recieve
49364    signs.
49365
49366    More formally, the hypothesis test is defined as follows.
49367
49368       H0: u1 = u2
49369       Ha: u1 <> u2
49370       Test Statistic: W=MIN(W-,W+) where the computation of
49371                       W- and W+ is discussed above.
49372       Alpha: Typically set to .05.  Due to the discreteness of the
49373              ranks, the actual significance level will not in most
49374              cases be exact.
49375       Critical Region: For small samples (N <= 30), the critical
49376              regions have been tabulated.  For N > 30,
49377              the test statistic W approaches a normal
49378              distribution with mean N(N+1)/4 and a
49379              standard deviation of SQRT[N(N+1)(2*N+1)/24].
49380              The critical regions are thus based on the normal
49381              percent point function.  That is, for a 2-sided
49382              test,
49383
49384              Uw - Sw*NORPPF(ALPHA/2) < W < Uw + Sw*NORPPF(1-ALPHA/2)
49385
49386              where Uw and Sw are the mean and standard deviation
49387              of W as described above and NORPPF is the normal
49388              percent point function.
49389       Conclusion: Reject null hypothesis if test statistic is
49390                   in critical region
49391
49392    Although the above discussion was in terms of a paired two
49393    sample test, it can easily be adapted to the following
49394    additional cases:
49395
49396       1) For the one sample case that the population mean is
49397          equal to a value d0, simply compute d(i) = x(i) - d0
49398          and calculate W+ and W- based on d(i).
49399
49400       2) For the paired two sample case where we want to test
49401          that the difference between the two population means
49402          is equal to d0, compute d(i) = x(i) - y(i) - d0 and
49403          calculate W+ and W- based on d(i).
49404
49405Syntax 1:
49406    SIGNED RANK TEST  <y1>  <mu>    <SUBSET/EXCEPT/FOR qualification>
49407    where <y1> is a response variable;
49408          <mu> is a number or parameter that is the hypothesized
49409               mean value;
49410    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
49411
49412    This syntax implements the one sample signed rank test.
49413
49414Syntax 2:
49415    SIGNED RANK TEST  <y1>  <y2>    <SUBSET/EXCEPT/FOR qualification>
49416    where <y1> is the first response variable;
49417          <y2> is the second response variable;
49418    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
49419
49420    This syntax implements the two sample paired signed rank test
49421    where the hypothesized difference between the population means
49422    for the two samples is zero.
49423
49424Syntax 3:
49425    SIGNED RANK TEST  <y1>  <y2>  <mu>
49426                            <SUBSET/EXCEPT/FOR qualification>
49427    where <y1> is the first response variable;
49428          <y2> is the second response variable;
49429          <mu> is a number or parameter that is the hypothesized
49430               difference between the means of the two samples;
49431    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
49432
49433    This syntax implements the two sample paired signed rank test
49434    where the hypothesized difference between the population means
49435    for the two samples is equal to a non-zero value.
49436
49437Examples:
49438    SIGNED RANK TEST Y1  0
49439    SIGNED RANK TEST Y1  Y2
49440    SIGNED RANK TEST Y1  Y2 MU
49441    SIGNED RANK TEST Y1  Y2  SUBSET TAG > 2
49442
49443Note:
49444    DATAPLOT automatically prints the test statistic for both
49445    one sided and two sided tests.
49446
49447Note:
49448    Dataplot saves the following internal parameters after a
49449    sign test:
49450
49451        STATVAL   = W, i.e., the minimum of the signed ranks
49452        STATCD2   = the normal cdf value of W
49453        CUTLOW90  = 0.05 critical value
49454        CUTUPP90  = 0.95 critical value
49455        CUTLOW95  = 0.025 critical value
49456        CUTUPP95  = 0.975 critical value
49457        CUTLOW99  = 0.005 critical value
49458        CUTUPP99  = 0.995 critical value
49459
49460    Note that the above critical values are the lower and upper
49461    tails for two sided tests (i.e., each tail is alpha/2.  For
49462    example, CUTLOW90 is the lower 5% of the normal percent point
49463    function (adjusted for the mean and standard deviation).  This
49464    is the critical regions for alpha = 0.10, so there is 0.05 in
49465    each tail.
49466
49467Note:
49468    The sign test is also an alternative to the t test for
49469    paired samples when the normality assumption is in doubt.
49470    The signed rank test is generally preferred over the sign
49471    test because it takes into account both the sign of the
49472    difference and the magnitude of the difference for paired
49473    samples while the sign test only takes the difference of
49474    the sign into account.
49475
49476Note:
49477    From Conover, the signed rank test is based on the following
49478    assumptions:
49479
49480        1. The distribution of each d(i) is symmetric.
49481
49482        2. The d(i) are mutually independent.
49483
49484        3. The d(i) all have the same mean.
49485
49486        4. The measurement scale of the d(i)'s is at least interval.
49487
49488    So the signed rank test weakens the assumption of normality of the
49489    paired t-test to an assumption of symmetry.  The signed rank test is
49490    more powerful than a sign test (it takes the magnitude of the
49491    differences into account as well as the sign), but it has stronger
49492    assumptions than the sign test.  So if your data is at approximately
49493    symmetric, then the signed rank test is preferred to the sign test.
49494    However, if the symmetry assumption is not reasonable, the sign test
49495    is preferred.
49496
49497    Also according to Conover, the null hypothesis can be stated either
49498    in terms of the mean or the median.  This is due to the assumption
49499    of symmetry.
49500
49501Note:
49502    The following statistics are also supported:
49503
49504        LET A = ONE SAMPLE WILCOXON SIGNED RANK TEST         Y
49505        LET A = ONE SAMPLE WILCOXON SIGNED RANK TEST CDF     Y
49506        LET A = ONE SAMPLE WILCOXON SIGNED RANK TEST PVALUE  Y
49507        LET A = ONE SAMPLE WILCOXON SIGNED RANK TEST LOWER ...
49508                TAIL PVALUE Y
49509        LET A = ONE SAMPLE WILCOXON SIGNED RANK TEST UPPER ...
49510                TAIL PVALUE Y
49511
49512        LET A = TWO SAMPLE WILCOXON SIGNED RANK TEST        Y1 Y2
49513        LET A = TWO SAMPLE WILCOXON SIGNED RANK TEST CDF    Y1 Y2
49514        LET A = TWO SAMPLE WILCOXON SIGNED RANK TEST PVALUE Y1 Y2
49515        LET A = TWO SAMPLE WILCOXON SIGNED RANK TEST LOWER  ...
49516                TAIL PVALUE Y1 Y2<BR>
49517        LET A = TWO SAMPLE WILCOXON SIGNED RANK TEST UPPER ...
49518                TAIL PVALUE Y1 Y2
49519
49520    In addition to the above LET command, built-in statistics are
49521    supported for about 20+ different commands (enter HELP STATISTICS
49522    for details).
49523
49524Default:
49525    None
49526
49527Synonyms:
49528    The following are synonyms for SIGNED RANK TEST:
49529
49530        WILCOXON SIGNED RANK TEST
49531        WILCOXON SIGNED RANK
49532        WILCOXON SIGN TEST
49533        WILCOXON TEST
49534        SIGNED RANK
49535
49536Related Commands:
49537    T-TEST                     = Compute a t-test.
49538    SIGN TEST                  = Compute a sign test.
49539    CHI-SQUARED 2 SAMPLE TEST  = Compute a two sample chi-square
49540                                 test.
49541    BIHISTOGRAM                = Generates a bihistogram.
49542    QUANTILE-QUANTILE PLOT     = Generate a quantile-quantile plot.
49543    BOX PLOT                   = Generates a box plot.
49544
49545Reference:
49546    Conover (1999), "Practical Non-Parametric Statistics," Third Edition,
49547    Wiley, pp. 352-364.
49548
49549    Snedecor and Cochran (1989), "Statistical Methods," Eigth Edition,
49550    Iowa State University Press, pp. 140-142.
49551
49552Applications:
49553    Confirmatory Data Analysis
49554
49555Implementation Date:
49556    1999/5
49557    2011/05: Switch algorithm to that given in Conover.
49558
49559Program:
49560    SKIP 25
49561    READ NATR332.DAT Y1 Y2
49562    SIGNED RANK TEST Y1 Y2
49563
49564-----SIN (LET)---------------------------------------------------
49565
49566SIN
49567
49568Name:
49569    SIN (LET)
49570
49571Type:
49572    Library Function
49573
49574Purpose:
49575    Compute the sine for a variable or parameter.
49576
49577Description:
49578    The sine is defined for all real numbers and the returned value
49579    will be between -1 and 1.  By default, the angle is specified in
49580    radian units.  To use degree values, enter the command ANGLE UNITS
49581    DEGREES (ANGLE UNITS RADIANS resets it).
49582
49583Syntax:
49584    LET <y2> = SIN(<y1>)  <SUBSET/EXCEPT/FOR qualification>
49585    where <y1> is a variable or a parameter;
49586          <y2> is a variable or a parameter (depending on what <y1> is)
49587               where the computed sine value is stored;
49588    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
49589
49590Examples:
49591    LET A = SIN(-2)
49592    LET A = SIN(A1)
49593    LET X2 = SIN(X1)
49594    LET X2 = SIN(PI/2)
49595
49596Note:
49597    Library functions are distinguished from let subcommands
49598    in the following ways.
49599    1) Functions enclose the input value in parenthesis.  Let
49600       subcommands use spaces.
49601    2) Functions can accept (and return) either parameters
49602       (i.e., single values) or variables (i.e., an array of
49603       values) while let subcommands are specific in which they
49604       accept as input and what they return as output.
49605    3) Functions can accept expressions while let subcommands
49606       do not.  For example, the following is legal:
49607           LET Y2 = ABS(Y1-INT(Y1))
49608       For let subcommands, you typically have to do something
49609       like the following:
49610           LET YTEMP = Y**2 + 8
49611           LET A = SUM YTEMP
49612
49613Default:
49614    None
49615
49616Synonyms:
49617    None
49618
49619Related Commands:
49620    COS      = Compute the cosine.
49621    TAN      = Compute the tangent.
49622    COT      = Compute the cotangent.
49623    SEC      = Compute the secant.
49624    CSC      = Compute the cosecant.
49625    ARCCOS   = Compute the arccosine.
49626    ARCSIN   = Compute the arcsine.
49627    ARCTAN   = Compute the arctangent.
49628    ARCCOT   = Compute the arccotangent.
49629    ARCSEC   = Compute the arcsecant.
49630    ARCCSC   = Compute the arcsecant.
49631
49632Reference:
49633    Consult any standard trigonometry or pre-calculus textbook.
49634
49635Applications:
49636    XX
49637
49638Implementation Date:
49639    XX
49640
49641Program:
49642    X1LABEL ANGLE VALUES (RADIANS)
49643    Y1LABEL SINE VALUE
49644    TITLE AUTOMATIC
49645    YLIMITS -1 1
49646    YTIC OFFSET 0.2 0.2
49647    PLOT SIN(X) FOR X = -3.1 .05 3.1
49648
49649-----SINE AMPLITUDE PLOT-----------------------------------------
49650
49651SINE AMPLITUDE PLOT
49652
49653Name:
49654    SINE AMPLITUDE PLOT
49655
49656Type:
49657    Graphics Command
49658
49659Purpose:
49660    Generates a sine amplitude plot.
49661
49662Description:
49663    A sine amplitude plot is a plot consisting of subsample sine
49664    amplitude versus subsample index.  The subsample sine amplitude is
49665    the approximate least squares estimate of the amplitude in a
49666    single-frequency sinusoidal model based on data from that subsample
49667    only.  The sine amplitude plot is used to answer the question--
49668    "Does the subsample amplitude change over different subsamples?".
49669    It consists of:
49670       Vertical   axis = subsample sine amplitude;
49671       Horizontal axis = subsample index.
49672    The sine amplitude plot yields 2 traces:
49673       1. a subsample sine amplitude trace; and
49674       2. a full-sample sine amplitude reference line.
49675    Like usual, the appearance of these 2 traces is
49676    controlled by the first 2 settings of the LINES,
49677    CHARACTERS, SPIKES, BARS, and similar attributes.
49678
49679Syntax:
49680    SINE AMPLITUDE PLOT  <y>  <x>   <SUBSET/EXCEPT/FOR qualification>
49681    where <y> is the response (= dependent) variable;
49682          <x> is the subsample identifier variable (this variable
49683              appears on the horizontal axis);
49684    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
49685
49686Examples:
49687    SINE AMPLITUDE PLOT Y X
49688    SINE AMPLITUDE PLOT Y X1
49689
49690Default:
49691    None
49692
49693Synonyms:
49694    SA PLOT
49695
49696Related Commands:
49697    CHARACTERS              = Sets the type for plot char.
49698    LINES                   = Sets the type for plot lines.
49699    SINE FREQUENCY PLOT     = Generates a sine frequency plot.
49700    COMPLEX DEMOD AMPL PLOT = Generate a complex demodulation
49701                              amplitude plot.
49702    COMPLEX DEMOD FREQ PLOT = Generate a complex demodulation
49703                              frequency plot.
49704    RANGE PLOT              = Generates a range plot.
49705    MEAN PLOT               = Generates a mean plot.
49706    AUTOCORRELATION PLOT    = Generates a autocorrelation plot.
49707    SPECTRAL PLOT           = Generates a spectral plot.
49708    BOX PLOT                = Generates a box plot.
49709    PLOT                    = Generates a data or function plot.
49710
49711Applications:
49712    Time Series Analysis
49713
49714Implementation Date:
49715    88/2
49716
49717Program:
49718    TITLE AUTOMATIC
49719    LET  X = SEQUENCE .1 .1 10.01
49720    LET AMP = SEQUENCE 0.1 25 0.1 0.405
49721    LET Y = AMP*SIN(X)
49722    LET TAG = SEQUENCE 1 25 1 4
49723    MULTIPLOT 2 1; MULTIPLOT CORNER COORDINATES 0 0 100 100
49724    PLOT Y X
49725    SINE AMPLITUDE PLOT Y TAG
49726    END OF MULTIPLOT
49727
49728-----SINE FREQUENCY PLOT-----------------------------------------
49729
49730SINE FREQUENCY PLOT
49731
49732Name:
49733    SINE FREQUENCY PLOT
49734
49735Type:
49736    Graphics Command
49737
49738Purpose:
49739    Generates a sine frequency plot.
49740
49741Description:
49742    A sine frequency plot is a plot consisting of subsample sine
49743    frequency versus subsample index.  The subsample sine frequency is
49744    the approximate least squares estimate of the frequency in a
49745    single-frequency sinusoidal model based on data from that subsample
49746    only.  The sine frequency plot is used to answer the question--
49747    "Does the subsample frequency change over different subsamples?".
49748    It consists of:
49749       Vertical   axis = subsample sine frequency;
49750       Horizontal axis = subsample index.
49751    The sine frequency plot yields 2 traces:
49752       1. a subsample sine frequency trace; and
49753       2. a full-sample sine frequency reference line.
49754    Like usual, the appearance of these 2 traces is
49755    controlled by the first 2 settings of the LINES,
49756    CHARACTERS, SPIKES, BARS, and similar attributes.
49757
49758Syntax:
49759    SINE FREQUENCY PLOT  <y>  <x>   <SUBSET/EXCEPT/FOR qualification>
49760    where <y> is the response (= dependent) variable;
49761          <x> is the subsample identifier variable (this variable
49762              appears on the horizontal axis);
49763    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
49764
49765Examples:
49766    SINE FREQUENCY PLOT Y X
49767    SINE FREQUENCY PLOT Y X1
49768
49769Default:
49770    None
49771
49772Synonyms:
49773    SF PLOT
49774
49775Related Commands:
49776    CHARACTERS              = Sets the type for plot characters.
49777    LINES                   = Sets the type for plot lines.
49778    SINE AMPLITUDE PLOT     = Generates a sine amplitude plot.
49779    COMPLEX DEMOD AMPL PLOT = Generates a complex demodulation
49780                              amplitude plot.
49781    COMPLEX DEMOD FREQ PLOT = Generates a complex demodulation
49782                              frequency plot.
49783    RANGE PLOT              = Generates a range plot.
49784    MEAN PLOT               = Generates a mean plot.
49785    AUTOCORRELATION PLOT    = Generates an autocorrelation plot.
49786    BOX PLOT                = Generates a box plot.
49787    RANGE PLOT              = Generates a range plot.
49788    MEAN PLOT               = Generates a mean plot.
49789    PLOT                    = Generates a data or function plot.
49790
49791Applications:
49792    Time Series Analysis
49793
49794Implementation Date:
49795    88/2
49796
49797Program:
49798    TITLE AUTOMATIC
49799    LET  X = SEQUENCE .1 .1 10.01
49800    LET FREQ = SEQUENCE 1.0 25 .5 2.5
49801    LET Y = SIN(FREQ*X)
49802    LET TAG = SEQUENCE 1 25 1 4
49803    MULTIPLOT 2 1; MULTIPLOT CORNER COORDINATES 0 0 100 100
49804    PLOT Y X
49805    SINE FREQUENCY PLOT Y TAG
49806    END OF MULTIPLOT
49807
49808-----SINE TRANSFORM (LET)------------------------------------------
49809
49810SINE TRANSFORM
49811
49812Name:
49813    SINE TRANSFORM (LET)
49814
49815Type:
49816    Let Subcommand
49817
49818Purpose:
49819    Compute the sine transform of a variable.
49820
49821Description:
49822    The sine transform converts a time domain function into a frequency
49823    domain function.  In practice, functions are sampled at equally
49824    spaced discrete points.  The discrete sine transform is:
49825        F(k) = SUM(j=0 to N-1) [f(j)sin(PI*j*k/N)]
49826    where f(j) is the data array for j = 0, 1, ... , N-1.
49827
49828    DATAPLOT calculates the discrete sine transform.  If you wish to
49829    calculate these transforms for a function, then evaluate this
49830    function at a series of points.
49831
49832    See the REFERENCE section below for references which give a more
49833    detailed explanation of sine transforms.
49834
49835Syntax:
49836    LET <r1> = SINE TRANSFORM <y1> <SUBSET/EXCEPT/FOR qualification>
49837    where <y1> is a response variable for which the sine transform is to
49838               be computed;
49839          <r1> is a variable containing the computed sine transform;
49840    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
49841
49842Examples:
49843    LET RPART = SINE TRANSFORM Y1
49844
49845Default:
49846    None
49847
49848Synonyms:
49849    None
49850
49851Related Commands:
49852    FOURIER TRANSFORM  = Compute the Fourier transform.
49853    INVERSE FOUR TRANS = Compute the inverse cosine transform.
49854    FFT                = Compute the fast cosine transform.
49855    INVERSE FFT        = Compute the inverse FFT.
49856    COSINE TRANSFORM   = Compute the cosine transformation.
49857    SPECTRAL PLOT      = Generate a spectral plot.
49858
49859Reference:
49860    "Numerical Recipes: The Art of Scientific Computing (FORTRAN
49861    Version)", Press, Flannery, Teukolsky, and Vetterling.  Cambridge
49862    University Press, 1989 (chapter 12).
49863
49864    "Fourier Analysis of Time Series: An Introduction", Peter
49865    Bloomfield, John Wiley and Sons, 1976.
49866
49867Applications:
49868    Frequency analysis of time series, signal processing
49869
49870Implementation Date:
49871    87/5
49872
49873Program:
49874    TITLE SINE TRANSFORM
49875    LEGEND 1 TIME SERIES SMOOTHING
49876    .
49877    LET X = SEQUENCE 0 .1 25.55
49878    LET YS = SIN(X)
49879    LET YN = NORMAL RANDOM NUMBERS FOR I = 1 1 256
49880    LET YN = YN/10
49881    LET Y = YS+YN
49882    .
49883    LET U  = SINE TRANSFORM Y
49884    LET NU = NUMBER U
49885    LET XU = SEQUENCE 1 1 NU
49886    LET XU = XU+50
49887    .
49888    LET U = 2.5*U
49889    PLOT U VS XU
49890
49891-----SINGLE SAMPLE ACCEPTANCE PLAN---------------------------------
49892
49893SINGLE SAMPLE ACCEPTANCE PLAN
49894
49895Name:
49896    SINGLE SAMPLE ACCEPTANCE PLAN
49897
49898Type:
49899    Analysis Command
49900
49901Purpose:
49902    Generates a single sample acceptance plan.
49903
49904Description:
49905    A lot acceptance sampling plan is a sampling scheme and a
49906    set of rules for making decisions.  The decision, based on
49907    counting the number of defectives in a sample, can be to
49908    accept the lot, reject the lot, or to take another sample.
49909
49910    For a single sampling plan, one sample of items is selected
49911    at random from a lot and the disposition of the lot is
49912    determined from the resulting information.  These plans are
49913    also denoted as (n,c) plans since there are n observations
49914    and the lot is rejected if there are more than c defectives.
49915
49916    Single sample acceptance plans are the most common and
49917    easiest plans to use.  However, they are not the most
49918    efficient in terms of the average number of samples needed.
49919
49920    The input to this command is the following four parameters:
49921       1) P1 = the acceptable quality level (AQL).  The AQL is the
49922          a proportion defective that is the base line requirement
49923          for the quality of the producer's product.  The producer
49924          would like to design a sampling plan such that there
49925          is a high probability of accepting a lot that has a
49926          defect level less than or equal to the AQL.  In Dataplot,
49927          this value should be entered as a proportion (i.e.,
49928          a value between 0 and 1.0).
49929       2) P2 = the lot tolerance percent defective (LTPD).  The
49930          LTPD is a designated high defect level that would be
49931          unacceptable to the consumer.  The consumer would like
49932          the sampling plan to have a low probability of accepting
49933          a lot with a defect level as high as the LTPD.  In
49934          Dataplot, this value should be entered as a proportion
49935          (i.e., a value between 0 and 1.0).
49936
49937          Note that P2 should be greater than P1.
49938
49939       3) ALPHA = the Type I Error (Producers Risk).  This is the
49940          probability, for a given (n,c) sampling plan, of
49941          rejecting a lot that has a defect level equal to the
49942          AQL.  The producer suffers when this occurs because a
49943          lot with acceptable was rejected.  Typical values for
49944          ALPHA range from 0.2 to 0.01.
49945       4) BETA = the Type II Error (Consumers Risk).  This is the
49946          probability, for a given (n,c) sampling plan, of
49947          accepting a lot with a defect level equal to the
49948          LTPD.  The consumer suffers when this occurs because
49949          a lot with unacceptable quality was accepted.  Typical
49950          values for BETA range from 0.2 to 0.01.
49951
49952    The output is the following two numbers:
49953       1) N = the size sample to collect
49954       2) C = reject the lot if this number of defectives
49955              exceeded
49956
49957Syntax:
49958    SINGLE SAMPLE ACCEPTANCE PLAN <p1> <p2> <alpha> <beta>
49959    where <p1> is a number or parameter that specifies the AQL;
49960          <p2> is a number of parameter that specifies the LTPD;
49961          <alpha> is a number or parameter that is the producers
49962               risk;
49963    and where <beta> is a number or parameter that is the
49964              consumers risk.
49965
49966Examples:
49967    SINGLE SAMPLE ACCEPTANCE PLAN 0.05 0.10 0.01 0.10
49968
49969    LET P1 = 0.01
49970    LET P2 = 0.05
49971    LET ALPHA = 0.01
49972    LET BETA = 0.10
49973    SINGLE SAMPLE ACCEPTANCE PLAN P1 P2 ALPHA BETA
49974
49975Note:
49976    In addition to printing the values of N and C, Dataplot
49977    stores these values in the internal parameters SSN and
49978    SSNC.  These parameters can be used in subsequent Dataplot
49979    analysis if needed.
49980
49981Note:
49982    Dataplot provides the following related macros:
49983
49984       OC_SSB.DP  - generate an Operating Characteristic (OC) curve
49985                    assuming binomial probabilities.  The OC
49986                    curve is a plot of probability of acceptance
49987                    versus percent defective.
49988       OC_SSA.DP  - generate an Operating Characteristic (OC) curve
49989                    assuming hypergeometric probabilities.  The OC
49990                    curve is a plot of probability of acceptance
49991                    versus percent defective.
49992       AOQSS.DP   - generate an Average Outgoing Quality (AOQ) curve.
49993                    For non-destructive samples, rejected lots are
49994                    often 100% inspected and defective units are
49995                    replaced with good units.  This means that the
49996                    only defective units are those in lots that
49997                    were accepted.  The AOQ is the long term defect
49998                    level for these combined lots.  The AOQ curve
49999                    is a plot of this AOQ versus percent defective.
50000       ATISS.DP   - generate an Average Total Inspection (ATI) curve.
50001                    The ATI curve is a plot of probability of
50002                    acceptance versus lot fraction defective.
50003
50004    You can enter LIST <macro> where <macro> is the name of one
50005    of the macros above for details on how to use them.
50006
50007Default:
50008    None
50009
50010Synonyms:
50011    None
50012
50013Related Commands:
50014    CONTROL CHART  = Generate a control chart.
50015    CP             = Compute a Cp capability index.
50016    CUSUM ARL      = Generate a cusum average run length chart.
50017
50018Reference:
50019    Douglas Montgomery, "Introduction to Statistical Quality
50020    Control", John wiley, 1991.
50021
50022Applications:
50023    Quality Control
50024
50025Implementation Date:
50026    1999/3
50027
50028    2001/8: Updated code to print an error message if P2 <= P1
50029
50030Program:
50031    LET P1 = 0.01
50032    LET P2 = 0.05
50033    LET ALPHA = 0.05
50034    LET BETA = 0.10
50035    SINGLE SAMPLE ACCEPTANCE PLAN P1 P2 ALPHA BETA
50036    LET N = SSN
50037    LET C = SSC
50038    . Purpose--Generate an Operating Characteristic curve for a
50039    .          single sample plan.
50040    .          The OC is defined as:
50041    .            BINCDF(c,p,n) versus p
50042    .          where
50043    .            n      = sample size
50044    .            c      = acceptance number for defectives
50045    .            p      = desired binomial probabilities
50046    .
50047    LABEL CASE ASIS
50048    TITLE CASE ASIS
50049    Y1LABEL Probability of Acceptance, Pa
50050    X1LABEL Lot Fraction Defective, p
50051    TITLE OC Single Sample (^SSN, ^SSC) Curve
50052    .
50053    PLOT BINCDF(SSC,P,SSN) FOR P = 0.001 0.001 0.20
50054
50055-----SINH (LET)---------------------------------------------------
50056
50057SINH
50058
50059Name:
50060    SINH (LET)
50061
50062Type:
50063    Library Function
50064
50065Purpose:
50066    Compute the hyperbolic sine for a variable or parameter.
50067
50068Description:
50069    The formula for the hyperbolic sine is:
50070        sinh(x) = (e**x - e**-x)/2
50071    This function is defined for all real x.  The range is negative
50072    infinity to positive infinity.
50073
50074Syntax:
50075    LET <y2> = SINH(<y1>)  <SUBSET/EXCEPT/FOR qualification>
50076    where <y1> is a variable or a parameter;
50077          <y2> is a variable or a parameter (depending on what <y1> is)
50078               where the computed hyperbolic sine value is stored;
50079    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
50080
50081Examples:
50082    LET A = SINH(-2)
50083    LET A = SINH(A1)
50084    LET X2 = SINH(X1)
50085    LET X2 = SINH(PI/2)
50086
50087Note:
50088    Library functions are distinguished from let subcommands
50089    in the following ways.
50090    1) Functions enclose the input value in parenthesis.  Let
50091       subcommands use spaces.
50092    2) Functions can accept (and return) either parameters
50093       (i.e., single values) or variables (i.e., an array of
50094       values) while let subcommands are specific in which they
50095       accept as input and what they return as output.
50096    3) Functions can accept expressions while let subcommands
50097       do not.  For example, the following is legal:
50098           LET Y2 = ABS(Y1-INT(Y1))
50099       For let subcommands, you typically have to do something
50100       like the following:
50101           LET YTEMP = Y**2 + 8
50102           LET A = SUM YTEMP
50103
50104Default:
50105    None
50106
50107Synonyms:
50108    None
50109
50110Related Commands:
50111    SIN      = Compute the sine.
50112    COS      = Compute the cosine.
50113    TAN      = Compute the tangent.
50114    COT      = Compute the cotangent.
50115    SEC      = Compute the secant.
50116    CSC      = Compute the cosecant.
50117    ARCCOS   = Compute the arccosine.
50118    ARCSIN   = Compute the arcsine.
50119    ARCTAN   = Compute the arctangent.
50120    ARCCOT   = Compute the arccotangent.
50121    ARCSEC   = Compute the arcsecant.
50122    ARCCSC   = Compute the arcsecant.
50123    COSH     = Compute the hyperbolic cosine.
50124    TANH     = Compute the hyperbolic tangent.
50125    COTH     = Compute the hyperbolic cotangent.
50126    SECH     = Compute the hyperbolic secant.
50127    CSCH     = Compute the hyperbolic cosecant.
50128    ARCCOSH  = Compute hyperbolic arccosine.
50129    ARCCOTH  = Compute hyperbolic arccotangent.
50130    ARCCSCH  = Compute hyperbolic arccosecant.
50131    ARCSECH  = Compute hyperbolic arcsecant.
50132    ARCSINH  = Compute hyperbolic arcsine.
50133    ARCTANH  = Compute hyperbolic arctangent.
50134
50135Applications:
50136    XX
50137
50138Implementation Date:
50139    XX
50140
50141Program:
50142    TITLE AUTOMATIC
50143    Y1LABEL HYPERBOLIC SINE VALUE
50144    PLOT SINH(X) FOR X = -5 .1 5
50145
50146-----SINHINT (LET)--------------------------------
50147
50148SINHINT
50149
50150Name:
50151    SINHINT (LET)
50152
50153Type:
50154    Library Function
50155
50156Purpose:
50157    Compute the hyperbolic sine integral.
50158
50159Description:
50160    The hyperbolic sine integral is defined as:
50161        Shi(X) = INTEGRAL(SINH(t)/t)dt
50162    where the integral is taken from 0 to x and SINH is the hyperbolic
50163    sine function.
50164
50165Syntax:
50166    LET <y2> = SINHINT(<x>)  <SUBSET/EXCEPT/FOR qualification>
50167    where <x> is a non-zero number, variable, or parameter;
50168          <y2> is a variable or a parameter (depending on what <x> is
50169               where the computed hyperbolic sine integral values
50170               are stored;
50171    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
50172
50173Examples:
50174    LET A = SINHINT(0.1)
50175    LET A = SINHINT(-0.1)
50176    LET X2 = SINHINT(X)
50177
50178Note:
50179    DATAPLOT uses the routine SICIEI written by Irene Stegum and
50180    Ruth Zucker of NIST (see the REFERENCE section below).
50181
50182Note:
50183    Library functions are distinguished from let subcommands
50184    in the following ways.
50185    1) Functions enclose the input value in parenthesis.  Let
50186       subcommands use spaces.
50187    2) Functions can accept (and return) either parameters
50188       (i.e., single values) or variables (i.e., an array of
50189       values) while let subcommands are specific in which they
50190       accept as input and what they return as output.
50191    3) Functions can accept expressions while let subcommands
50192       do not.  For example, the following is legal:
50193           LET Y2 = ABS(Y1-INT(Y1))
50194       For let subcommands, you typically have to do something
50195       like the following:
50196           LET YTEMP = Y**2 + 8
50197           LET A = SUM YTEMP
50198
50199Default:
50200    None
50201
50202Synonyms:
50203    None
50204
50205Related Commands:
50206    SININT     = Compute the hyperbolic sine integral.
50207    COSINT     = Compute the hyperbolic cosine integral.
50208    COSHINT    = Compute the hyperbolic cosine integral.
50209    EXPINTN    = Compute the exponential integral of order N.
50210    LOGINT     = Compute the logarithmic integral.
50211    DAWSON     = Compute Dawson's integral.
50212
50213Reference:
50214    "SICIEI: Automatic Computing Methods for Special FUnctions.  Part
50215    III. The Sine, Cosine, Exponential Integrals and Related
50216    Functions", Stegum and Zucker, Journal of Research of the National
50217    Bureau of Standards, 80B(2), 1976.
50218
50219    "Handbook of Mathematical Functions, Applied Mathematics Series,
50220    Vol. 55", Abramowitz and Stegun, National Bureau of Standards,
50221    1964 (chapter 5).
50222
50223Applications:
50224    Special Functions
50225
50226Implementation Date:
50227    94/9
50228
50229Program:
50230    TITLE AUTOMATIC
50231    PLOT SINHINT(X) FOR X = -10 0.1 10
50232
50233-----SINGULAR VALUES (LET)---------------------------------
50234
50235SINGULAR VALUES
50236
50237Name:
50238    SINGULAR VALUES (LET)
50239
50240Type:
50241    Let Subcommand
50242
50243Purpose:
50244    Compute the singular values of a matrix.
50245
50246Description:
50247    DATAPLOT uses the singular value decomposition (SVD) to compute
50248    the singular values.
50249
50250    If X is a matrix with row and column dimensions n and p
50251    respectively, then an n by n orthogonal matrix U and a p by p
50252    orthogonal matrix V can be found such that:
50253           U'XV = [ SIGMA]    - if n >= p
50254                  [  0   ]
50255           U'XV = [SIGMA 0]   - if n < p
50256    where SIGMA is a m by m diagonal matrix (m is the minimum of
50257    n and p).  The diagonal elements of SIGMA are the singular values
50258    of X and they are stored from largest to smallest.  Singular values
50259    of zero (or near zero) indicate that the matrix is singular (i.e.,
50260    not of full rank) or ill-conditioned.  Chapters 2 and 14 of the
50261    Numerical Recipes book describe some applications of the SVD.
50262
50263    For large matrices, it can be impractical to compute U (which is
50264    n by n).  However, U can be partitioned into
50265            U = (U1, U2)
50266    where U1 is n by p.  Then
50267            X = U1xSIGMAxV'
50268    is called the singular value factorization of X.  Several
50269    multivariate statistical techniques are based on this
50270    factorization.
50271
50272Syntax:
50273    LET <resp> = SINGULAR VALUES <mat1>
50274              <SUBSET/EXCEPT/FOR qualification>
50275    where <mat1> is a matrix for which the singular values are to be
50276                 computed;
50277          <resp> is a variable where the resulting singular values are
50278                 saved;
50279    and where the <SUBSET/EXCEPT/FOR qualification> is optional (and
50280                 rarely used in this context).
50281
50282Examples:
50283    LET C = SINGULAR VALUES A
50284
50285Note:
50286    Matrices are created with either the READ MATRIX command or the
50287    MATRIX DEFINITION command.  Enter HELP MATRIX DEFINITION and HELP
50288    READ MATRIX for details.
50289
50290Note:
50291    The columns of a matrix are accessible as variables by appending an
50292    index to the matrix name.  For example, the 4x4 matrix C has
50293    columns C1, C2, C3, and C4.  These columns can be operated on like
50294    any other DATAPLOT variable.
50295
50296Note:
50297    The maximum size matrix that DATAPLOT can handle is set when
50298    DATAPLOT is built on a particular site.  The default maximums are
50299    100 columns and 500 rows.  Earlier versions may be 20 rows and 20
50300    columns or 100 rows and 100 columns.
50301
50302Default:
50303    None
50304
50305Synonyms:
50306    None
50307
50308Related Commands:
50309    MATRIX ADDITION      = Perform a matrix addition.
50310    MATRIX ADJOINT       = Compute the adjoint matrix of a matrix.
50311    MATRIX COFACTOR      = Compute a matrix cofactor.
50312    MATRIX DEFINITION    = Set a matrix definition.
50313    MATRIX DETERMINANT   = Compute a matrix determinant.
50314    MATRIX EIGENVALUES   = Compute the matrix eigenvalues.
50315    MATRIX EIGENVECTORS  = Compute the matrix eigenvectors.
50316    MATRIX EUCLID NORM   = Compute the matrix Euclidean norm.
50317    MATRIX INVERSE       = Compute a matrix inverse.
50318    MATRIX MINOR         = Compute a matrix minor.
50319    MATRIX MULTIPLICAT   = Perform a matrix multiplication.
50320    MATRIX NUMB OF COLU  = Compute the number of columns in a matrix.
50321    MATRIX NUMB OF ROWS  = Compute the number of rows in a matrix.
50322    MATRIX RANK          = Compute the rank of a matrix.
50323    MATRIX SIMPLEX SOLU  = Compute a matrix simplex solution.
50324    MATRIX SOLUTION      = Solve a system of linear equations.
50325    MATRIX SPECTRAL NORM = Compute the matrix spectral norm.
50326    MATRIX SPECTRAL RADI = Compute the matrix spectral radius.
50327    MATRIX SUBMATRIX     = Define a matrix submatrix.
50328    MATRIX SUBTRACTION   = Perform a matrix subtraction.
50329    MATRIX TRACE         = Compute a matrix trace.
50330    MATRIX TRANSPOSE     = Compute a matrix transpose.
50331    CORRELATION MATRIX   = Compute the correlation matrix of a matrix.
50332    VARIANCE-COVA MATRIX = Compute the variance-covariance matrix of a
50333                           matrix.
50334    PRINCIPAL COMPONENTS = Compute the principal components of a
50335                           matrix.
50336    SINGULAR VALUE DECOM = Compute the singular value decomposition of
50337                           a matrix.
50338    SINGULAR VALUE FACT  = Compute the singular value factorization of
50339                           a matrix.
50340
50341Reference:
50342    "LINPACK User's Guide", Dongarra, Bunch, Moler, Stewart.  Siam,
50343    1979.
50344
50345    "Numerical Recipes: The Art of Scientific Programming (FORTRAN
50346    Version)", Press, Flannery, Teukolsky, and Vetterling.  Cambridge
50347    University Press, 1989 (chapter 2).
50348
50349Applications:
50350    Linear Algebra, Multivariate Analysis
50351
50352Implementation Date:
50353    93/8
50354
50355Program:
50356    . SOURCE: "GRAPHICAL EXPLORATORY DATA ANALYSIS", DU TOIT, ET AL
50357    . 28 STUDENTS FROM ABILITY TEST DATA SET (PAGE 6)
50358    .
50359    DIMENSION 100 COLUMNS
50360    READ MATRIX X
50361    11 19 21 21 18 20 21 15 14 15 13 15 16 19 19 19 20 17 17 39 21  9
50362    11 21 20 15 24 22 18 11 18 16 19 14 17 21 15 17 18 18 19 42 22  4
50363     0 18 19 16 18 18 23 11 13 13 15 11 11 15 18 13 15 18 13 38 18  6
50364     0 18 23 10 18 16 16 11  9  8 15  6  9 12 16  8 13  9 15 34 15  9
50365     0 24 24 19 20 23 24 22 18 16 19 16 19 19 21 21 20 18 20 46 21  2
50366     1 19 19 23 21 23 23  9  8 13 15 20 15 17 12 20 16 16 21 35 18  9
50367     0 21 20 19 21 21 23 11 16 11 18 18 14 21 17 14 19 18 16 42 19  4
50368     0 21 20 21 20 16 22  7 11 17 16  8 10 13 17 16 17 15 11 28 20  9
50369     1 19 20 19 22 18 21 11 12  7 15  9 11 13 12 13 17 12 12 38 19  8
50370     1 19 23 22 22 16 25 12 15 16 19 15 10 15 20 18 18 17 13 33 18  9
50371     0 17 13  8 18 13 18 12  8  9 12 12 11  9 14 15 12 13  9 23 16  9
50372    10 21 22 22 15 23 23 16 12 16 15 13 14 19 17 16 18 19 18 42 24  9
50373    11 18 18 17 16 15 22  8 11 10 16  8 14 10 13 10 14  9 14 27 14  8
50374    10 13 18 21 16 17 15 11 12 11  9 11 11 16 18 14 13 15 18 24 15  9
50375    11 17 13 17 20 22 19 15 11 11 12 11 13 15 15 15 13 16 12 33 10  9
50376    10 18 12  9  9 15 17  9  5  3 12  7  7 12 10 10 13 10 12 27 12  9
50377    10 22 15 24 17 15 20 10 12 12 11  9 12 19 16 16  8 11 17 30 22  6
50378    10 18 17 18 18 13 18 14 12 15 11 10  9 21 14 12 15 11 13 31 16  9
50379    10 17 15 14 14 12 13  9 10 11  9  7 11 13 15 11 13 10 13 31 11  9
50380    10 16 20 17 13 15 16 10 16 12 10  7 13 12 18 13 18 10 15 34 16  9
50381     1 24 21 22 21 21 25 11 17 17 21 11 15 15 18 16 16 17 17 37 21  3
50382     0 23 23 21 22 16 21 10 18 16 14 14 13 17 21 19 16 17 19 34 12  9
50383     1 22 22 21 24 18 24  6 16 14 20 16 18 12 12 13 18 18 21 31 19  4
50384     0 22 17 19 19 21 20 17 15  9 13 16 17 18 11 13 16 19 14 40 18  1
50385     0 20 23 23 22 22 24 11 18 16 16 16 20 13 16 18 18 20 20 41 21  3
50386     1 22 17 21 17 17 22 10 14 16 16 13  8 13 18 21 12 13 15 33 14  9
50387     1 21 18 20 23 21 22  8 15  9 17 11 13 13 20 20 21 15 20 38 21  6
50388     1 21 22 19 20 18 17 11 15 12 14 11 10 11 13 14 14 15 14 39 12  9
50389    END OF DATA
50390    LET S = SINGULAR VALUES X
50391    SET WRITE FORMAT F10.5
50392    PRINT S
50393    The computed singular values are:
50394      419.53979 32.21864 26.63654 22.93816 19.67355 18.49977 16.47950
50395       14.76893 14.27686 13.22598 12.82934 11.64946 10.87689 9.98086
50396        9.34820 7.87245 6.51996 6.08804 3.80118 3.12485 2.97399 0.78713
50397
50398-----SINGULAR VALUE DECOMPOSITION (LET)--------------------------
50399
50400SINGULAR VALUE DECOMPOSITION
50401
50402Name:
50403    SINGULAR VALUE DECOMPOSITION (LET)
50404
50405Type:
50406    Let Subcommand
50407
50408Purpose:
50409    Compute the singular value decomposition of a matrix.
50410
50411Description:
50412    If X is a matrix with row and column dimensions n and p
50413    respectively, then an n by n orthogonal matrix U and a p by p
50414    orthogonal matrix V can be found such that:
50415           U'XV = [ SIGMA]    - if n >= p
50416                  [  0   ]
50417           U'XV = [SIGMA 0]   - if n < p
50418    where SIGMA is a m by m diagonal matrix (m is the minimum of
50419    n and p).  The diagonal elements of SIGMA are the singular values
50420    of X and they are stored from largest to smallest.  Singular values
50421    of zero (or near zero) indicate that the matrix is singular (i.e.,
50422    not of full rank) or ill-conditioned.  Chapters 2 and 14 of the
50423    Numerical Recipes book describe some applications of the SVD.
50424
50425    Since U and V are orthogonal (and so their inverses are equal to
50426    their transpose), the above equation can also be written as:
50427             X = U[SIGMA]V'
50428                  [  0  ]
50429
50430    For large matrices, it can be impractical to compute U (which is
50431    n by n).  However, U can be partitioned into
50432            U = (U1, U2)
50433    where U1 is n by p.  Then
50434            X = U1xSIGMAxV'
50435    is called the singular value factorization of X.  Several
50436    multivariate statistical techniques are based on this
50437    factorization.
50438
50439Syntax:
50440    LET <u> <s> <v> = SINGULAR VALUE DECOMPOSITION <mat1>
50441               <SUBSET/EXCEPT/FOR qualification>
50442    where <mat1> is a matrix for which the singular values are to be
50443                 computed;
50444          <u> is an n by n matrix where U is saved;
50445          <s> is a variable where the singular values are saved
50446              (length is minimum of n and p);
50447          <v> is an p by p matrix where V is saved;
50448    and where the <SUBSET/EXCEPT/FOR qualification> is optional (and
50449                 rarely used in this context).
50450
50451Examples:
50452    LET U S V = SINGULAR VALUE DECOMPOSITION A
50453
50454Note:
50455    Matrices are created with either the READ MATRIX command or the
50456    MATRIX DEFINITION command.  Enter HELP MATRIX DEFINITION and HELP
50457    READ MATRIX for details.
50458
50459Note:
50460    The columns of a matrix are accessible as variables by appending an
50461    index to the matrix name.  For example, the 4x4 matrix C has
50462    columns C1, C2, C3, and C4.  These columns can be operated on like
50463    any other DATAPLOT variable.
50464
50465Note:
50466    The maximum size matrix that DATAPLOT can handle is set when
50467    DATAPLOT is built on a particular site.  The default maximums are
50468    100 columns and 500 rows.  Earlier versions may be 20 rows and 20
50469    columns or 100 rows and 100 columns.
50470
50471Default:
50472    None
50473
50474Synonyms:
50475    None
50476
50477Related Commands:
50478    MATRIX ADDITION      = Perform a matrix addition.
50479    MATRIX ADJOINT       = Compute the adjoint matrix of a matrix.
50480    MATRIX COFACTOR      = Compute a matrix cofactor.
50481    MATRIX DEFINITION    = Set a matrix definition.
50482    MATRIX DETERMINANT   = Compute a matrix determinant.
50483    MATRIX EIGENVALUES   = Compute the matrix eigenvalues.
50484    MATRIX EIGENVECTORS  = Compute the matrix eigenvectors.
50485    MATRIX EUCLID NORM   = Compute the matrix Euclidean norm.
50486    MATRIX INVERSE       = Compute a matrix inverse.
50487    MATRIX MINOR         = Compute a matrix minor.
50488    MATRIX MULTIPLICAT   = Perform a matrix multiplication.
50489    MATRIX NUMB OF COLU  = Compute the number of columns in a matrix.
50490    MATRIX NUMB OF ROWS  = Compute the number of rows in a matrix.
50491    MATRIX RANK          = Compute the rank of a matrix.
50492    MATRIX SIMPLEX SOLU  = Compute a matrix simplex solution.
50493    MATRIX SOLUTION      = Solve a system of linear equations.
50494    MATRIX SPECTRAL NORM = Compute the matrix spectral norm.
50495    MATRIX SPECTRAL RADI = Compute the matrix spectral radius.
50496    MATRIX SUBMATRIX     = Define a matrix submatrix.
50497    MATRIX SUBTRACTION   = Perform a matrix subtraction.
50498    MATRIX TRACE         = Compute a matrix trace.
50499    MATRIX TRANSPOSE     = Compute a matrix transpose.
50500    CORRELATION MATRIX   = Compute the correlation matrix of a matrix.
50501    VARIANCE-COVA MATRIX = Compute the variance-covariance matrix of a
50502                           matrix.
50503    PRINCIPAL COMPONENTS = Compute the principal components of a
50504                           matrix.
50505    SINGULAR VALUES      = Compute the singular values of a matrix.
50506    SINGULAR VALUE FACT  = Compute the singular value factorization of
50507                           a matrix.
50508
50509Reference:
50510    "LINPACK User's Guide", Dongarra, Bunch, Moler, Stewart.  Siam,
50511    1979.
50512
50513    "Numerical Recipes: The Art of Scientific Programming (FORTRAN
50514    Version)", Press, Flannery, Teukolsky, and Vetterling.  Cambridge
50515    University Press, 1989 (chapter 2).
50516
50517Applications:
50518    Linear Algebra, Multivariate Analysis
50519
50520Implementation Date:
50521    93/8
50522
50523Program:
50524    . SOURCE: "GRAPHICAL EXPLORATORY DATA ANALYSIS", DU TOIT, ET AL
50525    . 28 STUDENTS FROM ABILITY TEST DATA SET (PAGE 6)
50526    .
50527    DIMENSION 100 COLUMNS
50528    READ MATRIX X
50529    11 19 21 21 18 20 21 15 14 15 13 15 16 19 19 19 20 17 17 39 21  9
50530    11 21 20 15 24 22 18 11 18 16 19 14 17 21 15 17 18 18 19 42 22  4
50531     0 18 19 16 18 18 23 11 13 13 15 11 11 15 18 13 15 18 13 38 18  6
50532     0 18 23 10 18 16 16 11  9  8 15  6  9 12 16  8 13  9 15 34 15  9
50533     0 24 24 19 20 23 24 22 18 16 19 16 19 19 21 21 20 18 20 46 21  2
50534     1 19 19 23 21 23 23  9  8 13 15 20 15 17 12 20 16 16 21 35 18  9
50535     0 21 20 19 21 21 23 11 16 11 18 18 14 21 17 14 19 18 16 42 19  4
50536     0 21 20 21 20 16 22  7 11 17 16  8 10 13 17 16 17 15 11 28 20  9
50537     1 19 20 19 22 18 21 11 12  7 15  9 11 13 12 13 17 12 12 38 19  8
50538     1 19 23 22 22 16 25 12 15 16 19 15 10 15 20 18 18 17 13 33 18  9
50539     0 17 13  8 18 13 18 12  8  9 12 12 11  9 14 15 12 13  9 23 16  9
50540    10 21 22 22 15 23 23 16 12 16 15 13 14 19 17 16 18 19 18 42 24  9
50541    11 18 18 17 16 15 22  8 11 10 16  8 14 10 13 10 14  9 14 27 14  8
50542    10 13 18 21 16 17 15 11 12 11  9 11 11 16 18 14 13 15 18 24 15  9
50543    11 17 13 17 20 22 19 15 11 11 12 11 13 15 15 15 13 16 12 33 10  9
50544    10 18 12  9  9 15 17  9  5  3 12  7  7 12 10 10 13 10 12 27 12  9
50545    10 22 15 24 17 15 20 10 12 12 11  9 12 19 16 16  8 11 17 30 22  6
50546    10 18 17 18 18 13 18 14 12 15 11 10  9 21 14 12 15 11 13 31 16  9
50547    10 17 15 14 14 12 13  9 10 11  9  7 11 13 15 11 13 10 13 31 11  9
50548    10 16 20 17 13 15 16 10 16 12 10  7 13 12 18 13 18 10 15 34 16  9
50549     1 24 21 22 21 21 25 11 17 17 21 11 15 15 18 16 16 17 17 37 21  3
50550     0 23 23 21 22 16 21 10 18 16 14 14 13 17 21 19 16 17 19 34 12  9
50551     1 22 22 21 24 18 24  6 16 14 20 16 18 12 12 13 18 18 21 31 19  4
50552     0 22 17 19 19 21 20 17 15  9 13 16 17 18 11 13 16 19 14 40 18  1
50553     0 20 23 23 22 22 24 11 18 16 16 16 20 13 16 18 18 20 20 41 21  3
50554     1 22 17 21 17 17 22 10 14 16 16 13  8 13 18 21 12 13 15 33 14  9
50555     1 21 18 20 23 21 22  8 15  9 17 11 13 13 20 20 21 15 20 38 21  6
50556     1 21 22 19 20 18 17 11 15 12 14 11 10 11 13 14 14 15 14 39 12  9
50557    END OF DATA
50558    LET U S V = SINGULAR VALUE DECOMPOSITION X
50559
50560-----SINGULAR VALUE FACTORIZATION (LET)--------------------------
50561
50562SINGULAR VALUE FACTORIZATION
50563
50564Name:
50565    SINGULAR VALUE FACTORIZATION (LET)
50566
50567Type:
50568    Let Subcommand
50569
50570Purpose:
50571    Compute the singular value factorization of a matrix.
50572
50573Description:
50574    If X is a matrix with row and column dimensions n and p
50575    respectively, then an n by n orthogonal matrix U and a p by p
50576    orthogonal matrix V can be found such that:
50577           U'XV = [ SIGMA]    - if n >= p
50578                  [  0   ]
50579           U'XV = [SIGMA 0]   - if n < p
50580    where SIGMA is a m by m diagonal matrix (m is the minimum of
50581    n and p).  The diagonal elements of SIGMA are the singular values
50582    of X and they are stored from largest to smallest.  Singular values
50583    of zero (or near zero) indicate that the matrix is singular (i.e.,
50584    not of full rank) or ill-conditioned.  Chapters 2 and 14 of the
50585    Numerical Recipes book describe some applications of the SVD.
50586
50587    Since U and V are orthogonal (and so their inverses are equal to
50588    their transpose), the above equation can also be written as:
50589             X = U[SIGMA]V'
50590                  [  0  ]
50591
50592    For large matrices, it can be impractical to compute U (which is
50593    n by n).  However, U can be partitioned into
50594            U = (U1, U2)
50595    where U1 is n by p.  Then
50596            X = U1xSIGMAxV'
50597    is called the singular value factorization of X.  Several
50598    multivariate statistical techniques are based on this factorization.
50599    The program example demonstrates the biplot proposed by Ruben
50600    Gabriel.
50601
50602Syntax:
50603    LET <u> <s> <v> = SINGULAR VALUE FACTORIZATION <mat1>
50604    where <mat1> is a matrix for which the singular values are to be
50605                 computed;
50606          <u> is an n by p matrix where U is saved;
50607          <s> is a variable where the singular values are saved
50608              (length is minimum of n and p);
50609          <v> is an p by p matrix where V is saved.
50610
50611Examples:
50612    LET U S V = SINGULAR VALUE DECOMPOSITION A
50613
50614Note:
50615    DATAPLOT uses a LINPACK routine to compute the singular value
50616    factorization.
50617
50618Note:
50619    Matrices are created with either the READ MATRIX command or the
50620    MATRIX DEFINITION command.  Enter HELP MATRIX DEFINITION and HELP
50621    READ MATRIX for details.
50622
50623Note:
50624    The columns of a matrix are accessible as variables by appending an
50625    index to the matrix name.  For example, the 4x4 matrix C has
50626    columns C1, C2, C3, and C4.  These columns can be operated on like
50627    any other DATAPLOT variable.
50628
50629Note:
50630    The maximum size matrix that DATAPLOT can handle is set when
50631    DATAPLOT is built on a particular site.  The default maximums are
50632    100 columns and 500 rows.  Earlier versions may be 20 rows and 20
50633    columns or 100 rows and 100 columns.
50634
50635Default:
50636    None
50637
50638Synonyms:
50639    None
50640
50641Related Commands:
50642    MATRIX ADDITION      = Perform a matrix addition.
50643    MATRIX ADJOINT       = Compute the adjoint matrix of a matrix.
50644    MATRIX COFACTOR      = Compute a matrix cofactor.
50645    MATRIX DEFINITION    = Set a matrix definition.
50646    MATRIX DETERMINANT   = Compute a matrix determinant.
50647    MATRIX EIGENVALUES   = Compute the matrix eigenvalues.
50648    MATRIX EIGENVECTORS  = Compute the matrix eigenvectors.
50649    MATRIX EUCLID NORM   = Compute the matrix Euclidean norm.
50650    MATRIX INVERSE       = Compute a matrix inverse.
50651    MATRIX MINOR         = Compute a matrix minor.
50652    MATRIX MULTIPLICAT   = Perform a matrix multiplication.
50653    MATRIX NUMB OF COLU  = Compute the number of columns in a matrix.
50654    MATRIX NUMB OF ROWS  = Compute the number of rows in a matrix.
50655    MATRIX RANK          = Compute the rank of a matrix.
50656    MATRIX SIMPLEX SOLU  = Compute a matrix simplex solution.
50657    MATRIX SOLUTION      = Solve a system of linear equations.
50658    MATRIX SPECTRAL NORM = Compute the matrix spectral norm.
50659    MATRIX SPECTRAL RADI = Compute the matrix spectral radius.
50660    MATRIX SUBMATRIX     = Define a matrix submatrix.
50661    MATRIX SUBTRACTION   = Perform a matrix subtraction.
50662    MATRIX TRACE         = Compute a matrix trace.
50663    MATRIX TRANSPOSE     = Compute a matrix transpose.
50664    CORRELATION MATRIX   = Compute the correlation matrix of a matrix.
50665    VARIANCE-COVA MATRIX = Compute the variance-covariance matrix of a
50666                           matrix.
50667    PRINCIPAL COMPONENTS = Compute the principal components of a
50668                           matrix.
50669    SINGULAR VALUES      = Compute the singular values of a matrix.
50670    SINGULAR VALUE DECOM = Compute the singular value decomposition of
50671                           a matrix.
50672
50673Reference:
50674    "LINPACK User's Guide", Dongarra, Bunch, Moler, Stewart.  Siam,
50675    1979.
50676
50677    "Numerical Recipes: The Art of Scientific Programming (FORTRAN
50678    Version)", Press, Flannery, Teukolsky, and Vetterling.  Cambridge
50679    University Press, 1989 (chapter 2).
50680
50681Applications:
50682    Linear Algebra, Multivariate Analysis
50683
50684Implementation Date:
50685    93/8
50686
50687Program:
50688    . Generate a biplot (derived from the singular value factorization)
50689    . SOURCE: "THE BIPLOT AS A DIAGNOSTIC TOOL FOR MODELS OF TWO-WAY
50690    .         TABLES", BRANDU, GABRIEL, TECHNOMETRICS, FEB. 1978.
50691    . DATA IS YIELDS OF COTTON, ROWS ARE VARIETY, COLUMNS ARE CENTER
50692    DIMENSION 100 COLUMNS
50693    READ MATRIX X
50694     1.55 1.26 1.41  1.78
50695     3.39 3.47 2.82  3.89
50696     1.95 1.91 1.74  2.29
50697    10.47 9.12 9.55 17.78
50698     1.45 1.51 1.41  1.70
50699     3.72 3.55 3.09  4.27
50700     4.47 4.07 3.98  4.47
50701    END OF DATA
50702    LET N = SIZE X1
50703    .
50704    FEEDBACK OFF
50705    LET P = MATRIX NUMBER OF COLUMNS X
50706    LOOP FOR K = 1 1 P
50707        LET X^K = LOG10(X^K)
50708    END OF LOOP
50709    LET SUM1 = 0
50710    LOOP FOR K = 1 1 P
50711        LET TEMP = SUM X^K
50712        LET SUM1 = SUM1 + TEMP
50713    END OF LOOP
50714    LET GMEAN = SUM1/(N*P)
50715    LET X = MATRIX SUBTRACTION X GMEAN
50716    LET U S V = SINGULAR VALUE FACTORIZATION X
50717    LET DENOM = MATRIX EUCLIDEAN NORM X
50718    LET S1 = S(1)
50719    LET S2 = S(2)
50720    LET GF = (S1**2 + S2**2)/DENOM**2
50721    .
50722    LET B = MATRIX TRANSPOSE V
50723    LET U1 = U1*SQRT(S1)
50724    LET U2 = U2*SQRT(S2)
50725    LET B1 = B1*SQRT(S1)
50726    LET B2 = B2*SQRT(S2)
50727    .
50728    LET TAG = SEQUENCE 1 1 N
50729    LET TAG2 = SEQUENCE 1 1 P
50730    CHARACTER CIRCLE SQUARE
50731    CHARACTER FILL SOLID ALL
50732    LINE BLANK ALL
50733    TITLE BIPLOT
50734    X1LABEL GOODNESS OF FIT = ^GF
50735    LEGEND FILL SOLID
50736    LEGEND FONT SIMPLEX
50737    LEGEND 1 SQUA() - COLUMN MARKERS
50738    LEGEND 2 CIRC() - ROW MARKERS
50739    .
50740    PLOT U2 U1 AND
50741    PLOT B2 B1
50742    LEGEND 1
50743    LEGEND 2
50744    LIMITS FREEZE
50745    PRE-ERASE OFF
50746    CHARACTER 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
50747    CHARACTER OFFSET 1.2 0 ALL
50748    PLOT U2 U1 TAG
50749    PLOT B2 B1 TAG2
50750
50751-----SININT (LET)--------------------------------
50752
50753SININT
50754
50755Name:
50756    SININT (LET)
50757
50758Type:
50759    Library Function
50760
50761Purpose:
50762    Compute the sine integral.
50763
50764Description:
50765    The sine integral is defined as:
50766        Si(X) = INTEGRAL(SIN(t)/t)dt
50767    where the integral is taken from 0 to x.
50768
50769Syntax:
50770    LET <y2> = SININT(<x>)  <SUBSET/EXCEPT/FOR qualification>
50771    where <x> is a number, variable, or parameter;
50772          <y2> is a variable or a parameter (depending on what <x> is
50773               where the computed cosine integral values are stored;
50774    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
50775
50776Examples:
50777    LET A = SININT(0.1)
50778    LET A = SININT(-0.1)
50779    LET X2 = SININT(X)
50780
50781Note:
50782    DATAPLOT uses the routine SICIEI written by Irene Stegum and
50783    Ruth Zucker of NIST (see the REFERENCE section below).
50784
50785Note:
50786    Library functions are distinguished from let subcommands
50787    in the following ways.
50788    1) Functions enclose the input value in parenthesis.  Let
50789       subcommands use spaces.
50790    2) Functions can accept (and return) either parameters
50791       (i.e., single values) or variables (i.e., an array of
50792       values) while let subcommands are specific in which they
50793       accept as input and what they return as output.
50794    3) Functions can accept expressions while let subcommands
50795       do not.  For example, the following is legal:
50796           LET Y2 = ABS(Y1-INT(Y1))
50797       For let subcommands, you typically have to do something
50798       like the following:
50799           LET YTEMP = Y**2 + 8
50800           LET A = SUM YTEMP
50801
50802Default:
50803    None
50804
50805Synonyms:
50806    None
50807
50808Related Commands:
50809    COSHINT    = Compute the hyperbolic cosine integral.
50810    COSINT     = Compute the cosine integral.
50811    SINHINT    = Compute the hyperbolic sine integral.
50812    EXPINTN    = Compute the exponential integral of order N.
50813    LOGINT     = Compute the logarithmic integral.
50814    DAWSON     = Compute Dawson's integral.
50815
50816Reference:
50817    "SICIEI: Automatic Computing Methods for Special FUnctions.  Part
50818    III. The Sine, Cosine, Exponential Integrals and Related
50819    Functions", Stegum and Zucker, Journal of Research of the National
50820    Bureau of Standards, 80B(2), 1976.
50821
50822    "Handbook of Mathematical Functions, Applied Mathematics Series,
50823    Vol. 55", Abramowitz and Stegun, National Bureau of Standards,
50824    1964 (chapter 5).
50825
50826Applications:
50827    Special Functions
50828
50829Implementation Date:
50830    94/9
50831
50832Program:
50833    TITLE AUTOMATIC
50834    PLOT SININT(X) FOR X = -10 0.1 10
50835
50836-----SIZE (LET)---------------------------------------------------
50837
50838SIZE
50839
50840Name:
50841    SIZE (LET)
50842
50843Type:
50844    Let Subcommand
50845
50846Purpose:
50847    Compute the number of elements in a variable.
50848
50849Syntax:
50850    LET <par> = SIZE <x1>  <SUBSET/EXCEPT/FOR qualification>
50851    where <x1> is the variable for which the size is to be computed;
50852          <par> is a parameter where the size is saved;
50853    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
50854
50855Examples:
50856    LET N = SIZE Y1
50857
50858Default:
50859    None
50860
50861Synonyms:
50862    NUMBER
50863    COUNT
50864
50865Related Commands:
50866    SEQUENCE       = Generate a sequence of numbers.
50867    PATTERN        = Generate numbers with a specific pattern.
50868
50869Applications:
50870    Data Management
50871
50872Implementation Date:
50873    Pre-1987
50874
50875Program:
50876    XX
50877
50878-----SKEWNESS OUTLIER TEST------------------------------------
50879
50880SKEWNESS OUTLIER TEST
50881
50882Name:
50883    SKEWNESS OUTLIER TEST
50884
50885Type:
50886    Analysis Command
50887
50888Purpose:
50889    Perform the skewness test for univariate outliers from a normal
50890    distribution.
50891
50892Description:
50893    The ASTM E178-16a standard for detecting outliers from a univariate
50894    normal distribution includes the skewness outlier test.
50895
50896    The test statistic is the adjusted Fisher-Pearson skewness
50897    coefficient
50898
50899       g1 = n*SUM[i=1 to n][(x(i)-xbar)**2]/((n-1)*(n-2)*s**2)
50900
50901    with n, xbar and s denoting the sample size, the sample mean
50902    and the sample standard deviation, respectively.
50903
50904    The critical values are obtained via simulation.  The ASTM standard
50905    provides table values for n = 3 to 50 and alpha levels of 0.10, 0.05
50906    and 0.01.  Linear interpolation is used for values of n not given in
50907    the table.  Alternatively, you can perform a dynamic simulation
50908    to obtain the critical values.
50909
50910    To specify the method used to compute the critical value, enter
50911    one of the following commands (the default is ASTM)
50912
50913        SET SKEW OUTLIER TEST CRITICAL VALUES ASTM
50914        SET SKEW OUTLIER TEST CRITICAL VALUES SIMULATION
50915
50916    If n > 50, the simulation method will be used.
50917
50918Syntax 1:
50919    SKEWNESS OUTLIER TEST  <y>  <SUBSET/EXCEPT/FOR qualification>
50920    where <y> is the response variable being tested;
50921    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
50922
50923Syntax 2:
50924    MULTIPLE SKEWNESS OUTLIER TEST <y1> ... <yk>
50925                                   <SUBSET/EXCEPT/FOR qualification>
50926    where <y1> ... <yk> is a list of up to k response variables;
50927    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
50928
50929    This syntax performs the skewness outlier test on <y1>, then on
50930    <y2>, and so on.  Up to 30 response variables can be specified.
50931
50932    Note that the syntax
50933
50934         MULTIPLE SKEWNESS OUTLIER TEST Y1 TO Y4
50935
50936    is supported.  This is equivalent to
50937
50938         MULTIPLE SKEWNESS OUTLIER TEST Y1 Y2 Y3 Y4
50939
50940Syntax 3:
50941    REPLICATED SKEWNESS OUTLIER TEST <y> <x1> ... <xk>
50942                                     <SUBSET/EXCEPT/FOR qualification>
50943    where <y> is the response variable;
50944          <x1> ... <xk> is a list of up to k group-id variables;
50945    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
50946
50947    This syntax performs a cross-tabulation of <x1> ... <xk> and performs
50948    a skewness outlier test for each unique combination of cross-tabulated
50949    values.  For example, if X1 has 3 levels and X2 has 2 levels, there
50950    will be a total of 6 skewness outlier tests performed.
50951
50952    Up to six group-id variables can be specified.
50953
50954    Note that the syntax
50955
50956         REPLICATED SKEWNESS OUTLIER TEST Y X1 TO X4
50957
50958    is supported.  This is equivalent to
50959
50960         REPLICATED SKEWNESS OUTLIER TEST Y X1 X2 X3 X4
50961
50962Examples:
50963    SKEWNESS OUTLIER TEST Y1
50964    MULTIPLE SKEWNESS OUTLIER TEST Y1 Y2 Y3
50965    REPLICATED SKEWNESS OUTLIER TEST Y X1 X2
50966    SKEWNESS OUTLIER TEST Y1   SUBSET TAG > 2
50967
50968Note:
50969    Tests for outliers are dependent on knowing the distribution of the
50970    data.  The skewness outlier test assumes that the data come from an
50971    approximately normal distribution.  For this reason, it is strongly
50972    recommended that the skewness outlier test be complemented with a
50973    normal probability test.  If the data are not approximately normally
50974    distributed, then the skewness outlier test may be detecting the
50975    non-normality of the data rather than the presence of an outlier.
50976
50977Note:
50978    You can specify the number of digits in the skewness outlier test
50979    output with the command
50980
50981        SET WRITE DECIMALS <value>
50982
50983Note:
50984    The SKEWNESS OUTLIER TEST command automatically saves the following
50985    parameters:
50986
50987       STATVAL    = the value of the test statistic
50988       STATDCF    = the CDF value of the test statistic
50989       PVALUE     = the p-value of the test statistic
50990       CUTOFF80   = the 80 percent point of the reference distribution
50991       CUTOFF90   = the 90 percent point of the reference distribution
50992       CUTOFF95   = the 95 percent point of the reference distribution
50993       CUTOF975   = the 97.5 percent point of the reference distribution
50994       CUTOFF99   = the 99 percent point of the reference distribution
50995
50996    The STATCDF and PVALUE are only saved when the simulation method
50997    is used to obtain critical values.  If the ASTM method is used to
50998    obtain critical values, the CUTOFF80 and CUTOF975 values are not
50999    saved.
51000
51001    If the MULTIPLE or REPLICATED option is used, these values will
51002    be written to the file "dpst1f.dat" instead.
51003
51004Note:
51005    In addition to the SKEWNESS OUTLIER TEST command, the following
51006    commands can also be used:
51007
51008        LET A = SKEWNESS OUTLIER TEST Y
51009        LET A = SKEWNESS OUTLIER TEST CDF Y
51010        LET A = SKEWNESS OUTLIER TEST PVALUE Y
51011        LET A = SKEWNESS OUTLIER TEST INDEX Y
51012
51013        LET ALPHA = <value>
51014        LET A = SKEWNESS OUTLIER TEST CRITICAL VALUE Y
51015
51016    The SKEWNESS OUTLIER TEST, SKEWNESS OUTLIER TEST CDF, and
51017    SKEWNESS OUTLIER TEST PVALUE return the values of the test statistic,
51018    the cdf of the test statistic and the pvalue of the test statistic,
51019    respectively.  For the SKEWNESS OUTLIER TEST CDF and
51020    SKEWNESS OUTLIER TEST PVALUE commands, the simulation method will be
51021    used.  Otherwise, the method specified by the
51022    SET SKEWNESS OUTLIER TEST CRITICAL VALUE command will be used.
51023
51024    The SKEWNESS OUTLIER TEST INDEX returns the row index of the most
51025    extreme value in the response variable.  The most extreme value is
51026    defined as the value furtherest from the mean.
51027
51028    The SKEWNESS OUTLIER TEST CRITICAL VALUE returns the critical value
51029    for the specified value of ALPHA.  If ALPHA is not specified, it will
51030    be set to 0.05.  Note that if the ASTM method is specified for the
51031    critical values, only a few select values for alpha are supported
51032    (0.01, 0.05 and 0.10).
51033
51034    In addition to the above LET command, built-in statistics are
51035    supported for 30+ different commands (enter HELP STATISTICS
51036    for details).
51037
51038Default:
51039    The ASTM method is used to obtain critical values
51040
51041Synonyms:
51042    None
51043
51044Related Commands:
51045    KURTOSIS OUTLIER TEST       = Perform the kurtosis outlier test.
51046    GRUBBS TEST                 = Perform the Grubbs outlier test.
51047    DAVID TEST                  = Perform the David outlier test.
51048    TIETJEN-MOORE TEST          = Perform the Tietjen-Moore outlier
51049                                  test.
51050    EXTREME STUDENTIZED DEVIATE = Perform the generalized extreme
51051                                  studentized deviate outlier test.
51052    DIXON TEST                  = Perform the Dixon outlier test.
51053    SKEWNESS OUTLIER TEST       = Perform the skewness outlier test.
51054    KURTOSIS OUTLIER TEST       = Perform the kurtosis outlier test.
51055    ANDERSON DARLING TEST       = Perform the Anderson-Darling test for
51056                                  normality.
51057    WILK SHAPIRO TEST           = Perform the Wilk-Shapiro test for
51058                                  normality.
51059    PROBABILITY PLOT            = Generates a probability plot.
51060    HISTOGRAM                   = Generate a histogram.
51061    BOX PLOT                    = Generate a box plot.
51062
51063Reference:
51064    E178 - 16A (2016), "Standard Practice for Dealing with Outlying
51065    Observations", ASTM International, 100 Barr Harbor Drive,
51066    PO Box C700, West Conshohocken, PA 19428-2959, USA.
51067
51068    Ferguson, T.S. (1961), "On the Rejection of Outliers," Fourth
51069    Berkeley Symposium on Mathematical Statistics and Probability,
51070    edited by Jerzy Neyman, University of California Press, Berkeley
51071    and Los Angeles, CA.
51072
51073    Ferguson, T.S. (1961), "Rules for Rejection of Outliers," Revue
51074    Inst. Int. de Stat., RINSA, Vol. 29, No. 3, pp. 29-43.
51075
51076Applications:
51077    Outlier Detection
51078
51079Implementation Date:
51080    2019/10
51081
51082Program:
51083    . Step 1:   Read the data (from ASTM E-178 document)
51084    .
51085    read y
51086    3.73
51087    3.59
51088    3.94
51089    4.13
51090    3.04
51091    2.22
51092    3.23
51093    4.05
51094    4.11
51095    2.02
51096    end of data
51097    set write decimals 3
51098    .
51099    . Step 2:   Compute the statistics
51100    .
51101    let stat = skew outlier test y
51102    set skew outlier test critical values astm
51103    let cv1 = skew outlier test critical value y
51104    set skew outlier test critical values simulation
51105    let cv2 = skew outlier test critical value y
51106    .
51107    let pval = skew outlier test pvalue y
51108    let statcdf = skew outlier test cdf y
51109    let iindx = skew outlier test index y
51110    .
51111    print stat cv1 cv2 pval statcdf iindx
51112    .
51113    set skew outlier test critical values astm
51114    skewness outlier test y
51115    set skew outlier test critical values simulation
51116    skewness outlier test y
51117
51118-----SKEWNESS (LET)---------------------------------------------------
51119
51120SKEWNESS
51121
51122Name:
51123    SKEWNESS (LET)
51124
51125Type:
51126    Let Subcommand
51127
51128Purpose:
51129    Compute the skewness (or standardized third central moment) of a
51130    variable.
51131
51132Description:
51133    Skewness measures the lack of symmetry in a variable.  The
51134    formula for the Fisher-Pearson skewness coefficient is:
51135
51136       g1 = (SUM[i=1 to n][(X(i)-Xbar)**3/N))/s**3]
51137
51138    where xbar, s, and N are the sample mean, the sample standard
51139    deviation, and the sample size, respectively.  Note that in
51140    computing the skewness, the standard deviation is computed using
51141    n in the denominator rather than n - 1.
51142
51143    The adjusted Fisher-Pearson skewness coefficient is:
51144
51145       G1 = (SQRT(N*(N-1))/(N-1))*(SUM[i=1 to n][(X(i)-Xbar)**3/N))/s**3]
51146
51147    This provides a correction factor to adjust for the sample size.
51148    This adjustment factor approaches 1 as the sample size gets
51149    large.
51150
51151    In Dataplot, you can specify that the adjusted form of the
51152    statistic be computed by entering the command
51153
51154        SET SKEWNESS DEFINITION ADJUSTED FISHER-PEARSON
51155
51156    To reset the unadjusted skewness statistic, enter
51157
51158        SET SKEWNESS DEFINITION FISHER-PEARSON
51159
51160    There are many alternative definitions of skewness in the
51161    literature.  Dataplot supports the following two additional
51162    definitions of skewness.
51163
51164    The Galton skewness (also known as Bowley's skewness) is defined as
51165
51166        Galton skewness = (Q1 + Q3 - 2*Q2)/(Q3 - Q1)
51167
51168    where Q1 is the lower quartile, Q3 is the upper quartile, and
51169    Q2 is the median.
51170
51171    The Pearson 2 skewness coefficient is defined as
51172
51173        Sk2 = 3*(Ybar - Ymed)/s
51174
51175   where Ymed is the sample median.
51176
51177Syntax 1:
51178    LET <par> = SKEWNESS <y>  <SUBSET/EXCEPT/FOR qualification>
51179    where <y> is the response variable;
51180          <par> is a parameter where the skewness is saved;
51181    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
51182
51183    This syntax computes the Fisher-Pearson skewness.
51184
51185Syntax 2:
51186    LET <par> = GALTON SKEWNESS <y>  <SUBSET/EXCEPT/FOR qualification>
51187    where <y> is the response variable;
51188          <par> is a parameter where the skewness is saved;
51189    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
51190
51191    This syntax computes the Galton skewness.
51192
51193Syntax 3:
51194    LET <par> = PEARSON TWO SKEWNESS <y>  <SUBSET/EXCEPT/FOR qualification>
51195    where <y> is the response variable;
51196          <par> is a parameter where the skewness is saved;
51197    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
51198
51199    This syntax computes the Pearson two skewness.
51200
51201Examples:
51202    LET A = SKEWNESS Y1
51203    LET A = GALTON SKEWNESS Y1
51204    LET A = PEARSON TWO SKEWNESS Y1
51205
51206Note:
51207    The skewness for a normal distribution is zero.  Symmetric data
51208    should have a skewness near zero.  Negative values for the skewness
51209    indicate data that are skewed left and positive values for the
51210    skewness indicate data that are skewed right.  By skewed left, we
51211    mean that the left tail is long relative to the right tail.
51212    Similarly, skewed right means that the right tail is long relative
51213    to the left tail.  Note that if the data are multi-modal, then this
51214    may affect the sign of the skewness.
51215
51216    Measurement data is often bounded below (e.g., the measurement
51217    must be positive) but not above.  This type of data will
51218    frequently exhibit right skewness.
51219
51220Note:
51221    Dataplot statistics can be used in a number of commands.  For
51222    details, enter
51223
51224         HELP STATISTICS
51225
51226Default:
51227    None
51228
51229Synonyms:
51230    STANDARDIZED THIRD CENTRAL MOMENT
51231    STANDARDIZED 3RD CENTRAL MOMENT
51232    PEARSON 2 SKEWNESS
51233    PEARSON TYPE TWO SKEWNESS
51234    PEARSON TYPE 2 SKEWNESS
51235
51236Related Commands:
51237    MEAN                = Compute mean of a variable.
51238    STANDARD DEVIATION  = Compute the standard deviation of a variable.
51239    KURTOSIS            = Compute the Kurtosis of a variable.
51240
51241Applications:
51242    Data Analysis
51243
51244Implementation Date:
51245    Pre-1987
51246    2013/04: Added adjusted Fisher-Pearson skewness
51247    2014/12: Added Galton skewness
51248    2014/12: Added Pearson two skewness
51249
51250Program:
51251    skip 25
51252    read weibbury.dat y
51253    .
51254    let s1 = skewness y
51255    set skewness definition adjusted fisher pearson
51256    let s2 = skewness y
51257    let s3 = galton skewness y
51258    let s4 = pearson two skewness y
51259    .
51260    set write decimals 4
51261    print s1 s2 s3 s4
51262
51263-----SKEWNESS PLOT-----------------------------------------------
51264
51265SKEWNESS PLOT
51266
51267Name:
51268    SKEWNESS PLOT
51269
51270Type:
51271    Graphics Command
51272
51273Purpose:
51274    Generates a skewness plot.
51275
51276Description:
51277    A skewness plot is a plot consisting of subsample skewnesss versus
51278    subsample index.  The subsample skewness is the cube root of the
51279    standardized third central moment of the data in the subsample.
51280    The skewness plot is used to answer the question-- "Does the
51281    subsample skewness change over different subsamples?".  It consists
51282    of:
51283       Vertical   axis = subsample skewness;
51284       Horizontal axis = subsample index.
51285    The skewness plot yields 2 traces:
51286       1. a subsample skewness trace; and
51287       2. a full-sample skewness reference line.
51288    Like usual, the appearance of these 2 traces is
51289    controlled by the first 2 settings of the LINES,
51290    CHARACTERS, SPIKES, BARS, and similar attributes.
51291
51292Syntax:
51293    SKEWNESS PLOT   <y>   <x>    <SUBSET/EXCEPT/FOR qualification>
51294    where <y> is the response (= dependent) variable;
51295          <x> is the subsample identifier variable (this variable
51296              appears on the horizontal axis);
51297    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
51298
51299Examples:
51300    SKEWNESS PLOT Y X
51301    SKEWNESS PLOT Y X1
51302
51303Default:
51304    None
51305
51306Synonyms:
51307    None
51308
51309Related Commands:
51310    CHARACTERS              = Sets the type for plot char.
51311    LINES                   = Sets the type for plot lines.
51312    KURTOSIS PLOT           = Generates a kurtosis plot.
51313    VARIANCE PLOT           = Generates a variance plot.
51314    STANDARD DEVIATION PLOT = Generates a standard deviation plot.
51315    RANGE PLOT              = Generates a range plot
51316    MEAN PLOT               = Generates a mean plot.
51317    MEDIAN PLOT             = Generates a median plot.
51318    BOX PLOT                = Generates a box plot.
51319    S CHART                 = Generates a standard deviation
51320                              control chart.
51321    PLOT                    = Generates a data or function plot.
51322
51323Applications:
51324    Quality Control
51325
51326Implementation Date:
51327    88/2
51328
51329Program:
51330    SKIP 25
51331    READ GEAR.DAT Y X
51332    LINE BLANK DASH
51333    CHARACTER X BLANK
51334    XTIC OFFSET 0.2 0.2
51335    Y1LABEL SKEWNESS
51336    X1LABEL SAMPLE ID
51337    TITLE AUTOMATIC
51338    SKEWNESS PLOT Y X
51339
51340-----SKIP-------------------------------------------------------
51341
51342SKIP
51343
51344Name:
51345    SKIP
51346
51347Type:
51348    Support Command
51349
51350Purpose:
51351    Specifies the number of lines at the beginning of a file that
51352    should be skipped over during subsequent READ and SERIAL READ
51353    commands.
51354
51355Description:
51356    This gives the analyst a convenient method of skipping over
51357    non-data lines (consisting, for example, of descriptive text)
51358    which may exist at the beginning of a data file.
51359
51360Syntax 1:
51361    SKIP   <num>
51362    where <num> is an integer number or parameter that specifies the
51363              desired number of lines to be skipped during subsequent
51364              READs and SERIAL READs.
51365
51366Syntax 2:
51367    SKIP   AUTOMATIC
51368
51369    This syntax skips until a line beginning with "---" is
51370    found.  Note that most of the built-in Dataplot data files
51371    follow this convention.
51372
51373Examples:
51374    SKIP 10
51375    SKIP 3
51376    SKIP 0
51377    SKIP
51378
51379Note:
51380    SKIP with no arguments reverts the number of lines to be skipped
51381    to 0.
51382
51383Default:
51384    The default number of lines to be skipped is 0.
51385
51386Synonyms:
51387    SKIP <N> is identical in function to ROW LIMITS <N> INFINITY.
51388
51389Related Commands:
51390    READ         = Carries out a column-wise input of data.
51391    SERIAL READ  = Carries out a row-wise input of data.
51392    ROW LIMITS   = Specifies the start and stop row for subsequent
51393                   READ commands.
51394
51395Applications:
51396    Data Input
51397
51398Implementation Date:
51399    Pre-1987.  The SKIP AUTOMATIC option was added 1997/12.
51400
51401Program:
51402    SKIP 25
51403    READ BERGER1.DAT Y X
51404    FIT Y X
51405
51406-----SLACDF (LET)--------------------------------
51407
51408SLACDF
51409
51410Name:
51411    SLACDF (LET)
51412
51413Type:
51414    Library Function
51415
51416Purpose:
51417    Compute the slash cumulative distribution function.
51418
51419Description:
51420    The standard slash distribution has the following
51421    probability density function:
51422
51423       f(x) = (NORPDF(0) - NORPDF(X))/(X**2)      X <> 0
51424            = 0.5*NORPDF(0)                       X = 0
51425
51426    The slash cumulative distribution function is computed
51427    by numerically integrating the slash probability density
51428    function.
51429
51430    The most common use of the slash distribution is in
51431    simulation studies.  It is a useful distribution in this
51432    context because it has heavier tails than a normal distribution,
51433    but it is not as pathological as the Cauchy distribution.
51434
51435Syntax:
51436    LET <y> = SLACDF(<x>)      <SUBSET/EXCEPT/FOR qualification>
51437    where <x> is a variable, a number, or a parameter;
51438          <y> is a variable or a parameter (depending on what <x> is)
51439               where the computed slash cdf value is stored;
51440    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
51441
51442Examples:
51443    LET A = SLACDF(3)
51444    LET X2 = SLACDF(X1)
51445
51446Note:
51447    Dataplot uses the DQAGI routine from the Quadpack library
51448    to perform the numerical integration.
51449
51450Note:
51451    Library functions are distinguished from let subcommands
51452    in the following ways.
51453    1) Functions enclose the input value in parenthesis.  Let
51454       subcommands use spaces.
51455    2) Functions can accept (and return) either parameters
51456       (i.e., single values) or variables (i.e., an array of
51457       values) while let subcommands are specific in which they
51458       accept as input and what they return as output.
51459    3) Functions can accept expressions while let subcommands
51460       do not.  For example, the following is legal:
51461           LET Y2 = ABS(Y1-INT(Y1))
51462       For let subcommands, you typically have to do something
51463       like the following:
51464           LET YTEMP = Y**2 + 8
51465           LET A = SUM YTEMP
51466
51467Default:
51468    None
51469
51470Synonyms:
51471    None
51472
51473Related Commands:
51474    SLAPDF          = Compute the slash probability density function.
51475    SLAPPF          = Compute the slash percent point function.
51476    NORPDF          = Compute the normal probability density function.
51477    LOGPDF          = Compute the logistic probability density function.
51478    CAUPDF          = Compute the Cauchy probability density function.
51479    RANDOM NUMBERS  = Generate random numbers from 60+ univariate
51480                      distributions.
51481
51482Reference:
51483    "Continuous Univariate Distributions: Volume 1", 2nd. Ed.,
51484    Johnson, Kotz, and Balakrishnan, John Wiley, 1994,
51485    (page 63).
51486
51487Applications:
51488    Simulation
51489
51490Implementation Date:
51491    2004/1
51492
51493Program:
51494    TITLE SLASH CUMULATIVE DISTRIBUTION FUNCTION
51495    PLOT SLACDF(X)  FOR X = -10 0.01 10
51496
51497-----SLAPDF (LET)--------------------------------
51498
51499SLAPDF
51500
51501Name:
51502    SLAPDF (LET)
51503
51504Type:
51505    Library Function
51506
51507Purpose:
51508    Compute the slash probability density function.
51509
51510Description:
51511    The slash distribution has the following probability density
51512    function:
51513
51514       f(x) = (NORPDF(0) - NORPDF(X))/(X**2)      X <> 0
51515            = 0.5*NORPDF(0)                       X = 0
51516
51517    The most common use of the slash distribution is in
51518    simulation studies.  It is a useful distribution in this
51519    context because it has heavier tails than a normal distribution,
51520    but it is not as pathological as the Cauchy distribution.
51521
51522Syntax:
51523    LET <y> = SLAPDF(<x>)      <SUBSET/EXCEPT/FOR qualification>
51524    where <x> is a variable, a number, or a parameter;
51525          <y> is a variable or a parameter (depending on what <x> is)
51526               where the computed slash pdf value is stored;
51527    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
51528
51529Examples:
51530    LET A = SLAPDF(3)
51531    LET X2 = SLAPDF(X1)
51532
51533Note:
51534    You can generate random numbers from a slash distribution
51535    with the following command:
51536
51537        LET Y = SLASH RANDOM NUMBERS FOR I = 1 1 N
51538
51539Note:
51540    Library functions are distinguished from let subcommands
51541    in the following ways.
51542    1) Functions enclose the input value in parenthesis.  Let
51543       subcommands use spaces.
51544    2) Functions can accept (and return) either parameters
51545       (i.e., single values) or variables (i.e., an array of
51546       values) while let subcommands are specific in which they
51547       accept as input and what they return as output.
51548    3) Functions can accept expressions while let subcommands
51549       do not.  For example, the following is legal:
51550           LET Y2 = ABS(Y1-INT(Y1))
51551       For let subcommands, you typically have to do something
51552       like the following:
51553           LET YTEMP = Y**2 + 8
51554           LET A = SUM YTEMP
51555
51556Default:
51557    None
51558
51559Synonyms:
51560    None
51561
51562Related Commands:
51563    SLACDF          = Compute the slash cumulative distribution
51564                      function.
51565    SLAPPF          = Compute the slash percent point function.
51566    NORPDF          = Compute the normal probability density function.
51567    LOGPDF          = Compute the logistic probability density function.
51568    CAUPDF          = Compute the Cauchy probability density function.
51569    RANDOM NUMBERS  = Generate random numbers from 60+ univariate
51570                      distributions.
51571
51572Reference:
51573    "Continuous Univariate Distributions: Volume 1", 2nd. Ed.,
51574    Johnson, Kotz, and Balakrishnan, John Wiley, 1994,
51575    (page 63).
51576
51577Applications:
51578    Simulation
51579
51580Implementation Date:
51581    2003/3
51582
51583Program:
51584    TITLE SLASH PDF
51585    PLOT SLAPDF(X)  FOR X = -10 0.01 10
51586
51587-----SLAPPF (LET)--------------------------------
51588
51589SLAPPF
51590
51591Name:
51592    SLAPPF (LET)
51593
51594Type:
51595    Library Function
51596
51597Purpose:
51598    Compute the slash percent point function.
51599
51600Description:
51601    The standard slash distribution has the following
51602    probability density function:
51603
51604       f(x) = (NORPDF(0) - NORPDF(X))/(X**2)      X <> 0
51605            = 0.5*NORPDF(0)                       X = 0
51606
51607    The slash cumulative distribution function is computed
51608    by numerically integrating the slash probability density
51609    function.  The slash percent point function is computed
51610    by numerically inverting the slash cumulative distribution
51611    function.
51612
51613    The most common use of the slash distribution is in
51614    simulation studies.  It is a useful distribution in this
51615    context because it has heavier tails than a normal distribution,
51616    but it is not as pathological as the Cauchy distribution.
51617
51618Syntax:
51619    LET <y> = SLAPPF(<p>)      <SUBSET/EXCEPT/FOR qualification>
51620    where <p> is a variable, a number, or a parameter in the range
51621               [0,1];
51622          <y> is a variable or a parameter (depending on what <p> is)
51623               where the computed slash ppf value is stored;
51624    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
51625
51626Examples:
51627    LET A = SLAPPF(0.95)
51628    LET X2 = SLAPPF(P1)
51629
51630Note:
51631    Library functions are distinguished from let subcommands
51632    in the following ways.
51633    1) Functions enclose the input value in parenthesis.  Let
51634       subcommands use spaces.
51635    2) Functions can accept (and return) either parameters
51636       (i.e., single values) or variables (i.e., an array of
51637       values) while let subcommands are specific in which they
51638       accept as input and what they return as output.
51639    3) Functions can accept expressions while let subcommands
51640       do not.  For example, the following is legal:
51641           LET Y2 = ABS(Y1-INT(Y1))
51642       For let subcommands, you typically have to do something
51643       like the following:
51644           LET YTEMP = Y**2 + 8
51645           LET A = SUM YTEMP
51646
51647Default:
51648    None
51649
51650Synonyms:
51651    None
51652
51653Related Commands:
51654    SLACDF          = Compute the slash cumulative distribution
51655                      function.
51656    SLAPDF          = Compute the slash probability density function.
51657    NORPDF          = Compute the normal probability density function.
51658    LOGPDF          = Compute the logistic probability density function.
51659    CAUPDF          = Compute the Cauchy probability density function.
51660    RANDOM NUMBERS  = Generate random numbers from 60+ univariate
51661                      distributions.
51662
51663Reference:
51664    "Continuous Univariate Distributions: Volume 1", 2nd. Ed.,
51665    Johnson, Kotz, and Balakrishnan, John Wiley, 1994,
51666    (page 63).
51667
51668Applications:
51669    Simulation
51670
51671Implementation Date:
51672    2004/1
51673
51674Program:
51675    TITLE SLASH PERCENT POINT FUNCTION
51676    PLOT SLAPPF(P)  FOR P = 0.01 0.01 0.99
51677
51678-----SLEEP-------------------------------------------------------
51679
51680SLEEP
51681
51682Name:
51683    SLEEP
51684
51685Type:
51686    Support Command
51687
51688Purpose:
51689    This command pauses for a specified number of seconds.
51690
51691Description:
51692    The primary application of this command is to put a
51693    pause in a macro after a plot.  This allows you to view
51694    individual plots in a multi-plot macro without having to
51695    enter carriage returns as you would with the PAUSE command.
51696
51697    This is a system dependent command.  It is currently
51698    supported for Unix and Windows 95/98/NT.
51699
51700Syntax:
51701    SLEEP <n>
51702    where <n> specifies the number of seconds the pause will
51703              last.
51704
51705Examples:
51706    PLOT X**2 FOR X = 1 1 9
51707    SLEEP 5
51708
51709Default:
51710    None
51711
51712Synonyms:
51713    None
51714
51715Related Commands:
51716    SYSTEM        = Enter an operating system command within a
51717                    Dataplot session.
51718    CD            = Change the current directory
51719    PAUSE         = Wait for a carriage return before continuing.
51720
51721Applications:
51722    Interactive Usage
51723
51724Implementation Date:
51725    1997/9
51726
51727Program:
51728    PLOT X**2 FOR X = 1 1 9
51729    SLEEP 5
51730
51731-----SLOCDF (LET)--------------------------------
51732
51733SLOCDF
51734
51735Name:
51736    SLOCDF (LET)
51737
51738Type:
51739    Library Function
51740
51741Purpose:
51742    Compute the slope cumulative distribution function
51743    with shape parameter alpha.
51744
51745Description:
51746    The standard slope distribution has the following
51747    cumulative distribution function:
51748
51749       F(x;alpha) = alpha*x + (1-alpha)*x**2
51750                    0 <= x <= 1, 0 <= alpha <= 2
51751
51752    with alpha denoting the shape parameter.
51753
51754    This distribution can be extended with lower and upper
51755    bound parameters.  If a and b denote the lower and upper
51756    bounds, respectively, then the location and scale
51757    parameters are:
51758
51759        location = a
51760        scale    = b - a
51761
51762    The general form of the distribution can then be found
51763    by using the relation
51764
51765        F(x;alpha,a,b) = F((x-a)/(b-a);alpha,0,1)
51766
51767Syntax:
51768    LET <y> = SLOCDF(<x>,<alpha>,<a>,<b>)
51769              <SUBSET/EXCEPT/FOR qualification>
51770    where <x> is a number, parameter, or variable containing
51771              values in the interval (a,b);
51772          <y> is a variable or a parameter (depending on what
51773              <x> is) where the computed slope cdf value
51774              is stored;
51775          <alpha> is a positive number, parameter, or variable that
51776              specifies the shape parameter;
51777          <a> is a number, parameter, or variable that
51778              specifies the lower limit;
51779          <b> is a number, parameter, or variable that
51780              specifies the upper limit;
51781    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
51782
51783    If <a> and <b> are omitted, they default to 0 and 1,
51784    respectively.
51785
51786Examples:
51787    LET A = SLOCDF(0.3,0.2)
51788    LET Y = SLOCDF(X,0.5,0,5)
51789    PLOT SLOCDF(X,2,0,3) FOR X = 0  0.01  3
51790
51791Note:
51792    Library functions are distinguished from let subcommands
51793    in the following ways.
51794    1) Functions enclose the input value in parenthesis.  Let
51795       subcommands use spaces.
51796    2) Functions can accept (and return) either parameters
51797       (i.e., single values) or variables (i.e., an array of
51798       values) while let subcommands are specific in which they
51799       accept as input and what they return as output.
51800    3) Functions can accept expressions while let subcommands
51801       do not.  For example, the following is legal:
51802           LET Y2 = ABS(Y1-INT(Y1))
51803       For let subcommands, you typically have to do something
51804       like the following:
51805           LET YTEMP = Y**2 + 8
51806           LET A = SUM YTEMP
51807
51808Default:
51809    None
51810
51811Synonyms:
51812    None
51813
51814Related Commands:
51815    SLOPDF = Compute the slope probability density function.
51816    SLOPPF = Compute the slope percent point function.
51817    TSSPDF = Compute the two-sided slope probability density function.
51818    OGIPDF = Compute the ogive probability density function.
51819    TOPPDF = Compute the Topp and Leone probability density function.
51820    RGTPDF = Compute the generalized reflected slope
51821             probability density function.
51822    GTLPDF = Compute the generalized slope probability
51823             density function.
51824    TSPPDF = Compute the two-sided power probability density
51825             function.
51826    BETPDF = Compute the alpha probability density function.
51827    TRIPDF = Compute the triangular probability density function.
51828    TRAPDF = Compute the trapezoid probability density function.
51829    UNIPDF = Compute the uniform probability density function.
51830    POWPDF = Compute the power probability density function.
51831    JSBPDF = Compute the Johnson SB probability density function.
51832
51833Reference:
51834    Samuel Kotz and J. Rene Van Dorp 2004, "Beyond Alpha:
51835    Other Continuous Families of Distributions with Bounded
51836    Support and Applications", World Scientific, chapter 8.
51837
51838Applications:
51839    Distributional Modeling
51840
51841Implementation Date:
51842    2007/10
51843
51844Program:
51845    LABEL CASE ASIS
51846    TITLE CASE ASIS
51847    TITLE OFFSET 2
51848    .
51849    MULTIPLOT 2 2
51850    MULTIPLOT CORNER COORDINATES 0 0 100 95
51851    MULTIPLOT SCALE FACTOR 2
51852    .
51853    LET ALPHA  = 0.5
51854    TITLE Alpha = ^alpha
51855    PLOT SLOCDF(X,ALPHA) FOR X = 0  0.01  1
51856    .
51857    LET ALPHA  = 1
51858    TITLE Alpha = ^alpha
51859    PLOT SLOCDF(X,ALPHA) FOR X = 0  0.01  1
51860    .
51861    LET ALPHA  = 1.5
51862    TITLE Alpha = ^alpha
51863    PLOT SLOCDF(X,ALPHA) FOR X = 0  0.01  1
51864    .
51865    LET ALPHA  = 2
51866    TITLE Alpha = ^alpha
51867    PLOT SLOCDF(X,ALPHA) FOR X = 0  0.01  1
51868    .
51869    END OF MULTIPLOT
51870    .
51871    JUSTIFICATION CENTER
51872    MOVE 50 97
51873    TEXT Slope Cumulative Distribution Functions
51874
51875-----SLOPDF (LET)--------------------------------
51876
51877SLOPDF
51878
51879Name:
51880    SLOPDF (LET)
51881
51882Type:
51883    Library Function
51884
51885Purpose:
51886    Compute the slope probability density function
51887    with shape parameter alpha.
51888
51889Description:
51890    The standard slope distribution has the following
51891    probability density function:
51892
51893       f(x;alpha) = alpha + 2*(1-alpha)*x
51894                    0 <= x <= 1, 0 <= alpha <= 2
51895
51896    with alpha denoting the shape parameter.
51897
51898    This distribution can be extended with lower and upper
51899    bound parameters.  If a and b denote the lower and upper
51900    bounds, respectively, then the location and scale
51901    parameters are:
51902
51903        location = a
51904        scale    = b - a
51905
51906    The general form of the distribution can then be found
51907    by using the relation
51908
51909        f(x;alpha,a,b) = f((x-a)/(b-a);alpha,0,1)/(b-a)
51910
51911Syntax:
51912    LET <y> = SLOPDF(<x>,<alpha>,<a>,<b>)
51913              <SUBSET/EXCEPT/FOR qualification>
51914    where <x> is a number, parameter, or variable containing
51915              values in the interval (a,b);
51916          <y> is a variable or a parameter (depending on what
51917              <x> is) where the computed slope pdf value
51918              is stored;
51919          <alpha> is a positive number, parameter, or variable that
51920              specifies the shape parameter;
51921          <a> is a number, parameter, or variable that
51922              specifies the lower limit;
51923          <b> is a number, parameter, or variable that
51924              specifies the upper limit;
51925    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
51926
51927    If <a> and <b> are omitted, they default to 0 and 1,
51928    respectively.
51929
51930Examples:
51931    LET A = SLOPDF(0.3,0.2)
51932    LET Y = SLOPDF(X,0.5,0,5)
51933    PLOT SLOPDF(X,2,0,3) FOR X = 0  0.01  3
51934
51935Note:
51936    Slope random numbers, probability plots, and goodness of
51937    fit tests can be generated with the commands:
51938
51939       LET ALPHA = <value>
51940       LET A = <value>
51941       LET B = <value>
51942       LET Y = SLOPE RANDOM NUMBERS FOR I = 1 1 N
51943       SLOPE PROBABILITY PLOT Y
51944       SLOPE PROBABILITY PLOT Y2 X2
51945       SLOPE PROBABILITY PLOT Y3 XLOW XHIGH
51946       SLOPE KOLMOGOROV SMIRNOV GOODNESS OF FIT Y
51947       SLOPE CHI-SQUARE GOODNESS OF FIT Y2 X2
51948       SLOPE CHI-SQUARE GOODNESS OF FIT Y3 XLOW XHIGH
51949
51950    The following commands can be used to estimate the alpha
51951    shape parameter for the slope distribution:
51952
51953       LET ALPHA1 = <value>
51954       LET ALPHA2 = <value>
51955       SLOPE PPCC PLOT Y
51956       SLOPE PPCC PLOT Y2 X2
51957       SLOPE PPCC PLOT Y3 XLOW XHIGH
51958       SLOPE KS PLOT Y
51959       SLOPE KS PLOT Y2 X2
51960       SLOPE KS PLOT Y3 XLOW XHIGH
51961
51962    The default values for ALPHA1 and ALPHA2 are 0.05 and 2.
51963
51964    The probability plot can then be used to estimate the
51965    lower and upper limits (lower limit = PPA0,
51966    upper limit = PPA0 + PPA1).
51967
51968    For the ks plot, we can fix the location and scale.
51969    This is equivalent to assuming that the lower and
51970    upper limits are known (e.g., we could use the
51971    data minimum and maximum as the lower and upper
51972    limit values).  Given that the lower and upper
51973    limits are LOWLIM and UPPLIM, enter the commands
51974
51975         LET KSLOC   = LOWLIM
51976         LET KSSCALE = UPPLIM - LOWLIM
51977
51978    The ppcc plot is invariant to location and scale,
51979    so we cannot fix the lower and upper limits.
51980
51981    The BOOTSTRAP DISTRIBUTION command can be used to find
51982    uncertainty intervals for the ppcc plot and ks plot.
51983
51984Note:
51985    Library functions are distinguished from let subcommands
51986    in the following ways.
51987    1) Functions enclose the input value in parenthesis.  Let
51988       subcommands use spaces.
51989    2) Functions can accept (and return) either parameters
51990       (i.e., single values) or variables (i.e., an array of
51991       values) while let subcommands are specific in which they
51992       accept as input and what they return as output.
51993    3) Functions can accept expressions while let subcommands
51994       do not.  For example, the following is legal:
51995           LET Y2 = ABS(Y1-INT(Y1))
51996       For let subcommands, you typically have to do something
51997       like the following:
51998           LET YTEMP = Y**2 + 8
51999           LET A = SUM YTEMP
52000
52001Default:
52002    None
52003
52004Synonyms:
52005    None
52006
52007Related Commands:
52008    SLOCDF = Compute the slope cumulative distribution
52009             function.
52010    SLOPPF = Compute the slope percent point function.
52011    TSSPDF = Compute the two-sided slope probability density function.
52012    OGIPDF = Compute the ogive probability density function.
52013    TOPPDF = Compute the Topp and Leone probability density function.
52014    RGTPDF = Compute the generalized reflected slope
52015             probability density function.
52016    GTLPDF = Compute the generalized slope probability
52017             density function.
52018    TSPPDF = Compute the two-sided power probability density
52019             function.
52020    BETPDF = Compute the alpha probability density function.
52021    TRIPDF = Compute the triangular probability density function.
52022    TRAPDF = Compute the trapezoid probability density function.
52023    UNIPDF = Compute the uniform probability density function.
52024    POWPDF = Compute the power probability density function.
52025    JSBPDF = Compute the Johnson SB probability density function.
52026
52027Reference:
52028    Samuel Kotz and J. Rene Van Dorp 2004, "Beyond Alpha:
52029    Other Continuous Families of Distributions with Bounded
52030    Support and Applications", World Scientific, chapter 8.
52031
52032Applications:
52033    Distributional Modeling
52034
52035Implementation Date:
52036    2007/10
52037
52038Program 1:
52039    LABEL CASE ASIS
52040    TITLE CASE ASIS
52041    TITLE OFFSET 2
52042    .
52043    MULTIPLOT 2 2
52044    MULTIPLOT CORNER COORDINATES 0 0 100 95
52045    MULTIPLOT SCALE FACTOR 2
52046    .
52047    LET ALPHA  = 0.5
52048    TITLE Alpha = ^alpha
52049    PLOT SLOPDF(X,ALPHA) FOR X = 0  0.01  1
52050    .
52051    LET ALPHA  = 1
52052    TITLE Alpha = ^alpha
52053    PLOT SLOPDF(X,ALPHA) FOR X = 0  0.01  1
52054    .
52055    LET ALPHA  = 1.5
52056    TITLE Alpha = ^alpha
52057    PLOT SLOPDF(X,ALPHA) FOR X = 0  0.01  1
52058    .
52059    LET ALPHA  = 2
52060    TITLE Alpha = ^alpha
52061    PLOT SLOPDF(X,ALPHA) FOR X = 0  0.01  1
52062    .
52063    END OF MULTIPLOT
52064    .
52065    JUSTIFICATION CENTER
52066    MOVE 50 97
52067    TEXT Slope Probability Density Functions
52068
52069Program 2:
52070    let alpha = 1.2
52071    let y = slope rand numb for i = 1 1 200
52072    .
52073    let alphasav = alpha
52074    slope ppcc plot y
52075    just center
52076    move 50 5
52077    let alpha = shape
52078    text maxppcc = ^maxppcc, Alpha = ^alpha
52079    move 50 2
52080    text Alphasav = ^alphasav
52081    .
52082    char x
52083    line blank
52084    slope prob plot y
52085    move 50 5
52086    text PPA0 = ^ppa0, PPA1 = ^ppa1
52087    move 50 2
52088    let upplim = ppa0 + ppa1
52089    text Lower Limit = ^ppa0, Upper Limit = ^upplim
52090    char blank
52091    line solid
52092    .
52093    let ksloc = ppa0
52094    let ksscale = upplim
52095    slope kolm smir goodness of fit y
52096
52097-----SLOPE (LET)--------------------------------
52098
52099SLOPE
52100
52101Name:
52102    SLOPE (LET)
52103
52104Type:
52105    Library Function
52106
52107Purpose:
52108    Return the slope between two points.
52109
52110Description:
52111    Given two points, (X1,Y1) and (X2,Y2), the slope is defined as
52112
52113       m = (Y2-Y1)/(X2-X1)
52114
52115Syntax:
52116    LET <y> = SLOPE(<x1>,<y1>,<x2>,<y2>)
52117              <SUBSET/EXCEPT/FOR qualification>
52118    where <x1> is a variable or a parameter containing the x coordinates
52119               of the first point;
52120          <y1> is a variable or a parameter containing the y coordinates
52121               of the first point;
52122          <x2> is a variable or a parameter containing the x coordinates
52123               of the second point;
52124          <y2> is a variable or a parameter containing the y coordinates
52125               of the second point;
52126          <y> is a variable or a parameter (depending on what the input
52127               arguments are) where the computed slope values are stored;
52128    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
52129
52130Examples:
52131    LET A = SLOPE(0,0,10,15)
52132    LET A = SLOPE(X1,Y1,X2,Y2)
52133
52134Note:
52135    Library functions are distinguished from let subcommands
52136    in the following ways.
52137    1) Functions enclose the input value in parenthesis.  Let
52138       subcommands use spaces.
52139    2) Functions can accept (and return) either parameters
52140       (i.e., single values) or variables (i.e., an array of
52141       values) while let subcommands are specific in which they
52142       accept as input and what they return as output.
52143    3) Functions can accept expressions while let subcommands
52144       do not.  For example, the following is legal:
52145           LET Y2 = ABS(Y1-INT(Y1))
52146       For let subcommands, you typically have to do something
52147       like the following:
52148           LET YTEMP = Y**2 + 8
52149           LET A = SUM YTEMP
52150
52151Default:
52152    None
52153
52154Synonyms:
52155    None
52156
52157Related Commands:
52158    DPNTLINE           = Compute the perpindicular distance between a point
52159                         and a line defined by a point and a slope.
52160    POINTS IN POLYGON  = Determine whether points are in the interior
52161                         of a convex polygon.
52162    CONVEX HULL        = Determine the convex hull of a set of points.
52163    TRANSFORM POINTS   = Perform location, scale, and rotation
52164                         transformation for a set of points.
52165    EXTREME POINTS     = Determine the extreme points of a set of points.
52166    LINE INTERSECTIONS = Determine the intersection points for a set of
52167                         lines.
52168    PARALLEL LINE      = Determine the coordinates for a point that defines
52169                         a parallel line determined by a point and a line
52170                         defined by two points.
52171    PERPINDICULAR LINE = Determine the coordinates for a point that defines
52172                         a perpindicular line determined by a point and a
52173                         line defined by two points.
52174
52175Applications:
52176    Computational Geometry
52177
52178Implementation Date:
52179    2013/01
52180
52181Program:
52182    skip 25
52183    read convhull.dat x y
52184    .
52185    let y2 x2 = 2d convex hull y x
52186    let xtemp = x2(1)
52187    let ytemp = y2(1)
52188    let y2 = combine y2 ytemp
52189    let x2 = combine x2 xtemp
52190    let x3 = x2
52191    let y3 = y2
52192    let n = size y2
52193    let nm1 = n - 1
52194    retain x2 y2 for i = 1 1 nm1
52195    retain x3 y3 for i = 2 1 n
52196    let slope = slope(x2,y2,x3,y3)
52197    .
52198    set write decimals 4
52199    print x2 y2 x3 y3 slope
52200
52201-----SLOPPF (LET)--------------------------------
52202
52203SLOPPF
52204
52205Name:
52206    SLOPPF (LET)
52207
52208Type:
52209    Library Function
52210
52211Purpose:
52212    Compute the slope percent point function with shape
52213    parameter alpha.
52214
52215Description:
52216    The standard slope distribution has the following
52217    percent point function:
52218
52219       G(p;alpha) = p                                 alpha = 1
52220                  = {-alpha +
52221                    SQRT(alpha**2 + 4*p*(1-alpha))}/
52222                    (2*(1-alpha))                     alpha <> 1
52223
52224                    0 <= p <= 1, 0 <= alpha <= 2
52225
52226    with alpha denoting the shape parameter.
52227
52228    This distribution can be extended with lower and upper
52229    bound parameters.  If a and b denote the lower and upper
52230    bounds, respectively, then the location and scale
52231    parameters are:
52232
52233        location = a
52234        scale    = b - a
52235
52236    The general form of the distribution can then be found
52237    by using the relation
52238
52239        G(p;alpha,a,b) = a + (b-a)*G(p;alpha,0,1)
52240
52241Syntax:
52242    LET <y> = SLOPPF(<p>,<alpha>,<a>,<b>)
52243              <SUBSET/EXCEPT/FOR qualification>
52244    where <p> is a number, parameter, or variable containing
52245              values in the interval (0,1);
52246          <y> is a variable or a parameter (depending on what
52247              <p> is) where the computed slope ppf value
52248              is stored;
52249          <alpha> is a positive number, parameter, or variable that
52250              specifies the shape parameter;
52251          <a> is a number, parameter, or variable that
52252              specifies the lower limit;
52253          <b> is a number, parameter, or variable that
52254              specifies the upper limit;
52255    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
52256
52257    If <a> and <b> are omitted, they default to 0 and 1,
52258    respectively.
52259
52260Examples:
52261    LET A = SLOPPF(0.95,0.2)
52262    LET Y = SLOPPF(X,0.5,0,5)
52263    PLOT SLOPPF(P,2,0,3) FOR P = 0  0.01  1
52264
52265Note:
52266    Library functions are distinguished from let subcommands
52267    in the following ways.
52268    1) Functions enclose the input value in parenthesis.  Let
52269       subcommands use spaces.
52270    2) Functions can accept (and return) either parameters
52271       (i.e., single values) or variables (i.e., an array of
52272       values) while let subcommands are specific in which they
52273       accept as input and what they return as output.
52274    3) Functions can accept expressions while let subcommands
52275       do not.  For example, the following is legal:
52276           LET Y2 = ABS(Y1-INT(Y1))
52277       For let subcommands, you typically have to do something
52278       like the following:
52279           LET YTEMP = Y**2 + 8
52280           LET A = SUM YTEMP
52281
52282Default:
52283    None
52284
52285Synonyms:
52286    None
52287
52288Related Commands:
52289    SLOCDF = Compute the slope cumulative distribution function.
52290    SLOPDF = Compute the slope probability density function.
52291    TSSPDF = Compute the two-sided slope probability density function.
52292    OGIPDF = Compute the ogive probability density function.
52293    TOPPDF = Compute the Topp and Leone probability density function.
52294    RGTPDF = Compute the generalized reflected slope
52295             probability density function.
52296    GTLPDF = Compute the generalized slope probability
52297             density function.
52298    TSPPDF = Compute the two-sided power probability density
52299             function.
52300    BETPDF = Compute the alpha probability density function.
52301    TRIPDF = Compute the triangular probability density function.
52302    TRAPDF = Compute the trapezoid probability density function.
52303    UNIPDF = Compute the uniform probability density function.
52304    POWPDF = Compute the power probability density function.
52305    JSBPDF = Compute the Johnson SB probability density function.
52306
52307Reference:
52308    Samuel Kotz and J. Rene Van Dorp 2004, "Beyond Alpha:
52309    Other Continuous Families of Distributions with Bounded
52310    Support and Applications", World Scientific, chapter 8.
52311
52312Applications:
52313    Distributional Modeling
52314
52315Implementation Date:
52316    2007/10
52317
52318Program:
52319    LABEL CASE ASIS
52320    TITLE CASE ASIS
52321    TITLE OFFSET 2
52322    .
52323    MULTIPLOT 2 2
52324    MULTIPLOT CORNER COORDINATES 0 0 100 95
52325    MULTIPLOT SCALE FACTOR 2
52326    .
52327    LET ALPHA  = 0.5
52328    TITLE Alpha = ^alpha
52329    PLOT SLOPPF(P,ALPHA) FOR P = 0  0.01  1
52330    .
52331    LET ALPHA  = 1
52332    TITLE Alpha = ^alpha
52333    PLOT SLOPPF(P,ALPHA) FOR P = 0  0.01  1
52334    .
52335    LET ALPHA  = 1.5
52336    TITLE Alpha = ^alpha
52337    PLOT SLOPPF(P,ALPHA) FOR P = 0  0.01  1
52338    .
52339    LET ALPHA  = 2
52340    TITLE Alpha = ^alpha
52341    PLOT SLOPPF(P,ALPHA) FOR P = 0  0.01  1
52342    .
52343    END OF MULTIPLOT
52344    .
52345    JUSTIFICATION CENTER
52346    MOVE 50 97
52347    TEXT Slope Percent Point Functions
52348
52349-----SMALLEST (LET)-------------------------------------
52350
52351SMALLEST
52352
52353Name:
52354    SMALLEST (LET)
52355
52356Type:
52357    Let Subcommand
52358
52359Purpose:
52360    Extract the smallest elements of a variable.
52361
52362Description:
52363    This is a generalization of the MINIMUM command.  However, instead of
52364    returning the single smallest value, it returns the user specified
52365    number of smallest values.
52366
52367    The values will be returned in sorted order.  If the requested number
52368    of smallest values is less than 1, then an error will be returned.  If
52369    the requested number of smallest values is greater than the number of
52370    observations in the response variable, then the full response variable
52371    will be returned in sorted order.
52372
52373Syntax:
52374    LET <y> = SMALLEST <x>  <nval>    <SUBSET/EXCEPT/FOR>
52375    where <x> is a response variable;
52376          <nval> is a number or parameter that specifies how
52377              many values to extract;
52378          <y> is a variable that contains the smallest values.
52379    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
52380
52381Examples:
52382    LET NVAL = 3
52383    LET Y = SMALLEST X NVAL
52384
52385    LET Y = SMALLEST X 3
52386    LET Y = SMALLEST X 5
52387    LET Y = SMALLEST X 5  FOR I = 1 1 500
52388
52389Default:
52390    None
52391
52392Synonyms:
52393    None
52394
52395Related Commands:
52396    LARGEST            = Return the largest values in a variable.
52397    MAXIMUM            = Return the maximum value of a variable.
52398    MINIMUM            = Return the minimum value of a variable.
52399
52400Applications:
52401    Data Transformation
52402
52403Implementation Date:
52404    2018/10
52405
52406Program:
52407    let y = normal random numbers for i = 1 1 100
52408    let nval = 5
52409    let yout = smallest y nval
52410    set write decimals 3
52411    print yout
52412
52413-----SMOOTH-------------------------------------------------------
52414
52415SMOOTH
52416
52417Name:
52418    ... SMOOTH
52419
52420Type:
52421    Analysis Command
52422
52423Purpose:
52424    Carries out
52425       1) least squares smoothing;
52426       2) moving average type smoothing;
52427       2) robust smoothing.
52428
52429Description:
52430    These are data analysis techniques for producing a "smooth" set of
52431    values from a time series which has been contaminated with noise.
52432    For least squares smoothing, the analyst can specify the
52433       1) degree (default = 1); and
52434       2) width  (default = 3)
52435    of the smoothing function.  Any smoothing function from degree 0 to
52436    degree 5 may be used (moving average smoothing is mathematically
52437    equivalent to both degree 0 and degree 1 smoothing).  To specify
52438    the desired degree, the POLYNOMIAL DEGREE command should be used
52439    prior to the SMOOTH command.  Alternatively (and more commonly) the
52440    desired degree can be specified as the first word of the SMOOTH
52441    command.  Thus
52442       POLYNOMIAL DEGREE 3
52443       SMOOTH Y
52444    can be shortened to
52445       CUBIC SMOOTH Y
52446    To specify the width of the least squares smoothing function, the
52447    FILTER WIDTH command should be used prior to the SMOOTH command.
52448    The filter width must be odd.  For robust smoothing, the 3RSR
52449    smoother (developed by John Tukey) is used.  For the 3RSR smoother,
52450    the filter width is always 3 (and so the FILTER WIDTH command is
52451    not needed).  The 3RSR smoother involves 4 steps:
52452       1) computes 3-term moving medians;
52453       2) computes 3-term medians of the 3-term medians repeatedly
52454          until no change;
52455       3) applies a "splitting" process;
52456       4) repeats the splitting process until no change.
52457    See the Tukey book for complete details of the robust smoothing.
52458
52459Syntax 1:
52460    <d>   SMOOTH   <y>     <SUBSET/EXCEPT/FOR qualification>
52461    where <d> is the specification of the desired degree:
52462              CONSTANT  or ZERO-DEGREE
52463              LINEAR    or FIRST-DEGREE
52464              QUADRATIC or SECOND-DEGREE
52465              CUBIC     or THIRD-DEGREE
52466              QUARTIC   or FOURTH-DEGREE
52467              QUINTIC   or FIFTH-DEGREE
52468          <y> is the variable under analysis;
52469    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
52470
52471Syntax 2:
52472    ROBUST SMOOTH   <y>     <SUBSET/EXCEPT/FOR qualification>
52473          <y> is the variable under analysis;
52474    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
52475
52476Syntax 3:
52477    <stat>   SMOOTH   <y>     <SUBSET/EXCEPT/FOR qualification>
52478    where <stat> is the specification of the type of smoothing:
52479              MOVING AVERAGE
52480              MOVING MEDIAN
52481              MOVING MIDMEAN
52482              MOVING MIDRANGE
52483              MOVING UPPER QUARTILE
52484              MOVING LOWER QUARTILE
52485              MOVING MAXIMUM
52486              MOVING MINIMUM
52487              MOVING TRIANGLE
52488              MOVING HAMMING;
52489          <y> is the variable under analysis;
52490    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
52491
52492Examples:
52493    LINEAR SMOOTH Y
52494    QUADRATIC SMOOTH TEMP
52495    CUBIC SMOOTH V
52496    ROBUST SMOOTH CONC
52497    MOVING MEDIAN SMOOTH Y
52498
52499Note:
52500    The smoothed values are stored in the internal variable PRED.  The
52501    internal variable RES contains the difference between the observed
52502    values (i.e., the raw data) and the smoothed values.
52503
52504Note:
52505    See the sources under the REFERENCE section for the mathematical
52506    details of the various type of smoothing operations.
52507
52508Note:
52509    The least squares SMOOTH command assumes equispaced data.  The
52510    LOWESS SMOOTH command performs locally weighted least squares
52511    smoothing and can be used for non-equispaced data.
52512
52513Default:
52514    For least squares smoothing, the default is degree 1 and filter
52515    width 3 (that is, moving average smoothing of width 3).
52516
52517Synonyms:
52518    MOVING AVERAGE SMOOTH is identical to LINEAR SMOOTH.
52519
52520Related Commands:
52521    POLYNOMIAL DEGREE  = Sets the degree for least squares smoothing.
52522    FILTER WIDTH       = Sets the filter width for least squares
52523                         smoothing.
52524    LOWESS SMOOTH      = Carries out a locally weighted least squares
52525                         smoothing.
52526    FIT                = Carries out a least squares fit.
52527
52528References:
52529    "Introduction to Numerical Analysis", F. B. Hildebrand, Dover
52530    Press, (pp. 295-302, especially 301).
52531
52532    "A First Course in Numerical Analysis", Anthony Ralston,
52533    (pp. 250-254).
52534
52535    "Smoothing and Differentiation of Data by Simplified Least Squares
52536    Procedures", A. Savitsky M. J. E. Golay, Analytical Chemistry,
52537    July, 1964, (pp. 1627-1639).
52538
52539    "Exploratory Data Analysis", John Tukey, Addison-Wesley, 1977.
52540
52541Applications:
52542    XX
52543
52544Implementation Date:
52545    XX
52546
52547Program:
52548    SKIP 25
52549    READ MAVRO.DAT Y
52550    LET N = SIZE Y
52551    LET X = SEQUENCE 1 1 N
52552    .
52553    MULTIPLOT 2 2; MULTIPLOT CORNER COORDINATES 0 0 100 100
52554    TITLE AUTOMATIC
52555    CHARACTER SIZE 1.2
52556    CHAR X BLANK
52557    LINES BLANK SOLID
52558    PLOT Y
52559    TITLE LEAST SQUARES CUBIC SMOOTH
52560    CAPTURE SMOOTH_OUT.DAT
52561    CUBIC SMOOTH Y
52562    PLOT Y PRED VS X
52563    ROBUST SMOOTH Y
52564    TITLE ROBUST SMOOTH
52565    PLOT Y PRED VS X
52566    MOVING MEDIAN SMOOTH Y
52567    END OF CAPTURE
52568    TITLE MOVING MEDIAN SMOOTH
52569    PLOT Y PRED VS X
52570    END OF MULTIPLOT
52571
52572-----SN (LET)----------------------------------------------
52573
52574SN
52575
52576Name:
52577    SN (LET)
52578
52579Type:
52580    Library Function
52581
52582Purpose:
52583    Compute the Jacobi elliptic function sn.
52584
52585Description:
52586    The Jacobi elliptic function sn is defined as:
52587        sn(u,k)=SIN(phi)
52588    where phi is the amplitude and is defined as:
52589        u = INTEGRAL(1./SQRT(1-k*sin(theta)*sin(theta)))dtheta
52590    where INTEGRAL is the integral from 0 to phi.
52591
52592    The algorithm DATAPLOT uses takes MC=1-k**2 as its second
52593    argument rather than k.  Be aware that other routines take k**2
52594    as the second argument (e.g., IMSL, NAG, and mathematica).  If
52595    you want to use k**2, enter something like the following:
52596        LET K2 = <value>
52597        LET MC = 1 - K2
52598
52599Syntax:
52600    LET <a> = SN(<u>,<mc>)  <SUBSET/EXCEPT/FOR qualification>
52601    where <u> is a number, parameter, or variable;
52602          <mc> is a number, parameter, or variable;
52603          <a> is a variable or a parameter (depending on what <u>
52604               and <mc> are) where the computed values are stored;
52605    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
52606
52607Examples:
52608    LET A = SN(2,1)
52609    LET A = SN(X,0.5)
52610    LET X2 = SN(9,0)
52611
52612Note:
52613    The Jacobi elliptic functions are computed using a Fortran
52614    translation of the Algol-60 procedure given by Bulirsch (see the
52615    REFERENCE section below).
52616
52617Note:
52618    DATAPLOT computes the Jacobi elliptic functions sn, cn, and dn.
52619    An additional 9 functions can be computed from these:
52620        cd(u,k) = cn(u,k)/dn(u,k)
52621        sd(u,k) = sn(u,k)/dn(u,k)
52622        nd(u,k) = 1/dn(u,k)
52623        dc(u,k) = dn(u,k)/cn(u,k)
52624        nc(u,k) = 1/cn(u,k)
52625        sc(u,k) = sn(u,k)/cn(u,k)
52626        ns(u,k) = 1/sn(u,k)
52627        ds(u,k) = dn(u,k)/sn(u,k)
52628        cs(u,k) = cn(u,k)/sn(u,k)
52629
52630Note:
52631    Library functions are distinguished from let subcommands
52632    in the following ways.
52633    1) Functions enclose the input value in parenthesis.  Let
52634       subcommands use spaces.
52635    2) Functions can accept (and return) either parameters
52636       (i.e., single values) or variables (i.e., an array of
52637       values) while let subcommands are specific in which they
52638       accept as input and what they return as output.
52639    3) Functions can accept expressions while let subcommands
52640       do not.  For example, the following is legal:
52641           LET Y2 = ABS(Y1-INT(Y1))
52642       For let subcommands, you typically have to do something
52643       like the following:
52644           LET YTEMP = Y**2 + 8
52645           LET A = SUM YTEMP
52646
52647Default:
52648    None
52649
52650Synonyms:
52651    None
52652
52653Related Commands:
52654    CN      = Compute the Jacobi elliptic function cn.
52655    DN      = Compute the Jacobi elliptic function dn.
52656    PEQ     = Compute the real component of the Weirstrass elliptic
52657              function (equianharmonic case).
52658    PEQI    = Compute the complex component of the Weirstrass elliptic
52659              function (equianharmonic case).
52660    PLEM    = Compute the real component of the Weirstrass elliptic
52661              function (lemniscatic case).
52662    PLEMI   = Compute the complex component of the Weirstrass elliptic
52663              function (lemniscatic case).
52664    RC      = Compute the Carlson degenerate elliptic integral.
52665    RF      = Compute the Carlson elliptic integral of the first kind.
52666    RD      = Compute the Carlson elliptic integral of the second kind.
52667    RJ      = Compute the Carlson elliptic integral of the third kind.
52668    ELLIPC1 = Compute the Legendre complete elliptic integral of the
52669              first kind.
52670    ELLIPC2 = Compute the Legendre complete elliptic integral of the
52671              second kind.
52672    ELLIP1  = Compute the Legendre elliptic integral of the first
52673              kind.
52674    ELLIP2  = Compute the Legendre elliptic integral of the second
52675              kind.
52676    ELLIP3  = Compute the Legendre's elliptic integral of the third
52677              kind.
52678
52679Reference:
52680    "Numerical Calculation of Elliptic Integrals and Elliptic
52681    Functions", Bulirsch, Numerische Mathematik, vol. 7, 1965
52682    (pp. 78-90).
52683
52684    "Handbook of Mathematical Functions, Applied Mathematics Series,
52685    Vol. 55", Abramowitz and Stegun, National Bureau of Standards,
52686    1964 (chapter 16).
52687
52688Applications:
52689    Special Functions
52690
52691Implementation Date:
52692    94/11
52693
52694Program:
52695    TITLE JACOBI ELLIPTIC FUNCTIONS
52696    LET MC = 0.5
52697    LINE SOLID DASH DOT
52698    PLOT SN(X,MC) FOR X = -10 0.1 10 AND
52699    PLOT CN(X,MC) FOR X = -10 0.1 10 AND
52700    PLOT DN(X,MC) FOR X = -10 0.1 10
52701
52702-----SNCDF (LET)--------------------------------
52703
52704SNCDF
52705
52706Name:
52707    SNCDF (LET)
52708
52709Type:
52710    Library Function
52711
52712Purpose:
52713    Compute the skew-normal cumulative distribution function.
52714
52715Description:
52716    The skew-normal distribution has the following probability density
52717    function:
52718
52719       f(x,lambda)=2*NORCDF(lambda*x)*NORPDF(x)
52720                                     -infinity < x, lambda < infinity
52721
52722    For lambda = 0, the skew-normal reduces to a normal distribution.
52723    As lambda goes to infinity, the skew-normal tends to the
52724    half-normal distribution.
52725
52726    The cumulative distribution function is computed by numerically
52727    integrating the skew-normal density function.
52728
52729    The standard skew-normal distribution can be generalized with
52730    location and scale parameters.
52731
52732Syntax:
52733    LET <y> = SNCDF(<x>,<lambda>,<loc>,<scale>)
52734                                <SUBSET/EXCEPT/FOR qualification>
52735    where <x> is a variable or a parameter;
52736          <lambda> is a number of parameter that specifies the
52737              value of the shape parameter;
52738          <loc> is an optional number or parameter that specifies the
52739              value of the location parameter;
52740          <scale> is an optional positive number or parameter that
52741              specifies the value of the scale parameter;
52742          <y> is a variable or a parameter (depending on what <x> is)
52743               where the computed skew-normal cdf value is stored;
52744    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
52745
52746Examples:
52747    LET A = SNCDF(3,1)
52748    LET A = SNCDF(A1,LAMBDA)
52749    LET X2 = SNCDF(X1,0.5)
52750
52751Note:
52752    Dataplot uses the DQAGI subroutine of Piessens and De Doncker
52753    from the Quadpack library of integration routines.
52754
52755Note:
52756    Library functions are distinguished from let subcommands
52757    in the following ways.
52758    1) Functions enclose the input value in parenthesis.  Let
52759       subcommands use spaces.
52760    2) Functions can accept (and return) either parameters
52761       (i.e., single values) or variables (i.e., an array of
52762       values) while let subcommands are specific in which they
52763       accept as input and what they return as output.
52764    3) Functions can accept expressions while let subcommands
52765       do not.  For example, the following is legal:
52766           LET Y2 = ABS(Y1-INT(Y1))
52767       For let subcommands, you typically have to do something
52768       like the following:
52769           LET YTEMP = Y**2 + 8
52770           LET A = SUM YTEMP
52771
52772Default:
52773    None
52774
52775Synonyms:
52776    None
52777
52778Related Commands:
52779    SNPDF  = Compute the skew-normal probability density function.
52780    SNPPF  = Compute the skew-normal percent point function.
52781    NORPDF = Compute the normal density function.
52782    CHIPDF = Compute the chi probability density function.
52783    CHSPDF = Compute the chi-square probability density function.
52784    WEIPDF = Compute the Weibull probability density function.
52785
52786Reference:
52787    "A Class of Distributions Which Includes the Normal Ones",
52788    Azzalini, Scandinavian Journal of Statistics, 12, 171-178.
52789
52790    "Continuous Univariate Distributions: Volume I", Second Edition,
52791    Johnson, Kotz, and Balakrishnan, Wiley, 1994, p. 454.
52792
52793Applications:
52794    Distributional Analysis, Bayesian Analysis
52795
52796Implementation Date:
52797    1/2004
52798
52799Program:
52800    MULTIPLOT 2 2
52801    MULTIPLOT CORNER COORDINATES 0 0 100 100
52802    TITLE SKEW-NORMAL: LAMBDA = 0
52803    PLOT SNCDF(X,0) FOR X = -5 0.1 5
52804    TITLE SKEW-NORMAL: LAMBDA = 1
52805    PLOT SNCDF(X,1) FOR X = -5 0.1 5
52806    TITLE SKEW-NORMAL: LAMBDA = 5
52807    PLOT SNCDF(X,5) FOR X = -5 0.1 5
52808    TITLE SKEW-NORMAL: LAMBDA = 10
52809    PLOT SNCDF(X,10) FOR X = -5 0.1 5
52810    END OF MULTIPLOT
52811
52812-----SNPDF (LET)--------------------------------
52813
52814SNPDF
52815
52816Name:
52817    SNPDF (LET)
52818
52819Type:
52820    Library Function
52821
52822Purpose:
52823    Compute the skew-normal probability density function.
52824
52825Description:
52826    The skew-normal distribution has the following probability density
52827    function:
52828
52829       f(x,lambda)=2*NORCDF(lambda*x)*NORPDF(x)
52830                                     -infinity < x, lambda < infinity
52831
52832    For lambda = 0, the skew-normal reduces to a normal distribution.
52833    As lambda goes to infinity, the skew-normal tends to the
52834    half-normal distribution.
52835
52836    The standard skew-normal distribution can be generalized with
52837    location and scale parameters.
52838
52839Syntax:
52840    LET <y> = SNPDF(<x>,<lambda>,<loc>,<scale>)
52841                                <SUBSET/EXCEPT/FOR qualification>
52842    where <x> is a variable or a parameter;
52843          <lambda> is a number of parameter that specifies the
52844              value of the shape parameter;
52845          <loc> is an optional number or parameter that specifies the
52846              value of the location parameter;
52847          <scale> is an optional positive number or parameter that
52848              specifies the value of the scale parameter;
52849          <y> is a variable or a parameter (depending on what <x> is)
52850               where the computed skew-normal pdf value is stored;
52851    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
52852
52853Examples:
52854    LET A = SNPDF(3,1)
52855    LET A = SNPDF(A1,LAMBDA)
52856    LET X2 = SNPDF(X1,0.5)
52857
52858Note:
52859    Library functions are distinguished from let subcommands
52860    in the following ways.
52861    1) Functions enclose the input value in parenthesis.  Let
52862       subcommands use spaces.
52863    2) Functions can accept (and return) either parameters
52864       (i.e., single values) or variables (i.e., an array of
52865       values) while let subcommands are specific in which they
52866       accept as input and what they return as output.
52867    3) Functions can accept expressions while let subcommands
52868       do not.  For example, the following is legal:
52869           LET Y2 = ABS(Y1-INT(Y1))
52870       For let subcommands, you typically have to do something
52871       like the following:
52872           LET YTEMP = Y**2 + 8
52873           LET A = SUM YTEMP
52874
52875Default:
52876    None
52877
52878Synonyms:
52879    None
52880
52881Related Commands:
52882    SNCDF  = Compute the skew-normal cumulative distribution function.
52883    SNPPF  = Compute the skew-normal percent point function.
52884    NORPDF = Compute the normal density function.
52885    CHIPDF = Compute the chi probability density function.
52886    CHSPDF = Compute the chi-square probability density function.
52887    WEIPDF = Compute the Weibull probability density function.
52888
52889Reference:
52890    "A Class of Distributions Which Includes the Normal Ones",
52891    Azzalini, Scandinavian Journal of Statistics, 12, 171-178.
52892
52893    "Continuous Univariate Distributions: Volume I", Second Edition,
52894    Johnson, Kotz, and Balakrishnan, Wiley, 1994, p. 454.
52895
52896Applications:
52897    Distributional Analysis, Bayesian Analysis
52898
52899Implementation Date:
52900    1/2004
52901
52902Program:
52903    MULTIPLOT 2 2
52904    MULTIPLOT CORNER COORDINATES 0 0 100 100
52905    TITLE SKEW-NORMAL: LAMBDA = 0
52906    PLOT SNPDF(X,0) FOR X = -5 0.1 5
52907    TITLE SKEW-NORMAL: LAMBDA = 1
52908    PLOT SNPDF(X,1) FOR X = -5 0.1 5
52909    TITLE SKEW-NORMAL: LAMBDA = 5
52910    PLOT SNPDF(X,5) FOR X = -5 0.1 5
52911    TITLE SKEW-NORMAL: LAMBDA = 10
52912    PLOT SNPDF(X,10) FOR X = -5 0.1 5
52913    END OF MULTIPLOT
52914
52915-----SNPPF (LET)--------------------------------
52916
52917SNPPF
52918
52919Name:
52920    SNPPF (LET)
52921
52922Type:
52923    Library Function
52924
52925Purpose:
52926    Compute the skew-normal percent point function.
52927
52928Description:
52929    The skew-normal distribution has the following probability density
52930    function:
52931
52932       f(x,lambda)=2*NORCDF(lambda*x)*NORPDF(x)
52933                                     -infinity < x, lambda < infinity
52934
52935    For lambda = 0, the skew-normal reduces to a normal distribution.
52936    As lambda goes to infinity, the skew-normal tends to the
52937    half-normal distribution.
52938
52939    The skew-normal percent point function is computed by numerically
52940    inverting the skew-normal cumulative distribution function (which
52941    in turn is computed by numerically integrating the skew-normal
52942    density function).
52943
52944    The standard skew-normal distribution can be generalized with
52945    location and scale parameters.
52946
52947Syntax:
52948    LET <y> = SNPPF(<p>,<lambda>,<loc>,<scale>)
52949                                <SUBSET/EXCEPT/FOR qualification>
52950    where <p> is a variable or a parameter in the range (0,1);
52951          <lambda> is a number of parameter that specifies the
52952              value of the shape parameter;
52953          <loc> is an optional number or parameter that specifies the
52954              value of the location parameter;
52955          <scale> is an optional positive number or parameter that
52956              specifies the value of the scale parameter;
52957          <y> is a variable or a parameter (depending on what <x> is)
52958               where the computed skew-normal ppf value is stored;
52959    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
52960
52961Examples:
52962    LET A = SNPPF(0.95,1)
52963    LET A = SNPPF(A1,LAMBDA)
52964    LET X = SNPPF(P1,0.5)
52965
52966Note:
52967    Library functions are distinguished from let subcommands
52968    in the following ways.
52969    1) Functions enclose the input value in parenthesis.  Let
52970       subcommands use spaces.
52971    2) Functions can accept (and return) either parameters
52972       (i.e., single values) or variables (i.e., an array of
52973       values) while let subcommands are specific in which they
52974       accept as input and what they return as output.
52975    3) Functions can accept expressions while let subcommands
52976       do not.  For example, the following is legal:
52977           LET Y2 = ABS(Y1-INT(Y1))
52978       For let subcommands, you typically have to do something
52979       like the following:
52980           LET YTEMP = Y**2 + 8
52981           LET A = SUM YTEMP
52982
52983Default:
52984    None
52985
52986Synonyms:
52987    None
52988
52989Related Commands:
52990    SNCDF  = Compute the skew-normal cumulative distribution function.
52991    SNPDF  = Compute the skew-normal probability density function.
52992    NORPDF = Compute the normal density function.
52993    CHIPDF = Compute the chi probability density function.
52994    CHSPDF = Compute the chi-square probability density function.
52995    WEIPDF = Compute the Weibull probability density function.
52996
52997Reference:
52998    "A Class of Distributions Which Includes the Normal Ones",
52999    Azzalini, Scandinavian Journal of Statistics, 12, 171-178.
53000
53001    "Continuous Univariate Distributions: Volume I", Second Edition,
53002    Johnson, Kotz, and Balakrishnan, Wiley, 1994, p. 454.
53003
53004Applications:
53005    Distributional Analysis, Bayesian Analysis
53006
53007Implementation Date:
53008    1/2004
53009
53010Program:
53011    MULTIPLOT 2 2
53012    MULTIPLOT CORNER COORDINATES 0 0 100 100
53013    TITLE SKEW-NORMAL: LAMBDA = 0
53014    PLOT SNPPF(P,0) FOR P = 0.01 0.01 0.99
53015    TITLE SKEW-NORMAL: LAMBDA = 1
53016    PLOT SNPPF(P,1) FOR P = 0.01 0.01 0.99
53017    TITLE SKEW-NORMAL: LAMBDA = 5
53018    PLOT SNPPF(P,5) FOR P = 0.01 0.01 0.99
53019    TITLE SKEW-NORMAL: LAMBDA = 10
53020    PLOT SNPPF(P,10) FOR P = 0.01 0.01 0.99
53021    END OF MULTIPLOT
53022
53023-----SN SCALE (LET)-------------------------------
53024
53025SN SCALE
53026
53027Name:
53028    SN SCALE (LET)
53029
53030Type:
53031    Let Subcommand
53032
53033Purpose:
53034    Compute the Sn scale estimate for a variable.
53035
53036Description:
53037    Mosteller and Tukey (see Reference section below) define
53038    two types of robustness:
53039
53040      1) resistance means that changing a small part, even by a
53041         large amount, of the data does not cause a large change
53042         in the estimate
53043
53044      2) robustness of efficiency means that the statistic has
53045         high efficiency in a variety of situations rather than
53046         in any one situation.  Efficiency means that the estimate
53047         is close to optimal estimate given that we know what
53048         distribution that the data comes from.  A useful measure
53049         of efficiency is:
53050
53051              Efficiency = (lowest variance feasible)/
53052                           (actual variance)
53053
53054    Many statistics have one of these properties.  However,
53055    it can be difficult to find statistics that are both
53056    resistant and have robustness of efficiency.
53057
53058    The most common estimate of scale, the standard deviation,
53059    is the most efficient estimate of scale if the data come from
53060    a normal distribution.  However, the standard deviation is
53061    not robust in the sense that changing even one value can
53062    dramatically change the computed value of the standard deviation
53063    (i.e., poor resistance).  In addition, it does not have
53064    robustness of efficiency for non-normal data.
53065
53066    The median absolute deviation (MAD) and interquartile range are
53067    the two most commonly used robust alternatives to the standard
53068    deviation.  The MAD in particular is a very robust scale
53069    estimator.  However, the MAD has the following limitations:
53070
53071       1) It does not have particularly high efficiency for
53072          data that is in fact normal (37%).  In comparison, the
53073          median has 64% efficiency for normal data.
53074
53075       2) The MAD statistic also has an implicit assumption of
53076          symmetry.  That is, it measures the distance from a
53077          measure of central location (the median).
53078
53079    Rousseeuw and Croux proposed the Sn estimate of scale as an
53080    alternative to the MAD.  It shares desirable robustness
53081    properties with MAD (50% breakdown point, bounded influence
53082    function).  In addition, it has significantly better normal
53083    efficiency (58%) and it does not depend on symmetry.
53084
53085    The Sn scale estimate is defined as:
53086
53087        Sn = c*MEDIAN(i){MEDIAN(j)|x(i) - x(j)|}
53088
53089    That is, for each i we compute the median of
53090    {|x(i) - x(j)|; j = 1, ..., n}.  The median of these n
53091    numbers is then the estimate of Sn.  The constant c is
53092    determined to make Sn a consistent estimator.  The value
53093    used is 1.1926 (this is the value needed to make Sn a
53094    consistent estimator for normal data).
53095
53096    The Sn statistic measures typical distances between values
53097    in contrast to the MAD and the standard deviation which
53098    measure the distance from a central location.  This is why
53099    the Sn is appropriate for asymmetic distributions as well
53100    symmetric distributions.
53101
53102    The Rousseeuw and Croux article (see the Reference section
53103    below) discusses the properties of the Sn estimate in
53104    detail.
53105
53106Syntax:
53107    LET <par> = SN SCALE <y>      <SUBSET/EXCEPT/FOR qualification>
53108    where <y> is the response variable;
53109          <par> is a parameter where the computed Sn scale
53110               statistic is stored;
53111    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
53112
53113Examples:
53114    LET A = SN SCALE Y1
53115    LET A = SN SCALE Y1 SUBSET TAG > 2
53116
53117Note:
53118    Dataplot uses code provided by Rousseeuw and Croux to compute
53119    the Sn estimate.  This algorithm uses an efficient computational
53120    method for computing Sn.
53121
53122Note:
53123    The Rousseeuw and Croux article also proposes the Qn scale
53124    estimate.  The article discusses the properties of both
53125    estimators in detail.
53126
53127Note:
53128    In addition, the Sn statistic is supported for the following
53129    plots and commands
53130
53131       SN SCALE PLOT Y X
53132       CROSS TABULATE SN SCALE PLOT Y X1 X2
53133       BOOTSTRAP SN SCALE PLOT Y
53134       JACKNIFE SN SCALE PLOT Y
53135       DEX SN SCALE PLOT Y X1 ... XK
53136       SN SCALE BLOCK PLOT Y X1 ... XK
53137       SN SCALE INFLUENCE CURVE Y
53138       SN SCALE INTERACTION PLOT Y X1 X2
53139
53140       TABULATE SN SCALE Y X
53141       CROSS TABULATE SN Y X1 X2
53142       LET Z = CROSS TABULATE SN SCALE Y X1 X2
53143       LET Y = MATRIX COLUMN SN SCALE M
53144       LET Y = MATRIX ROW SN SCALE M
53145
53146
53147Default:
53148    None
53149
53150Synonyms:
53151    None
53152
53153Related Commands:
53154    QN SCALE                   = Compute the Qn scale estimate of a
53155                                 variable.
53156    MEDIAN ABSOLUTE DEVIATION  = Compute the median absolute
53157                                 deviation of a variable.
53158    INTERQUARTILE RANGE        = Compute the interquartile range of
53159                                 a variable.
53160    STANDARD DEVIATION         = Compute the standard deviation of a
53161                                 variable.
53162    DIFFERENCE OF SN           = Compute the difference of the Sn
53163                                 scale estimates between two variables.
53164    STATISTIC PLOT             = Generate a statistic versus subset
53165                                 plot.
53166    CROSS TABULATE PLOT        = Generate a statistic versus subset
53167                                 plot (two subset variables).
53168    BOOTSTRAP PLOT             = Generate a bootstrap plot for a
53169                                 statistic.
53170
53171Reference:
53172    "Alternatives to the Median Absolute Deviation",
53173    Peter J. Rousseuw and Christophe Croux, Journal of the American
53174    Statistical Association, December, 1993, Vol. 88, No. 424,
53175    pp. 1273-1283.
53176
53177    "Data Analysis and Regression: A Second Course in Statistics",
53178    Mosteller and Tukey, Addison-Wesley, 1977, pp. 203-209.
53179
53180Applications:
53181    Data Analysis
53182
53183Implementation Date:
53184    2003/4
53185
53186Program:
53187    MULTIPLOT 2 2
53188    MULTIPLOT CORNER COORDINATES 0 0 100 100
53189    MULTIPLOT SCALE FACTOR 2
53190    X1LABEL DISPLACEMENT 12
53191    .
53192    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 200
53193    LET SIGMA = 1
53194    LET Y2 = LOGNORMAL RANDOM NUMBERS FOR I = 1 1 200
53195    .
53196    BOOTSTRAP SAMPLES 500
53197    BOOTSTRAP SN SCALE PLOT Y1
53198    X1LABEL B025 = ^B025, B975=^B975
53199    HISTOGRAM YPLOT
53200    X1LABEL
53201    .
53202    BOOTSTRAP SN SCALE PLOT Y2
53203    X1LABEL B025 = ^B025, B975=^B975
53204    HISTOGRAM YPLOT
53205    .
53206    END OF MULTIPLOT
53207    JUSTIFICATION CENTER
53208    MOVE 50 96
53209    TEXT SN SCALE BOOTSTRAP: NORMAL
53210    MOVE 50 46
53211    TEXT SN SCALE BOOTSTRAP: LOGNORMAL
53212
53213-----SORT2 (LET)---------------------------------------------------
53214
53215SORT2
53216
53217Name:
53218    SORT2 (LET)
53219
53220Type:
53221    Let Subcommand
53222
53223Purpose:
53224    Sort the elements of two, three, or four variables in ascending
53225    order.
53226
53227Description:
53228    The SORT command is used to sort a single variable.  In some
53229    cases, it is desirable to sort based on more than one
53230    variable.  Note that this only makes sense if some of the
53231    variables contain replication.  For example, if you have
53232    one or more group variables, you might want to sort a
53233    response variable within common values of the group-id
53234    variables.
53235
53236    In the variable list, the sorts are performed from left
53237    to right.  For example, if we are sorting the variables
53238    X and Y, we first sort the X variable (and carry the
53239    corresponding rows in Y).  We then determine the distinct
53240    values in the X array.  For each distinct value of X,
53241    we sort the corresponding rows in the Y variable.
53242
53243Syntax 1:
53244    LET <y1> <y2> = SORT2 <x1> <x2>
53245                    <SUBSET/EXCEPT/FOR qualification>
53246    where <x1> is the first variable to be sorted;
53247          <x2> is the second variable to be sorted;
53248          <y1> is a variable where the sorted <x1> values are saved;
53249          <y2> is a variable where the sorted <x2> values are saved;
53250    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
53251
53252    This syntax is used for the case where we are sorting based
53253    on two variables.
53254
53255Syntax 2:
53256    LET <y1> <y2> <y3> = SORT3 <x1> <x2> <x3>
53257                    <SUBSET/EXCEPT/FOR qualification>
53258    where <x1> is the first variable to be sorted;
53259          <x2> is the second variable to be sorted;
53260          <x3> is the third variable to be sorted;
53261          <y1> is a variable where the sorted <x1> values are saved;
53262          <y2> is a variable where the sorted <x2> values are saved;
53263          <y3> is a variable where the sorted <x3> values are saved;
53264    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
53265
53266    This syntax is used for the case where we are sorting based
53267    on three variables.
53268
53269Syntax 3:
53270    LET <y1> <y2> <y3> <y4> = SORT4 <x1> <x2> <x3> <x4>
53271                    <SUBSET/EXCEPT/FOR qualification>
53272    where <x1> is the first variable to be sorted;
53273          <x2> is the second variable to be sorted;
53274          <x3> is the third variable to be sorted;
53275          <x4> is the fourth variable to be sorted;
53276          <y1> is a variable where the sorted <x1> values are saved;
53277          <y2> is a variable where the sorted <x2> values are saved;
53278          <y3> is a variable where the sorted <x3> values are saved;
53279          <y4> is a variable where the sorted <x4> values are saved;
53280    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
53281
53282    This syntax is used for the case where we are sorting based
53283    on four variables.
53284
53285Examples:
53286    LET X2 Y2 = SORT2 X Y
53287    LET Y1 Y2 Y3 = SORT3 X1 X2 X3
53288    LET Y1 Y2 Y3 Y4 = SORT3 X1 X2 X3 X4
53289
53290Note:
53291    Once data for specific replication has been extracted,
53292    DATAPLOT uses the QUICKSORT algorithm developed by Richard
53293    Singelton to perform the sort of a single variable.
53294
53295Note:
53296    By default, the values are sorted in ascending order.  If
53297    you want to sort values in descending order, enter the
53298    command
53299
53300       SET SORT DIRECTION DESCENDING
53301
53302    Currently, all variables must be sorted in the same
53303    direction (i.e., either ascending or descending).
53304
53305Default:
53306    None
53307
53308Synonyms:
53309    None
53310
53311Related Commands:
53312    SORT         = Sort the elements of a variable.
53313    SORTC        = Sort the elements of a variable and carry one or
53314                   more variables along.
53315    COCODE       = Generate a cocoded variable.
53316    CODE         = Generate a coded variable.
53317    SEQUENCE     = Generate a sequence of numbers.
53318    PATTERN      = Generate numbers with a specific pattern.
53319    RANK         = Rank the elements of a variable.
53320
53321Reference:
53322    "Quicksort Algorithm", Richard Singelton, CACM, March, 1969.
53323
53324Applications:
53325    Data Management
53326
53327Implementation Date:
53328    2008/10
53329
53330Program 1:
53331    SKIP 25
53332    READ GEAR.DAT Y X
53333    LET X2 Y2 = SORT2 X Y
53334    SET WRITE DECIMALS 3
53335    PRINT X Y X2 Y2
53336
53337Program 2:
53338    SKIP 25
53339    READ RIPKEN.DAT Y X1 X2 X3 X4
53340    LET Z2 Z3 Y2 = SORT3 X2 X3 Y
53341    SET WRITE DECIMALS 3
53342    PRINT X2 X3 Y Z2 Z3 Y2
53343    LET Z2 Z3 Z4 Y2 = SORT4 X2 X3 X4 Y
53344    SET WRITE DECIMALS 3
53345    PRINT X2 X3 X4 Y Z2 Z3 Z4 Y2
53346
53347-----SORT (LET)---------------------------------------------------
53348
53349SORT
53350
53351Name:
53352    SORT (LET)
53353
53354Type:
53355    Let Subcommand
53356
53357Purpose:
53358    Sort the elements of a variable in ascending order.
53359
53360Syntax:
53361    LET <resp> = SORT <y1>  <SUBSET/EXCEPT/FOR qualification>
53362    where <y1> is the variable to be sorted (it is not changed);
53363          <resp> is a variable where the sorted values are saved;
53364    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
53365
53366Examples:
53367    LET YSORT = SORT Y1
53368
53369Note:
53370    DATAPLOT uses the QUICKSORT algorithm developed by Richard
53371    Singelton.
53372
53373Default:
53374    None
53375
53376Synonyms:
53377    None
53378
53379Related Commands:
53380    COCODE       = Generate a cocoded variable.
53381    CODE         = Generate a coded variable.
53382    SEQUENCE     = Generate a sequence of numbers.
53383    PATTERN      = Generate numbers with a specific pattern.
53384    RANK         = Rank the elements of a variable.
53385    SORTC        = Sort the elements of a variable and carry one or
53386                   more variables along.
53387
53388Reference:
53389    "Quicksort Algorithm", Richard Singelton, CACM, March, 1969.
53390
53391Applications:
53392    XX
53393
53394Implementation Date:
53395    XX
53396
53397Program:
53398    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
53399    LET Y2 = SORT Y1
53400
53401-----SORT BY STATISTIC (LET)-----------------------------------------
53402
53403SORT BY STATISTIC (LET)
53404
53405Name:
53406    SORT BY STATISTIC (LET)
53407
53408Type:
53409    Let Subcommand
53410
53411Purpose:
53412    Sort the values of a group variable based on the values
53413    of a user-specified statistic for each group.
53414
53415Description:
53416    For plots based on a response variable and a corresponding
53417    group-id variable, it is often desirable to generate the
53418    plot sorted by the value of some statistic for each group.
53419    For example, you may want to generate a box plot ordered
53420    from the smallest median to the largest median.
53421
53422    In most cases, the sorting statistic will be a location
53423    statistic such as the mean, median, minimum, or maximum.
53424    However, Dataplot supports 40+ statistics for the sorting
53425    statistic.
53426
53427    The SORT BY command is a utility command that simplifies
53428    the generation of these sorted plots.  Specifically, it can
53429    be used in conjunction with the following types of plots:
53430
53431       1) BOX PLOT
53432       2) <STATISTIC> PLOT
53433       3) PLOT Y X TAG  (i.e., scatter plot with replication)
53434
53435    Given a response variable, Y, and a group-id variable, X,
53436    the SORT BY command computes the value of a specified
53437    statistic for each group and returns the following two
53438    variables:
53439
53440       1) An index variable which is the ranking of the
53441          computed statistic for each group (if there are five
53442          groups in the data, the index variable will have
53443          five elements).
53444
53445       2) A sorted group-id variable, X2, that is used in
53446          place of the original X variable in subsequent
53447          plots.
53448
53449Syntax:
53450    LET <x2> <index> = SORT BY <stat> <y> <x>
53451                        <SUBSET/EXCEPT/FOR qualification>
53452    where <y> is the response variable;
53453          <x> is the group-id variable;
53454          <stat> is one of the following statistics:
53455              MEAN, MIDMEAN, MEDIAN, TRIMMED MEAN, WINSORIZED MEAN,
53456              GEOMETRIC MEAN, HARMONIC MEAN, HODGES LEHMAN,
53457              BIWEIGHT LOCATION,
53458              SUM, PRODUCT, SIZE (or NUMBER or SIZE),
53459              STANDARD DEVIATION, STANDARD DEVIATION OF MEAN,
53460              VARIANCE, VARIANCE OF THE MEAN,
53461              TRIMMED MEAN STANDARD ERROR,
53462              AVERAGE ABSOLUTE DEVIATION (or AAD),
53463              MEDIAN ABSOLUTE DEVIATION (or MAD),
53464              IQ RANGE, BIWEIGHT MIDVARIANCE, BIWEIGHT SCALE,
53465              PERCENTAGE BEND MIDVARIANCE,
53466              WINSORIZED VARIANCE, WINSORIZED STANDARD DEVIATION,
53467              RELATIVE STANDARD DEVIATION, RELATIVE VARIANCE,
53468              COEFFICIENT OF VARIATION,
53469              RANGE, MIDRANGE, MAXIMUM, MINIMUM, EXTREME,
53470              LOWER HINGE, UPPER HINGE, LOWER QUARTILE, UPPER QUARTILE,
53471              <FIRST/SECOND/THIRD/FOURTH/FIFTH/SIXTH/SEVENTH/EIGHTH/
53472                  NINTH/TENTH> DECILE,
53473              PERCENTILE, QUANTILE, QUANTILE STANDARD ERROR,
53474              SKEWNESS, KURTOSIS, NORMAL PPCC,
53475              AUTOCORRELATION, AUTOCOVARIANCE,
53476              SIN FREQUENCY, SIN AMPLITUDE,
53477              CP, CPK, CNPK, CPM, CC,
53478              EXPECTED LOSS, PERCENT DEFECTIVE,
53479              TAGUCHI SN0 (or SN), TAGUCHI SN+ (or SNL),
53480              TAGUCHI SN- (or SNS), TAGUCHI SN00 (or SN2);
53481          <x2> is a variable where the sorted group-id values are
53482             stored;
53483          <index> is a variable where the ranking of the statistic
53484             for each group are stored;
53485    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
53486
53487Examples:
53488    LET X2 INDX = SORT BY MEAN Y X
53489    LET X2 INDX = SORT BY MEIDAN Y X
53490    LET X2 INDX = SORT BY SD Y X
53491    LET X2 INDX = SORT BY MINIMUM Y X
53492    LET X2 INDX = SORT BY IQ RANGE Y X
53493
53494Note:
53495    These plots often have alphabetic tick mark labels.  The
53496    following enhancements were made to simplify the use
53497    of alphabetic tick mark labels with sorted plots.
53498
53499    a) The TIC MARK LABEL FORMAT and TIC MARK LABEL CONTENT
53500       commands were previously augmented to allow numeric
53501       variables, group label variables, or the row label
53502       variable as the contents for the tick mark labels.
53503       Specifically,
53504
53505          LET LAB = DATA 50 40 30 20 10 0
53506          X1TIC MARK LABEL FORMAT VARIABLE
53507          X1TIC MARK LABEL CONTENT LAB
53508
53509          LET IG = GROUP LABELS A B C D E
53510          X1TIC MARK LABEL FORMAT GROUP LABEL
53511          X1TIC MARK LABEL CONTENT IG
53512
53513          X1TIC MARK LABEL FROMAT ROW LABELS
53514
53515       This has been enhanced to allow an index variable to
53516       be specified on the above TIC MARK LABEL CONTENT
53517       commands (the index variable is typically generated by
53518       a SORT BY <stat> command).  The index variable specifies
53519       the order in which the tic mark labels will be generated.
53520
53521       So the above examples can be augmented by
53522
53523          LET X2 INDX = SORT BY MEAN Y X
53524          LET LAB = DATA 50 40 30 20 10 0
53525          X1TIC MARK LABEL FORMAT VARIABLE
53526          X1TIC MARK LABEL CONTENT LAB INDX
53527
53528          LET X2 INDX = SORT BY MEAN Y X
53529          LET IG = GROUP LABELS A B C D E
53530          X1TIC MARK LABEL FORMAT GROUP LABEL
53531          X1TIC MARK LABEL CONTENT IG INDX
53532
53533          LET X2 INDX = SORT BY MEAN Y X
53534          X1TIC MARK LABEL FROMAT ROW LABELS
53535          X1TIC MARK LABEL CONTENT INDX
53536
53537       Note that it is the values of INDX when the plot is
53538       generated, not when the TIC MARK LABEL CONTENT is
53539       entered, that will be used to sort the tick mark labels.
53540
53541    b) The LET ... = GROUP LABEL .... command was augmented in
53542       the following two ways.
53543
53544        i) You can specify literal strings for group labels.
53545           For example,
53546
53547              LET IG = GROUP LABEL  BATCHSP()1 BATCHSP()2 ...
53548                       BATCHSP()3 BATCHSP()4
53549
53550           The strings are separated by spaces.  If you need to
53551           include a space in a particular string, use the
53552           SP() as in the above example.
53553
53554       ii) Pre-defined strings can be used to define a group
53555           label variable.  For example,
53556
53557              LET IG = GROUP LABEL ST1 TO ST10
53558
53559           where ST1, ST2, ...., ST10 are previously defined
53560           strings.  The TO syntax is useful in this context
53561           when the number of strings is large.
53562
53563       Dataplot's algorithm for parsing the GROUP LABEL command
53564       is:
53565
53566         i) Dataplot first checks the character variables file
53567            (HELP SET CONVERT CHARACTER for details).  If the
53568            first name listed is found, Dataplot uses this
53569            character variable to define the group labels.
53570
53571        ii) If a character variable is not found, Dataplot
53572            checks all the listed names to see if they are
53573            previously defined strings.  If they are, then
53574            Dataplot substitutes the values of these strings.
53575
53576       iii) If one or more of the names is not a previously
53577            defined string, then Dataplot treats all of the
53578            names as literal text strings.
53579
53580
53581Default:
53582    None
53583
53584Synonyms:
53585    None
53586
53587Related Commands:
53588    PLOT                   = Generate a plot.
53589    BOX PLOT               = Generate a box plot.
53590    STATISTIC PLOT         = Generate a statistic versus subset plot.
53591    TIC MARK LABEL FORMAT  = Specify the format for tic mark labels.
53592    TIC MARK LABEL CONTENT = Specify the content for alphabetic
53593                             tic mark labels.
53594
53595Applications:
53596    Data Analysis
53597
53598Implementation Date:
53599    2006/1: Original Implementation
53600
53601Program 1:
53602    skip 25
53603    read splett2.dat y x
53604    .
53605    let x2 indx = sort by median y x
53606    let ig = group label Tinius1 Tinius2 Satec Tokyo
53607    x1tic mark label case asis
53608    x1tic mark label format group labels
53609    x1tic mark label content ig indx
53610    .
53611    char box plot
53612    line box plot
53613    fences on
53614    .
53615    xlimits 1 4
53616    major xtic mark number 4
53617    minor xtic mark number 0
53618    xtic offset 0.5 0.5
53619    .
53620    title case asis
53621    title offset 2
53622    title Charpy V-NIST Notch Testing
53623    label case asis
53624    x1label Machine Manufacturer
53625    y1label Absorbed Energy
53626    .
53627    box plot y x2
53628
53629Program 2:
53630    set convert character on
53631    skip 25
53632    read draft69c.dat rank day month
53633    .
53634    let ig = group label month
53635    x1tic mark label format group label
53636    let xcode = character code month
53637    .
53638    major xtic mark number 12
53639    minor xtic mark number 0
53640    xlimits 1 12
53641    xtic offset 0.5 0.5
53642    .
53643    let xcode2 indx = sort by mean rank xcode
53644    x1tic mark label content ig  indx
53645    .
53646    x1tic mark label size 1.5
53647    tic mark label case asis
53648    label case asis
53649    title case asis
53650    title displacement 2
53651    x1label Month
53652    y1label Draft Ranking
53653    title Mean Plot Ordered by Mean
53654    .
53655    mean plot rank xcode2
53656
53657Program 3:
53658    skip 25
53659    read splett2.dat y x
53660    .
53661    let ig = group label Tinius1 Tinius2 Satec Tokyo
53662    .
53663    char x blank
53664    line blank dash
53665    .
53666    xlimits 1 4
53667    major xtic mark number 4
53668    minor xtic mark number 0
53669    tic offset units screen
53670    tic offset 5 5
53671    .
53672    title offset 2
53673    multiplot corner coordinates 0 0 100 100
53674    multiplot 2 2
53675    multiplot scale factor 2
53676    .
53677    x1tic mark label format group label
53678    x1tic mark label content ig
53679    title Mean Plot (Unsorted)
53680    mean plot y x
53681    .
53682    title SD Plot (Unsorted)
53683    sd plot y x
53684    .
53685    title Mean Plot (Sorted by Mean)
53686    let x2 indx = sort by mean y x
53687    x1tic mark label content ig indx
53688    mean plot y x2
53689    .
53690    title SD Plot (Sorted by SD)
53691    let x2 indx = sort by sd y x
53692    x1tic mark label content ig indx
53693    sd plot y x2
53694    .
53695    end of multiplot
53696
53697Program 4:
53698    skip 25
53699    read gear.dat y x
53700    .
53701    char x all
53702    line solid all
53703    .
53704    xlimits 1 10
53705    major xtic mark number 10
53706    minor xtic mark number 0
53707    xtic offset 0.5 0.5
53708    .
53709    title offset 2
53710    multiplot corner coordinates 0 0 100 100
53711    multiplot 2 2
53712    multiplot scale factor 2
53713    .
53714    title Original Data
53715    plot y x x
53716    .
53717    title Sort by Mean
53718    let x2 indx = sort by mean y x
53719    x1tic mark label format variable
53720    x1tic mark label content indx
53721    plot y x2 x2
53722    .
53723    title Sort by Minimum
53724    let x2 indx = sort by minimum y x
53725    x1tic mark label content indx
53726    plot y x2 x2
53727    .
53728    title Sort by SD
53729    let x2 indx = sort by sd y x
53730    x1tic mark label content indx
53731    plot y x2 x2
53732    .
53733    end of multiplot
53734
53735-----SORTC (LET)---------------------------------------------------
53736
53737SORTC
53738
53739Name:
53740    SORTC (LET)
53741
53742Type:
53743    Let Subcommand
53744
53745Purpose:
53746    Sort the elements of a variable in ascending order.  In addition,
53747    carry one or more additional variables along when doing the sort
53748    (that is, the additional variables are sorted in the order of the
53749    first variable).
53750
53751Syntax:
53752    LET <resp> = SORTC <y1>  <y2> ... <yn>
53753                <SUBSET/EXCEPT/FOR qualification>
53754    where <y1> is the variable to be sorted (it is not changed);
53755          <y2> ... <yn> is a list of variables to be carried along;
53756          <resp> is a variable where the sorted values are saved;
53757    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
53758
53759Examples:
53760    LET YSORT = SORT Y1  Y2
53761    LET YSORT = SORT Y1  Y2 Y3 Y4
53762
53763Note:
53764    DATAPLOT uses the QUICKSORT algorithm developed by Richard
53765    Singelton.
53766
53767Default:
53768    None
53769
53770Synonyms:
53771    None
53772
53773Related Commands:
53774    COCODE       = Generate a cocoded variable.
53775    CODE         = Generate a coded variable.
53776    SEQUENCE     = Generate a sequence of numbers.
53777    PATTERN      = Generate numbers with a specific pattern.
53778    RANK         = Rank the elements of a variable.
53779    SORT         = Sort the elements of a variable.
53780
53781Applications:
53782    XX
53783
53784Implementation Date:
53785    XX
53786
53787Program:
53788    XX
53789
53790-----SORT DIRECTION (SET)---------------------------------------
53791
53792SORT DIRECTION
53793
53794Name:
53795    SORT DIRECTION (SET)
53796
53797Type:
53798    Set Subcommand
53799
53800Purpose:
53801    Specify whether sorts performed by SORT and SORTC generate
53802    ascending or descending sorts.
53803
53804Syntax:
53805    SET SORT DIRECTION <value>
53806    where <value> is ASCENDING or DESCENDING.
53807
53808Examples:
53809    SET SORT DIRECTION ASCENDING
53810    SET SORT DIRECTION DESCENDING
53811
53812Default:
53813    The default is ASCENDING.
53814
53815Synonyms:
53816    None
53817
53818Related Commands:
53819    SORT     = Sort an array of numbers.
53820    SORTC    = Sort an array of numbers and carry other arrays.
53821
53822Applications:
53823    Sorting
53824
53825Implementation Date:
53826    2000/1
53827
53828Program:
53829    LET Y = NORMAL RANDOM NUMBERS FOR I = 1 1 100
53830    LET Y2 = SORT Y
53831    SET SORT DIRECTION DESCENDING
53832    LET Y3 = SORT Y
53833    SET WRITE DECIMALS 3
53834    PRINT Y Y2 Y3
53835
53836-----SPACING-------------------------------------------------------
53837
53838SPACING
53839
53840Name:
53841    SPACING
53842
53843Type:
53844    Diagrammatic Graphics Command
53845
53846Purpose:
53847    Specifies whether text is drawn with fixed or proportional spacing.
53848
53849Description:
53850    Proportional spacing often has a neater appearance.  However, fixed
53851    spacing is desirable when it is important to line up different
53852    portions of text.
53853
53854Syntax:
53855    SPACING  <FIXED/PROPORTIONAL>
53856    where FIXED specifies fixed spacing and PROPORTIONAL specifies
53857             proportional spacing.
53858
53859Examples:
53860    SPACING FIXED
53861    SPACING PROPORTIONAL
53862
53863Note:
53864    This command only applies to software fonts.  The spacing for
53865    hardware fonts is determined by the definition of the font and
53866    cannot be changed.  Most hardware fonts are fixed space fonts.
53867    The exception is that most Postscript and QMS fonts are
53868    proportional space fonts.  If fixed spacing is needed for
53869    Postscript, use the SET POSTSCRIPT FONT command to set one of the
53870    Courier fonts (all the rest are proportional).  The SET QMS FONT
53871    command can be used to set the hardware font for QMS devices.
53872    See the documentation for the QMS device for a list of which fonts
53873    are fixed and which are proportional.
53874
53875Default:
53876    Proportional spacing is used by default.
53877
53878Synonyms:
53879    None
53880
53881Related Commands:
53882    TEXT             = Writes a text string.
53883    FONT             = Specify the font to use for text.
53884
53885Applications:
53886    XX
53887
53888Implementation Date:
53889    XX
53890
53891Program:
53892    VERTICAL SPACING 6
53893    CRLF ON
53894    MARGIN 10
53895    FONT DUPLEX
53896    SPACING PROPORTIONAL
53897    .
53898    HW 4 2
53899    MOVE 5 95
53900    TEXT JAPAN's 6-POINT PROGRAM FOR
53901    MOVE 5 89
53902    TEXT QUALITY MANUFACTURING
53903    MOVE 10 80
53904    HW 2.6 1.3
53905    TEXT CIRC() QUALITY AUDITS
53906    TEXT CIRC() COMPANY-WIDE QUALITY CONTROL (CWQC)
53907    TEXT CIRC() QUALITY TRAINING AND EDUCATION
53908    TEXT CIRC() APPLICATION OF STATISTICAL METHODS
53909    .
53910    SPACING FIXED
53911    .
53912    TEXT CIRC() QUALITY CIRCLE ACTIVITIES
53913    TEXT CIRC() NATION-WIDE QUALITY CONTROL PROMOTIONAL ACTIVITIES
53914    HW 2 1
53915    MOVE 5 10
53916    TEXT SOURCE: Q.C. TRENDS WINTER 1985, PAGES 22-23.
53917
53918-----SPEARMAN DISSIMILARITY (LET)--------------------------------
53919
53920SPEARMAN DISSIMILARITY
53921
53922Name:
53923    SPEARMAN DISSIMILARITY (LET)
53924    SPEARMAN SIMILARITY (LET)
53925
53926Type:
53927    Let Subcommand
53928
53929Purpose:
53930    Compute the Spearman rank correlation coefficient transformed to a
53931    dissimilarity measure between two variables.
53932
53933Description:
53934    If the measurements in the two samples are replaced with their ranks
53935    (and average ranks in the case of ties) and the Pearson correlation
53936    coefficient (HELP CORRELATION for details) is computed, the result is
53937    the Spearman rho correlation coefficient.
53938
53939    The rank correlation is recommended in the following cases:
53940
53941      1) When the underlying data does not have a meaningful numerical
53942         measure, but it can be ranked;
53943      2) When the relationship between the two variables is not
53944         linear;
53945      3) When the normality assumption for two variables is not
53946         valid.
53947
53948    A perfect linear relationship yields a correlation coefficient of
53949    +1 (or -1 for a negative relationship) and no linear relationship
53950    yields a correlation coefficient of 0.
53951
53952    In some applications, such as clustering, it can be useful to
53953    transform the correlation coefficient to a dissimilarity measure.
53954    The transformation used here is
53955
53956        d = (1 - R)/2
53957
53958    This converts the correlation coefficient with values between -1 and
53959    1 to a score between 0 and 1.  High positive correlation (i.e., very
53960    similar) results in a dissimilarity near 0 and high negative
53961    correlation (i.e., very dissimilar) results in a dissimilarity near 1.
53962
53963    If a similarity score is preferred, you can use
53964
53965        s = 1 - d
53966
53967    where d is defined as above.
53968
53969Syntax 1:
53970    LET <par> = SPEARMAN DISSIMILARITY <y1> <y2>
53971                <SUBSET/EXCEPT/FOR qualification>
53972    where <y1> is the first  response variable;
53973          <y2> is the second response variable;
53974          <par> is a parameter where the computed Spearman dissimilarity
53975               is stored;
53976    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
53977
53978Syntax 2:
53979    LET <par> = SPEARMAN SIMILARITY <y1> <y2>
53980                <SUBSET/EXCEPT/FOR qualification>
53981    where <y1> is the first  response variable;
53982          <y2> is the second response variable;
53983          <par> is a parameter where the computed Spearman similarity
53984               is stored;
53985    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
53986
53987Examples:
53988    LET A = SPEARMAN DISSIMILARITY Y1 Y2
53989    LET A = SPEARMAN DISSIMILARITY Y1 Y2 SUBSET TAG > 2
53990    LET A = SPEARMAN SIMILARITY Y1 Y2
53991
53992Note:
53993    The two variables must have the same number of elements.
53994
53995Default:
53996    None
53997
53998Synonyms:
53999    SPEARMAN DISTANCE is a synonym for SPEARMAN DISSIMILARITY
54000
54001Related Commands:
54002    RANK CORRELATION          = Compute Spearman's rank correlation
54003                                coefficient.
54004    CORRELATION               = Compute the Pearson correlation of two
54005                                variables.
54006    PEARSON DISSIMILARITY     = Compute the dissimilarity of two variables
54007                                based on Pearson correlation.
54008    KENDALL TAU DISSIMILARITY = Compute the dissimilarity of two variables
54009                                based on Kendall's tau correlation.
54010    COSINE DISTANCE           = Compute the cosine distance.
54011    MANHATTAN DISTANCE        = Compute the Euclidean distance.
54012    EUCLIDEAN DISTANCE        = Compute the Euclidean distance.
54013    MATRIX DISTANCE           = Compute various distance metrics for a
54014                                matrix.
54015    GENERATE MATRIX <stat>    = Compute a matrix of pairwise statistic
54016                                values.
54017    CLUSTER                   = Perform a cluster analysis.
54018
54019Reference:
54020    Kaufman and Rousseeuw (1990), "Finding Groups in Data: An
54021    Introduction To Cluster Analysis", Wiley.
54022
54023Applications:
54024    Clustering
54025
54026Implementation Date:
54027    2017/08:
54028    2018/10: SPEARMAN DISTANCE is a synonym for SPEARMAN DISSIMILARITY
54029
54030Program 1:
54031    SKIP 25
54032    READ BERGER1.DAT Y X
54033    LET CORR = RANK CORRELATION Y X
54034    LET D    = SPEARMAN DISSIMILARITY Y X
54035    SET WRITE DECIMALS 4
54036    PRINT CORR D
54037
54038Program 2:
54039    SKIP 25
54040    READ IRIS.DAT Y1 Y2 Y3 Y4
54041    SET WRITE DECIMALS 3
54042    .
54043    LET M = GENERATE MATRIX SPEARMAN DISSIMILARITY Y1 Y2 Y3 Y4
54044    PRINT M
54045
54046Program 3:
54047    SKIP 25
54048    READ IRIS.DAT Y1 Y2 Y3 Y4 TAG
54049    .
54050    TITLE CASE ASIS
54051    TITLE OFFSET 2
54052    CASE ASIS
54053    TIC MARK OFFSET UNITS DATA
54054    YLIMITS 0 1
54055    MAJOR YTIC MARK NUMBER 6
54056    MINOR YTIC MARK NUMBER 1
54057    Y1TIC MARK LABEL DECIMAL 1
54058    XLIMITS 1 3
54059    MAJOR XTIC MARK NUMBER 3
54060    MINOR XTIC MARK NUMBER 0
54061    XTIC MARK OFFSET 0.3 0.3
54062    CHARACTER X BLANK
54063    LINES BLANK SOLID
54064    .
54065    MULTIPLOT CORNER COORDINATES 5 5 95 95
54066    MULTIPLOT SCALE FACTOR 2
54067    MULTIPLOT 2 3
54068    .
54069    TITLE Sepal Length vs Sepal Width
54070    SPEARMAN DISSIMILARITY PLOT Y1 Y2 TAG
54071    .
54072    TITLE Sepal Length vs Petal Length
54073    SPEARMAN DISSIMILARITY PLOT Y1 Y3 TAG
54074    .
54075    TITLE Sepal Length vs Petal Width
54076    SPEARMAN DISSIMILARITY PLOT Y1 Y4 TAG
54077    .
54078    TITLE Sepal Width vs Petal Length
54079    SPEARMAN DISSIMILARITY PLOT Y2 Y3 TAG
54080    .
54081    TITLE Sepal Width vs Petal Width
54082    SPEARMAN DISSIMILARITY PLOT Y2 Y4 TAG
54083    .
54084    TITLE Petal Length vs Petal Width
54085    SPEARMAN DISSIMILARITY PLOT Y3 Y4 TAG
54086    .
54087    END OF MULTIPLOT
54088    .
54089    JUSTIFICATION CENTER
54090    MOVE 50 5
54091    TEXT Species
54092    DIRECTION VERTICAL
54093    MOVE 5 50
54094    TEXT Spearman Rank Dissimilarity Coefficient
54095    DIRECTION HORIZONTAL
54096
54097-----SPECTRAL PLOT---------------------------------------------------
54098
54099SPECTRAL PLOT
54100
54101Name:
54102    ... SPECTRAL PLOT
54103
54104Type:
54105    Graphics Command
54106
54107Purpose:
54108    Generates a spectral plot.
54109
54110Description:
54111    A spectral plot is a graphical data analysis technique for
54112    examining frequency-domain models for a single time series or for
54113    two time series.  The spectral power function is a smoothed Fourier
54114    transform of the autocorrelation function.  The spectral plot is a
54115    graphical technique for assessing autocorrelation and cyclic
54116    structure in time series.  The frequency is plotted (on the
54117    horizontal axis) from 0 to 0.5 cycles per unit time where unit time
54118    is assumed to be 1 (i.e., unit time is the elapsed time between
54119    adjacent data values).  The variance component at each frequency is
54120    plotted on the vertical axis.
54121
54122    From a data analysis point of view, the type of structure in the
54123    autocorrelation plot indicates the location of peaks in the
54124    spectral plot.  The peaks in the spectral plot also indicate the
54125    dominant frequency for underlying cyclic models.  Once the dominant
54126    peaks have been identified, the next step is typically to use other
54127    time series analysis techniques (such as the complex demodulation
54128    phase plots) to determine if this frequency is constant over the
54129    entire domain of the data, or to carry out a non-linear fit with an
54130    underlying cyclic model (see the documentation for COMPLEX
54131    DEMODULATION PLOT).
54132
54133    The axes depend on the type of spectral plot.  The autospectral
54134    plot has the following:
54135       Vertical   axis = power (= variable contribution);
54136       Horizontal axis = frequency (cycles per observation).
54137    Spectral plots are available in the following 9 types:
54138          1) spectral plot (= autospectral plot)
54139          2) cross-spectral plot
54140          3) co-spectral plot
54141          4) quadrature spectral plot
54142          5) coherency spectral plot
54143          6) amplitude spectral plot
54144          7) phase spectral plot
54145          8) gain spectral plot
54146          9) argand spectral plot
54147
54148Syntax 1:
54149    SPECTRAL PLOT <y1>       <SUBSET/EXCEPT/FOR qualification>
54150    where <y1> is a response variable;
54151    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
54152
54153    This syntax is used for a single time series.
54154
54155Syntax 2:
54156    <keyword> PLOT <y1> <y2>  <SUBSET/EXCEPT/FOR qualification>
54157    where <keyword> is one of the following:
54158               CROSS-SPECTRAL
54159               CO-SPECTRAL
54160               QUADRATURE SPECTRAL
54161               COHERENCY SPECTRAL
54162               AMPLITUDE SPECTRAL
54163               PHASE PSECTRAL
54164               ARGAND SPECTRAL;
54165          <y1> is the first response variable;
54166          <y2> is the second response variable;
54167    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
54168
54169    This syntax is used for two time series.
54170
54171Examples:
54172    SPECTRAL PLOT Y
54173    SPECTRAL PLOT Y2  SUBSET Y2 > 2
54174    CROSS-SPECTRAL PLOT Y1 Y2
54175    CO-SPECTRAL PLOT Y1 Y2
54176    QUADRATURE SPECTRAL PLOT Y1 Y2
54177    COHERENCY SPECTRAL PLOT Y1 Y2
54178    AMPLITUDE SPECTRAL PLOT Y1 Y2
54179    PHASE SPECTRAL PLOT Y1 Y2
54180    ARGAND SPECTRAL PLOT Y1 Y2
54181
54182Note:
54183    The SPECTRAL PLOT command assumes the data are equi-spaced and
54184    that there is no missing data.  Any equi-spaced time series is
54185    intrinsically limited to detecting frequencies no larger than 0.5
54186    cycles per data point (this corresponds to the fact that the
54187    smallest detectable cycle in the data is 2 data points per cycle).
54188
54189Note:
54190    The spectral plot is essentially a "smoothed" periodogram.  The
54191    smoothing is done in the frequency domain.  There are several
54192    alternative methods for computing the spectrum estimates.  DATAPLOT
54193    uses the algorithm from the Jenkins and Watts reference (pp. 382-
54194    383).
54195
54196Note:
54197    Spectral plots are often drawn with log scales to provide better
54198    resolution (enter LOG ON).  Some analysts prefer to draw the plot
54199    as a solid connected lines while others prefer to draw it with
54200    spikes.  Either way is straightforward to generate with the proper
54201    settings for the LINES and SPIKES commands.
54202
54203Default:
54204    None
54205
54206Synonyms:
54207    SPECTRUM is a synonym for SPECTRAL.
54208    The word PLOT is optional in the various SPECTRAL PLOT commands
54209    (e.g., SPECTRUM Y, CROSS-SPECTRUM Y1 Y2).
54210    AUTO SPECTRAL PLOT is a synonym for SPECTRAL PLOT.
54211
54212Related Commands:
54213    PERIODOGRAM         = Generates a periodogram plot.
54214    CORRELATION PLOT    = Generates a correlation plot.
54215    COMPLEX DEMOD  PLOT = Generates a complex demodulation plot.
54216    LAG PLOT            = Generates a lag plot.
54217    PLOT                = Generates a data or function plot.
54218    4-PLOT              = Generates 4-plot univariate analysis.
54219    CHARACTERS          = Sets the types for plot characters.
54220    LINES               = Sets the types for plot lines.
54221    LOG                 = Sets the log switches on/off.
54222    SPIKES              = Sets the on/off switches for plot spikes.
54223    SUMMARY             = Generates a table of summary statistics.
54224    LET                 = Generates  sin/cos transformations (plus
54225                          much more).
54226    FIT                 = Carries out a least squares fit.
54227
54228Reference:
54229    "Spectral Analysis and Its Applications", Jenkins and Watts.
54230    Holden-Day, 1968 (pp. 16-23).
54231
54232    "Fourier Analysis of Time Series", Peter Bloomfield, Wiley, 1976.
54233
54234Applications:
54235    Frequency Time Series Analysis
54236
54237Implementation Date:
54238    XX
54239
54240Program 1:
54241    SKIP 25
54242    READ LEW.DAT Y
54243    .
54244    MULTIPLOT 2 1; MULTIPLOT CORNER COORDINATES 0 0 100 100
54245    TITLE SPECTRAL PLOT; Y1LABEL POWER; X1LABEL FREQUENCY
54246    SPIKE ON; LINE BLANK
54247    SPECTRAL PLOT Y
54248    LOG ON
54249    SPIKE OFF; LINE SOLID
54250    SPECTRAL PLOT Y
54251    END OF MULTIPLOT
54252
54253Program 1:
54254    SKIP 25
54255    READ HAYES1.DAT JUNK Y1 Y2
54256    .
54257    MULTIPLOT 3 3; MULTIPLOT CORNER COORDINATES 0 0 100 100
54258    TITLE AUTOMATIC; Y1LABEL POWER; X1LABEL FREQUENCY
54259    LINE SOLID DOTTED
54260    CROSS-SPECTRAL PLOT Y1 Y2
54261    COSPECTRAL PLOT Y1 Y2
54262    QUADRATURE SPECTRAL PLOT Y1 Y2
54263    COHERENCY SPECTRAL PLOT Y1 Y2
54264    AMPLITUDE SPECTRAL PLOT Y1 Y2
54265    PHASE SPECTRAL PLOT Y1 Y2
54266    GAIN SPECTRAL PLOT Y1 Y2
54267    ARGAND SPECTRAL PLOT Y1 Y2
54268    END OF MULTIPLOT
54269
54270-----SPENCE (LET)--------------------------------
54271
54272SPENCE
54273
54274Name:
54275    SPENCE (LET)
54276
54277Type:
54278    Library Function
54279
54280Purpose:
54281    Compute the Spence integral.
54282
54283Description:
54284    The Spence integral is defined as:
54285        F(x) = INTEGRAL(-LOG(1-Y)/Y) DY
54286    where INTEGRAL is the integral from 0 to x.
54287
54288    This is a form of Spence's integral due to K. Mitchell.  It
54289    differs from the definition in the NBS Handbook of Mathematical
54290    Functions (see the REFERENCE section below).
54291
54292Syntax:
54293    LET <y> = SPENCE(<x>)  <SUBSET/EXCEPT/FOR qualification>
54294    where <x> is a number, variable, or parameter;
54295          <y> is a variable or a parameter (depending on what <x> is
54296               where the computed SPENCE integral values are stored;
54297    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
54298
54299Examples:
54300    LET A = SPENCE(0.1)
54301    LET A = SPENCE(10)
54302    LET X2 = SPENCE(X)
54303
54304Note:
54305    DATAPLOT uses the routine DSPENC from the SLATEC Common
54306    Mathematical Library to compute this function.  SLATEC is a large
54307    set of high quality, portable, public domain Fortran routines for
54308    various mathematical capabilities maintained by seven federal
54309    laboratories.
54310
54311Note:
54312    Library functions are distinguished from let subcommands
54313    in the following ways.
54314    1) Functions enclose the input value in parenthesis.  Let
54315       subcommands use spaces.
54316    2) Functions can accept (and return) either parameters
54317       (i.e., single values) or variables (i.e., an array of
54318       values) while let subcommands are specific in which they
54319       accept as input and what they return as output.
54320    3) Functions can accept expressions while let subcommands
54321       do not.  For example, the following is legal:
54322           LET Y2 = ABS(Y1-INT(Y1))
54323       For let subcommands, you typically have to do something
54324       like the following:
54325           LET YTEMP = Y**2 + 8
54326           LET A = SUM YTEMP
54327
54328Default:
54329    None
54330
54331Synonyms:
54332    None
54333
54334Related Commands:
54335    LOGINT     = Compute the logarithmic integral.
54336    EXPINT1    = Compute the exponential integral of order 1.
54337    EXPINTN    = Compute the exponential integral of order N.
54338    EXPINTE    = Compute the principla value of the exponential
54339                 integral.
54340    ERF        = Compute the error function.
54341    SININT     = Compute the sine integral.
54342    COSINT     = Compute the cosine integral.
54343
54344Reference:
54345    "Handbook of Mathematical Functions, Applied Mathematics Series,
54346    Vol. 55", Abramowitz and Stegun, National Bureau of Standards,
54347    1964 (page 1004).
54348
54349    Article by K. Mitchell in the Philosophical Magazine, 40, p. 351,
54350    (1949).
54351
54352Applications:
54353    Special Functions
54354
54355Implementation Date:
54356    94/9
54357
54358Program:
54359    TITLE AUTOMATIC
54360    PLOT SPENCE(X) FOR X = -10 0.1 10
54361
54362-----SPIKE-------------------------------------------------------
54363
54364SPIKE
54365
54366Name:
54367    SPIKE
54368
54369Type:
54370    Plot Control Command
54371
54372Purpose:
54373    Specifies if a spike will be drawn at the plot points of each
54374    trace on subsequent plots.
54375
54376Description:
54377    A spike is a vertical line from the plot point to the spike base
54378    (most typically the x axis).
54379
54380    DATAPLOT can draw a trace as a character or plot symbol at each
54381    point, as a connected line, as a spike from the point to a base,
54382    as a bar from the plot point to a base, or as any combination of
54383    the above.  The choice is determined by the BAR, SPIKE, CHARACTER,
54384    and LINE commands.  The switches for these commands work
54385    independently of each other.
54386
54387    Spikes are commonly used in time series plots.  They are also
54388    useful in showing deviation from a common value such as the mean
54389    or median.  They are also used to generate dot charts.  Dot charts
54390    are an alternative bar charts recommended by Bill Cleveland in the
54391    books listed in the REFERENCE section below.
54392
54393Syntax:
54394    SPIKE  <ON/OFF>  <ON/OFF>  <ON/OFF>  etc.
54395    where ON specifies that the trace is to be drawn with spikes and
54396             OFF specifies that it is not.  Up to 100 spike types can
54397             be specified.
54398
54399Examples:
54400    SPIKE ON OFF ON OFF
54401    SPIKE ON ALL
54402    SPIKE ALL ON
54403    SPIKE
54404
54405Note:
54406    Dot charts are typically drawn vertically rather than horizontally.
54407    This can done with either the SPIKE DIRECTION or the HORIZONTAL
54408    SWITCH command.
54409
54410Note:
54411    It is common with dot charts to want alphabetic labels.  The TIC
54412    MARK LABEL FORMAT, TIC MARK LABEL CONTENT, and TIC OFFSET commands
54413    can be used for this purpose.
54414
54415Note:
54416    The SPIKE command with no arguments sets the spike type to blank
54417    for all traces.  The SPIKE command with the word ALL before or
54418    after the specified type assigns that spike type to all traces;
54419    thus SPIKE ON ALL or SPIKE ALL ON plots spikes for all traces.
54420
54421Default:
54422    No spikes are drawn (i.e., all OFF).
54423
54424Synonyms:
54425    None
54426
54427Related Commands:
54428    PLOT              = Generates a data or function plot.
54429    SPIKE BASE        = Sets the base locations for plot spikes.
54430    SPIKE COLOR       = Sets the colors for plot spikes.
54431    SPIKE DIRECTION   = Sets the directions for plot spikes.
54432    SPIKE LINE        = Sets the line types for plot spikes.
54433    SPIKE THICKNESS   = Sets the line thicknesses for plot spikes.
54434
54435Reference:
54436    "Elements of Graphing Data" by William S. Cleveland, Wadsworth
54437    Advanced Books and Software, 1985.
54438
54439    "Visualizing Data", William S. Cleveland, Hobart Press, 1993.
54440
54441Applications:
54442    Presentation Graphics
54443
54444Implementation Date:
54445    XX
54446
54447Program 1:
54448    SKIP 25
54449    READ BOXJE142.DAT YIELD
54450    .
54451    TITLE TIME SERIES PLOT
54452    Y1LABEL YIELD
54453    X1LABEL SEQUENCE NUMBER
54454    XLIMITS 0 70
54455    XTIC OFFSET 2 2
54456    LET N = SIZE YIELD
54457    LET X = DATA 1 N
54458    LET A = MEAN YIELD
54459    LET Y = DATA A A
54460    CHARACTER OFF
54461    SPIKE ON
54462    SPIKE BASE A
54463    LINE BLANK
54464    PLOT YIELD AND
54465    PLOT Y X
54466
54467Program 2:
54468    READ STRING S1 S2 S3 S4 S5 S6 S7
54469    ALABAMA ALASKA ARIZONA ARKANSAS CALIFORNIA SP()COLORADO CONNETICUIT
54470    READ STRING S8 S9 S10 S11 S12 S13 S14
54471    DELAWARE WASHINGTONSP()DC FLORIDA GEORGIA HAWAII IDAHO ILLINOIS
54472    READ STRING S15 S16 S17 S18 S19 S20 S21 S22
54473    INDIANA IOWA KANSAS KENTUCKY LOUSIANA MAINE MARYLAND MASSACHUSETS
54474    READ STRING S23 S24 S25 S26 S27 S28 S29
54475    MICHIGAN MINNESOTA MISSISSIPPI MISSOURI MONTANA NEBRASKA NEVADA
54476    READ STRING S30 S31 S32 S33
54477    NEWSP()HAMPSHIRE NEWSP()JERSEY NEWSP()MEXICO NEWSP()YORK
54478    READ STRING S34 S35 S36 S37 S38
54479    NORTHSP()CAROLINA NORTHSP()DAKOTA OHIO OKLAHOMA OREGON
54480    READ STRING S39 S40 S41 S42
54481    PENNSYLVANIA RHODESP()ISLAND SOUTHSP()CAROLINA SOUTHSP()DAKOTA
54482    READ STRING S43 S44 S45 S46 S47 S48 S49 S50 S51
54483    TENNESSEE TEXAS UTAH VERMONT VIRGINIA WASHINGTON WESTSP()VIRGINIA
54484    READ STRING S50 S51
54485    WISCONSIN WYOMING
54486    .
54487    SKIP 25
54488    COLUMN LIMITS 5 30
54489    READ MURDER86.DAT RATE
54490    .
54491    TITLE DOT CHART WITH ONE VARIABLE
54492    Y1TIC MARK LABEL OFF; YTIC SIZE 0.5
54493    YLIMITS 1 51; YTIC OFFSET 1 1
54494    MAJOR YTIC MARK NUMBER 51; MINOR YTIC MARK NUMBER 0
54495    X1LABEL MURDER RATE (PER 100,000); XLIMITS 0 30; XTIC OFFSET 0 2
54496    HORIZONTAL SWITCH ON
54497    CHARACTER CIRCLE; CHARACTER FILL ON; CHARACTER HW 0.8 0.7
54498    LINE BLANK
54499    SPIKE ON
54500    SPIKE LINE DOT
54501    LET INDX = SEQUENCE 1 1 51
54502    LET RATE2 = SORTC RATE INDX
54503    PLOT RATE2
54504    HEIGHT 0.7; JUSTIFICATION RIGHT
54505    LET INC = (90-20)/52; LET YPOS = 19.7; LET XPOS = 14
54506    LOOP FOR K = 1 1 51
54507        LET YPOS = YPOS + INC
54508        LET J = INDX(K)
54509        MOVE XPOS YPOS; TEXT ^S^J
54510    END OF LOOP
54511
54512-----SPIKE BASE-------------------------------------------------------
54513
54514SPIKE BASE
54515
54516Name:
54517    SPIKE BASE
54518
54519Type:
54520    Plot Control Command
54521
54522Purpose:
54523    Specifies the base location for spikes on plots.
54524
54525Description:
54526    A spike is a vertical line from the base number to the plot point.
54527    Spike bases are specified by trace.
54528
54529Syntax:
54530    SPIKE BASES  <number>  <number>  <number>  etc.
54531    where <number> is a number or parameter that specifies the desired
54532               spike base.  Up to 100 spike bases can be specified.
54533
54534Examples:
54535    SPIKE BASES 0. 0. 10.
54536    SPIKE BASES 20. 20. 20.
54537    SPIKE BASES 0. ALL
54538    SPIKE BASES ALL 0.
54539    SPIKE BASES
54540
54541Note:
54542    The SPIKE BASE command with no arguments sets the spike base to 0.0
54543    for all traces.  The SPIKE BASE command with the word ALL before or
54544    after the specified base assigns that spike base to all traces;
54545    thus SPIKE BASE 0.0 ALL or SPIKE BASE ALL 0.0 uses a base of 0.0
54546    for all traces.
54547
54548Note:
54549    The BAR BASE, SPIKE, CHARACTER, and LINE switch all work
54550    independently of each other.  That is, a plot point can be a line,
54551    a character, a spike or a bar or any combination of the above.
54552
54553Default:
54554    All spike bases are 0.0.
54555
54556Synonyms:
54557    None
54558
54559Related Commands:
54560    PLOT              = Generates a data or function plot.
54561    SPIKE             = Sets the on/off switches for plot spikes.
54562    SPIKE COLOR       = Sets the colors for plot spikes.
54563    SPIKE DIRECTION   = Sets the directions for plot spikes.
54564    SPIKE LINE        = Sets the line types for plot spikes.
54565    SPIKE THICKNESS   = Sets the line thicknesses for plot spikes.
54566
54567References:
54568    "Elements of Graphing Data" by William S. Cleveland, Wadsworth
54569    Advanced Books and Software, 1985.
54570
54571    "Visualizing Data", William S. Cleveland, Hobart Press, 1993.
54572
54573Applications:
54574    Presentation Graphics
54575
54576Implementation Date:
54577    XX
54578
54579Program:
54580    SKIP 25
54581    READ ELNINO.DAT Y YEAR MONTH
54582    .
54583    SPIKE ON
54584    LINE BLANK
54585    LET A = MEAN Y
54586    SPIKE BASE A
54587    X1LABEL MEAN PLOT
54588    Y1LABEL SOUTHERN OSCILLATION INDEX
54589    XLIMITS 1 12
54590    XTIC OFFSET 1 1
54591    MAJOR XTIC MARK NUMBER 12
54592    MINOR XTIC MARK NUMBER 0
54593    X1TIC MARK LABEL FORMAT ALPHA
54594    X1TIC MARK LABEL CONTENTS JAN FEB MARCH APRIL MAY JUNE JULY AUG ...
54595         SEP OCT NOV DEC
54596    MEAN PLOT Y MONTH
54597
54598-----SPIKE COLOR-------------------------------------------------------
54599
54600SPIKE COLOR
54601
54602Name:
54603    SPIKE COLOR
54604
54605Type:
54606    Plot Control Command
54607
54608Purpose:
54609    Specifies the colors used to draw spikes on subsequent plots.
54610
54611Description:
54612    A spike is a vertical line from the plot point to the spike base
54613    (most typically the x axis).  Spikes are specified by trace.  That
54614    is, all points belonging to the same trace are drawn with the same
54615    spike attributes.
54616
54617Syntax:
54618    SPIKE COLOR  <color>  <color>  <color>  etc.
54619    where <color> is a character string that specifies the desired
54620                color.  Up to 100 spike colors can be specified.
54621
54622Examples:
54623    SPIKE COLOR RED BLUE GREEN
54624    SPIKE COLORS BLACK ALL
54625    SPIKE COLORS ALL RED
54626    SPIKE COLORS
54627
54628Note:
54629    The SPIKE COLOR command with no arguments sets the spike color to
54630    default for all traces.  The SPIKE COLOR command with the word ALL
54631    before or after the specified type assigns that color to all
54632    traces; thus SPIKE COLOR RED ALL or SPIKE LINE ALL RED plots spikes
54633    with red lines for all traces.
54634
54635Note:
54636    The BAR, SPIKE, CHARACTER, and LINE switch all work independently
54637    of each other.  That is, a plot point can be a line, a character,
54638    a spike or a bar or any combination of the above.
54639
54640Default:
54641    All spikes are drawn with black lines.
54642
54643Synonyms:
54644    SPIKE PATTERN
54645
54646Related Commands:
54647    PLOT              = Generates a data or function plot.
54648    SPIKE             = Sets the on/off switches for plot spikes.
54649    SPIKE BASE        = Sets the base locations for plot spikes.
54650    SPIKE DIRECTION   = Sets the directions for plot spikes.
54651    SPIKE LINE        = Sets the line types for plot spikes.
54652    SPIKE THICKNESS   = Sets the line thicknesses for plot spikes.
54653
54654References:
54655    "Elements of Graphing Data" by William S. Cleveland, Wadsworth
54656    Advanced Books and Software, 1985.
54657
54658    "Visualizing Data", William S. Cleveland, Hobart Press, 1993.
54659
54660Applications:
54661    Presentation Graphics
54662
54663Implementation Date:
54664    XX
54665
54666Program:
54667    LET CARTER = DATA 66 30 11 43 44 41 35 82 54 36
54668    LET REAGAN = DATA 26 54 84 47 51 51 52 14 36 55
54669    LET X = DATA 1 2 3 5 6 7 8 10 11 12
54670    .
54671    TIC MARK LABEL FORMAT ALPHA; YLIMITS 1 12; YTIC OFFSET 1 1
54672    Y1TIC LABEL CONTENT DEMOCRATS INDEPENDENTS REPUBLICANS SP() ...
54673       EAST SOUTH MIDWEST WEST SP() BLACKS HISPANICS WHITES SP()
54674    MINOR Y1TIC MARK NUMBER 0
54675    X1LABEL PERCENT
54676    XLIMITS -100 100
54677    MAJOR XTIC MARK NUMBER 11; MINOR XTIC MARK NUMBER 1
54678    XTIC MARK LABEL CONTENT 100 80 60 40 20 0 20 40 60 80 100
54679    .
54680    LINE BLANK BLANK SOLID
54681    SPIKE ON ON OFF; SPIKE THICKNESS 0.5 ALL; SPIKE DIRECTION H ALL
54682    SPIKE COLOR G25 G75
54683    TITLE DEMONSTRATE SPIKE COLOR COMMAND
54684    LEGEND 1 CARTER; LEGEND 1 COORDINATES 17 85
54685    LEGEND 2 REAGAN; LEGEND 2 COORDINATES 83 85; LEGEND 2 JUST RIGHT
54686    .
54687    LET CART2 = -CARTER
54688    LET XJUNK = DATA 0.5 12.5; LET YJUNK = DATA 0 0
54689    PLOT X VS REAGAN AND
54690    PLOT X VS CART2 AND
54691    PLOT XJUNK YJUNK
54692
54693-----SPIKE DIRECTION-------------------------------------------------
54694
54695SPIKE DIRECTION
54696
54697Name:
54698    SPIKE DIRECTION
54699
54700Type:
54701    Plot Control Command
54702
54703Purpose:
54704    Specifies if a spike will be drawn horizontally or vertically
54705    on subsequent plots.
54706
54707Description:
54708    A spike is a vertical line from the plot point to the spike base.
54709    Vertical spikes are drawn from the x-axis to the plot point while
54710    horizontal spikes are drawn from the y-axis to the plot point.
54711
54712Syntax:
54713    SPIKE DIRECTIONS  <H/V>  <H/V>  <H/V>  etc.
54714    where H specifies the spike is drawn horizontally while V specifies
54715               that the spike is drawn vertically.  Up to 100 spike
54716               directions can be specified.
54717
54718Examples:
54719    SPIKE DIRECTIONS H H
54720    SPIKE DIRECTIONS V V
54721    SPIKE DIRECTIONS V ALL
54722    SPIKE DIRECTIONS ALL V
54723    SPIKE DIRECTIONS
54724
54725Note:
54726    The HORIZONTAL SWITCH command can also be used to generate
54727    horizontal bars.  This command is more general in that all plot
54728    elements are drawn horizontally (SPIKE DIRECTION only does the
54729    spikes).  It also exchanges the x and y data values before
54730    plotting (the BAR DIRECTION command does not do this).
54731
54732Note:
54733    Horizontal spikes are typically combined with a portrait page
54734    orientation to generate publication quality bar dot graphs.
54735
54736Note:
54737    The SPIKE DIRECTION command with no arguments sets the spike
54738    direction to vertical for all spikes.  The SPIKE DIRECTION command
54739    with the word ALL before or after the specified direction assigns
54740    that spike direction to all traces; thus SPIKE DIRECTION H ALL or
54741    SPIKE DIRECTION ALL H plots all spikes horizontally.
54742
54743Note:
54744    The BAR, SPIKE, CHARACTER, and LINE switch all work independently
54745    of each other.  That is, a plot point can be a line, a character,
54746    a spike or a bar or any combination of the above.
54747
54748Default:
54749    All spikes are drawn vertically.
54750
54751Synonyms:
54752    None
54753
54754Related Commands:
54755    PLOT              = Generates a data or function plot.
54756    HORIZONTAL SWITCH = Specifies whether a plot is drawn horizontally
54757                        or vertically.
54758    SPIKE             = Sets the on/off switches for plot spikes.
54759    SPIKE BASE        = Sets the base locations for plot spikes.
54760    SPIKE COLOR       = Sets the colors for plot spikes.
54761    SPIKE LINE        = Sets the line types for plot spikes.
54762    SPIKE THICKNESS   = Sets the line thicknesses for plot spikes.
54763
54764References:
54765    "Elements of Graphing Data" by William S. Cleveland, Wadsworth
54766    Advanced Books and Software, 1985.
54767
54768    "Visualizing Data", William S. Cleveland, Hobart Press, 1993.
54769
54770Applications:
54771    Presentation Graphics
54772
54773Implementation Date:
54774    XX
54775
54776Program:
54777    LET CARTER = DATA 66 30 11 43 44 41 35 82 54 36
54778    LET REAGAN = DATA 26 54 84 47 51 51 52 14 36 55
54779    LET X = DATA 1 2 3 5 6 7 8 10 11 12
54780    .
54781    TIC MARK LABEL FORMAT ALPHA; YLIMITS 1 12; YTIC OFFSET 1 1
54782    Y1TIC LABEL CONTENT DEMOCRATS INDEPENDENTS REPUBLICANS SP() ...
54783       EAST SOUTH MIDWEST WEST SP() BLACKS HISPANICS WHITES SP()
54784    MINOR Y1TIC MARK NUMBER 0
54785    X1LABEL PERCENT
54786    XLIMITS -100 100
54787    MAJOR XTIC MARK NUMBER 11; MINOR XTIC MARK NUMBER 1
54788    XTIC MARK LABEL CONTENT 100 80 60 40 20 0 20 40 60 80 100
54789    .
54790    LINE BLANK BLANK SOLID
54791    SPIKE ON ON OFF
54792    SPIKE DIRECTION H ALL
54793    CHARACTER CIRCLE CIRCLE; CHARACTER FILL ON ON
54794    CHARACTER HW 1 0.75 ALL
54795    TITLE DOT CHART WITH HORIZONTAL DIRECTION
54796    LEGEND 1 CARTER; LEGEND 1 COORDINATES 17 85
54797    LEGEND 2 REAGAN; LEGEND 2 COORDINATES 83 85; LEGEND 2 JUST RIGHT
54798    .
54799    LET CART2 = -CARTER
54800    LET XJUNK = DATA 0.5 12.5; LET YJUNK = DATA 0 0
54801    PLOT X VS REAGAN AND
54802    PLOT X VS CART2 AND
54803    PLOT XJUNK YJUNK
54804
54805-----SPIKE LINE-------------------------------------------------------
54806
54807SPIKE LINE
54808
54809Name:
54810    SPIKE LINE
54811
54812Type:
54813    Plot Control Command
54814
54815Purpose:
54816    Specifies the line patterns used to draw spikes on subsequent
54817    plots.
54818
54819Description:
54820    A spike is a vertical line from the plot point to the spike base
54821    (most typically the x axis).  Spikes are specified by trace.  That
54822    is, all points belonging to the same trace are drawn with the same
54823    spike attributes.
54824
54825Syntax:
54826    SPIKE LINE  <type>  <type>  <type>  etc.
54827    where <type> is a character string that specifies the desired line
54828                type.  Up to 100 spike line types can be specified.
54829
54830Examples:
54831    SPIKE LINE SOLID DASH DOT
54832    SPIKE LINES SOLID ALL
54833    SPIKE LINES ALL SOLID
54834    SPIKE LINES
54835
54836Note:
54837    The SPIKE LINE command with no arguments sets the spike type to
54838    solid for all traces.  The SPIKE LINE command with the word ALL
54839    before or after the specified type assigns that pattern line type
54840    to all traces; thus SPIKE LINE SOLID ALL or SPIKE LINE ALL SOLID
54841    plots spike patterns with solid lines for all traces.
54842
54843Note:
54844    The BAR, SPIKE, CHARACTER, and LINE switch all work independently
54845    of each other.  That is, a plot point can be a line, a character,
54846    a spike or a bar or any combination of the above.
54847
54848Default:
54849    All spikes are drawn with solid lines.
54850
54851Synonyms:
54852    SPIKE PATTERN
54853
54854Related Commands:
54855    PLOT              = Generates a data or function plot.
54856    SPIKE             = Sets the on/off switches for plot spikes.
54857    SPIKE BASE        = Sets the base locations for plot spikes.
54858    SPIKE COLOR       = Sets the colors for plot spikes.
54859    SPIKE DIRECTION   = Sets the directions for plot spikes.
54860    SPIKE THICKNESS   = Sets the line thicknesses for plot spikes.
54861
54862References:
54863    "Elements of Graphing Data" by William S. Cleveland, Wadsworth
54864    Advanced Books and Software, 1985.
54865
54866    "Visualizing Data", William S. Cleveland, Hobart Press, 1993.
54867
54868Applications:
54869    Presentation Graphics
54870
54871Implementation Date:
54872    XX
54873
54874Program:
54875    LET CARTER = DATA 66 30 11 43 44 41 35 82 54 36
54876    LET REAGAN = DATA 26 54 84 47 51 51 52 14 36 55
54877    LET X = DATA 1 2 3 5 6 7 8 10 11 12
54878    .
54879    TIC MARK LABEL FORMAT ALPHA; YLIMITS 1 12; YTIC OFFSET 1 1
54880    Y1TIC LABEL CONTENT DEMOCRATS INDEPENDENTS REPUBLICANS SP() ...
54881       EAST SOUTH MIDWEST WEST SP() BLACKS HISPANICS WHITES SP()
54882    MINOR Y1TIC MARK NUMBER 0
54883    X1LABEL PERCENT; XLIMITS -100 100
54884    MAJOR XTIC MARK NUMBER 11; MINOR XTIC MARK NUMBER 1
54885    XTIC MARK LABEL CONTENT 100 80 60 40 20 0 20 40 60 80 100
54886    .
54887    LINE BLANK BLANK SOLID
54888    CHARACTER CIRCLE CIRCLE; CHARACTER FILL ON ON
54889    CHARACTER HW 1 0.75 ALL
54890    SPIKE ON ON OFF; SPIKE DIRECTION H ALL
54891    SPIKE LINE DASH DASH
54892    TITLE DEMONSTRATE SPIKE LINE COMMAND
54893    LEGEND 1 CARTER; LEGEND 1 COORDINATES 17 85
54894    LEGEND 2 REAGAN; LEGEND 2 COORDINATES 83 85; LEGEND 2 JUST RIGHT
54895    .
54896    LET CART2 = -CARTER
54897    LET XJUNK = DATA 0.5 12.5; LET YJUNK = DATA 0 0
54898    PLOT X VS REAGAN AND
54899    PLOT X VS CART2 AND
54900    PLOT XJUNK YJUNK
54901
54902-----SPIKE THICKNESS--------------------------------------------------
54903
54904SPIKE THICKNESS
54905
54906Name:
54907    SPIKE THICKNESS
54908
54909Type:
54910    Plot Control Command
54911
54912Purpose:
54913    Specifies the thickness of lines used to draw spikes on subsequent
54914    plots.
54915Description:
54916    A spike is a vertical line from the plot point to the spike base
54917    (most typically the x axis).  Spikes are specified by trace.  That
54918    is, all points belonging to the same trace are drawn with the same
54919    spike attributes.
54920
54921    Line thickness is specified as a percentage of the vertical
54922    height of the device.  Line widths are typically between 0.1 and
54923    0.3.
54924
54925Syntax:
54926    SPIKE THICKNESSS  <thickness>  <thickness>  <thickness>  etc.
54927    where <thickness> is a number or parameter that specifies the
54928              desired line thickness.  Up to 100 spike thicknesses can
54929              be specified.
54930
54931Examples:
54932    SPIKE THICKNESSS 0.1 0.2 0.1 0.2
54933    SPIKE THICKNESSS 0.2 0.2 0.1
54934    SPIKE THICKNESSS 0.1 ALL
54935    SPIKE THICKNESSS ALL 0.1
54936    SPIKE THICKNESSS
54937
54938Note:
54939    The SPIKE THICKNESS command with no arguments sets the spike line
54940    thickness to default for all traces.  The SPIKE THICKNESS command
54941    with the word ALL before or after the specified thickness assigns
54942    that spike line thickness to all spikes; thus SPIKE THICKNESS 0.1
54943    ALL or SPIKE THICKNESS ALL 0.1 draws spikes with a line thickness
54944    of 0.1 for all traces on the plot.
54945
54946Note:
54947    The SPIKE, BAR, CHARACTER, and LINE switch all work independently
54948    of each other.  That is, a plot point can be a line, a character,
54949    a spike, a bar, or any combination of the above.
54950
54951Default:
54952    All spikes are drawn with a line width of 0.1.
54953
54954Synonyms:
54955    None
54956
54957Related Commands:
54958    PLOT              = Generates a data or function plot.
54959    SPIKE             = Sets the on/off switches for plot spikes.
54960    SPIKE BASE        = Sets the base locations for plot spikes.
54961    SPIKE COLOR       = Sets the colors for plot spikes.
54962    SPIKE DIRECTION   = Sets the directions for plot spikes.
54963    SPIKE LINE        = Sets the line types for plot spikes.
54964
54965References:
54966    "Elements of Graphing Data" by William S. Cleveland, Wadsworth
54967    Advanced Books and Software, 1985.
54968
54969    "Visualizing Data", William S. Cleveland, Hobart Press, 1993.
54970
54971Applications:
54972    Presentation Graphics
54973
54974Implementation Date:
54975    XX
54976
54977Program:
54978    LET CARTER = DATA 66 30 11 43 44 41 35 82 54 36
54979    LET REAGAN = DATA 26 54 84 47 51 51 52 14 36 55
54980    LET X = DATA 1 2 3 5 6 7 8 10 11 12
54981    .
54982    TIC MARK LABEL FORMAT ALPHA; YLIMITS 1 12; YTIC OFFSET 1 1
54983    Y1TIC LABEL CONTENT DEMOCRATS INDEPENDENTS REPUBLICANS SP() ...
54984       EAST SOUTH MIDWEST WEST SP() BLACKS HISPANICS WHITES SP()
54985    MINOR Y1TIC MARK NUMBER 0
54986    X1LABEL PERCENT
54987    XLIMITS -100 100
54988    MAJOR XTIC MARK NUMBER 11; MINOR XTIC MARK NUMBER 1
54989    XTIC MARK LABEL CONTENT 100 80 60 40 20 0 20 40 60 80 100
54990    .
54991    LINE BLANK BLANK SOLID
54992    SPIKE ON ON OFF; SPIKE DIRECTION H ALL
54993    SPIKE THICKNESS 0.5 ALL
54994    TITLE DEMONSTRATE SPIKE THICKNESS COMMAND
54995    LEGEND 1 CARTER; LEGEND 1 COORDINATES 17 85
54996    LEGEND 2 REAGAN; LEGEND 2 COORDINATES 83 85; LEGEND 2 JUST RIGHT
54997    .
54998    LET CART2 = -CARTER
54999    LET XJUNK = DATA 0.5 12.5; LET YJUNK = DATA 0 0
55000    PLOT X VS REAGAN AND
55001    PLOT X VS CART2 AND
55002    PLOT XJUNK YJUNK
55003
55004-----SPHRHRMR (LET)--------------------------------
55005
55006SPHRHRMR
55007
55008Name:
55009    SPHRHRMR (LET)
55010
55011Type:
55012    Library Function
55013
55014Purpose:
55015    Compute the spherical harmonic function of order N and degree M.
55016
55017Description:
55018    The spherical harmonic function is related to the associated
55019    Legendre function as follows:
55020       Yn,m(theta,phi) = SQRT((2n+1)*(n-m)!/(4*PI*(n+m)!))*
55021                          Pn,m(cos(theta))*EXP(i*m*phi)
55022    where Pn,m is the associated Legendre polynomial.  See the
55023    documentation for the LEGENDRE command for a description of
55024    Legendre polynomials and associated Legendre polynomials.
55025
55026    DATAPLOT use the NORMP set of routines from the Slatec library to
55027    compute the normalized associated Legendre polynomials.  These are
55028    then transformed in an appropriate manner to obtain the spherical
55029    harmonic value.  These routines use a technique called extended
55030    range arithmetic to avoid underflow and overflow problems.
55031    However, DATAPLOT stores the result as a single precision real
55032    number.  If it is unable to do so, it prints an error message.
55033
55034Syntax 1:
55035    LET <y> = SPHRHRMR(<theta>,<phi>,<n>,<m>)
55036                                   <SUBSET/EXCEPT/FOR qualification>
55037    where <theta> is a number, parameter, or variable in the range
55038              (-PI,PI);
55039          <phi> is a number, parameter, or variable in the range
55040              (-PI,PI);
55041          <n> is a non-negative integer number, parameter, or variable
55042              that specifies the order of the Legendre polynomial;
55043          <m> is a non-negative integer number, parameter, or variable
55044              that specifies the degree of the Legendre polynomial;
55045          <y> is a variable or a parameter (depending on what <x> is)
55046              where the computed spherical harmonic value is stored;
55047    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
55048
55049    This syntax computes the real component of the spherical harmonic
55050    function.
55051
55052Syntax 2:
55053    LET <y> = SPHRHRMC(<theta>,<phi>,<n>,<m>)
55054                                   <SUBSET/EXCEPT/FOR qualification>
55055    where <theta> is a number, parameter, or variable in the range
55056              (-PI,PI);
55057          <phi> is a number, parameter, or variable in the range
55058              (-PI,PI);
55059          <n> is a non-negative integer number, parameter, or variable
55060              that specifies the order of the Legendre polynomial;
55061          <m> is a non-negative integer number, parameter, or variable
55062              that specifies the degree of the Legendre polynomial;
55063          <y> is a variable or a parameter (depending on what <x> is)
55064              where the computed spherical harmonic value is stored;
55065    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
55066
55067    This syntax computes the complex component of the spherical
55068    harmonic function.
55069
55070Examples:
55071    DEGREES; LET AR = SPHRHRMR(45,60,5,2); LET AC = SPHRMRC(45,60,5,2)
55072    DEGREES; LET AR = SPHRHRMR(T,P,5,2); LET AC = SPHRMRC(T,P,5,2)
55073    DEGREES; LET AR = SPHRHRMR(T,P,N,M); LET AC = SPHRMRC(T,P,N,M)
55074
55075Note:
55076    Spherical harmonics are often specified with an angular input
55077    value.  If your input value is in terms of the (-1,1) interval,
55078    use the command
55079        LET TNEW = ARCCOS(T)
55080        LET PNEW = ARCCOS(P)
55081    and then use TNEW and PNEW as the input arguments to the spherical
55082    harmonic functions.
55083
55084    By default, the angle is specified in radians.  Enter the command
55085    DEGREES to specify degree units.
55086
55087Note:
55088    Library functions are distinguished from let subcommands
55089    in the following ways.
55090    1) Functions enclose the input value in parenthesis.  Let
55091       subcommands use spaces.
55092    2) Functions can accept (and return) either parameters
55093       (i.e., single values) or variables (i.e., an array of
55094       values) while let subcommands are specific in which they
55095       accept as input and what they return as output.
55096    3) Functions can accept expressions while let subcommands
55097       do not.  For example, the following is legal:
55098           LET Y2 = ABS(Y1-INT(Y1))
55099       For let subcommands, you typically have to do something
55100       like the following:
55101           LET YTEMP = Y**2 + 8
55102           LET A = SUM YTEMP
55103
55104Default:
55105    None
55106
55107Synonyms:
55108    None
55109
55110Related Commands:
55111    LEGENDRE = Compute the Legendre polynomial of order N.
55112    CHEBT    = Compute the Chebychev polynomial first kind, order N.
55113    CHEBU    = Compute the Chebychev polynomial second kind, order N.
55114    HERMITE  = Compute the Hermite polynomial of order N.
55115    JACOBIPE = Compute the Jacobi polynomial of order N.
55116    ULTRASPH = Compute the ultrasperical polynomial of order N.
55117    LAGUERRE = Compute the Laguerre polynomial of order N.
55118
55119Reference:
55120    "Extended-Range Arithmetic and Normalized Legendre Polynomials",
55121    Smith, Olver, and Lozier, ACM Transactions On Mathematical
55122    Software, Vol. 7, No. 1, March, 1981 (pp. 93-105).
55123
55124    "Associated Legendre Functions on the Cut", Smith, and Olver,
55125    Journal of Computational Physics, Vol. 51, No. 3, September, 1983,
55126    (pp. 502-518).
55127
55128    "Handbook of Mathematical Functions, Applied Mathematics Series,
55129    Vol. 55", Abramowitz and Stegun, National Bureau of Standards,
55130    1964 (chapter 22).
55131
55132Applications:
55133    Mathematics
55134
55135Implementation Date:
55136    95/7
55137
55138Program:
55139    TITLE CASE ASIS; LABEL CASE ASIS; LINE SOLID DASH
55140    DEGREES
55141    Y1LABEL Y(theta,phi,n,m)
55142    X1LABEL THETA   (phi = 60, n = 5)
55143    X2LABEL SOLID = Real Component
55144    X3LABEL DASH = Complex Component
55145    TITLE Spherical Harmonics (m = 2)
55146    MULTIPLOT 2 2; MULTIPLOT CORNER COORDINATES 0 0 100 100
55147    PLOT SPHRHRMR(X,60,5,2) FOR X = 1 1 89 AND
55148    PLOT SPHRHRMC(X,60,5,2) FOR X = 1 1 89
55149    TITLE Spherical Harmonics (m = 3)
55150    PLOT SPHRHRMR(X,60,5,3) FOR X = 1 1 89 AND
55151    PLOT SPHRHRMC(X,60,5,3) FOR X = 1 1 89
55152    TITLE Spherical Harmonics (m = 4)
55153    PLOT SPHRHRMR(X,60,5,4) FOR X = 1 1 89 AND
55154    PLOT SPHRHRMC(X,60,5,4) FOR X = 1 1 89
55155    TITLE Spherical Harmonics (m = 5)
55156    PLOT SPHRHRMR(X,60,5,5) FOR X = 1 1 89 AND
55157    PLOT SPHRHRMC(X,60,5,5) FOR X = 1 1 89
55158    END OF MULTIPLOT
55159
55160-----SPLINE FIT-------------------------------------------------------
55161
55162SPLINE FIT
55163
55164Name:
55165    ... SPLINE FIT
55166
55167Type:
55168    Analysis Command
55169
55170Purpose:
55171    Carries out a B-spline fit.
55172
55173Description:
55174    A spline fit is a data analysis technique for estimating (via the
55175    least squares criterion) the parameters in a spline polynomial
55176    model.  It is commonly used to fit curves that have different
55177    shapes in different areas of the horizontal axis variable.  Knot
55178    points are defined to delineate these different regions.  Separate
55179    spline polynomials are fit in these different areas.  The
55180    distinction of spline fits is that the fitted curve will be smooth
55181    at the knot points.
55182
55183Syntax 1:
55184    <degree> SPLINE FIT <y> <x> <x2>  <SUBSET/EXCEPT/FOR qualification>
55185    where <degree> is the degree of the spline fit:
55186                 LINEAR      (or 1ST or FIRST)
55187                 QUADRATIC   (or 2ND or SECOND)
55188                 CUBIC       (or 3RD or THIRD ) (the default)
55189                 QUARTIC     (or 4TH or FOURTH)
55190                 QUINTIC     (or 5TH or FIFTH)
55191                 SEXTIC      (or 6TH or SIXTH)
55192                 SEPTIC      (or 7TH or SEVENTH)
55193                 OCTIC       (or 8TH or EIGHTH)
55194                 NONIC       (or 9TH or NINTH)
55195                 DEXIC       (or 10TH or TENTH);
55196          <y> is the response (vertical axis) variable;
55197          <x> is the independent (horizontal axis) variable;
55198          <x2> is the knots variable;
55199    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
55200
55201Syntax 2:
55202    <degree> SPLINE FIT <y> <x>   <SUBSET/EXCEPT/FOR qualification>
55203    where <degree> is the degree of the spline fit (same choices as for
55204              syntax 1);
55205          <y> is the response (vertical axis) variable;
55206          <x> is the independent (horizontal axis) variable;
55207    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
55208
55209    With this syntax, the knots variable is specified with the KNOTS
55210    command before doing the SPLINE FIT command.
55211
55212Examples:
55213    SPLINE FIT Y X X2
55214    CUBIC SPLINE FIT Y X K
55215
55216Note:
55217    The knots variable contains the values along the X axis which
55218    define the end points of sub-domains (a separate spline is fit in
55219    each sub-domain).  The individual points are "splined" together at
55220    these knot points.
55221
55222Note:
55223    The values for the spline fit are placed in the internal variable
55224    PRED. The residuals (the difference between the fitted values and
55225    the raw data) are placed in the internal variable RES.
55226
55227Note:
55228    A maximum of 50 knot points can be defined.
55229
55230Note:
55231    Cubic splines are the most commonly used.  Degrees above 3 are
55232    rarely used.
55233
55234Default:
55235    Cubic splines (i.e., degree 3).
55236
55237Synonyms:
55238    None
55239
55240Related Commands:
55241    KNOTS         = Specify the knots variable for a spline fit.
55242    FIT           = Compute a least squares fit.
55243    LOWESS        = Compute a locally weighted least squares.
55244    SMOOTH        = Perform a smoothing of a variable.
55245
55246Reference:
55247    "...", Wold, Technometrics, 1974, page 2.
55248
55249    "Numerical Recipes", Press, Flannery, Teukolsky, Vetterling,
55250    Cambridge Press, 1989 (chapter 3).
55251
55252Applications:
55253    Fitting
55254
55255Implementation Date:
55256    Pre-1987
55257
55258Program:
55259    LET X = DATA 1 2 3 4 5 6 7 8 9 10
55260    LET Y = DATA 1 2 3 4 5 5.1 5.2 5.3 5.4 5.5
55261    .
55262    LET KNOT(1) = 5
55263    CAPTURE SPLINE_OUT.DAT
55264    LINEAR SPLINE FIT Y X KNOT
55265    END OF CAPTURE
55266    CHARACTER CIRCLE BLANK
55267    LINE BLANK SOLID
55268    CHARACTER FILL ON
55269    CHARACTER SIZE 1.2
55270    TITLE LINEAR SPLINE FIT
55271    PLOT Y PRED VS X
55272
55273-----SPREAD LOCATION PLOT--------------------------------------
55274
55275SPREAD LOCATION PLOT
55276
55277Name:
55278    SPREAD LOCATION PLOT
55279
55280Type:
55281    Graphics Command
55282
55283Purpose:
55284    Generates a spread location plot.
55285
55286Description:
55287    The spread-location (s-l) plot is a robust alternative to
55288    the homoscedasticity plot.
55289
55290    Given a response variable Y and a group-id variable X,
55291    the homoscedasticity plot is the group standard deviations
55292    versus the group means.  This is a graphical measure of
55293    how the spread (variability) changes as the location changes
55294    across groups.  This is basically a graphical test for
55295    the assumption of homogeneous variances across samples.
55296
55297    The s-l plot has the square roots of the absolute value of
55298    the Y(i) minus their group medians on the vertical axis and
55299    the group medians on the horizontal axis.  A reference line
55300    connects the group medians.  This provides a more robust
55301    measure of how the spread changes as the location changes.
55302
55303    The basic idea can be applied to other measure of location
55304    and spread.  That is, some measure of spread (or variability)
55305    is plotted on the vertical axis and some measure of location
55306    is plotted on the horizontal axis.  Although Dataplot only
55307    supports the HOMOSCEDASTICITY PLOT and the SPREAD LOCATION
55308    PLOT directly, it should be straight forward to implement
55309    other alternatives as macros.
55310
55311    When setting the LINE and CHARACTER commands, the reference
55312    line is the first trace and the data starts with trace 2
55313    (each group is identified as a unique trace).  That is, to
55314    draw the data points as circles and the reference line as a
55315    solid line, do something like the following
55316
55317        CHARACTER CIRCLE ALL
55318        CHARACTER BLANK
55319        LINE BLANK ALL
55320        LINE SOLID
55321        SPREAD LOCATION PLOT Y X
55322
55323Syntax:
55324    SPREAD LOCATION PLOT <y> <tag>  <SUBSET/EXCEPT/FOR qualification>
55325    where <y> is a  response variable;
55326          <tag> is a group identifier variable;
55327    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
55328
55329Examples:
55330    SPREAD LOCATION PLOT Y1 TAG
55331    SPREAD LOCATION PLOT Y1 TAG  SUBSET TAG > 2
55332
55333Default:
55334    None
55335
55336Synonyms:
55337    None
55338
55339References:
55340    "Visualizing Data", Cleveland, William S., Hobart Press, 1993.
55341
55342Related Commands:
55343    LINES                  = Sets the type for plot lines.
55344    CHARACTER              = Sets the type for plot characters.
55345    HOMOSCEDATICITY PLOT   = Generates a homoscedasticity plot.
55346    BOX PLOT               = Generates a box plot.
55347    PLOT                   = Generates a data or function plot.
55348    LEVENES TEST           = Perform Levenes test for homogeneity
55349                             of variances.
55350
55351    BARTLET TEST           = Perform Bartlet;s test for homogeneity
55352                             of variances.
55353Applications:
55354    Exploratory Data Analysis
55355
55356Implementation Date:
55357    2000/1
55358
55359Program:
55360    SKIP 25
55361    READ SPLETT2.DAT Y MACHINE
55362    TIC OFFSET UNITS DATA
55363    XTIC OFFSET 0.5 0.5
55364    YTIC OFFSET 0.2 0.2
55365    YTIC MARK DECIMAL 1
55366    CHARACTER BLANK 1 2 3 4
55367    LINE SOLID BLANK BLANK BLANK BLANK
55368    TITLE AUTOMATIC
55369    Y1LABEL SPREAD
55370    X1LABEL LOCATION
55371    SPREAD LOCATION PLOT Y MACHINE
55372
55373-----SQRT (LET)------------------------------------------------
55374
55375SQRT
55376
55377Name:
55378    SQRT (LET)
55379
55380Type:
55381    Library Function
55382
55383Purpose:
55384    Compute the square root of a non-negative number.
55385
55386Syntax:
55387    LET <y2> = SQRT(<y1>)  <SUBSET/EXCEPT/FOR qualification>
55388    where <y1> is a variable or a parameter containing non-negative
55389               decimal number(s);
55390          <y2> is a variable or a parameter (depending on what <y1> is)
55391               where the computed square roots are stored;
55392    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
55393
55394Examples:
55395    LET A = SQRT(14.2835,1)
55396    LET A = SQRT(A1,2)
55397    LET X2 = SQRT(X1,1)
55398    LET X2 = SQRT(X1-4,2)
55399
55400Note:
55401    Library functions are distinguished from let subcommands
55402    in the following ways.
55403    1) Functions enclose the input value in parenthesis.  Let
55404       subcommands use spaces.
55405    2) Functions can accept (and return) either parameters
55406       (i.e., single values) or variables (i.e., an array of
55407       values) while let subcommands are specific in which they
55408       accept as input and what they return as output.
55409    3) Functions can accept expressions while let subcommands
55410       do not.  For example, the following is legal:
55411           LET Y2 = ABS(Y1-INT(Y1))
55412       For let subcommands, you typically have to do something
55413       like the following:
55414           LET YTEMP = Y**2 + 8
55415           LET A = SUM YTEMP
55416
55417Default:
55418    None
55419
55420Synonyms:
55421    None
55422
55423Related Commands:
55424    ABS    = Compute the absolute value of a number.
55425    EXP    = Compute the exponential of a number.
55426    MOD    = Compute the modulo function.
55427    MIN    = Compute the minimum of two numbers.
55428    MAX    = Compute the maximum of two numbers.
55429    DIM    = Compute the positive difference of two numbers.
55430    IND    = Compute the mathematical indicator function.
55431
55432Applications:
55433    XX
55434
55435Implementation Date:
55436    XX
55437
55438Program:
55439    TITLE PLOT SQUARE ROOT FUNCTION
55440    PLOT SQRT(X) FOR X = 0 .1 9.9
55441
55442-----SQUARED RANKS TEST-----------------------------------------
55443
55444SQUARED RANKS
55445
55446Name:
55447    SQUARED RANKS
55448
55449Type:
55450    Analysis Command
55451
55452Purpose:
55453    Perform a squared ranks test that k samples have equal variances.
55454
55455Description:
55456    The F test is the standard parameteric test for testing the
55457    equality of variances for the two sample case.  The squared
55458    ranks test is a nonparametric test for either the two sample
55459    case or the case of k groups.
55460
55461    The assumptions for using this test are
55462
55463        1. The k samples are random samples from their respective
55464           populations.
55465
55466        2. The k samples are mutually independent.
55467
55468        3. The measurement is scale is at least interval (i.e.,
55469           the data can be ranked).
55470
55471    More formally,
55472
55473        H0: The samples are identically distributed except for
55474            possibly different means
55475        HA: At least two of the variances are not equal
55476        Test Statistic:
55477
55478                T = (1/D**2)*{SUM[i=1 to k][S(i)**2/n(i)] - N*SBAR**2}
55479
55480            where
55481
55482                S(i) = sum of squared ranks in subsample i
55483                n(i) = number of observations in subsample i
55484                D**2 = (1/(N-1))*{SUM[i=1 to N][R(i)**4] - N*SBAR**2}
55485                SBAR = (1/N)*SUM[j=1 to k][S(k)]
55486                     = (1/N)*SUM[i=1 to N][S(k)]
55487                R(i) = rank of observation i
55488
55489            For the 2-sample case, the test statistic is
55490
55491               T1 = {T - N1*SBAR**2}/
55492                    SQRT{(N1*N2)/(N*(N-1))}*SUM[i=1 to N][R(i)**4] -
55493                    (N1*N2/(N-1))*(SBAR)**2}
55494
55495        Significance Level: alpha
55496        Critical Region: For the k sample case
55497
55498                             T1 > CHIPPF(ALPHA,K-1)
55499
55500                         where CHIPPF is the chi-square percent point
55501                         function.
55502
55503                         For the 2 sample case,
55504
55505                             T1 > NORPPF(1 - ALPHA/2)
55506                             T1 < NORPPF(ALPHA/2)
55507
55508                         where CHIPPF is the chi-square percent point
55509                         function.
55510
55511        Conclusion: Reject the null hypothesis if the test
55512                    statistic is in the critical region.
55513
55514Syntax 1:
55515    <LOWER TAILED/UPPER TAILED> SQUARED RANKS  <y>  <x>
55516                                <SUBSET/EXCEPT/FOR qualification>
55517    where <LOWER TAILED/UPPER TAILED> is an optional keyword for the
55518              two sample case;
55519          <y> is the response (= dependent) variable;
55520          <x> is the factor (= independent) variable;
55521    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
55522
55523    The LOWER TAILED and UPPER TAILED options are only available
55524    for the two sample case.  Only one can be specified and if
55525    neither is entered a two-tailed test will be performed.
55526
55527Syntax 2:
55528    MULTIPLE SQUARED RANKS  <y1> ... <yk>
55529                             <SUBSET/EXCEPT/FOR qualification>
55530    where <LOWER TAILED/UPPER TAILED> is an optional keyword for the
55531              two sample case;
55532          <y1> ... <yk> is a list of 1 to 30 response variables;
55533    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
55534
55535    This syntax is used for the case when the data for each group is
55536    stored in a separate variable.  This syntax accepts matrix arguments.
55537
55538    The LOWER TAILED and UPPER TAILED options are only available
55539    for the two sample case.  Only one can be specified and if
55540    neither is entered a two-tailed test will be performed.
55541
55542Examples:
55543    SQUARED RANKS TEST Y X
55544    SQUARED RANKS TEST Y X  SUBSET X = 1 TO 4
55545    MULTIPLE SQUARED RANKS TEST Y1 Y2 Y3 Y4
55546    MULTIPLE SQUARED RANKS TEST Y1 TO Y4
55547    LOWER TAILED SQUARED RANKS TEST Y1 Y2
55548    UPPER TAILED SQUARED RANKS TEST Y1 Y2
55549
55550Note:
55551    For the k sample case and if the hypothesis of identical distributions
55552    is rejected, you can perform a multiple comparisons procedure to
55553    determine which pairs of populations tend to differ.
55554
55555    The populations i and j seem to have different variances if the
55556    following inequality is satisfied:
55557
55558       |S(i)/N(i) - S(j)/n(j)| > TPPF(1-(alpha/2))*
55559                                 SQRT(D**2**(N-1-T1)/(N-k))*
55560                                 SQRT((1/N(i)) + (1/N(j)))
55561
55562    with TPPF and T1 denoting the t percent point function with N - k
55563    degrees of freedom and the Kruskal-Wallis test statistic,
55564    respectively.
55565
55566Note:
55567    The following statistics are also supported:
55568
55569        LET A = SQUARED RANKS TEST                     Y
55570        LET A = SQUARED RANKS TEST CDF                 Y
55571        LET A = SQUARED RANKS TEST PVALUE              Y
55572        LET A = SQUARED RANKS TEST LOWER TAILED PVALUE Y
55573        LET A = SQUARED RANKS TEST UPPER TAILED PVALUE Y
55574
55575    Enter HELP STATISTICS to see what commands can use these
55576    statistics.
55577
55578Default:
55579    None
55580
55581Synonyms:
55582    SQUARED RANKS is a synonym for SQUARED RANKS TEST
55583
55584Related Commands:
55585    KLOTZ TEST            = Perform two sample test for equal variances.
55586    KRUSKAL WALLIS TEST   = Perform Kruskal Wallis test for equal
55587                            locations.
55588    ANOVA                 = Perform an analysis of variance.
55589    MEDIAN TEST           = Perform a median test for equal variances.
55590    BLOCK PLOT            = Generate a block plot.
55591    DEX ... PLOT          = Generates a dex plot for a statistic.
55592    T TEST                = Performs a t test.
55593
55594Reference:
55595    W. J. Conover, (1999).  "Practical Nonparameteric Statistics",
55596    Third Edition, Wiley, pp. 300-310.
55597
55598Applications:
55599    Nonparametric Analysis
55600
55601Implementation Date:
55602    2011/6
55603
55604Program:
55605    . Step 1: Read Data (example 1 from pp. 304-305 of Conover)
55606    .
55607    let y1 = data 10.8 11.1 10.4 10.1 11.3
55608    let y2 = data 10.8 10.5 11.0 10.9 10.8 10.7 10.8
55609    .
55610    . Step 2: Data with more than 2 groups
55611    .
55612    let z1 = data 0.7  1  2  1.4  0.5  0.8  1  1.1  1.9  1.2  1.5
55613    let z2 = data 1.7  2.1  -0.4  0  1  1.1  0.9  2.3  1.3  0.4  0.5
55614    let z3 = data 0.9  0.9  1  0  0.1  -0.6  2.2  -0.3  0.6  2.4  2.5
55615    .
55616    . Step 3: Convert to form needed for "statistic" command
55617    .
55618    let y x = stacked y1 y2
55619    let zy zx = stacked z1 z2 z3
55620    set write decimals 4
55621    .
55622    .  Step 2: Check the statistic
55623    .
55624    .  stat = 5.192, pvalue = 0.0754
55625    .
55626    let stat = squared rank test         zy zx
55627    let pval = squared rank test pvalue  zy zx
55628    let cdf  = squared rank test cdf     zy zx
55629    print stat cdf pval
55630    pause
55631    .
55632    let stat2 = squared rank test         y x
55633    let cdf2  = squared rank test cdf     y x
55634    let pval2 = squared rank test pvalue  y x
55635    let pvallt = squared rank test lower tailed pvalue  y x
55636    let pvalut = squared rank test upper tailed pvalue  y x
55637    print stat2 cdf2 pval2 pvallt pvalut
55638    .
55639    squared rank test y1 y2
55640
55641-----SRACDF (LET)--------------------------------
55642
55643SRACDF
55644
55645Name:
55646    SRACDF (LET)
55647
55648Type:
55649    Library Function
55650
55651Purpose:
55652    Compute the studentized range cumulative distribution
55653    function with degrees of freedom parameter V and number of
55654    samples parameter R.
55655
55656Description:
55657    The studentized range is defined as:
55658
55659       Q = Range/Standard Deviation
55660
55661    The studentized range is used in constructing confidence
55662    intervals for tests of multiple comparisons in analysis
55663    of variance problems.
55664
55665    The parameter V must be >= 1 and R must be >= 2.  Note
55666    that for the most common uses of this distribution
55667    R is usually set to V + 1.
55668
55669Syntax:
55670    LET <y> = SRACDF(<x>,<v>,<r>)  <SUBSET/EXCEPT/FOR qualification>
55671    where <x> is a variable or a parameter where the studentized
55672               range will be computed (<x> > 0);
55673          <y> is a variable or a parameter (depending on what <x> is)
55674               where the computed studentized range cdf values are
55675               stored;
55676          <v> is a number or parameter that specifies the degrees
55677               of freedom parameter (<v> >= 1);
55678          <r> is a number or parameter that specifies the sample
55679               size parameter (<r> >= 2);
55680    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
55681
55682Examples:
55683    LET A = SRACDF(3,10,11)
55684    LET A = SRACDF(A1,22,23)
55685    LET X2 = SRACDF(X1,V,R)
55686
55687Note:
55688    This command is implemented using the Algorithm AS 190,
55689    prtrng, from Applied Statistics (1983), Vol. 32, No. 2.
55690    It incorporates modifications from Applied Statistics,
55691    (1985) Vol. 34, (1).
55692
55693Note:
55694    Library functions are distinguished from let subcommands
55695    in the following ways.
55696    1) Functions enclose the input value in parenthesis.  Let
55697       subcommands use spaces.
55698    2) Functions can accept (and return) either parameters
55699       (i.e., single values) or variables (i.e., an array of
55700       values) while let subcommands are specific in which they
55701       accept as input and what they return as output.
55702    3) Functions can accept expressions while let subcommands
55703       do not.  For example, the following is legal:
55704           LET Y2 = ABS(Y1-INT(Y1))
55705       For let subcommands, you typically have to do something
55706       like the following:
55707           LET YTEMP = Y**2 + 8
55708           LET A = SUM YTEMP
55709
55710Default:
55711    None
55712
55713Synonyms:
55714    None
55715
55716Related Commands:
55717    SRAPPF = Compute the studentized range percent point function.
55718    ANOVA  = Perform an analysis of variance.
55719    CHSPDF = Compute the chi-square probability density function.
55720    CHSPPF = Compute the chi-square percent point function.
55721    CHSCDF = Compute the chi-square cumulative distribution function.
55722    FCDF   = Compute the F cumulative distribution function.
55723    FPDF   = Compute the F probability density function.
55724    FPPF   = Compute the F percent point function.
55725    NORCDF = Compute the normal cumulative distribution function.
55726    NORPDF = Compute the normal probability density function.
55727    NORPPF = Compute the normal percent point function.
55728    TCDF   = Compute the T cumulative distribution function.
55729    TPDF   = Compute the T probability density function.
55730    TPPF   = Compute the T percent point function.
55731
55732Applications:
55733    Analysis of Variance
55734
55735Implementation Date:
55736    1999/3
55737
55738Program:
55739    TITLE AUTOMATIC
55740    MULTIPLOT CORNER COORDINATES 5 5 95 95
55741    MULTIPLOT 2 2
55742    PLOT SRACDF(X,4,5) FOR X = 0.01 0.01 10
55743    PLOT SRACDF(X,9,10) FOR X = 0.01 0.01 10
55744    PLOT SRACDF(X,19,20) FOR X = 0.01 0.01 10
55745    PLOT SRACDF(X,29,30) FOR X = 0.01 0.01 10
55746    END OF MULTIPLOT
55747
55748-----SRAPPF (LET)--------------------------------
55749
55750SRAPPF
55751
55752Name:
55753    SRAPPF (LET)
55754
55755Type:
55756    Library Function
55757
55758Purpose:
55759    Compute the studentized range percent point function with
55760    degrees of freedom parameter V and number of samples
55761    parameter R.
55762
55763Description:
55764    The studentized range is defined as:
55765
55766       Q = Range/Standard Deviation
55767
55768    The studentized range is used in constructing confidence
55769    intervals for tests of multiple comparisons in analysis
55770    of variance problems.
55771
55772    The parameter V must be >= 1 and R must be >= 2.  Note
55773    that for the most common uses of this distribution
55774    R is usually set to V + 1.
55775
55776    This function is only supported for values in the range
55777    0.90 to 0.99.
55778
55779Syntax:
55780    LET <y> = SRAPPF(<p>,<v>,<r>)  <SUBSET/EXCEPT/FOR qualification>
55781    where <p> is a variable or a parameter where the studentized
55782               range percent point will be computed
55783               (0.90 <= <p> <= 0.99);
55784          <y> is a variable or a parameter (depending on what <x> is)
55785               where the computed studentized range cdf values are
55786               stored;
55787          <v> is a number or parameter that specifies the degrees
55788               of freedom parameter (<v> >= 1);
55789          <r> is a number or parameter that specifies the sample
55790               size parameter (<r> >= 2);
55791    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
55792
55793Examples:
55794    LET A = SRAPPF(0.90,10,11)
55795    LET A = SRAPPF(0.95,22,23)
55796    LET X2 = SRAPPF(0.99,V,R)
55797
55798Note:
55799    This command is implemented using the Algorithm AS 190,
55800    qrtrng, from Applied Statistics (1983), Vol. 32, No. 2.
55801    It incorporates modifications from Applied Statistics,
55802    (1985) Vol. 34, (1).
55803
55804Note:
55805    Library functions are distinguished from let subcommands
55806    in the following ways.
55807    1) Functions enclose the input value in parenthesis.  Let
55808       subcommands use spaces.
55809    2) Functions can accept (and return) either parameters
55810       (i.e., single values) or variables (i.e., an array of
55811       values) while let subcommands are specific in which they
55812       accept as input and what they return as output.
55813    3) Functions can accept expressions while let subcommands
55814       do not.  For example, the following is legal:
55815           LET Y2 = ABS(Y1-INT(Y1))
55816       For let subcommands, you typically have to do something
55817       like the following:
55818           LET YTEMP = Y**2 + 8
55819           LET A = SUM YTEMP
55820
55821Default:
55822    None
55823
55824Synonyms:
55825    None
55826
55827Related Commands:
55828    SRACDF = Compute the studentized range cumulative distribution
55829             function.
55830    ANOVA  = Perform an analysis of variance.
55831    CHSPDF = Compute the chi-square probability density function.
55832    CHSPPF = Compute the chi-square percent point function.
55833    CHSCDF = Compute the chi-square cumulative distribution function.
55834    FCDF   = Compute the F cumulative distribution function.
55835    FPDF   = Compute the F probability density function.
55836    FPPF   = Compute the F percent point function.
55837    NORCDF = Compute the normal cumulative distribution function.
55838    NORPDF = Compute the normal probability density function.
55839    NORPPF = Compute the normal percent point function.
55840    TCDF   = Compute the T cumulative distribution function.
55841    TPDF   = Compute the T probability density function.
55842    TPPF   = Compute the T percent point function.
55843
55844Applications:
55845    Analysis of Variance
55846
55847Implementation Date:
55848    1999/3
55849
55850Program:
55851    TITLE AUTOMATIC
55852    MULTIPLOT CORNER COORDINATES 5 5 95 95
55853    MULTIPLOT 2 2
55854    PLOT SRAPPF(P,4,5) FOR P = 0.90 0.01 0.99
55855    PLOT SRAPPF(P,9,10) FOR P = 0.90 0.01 0.99
55856    PLOT SRAPPF(P,19,20) FOR P = 0.90 0.01 0.99
55857    PLOT SRAPPF(P,29,30) FOR P = 0.90 0.01 0.99
55858    END OF MULTIPLOT
55859
55860-----STACK-------------------------------------------------------
55861
55862STACK
55863
55864Name:
55865    STACK
55866
55867Type:
55868    LET Subcommand
55869
55870Purpose:
55871    Convert a set of response variables to a single response
55872    variable and a group-id variable.
55873
55874Description:
55875    Many commands in Dataplot expect the data to be in the
55876    form of a single response variable and a group-id variable
55877    (e.g., BOX PLOT, MEAN PLOT, SD PLOT, TABULATE).  However, many
55878    data files will contain grouped data in a form where each group
55879    is stored as a separate response variable.
55880
55881    The STACK command provides a convenient method for converting
55882    from the multi-column form to the single response variable
55883    with group-id variable form.
55884
55885Syntax:
55886    LET <y2> <x2> = STACK <x1> ... <xk>
55887                          <SUBSET/EXPCEPT/FOR qualification>
55888    where <x1> ... <xk> is a set of one or more response variables
55889               (they do not have to be of equal size);
55890          <y2> is the variable to contain <x1> ... <xk> in a
55891               single response variable;
55892          <x2> is the variable to contain the group-id variable;
55893    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
55894
55895Examples:
55896    LET Y2 X2 = STACK Z1 Z2 Z3 Z4 Z5
55897
55898Default:
55899    None.
55900
55901Synonyms:
55902    None
55903
55904Related Commands:
55905    EXTEND        = Extends a variable by another variable.
55906    LET           = Creates, transforms, etc. a variable.
55907    MEAN PLOT     = Generate a mean plot.
55908    BOX PLOT      = Generate a box plot.
55909    TABULATE      = Peform a tabulation.
55910    UNSTACK       = Create multiple response variables from a response
55911                    variable and an associated group-id variable.
55912
55913Applications:
55914    Data Management
55915
55916Implementation Date:
55917    2003/5
55918
55919Program:
55920    SKIP 25
55921    READ MONTGOME.DAT Y1 Y2 Y3
55922    .
55923    LET Z2 X2 = STACK Y1 Y2 Y3
55924    .
55925    XTIC OFFSET 0.5 0.5
55926    LET NVAR = 3
55927    XLIMITS 1 NVAR
55928    MAJOR XTIC MARK NUMBER NVAR
55929    MINOR XTIC MARK NUMBER 0
55930    MAJOR XTIC MARK NUMBER NVAR
55931    X1TIC MARK LABEL FORMAT ALPHA
55932    X1TIC MARK LABEL CONTENT LARGE MEDIUM SMALL
55933    .
55934    MULTIPLOT SCALE FACTOR 1.5
55935    MULTIPLOT CORNER COORDINATES 0 0 100 100
55936    MULTIPLOT 2 2
55937    CHARACTER X BLANK
55938    LINE BLANK SOLID
55939    Y1LABEL MEAN (PERCENTAGE CLASSIFICATION)
55940    MEAN PLOT Z2 X2
55941    Y1LABEL SD (PERCENTAGE CLASSIFICATION)
55942    SD PLOT Z2 X2
55943    LINES BOX PLOT
55944    CHARACTER BOX PLOT
55945    FENCES ON
55946    Y1LABEL (PERCENTAGE CLASSIFICATION)
55947    BOX PLOT Z2 X2
55948    END OF MULTIPLOT
55949
55950-----STANDARD DEVIATION (LET)-----------------------------------------
55951
55952STANDARD DEVIATION
55953
55954Name:
55955    STANDARD DEVIATION (LET)
55956
55957Type:
55958    Let Subcommand
55959
55960Purpose:
55961    Compute the standard deviation of a variable.
55962
55963Description:
55964    The standard deviation is a common measure of the spread of a
55965    distribution or variable.  The formula is:
55966          SD = SQRT(SUM(Xi - Xmean)**2/(N-1))
55967
55968Syntax:
55969    LET <par> = STANDARD DEVIATION <y>
55970               <SUBSET/EXCEPT/FOR qualification>
55971    where <y> is the variable for which the standard deviation is to
55972              be computed;
55973          <par> is a parameter where the computed standard deviation
55974              is saved;
55975    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
55976
55977Examples:
55978    LET SD = STANDARD DEVIATION Y1
55979    LET SD = STANDARD DEVIATION Y1  SUBSET TAG > 2
55980
55981Default:
55982    None
55983
55984Synonyms:
55985    None
55986
55987Related Commands:
55988    MEAN                 = Compute the mean of a variable.
55989    RANGE                = Compute the range of a variable.
55990    VARIANCE             = Compute the variance of a variable.
55991    WEIGHTED STAND DEVI  = Compute the weighted standard deviation of
55992                           a variable.
55993
55994Applications:
55995    Data Analysis
55996
55997Implementation Date:
55998    Pre-1987
55999
56000Program:
56001    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
56002    LET SD = STANDARD DEVIATION Y1
56003
56004-----SD CONFIDENCE LIMITS--------------------------------------
56005
56006SD CONFIDENCE LIMITS
56007
56008Name:
56009    SD CONFIDENCE LIMITS
56010
56011Type:
56012    Analysis Command
56013
56014Purpose:
56015    Generates a confidence interval for the standard deviation.
56016
56017Description:
56018    Given a sample of n observations with standard deviation s, the
56019    two-sided confidence interval for the standard deviation is
56020
56021       lower confidence limit = s*SQRT((n-1)/CHSPPF(1-alpha/2;n-1))
56022       upper confidence limit = s*SQRT((n-1)/CHSPPF(alpha/2;n-1))
56023
56024    with CHSPPF denoting the percent point function of the chi-square
56025    distribution.  In these formulas, alpha is less than 0.5 (i.e.,
56026    for a 95% confidence interval, we are using alpha = 0.05).
56027
56028    The one-sided lower confidence limit is
56029
56030       lower confidence limit = s*SQRT((n-1)/CHSPPF(1-alpha;n-1))
56031
56032    The one-sided upper confidence limit is
56033
56034       upper confidence limit = s*SQRT((n-1)/CHSPPF(alpha;n-1))
56035
56036    This confidence interval is based on the assumption that
56037    the underlying data is approximately normally distributed.
56038    The confidence interval for the standard deviation is highly
56039    sensitive to non-normality in the data.  It is recommended
56040    that the original data be tested for normality before using
56041    these normal based intervals.  If the data is not approximately
56042    normal, an alternative is to use the command
56043
56044       BOOTSTRAP STANDARD DEVIATION PLOT Y
56045
56046Syntax 1:
56047    <LOWER/UPPER> SD CONFIDENCE LIMITS  <y>
56048                                        <SUBSET/EXCEPT/FOR qualification>
56049    where <y> is the response variable;
56050    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56051
56052    If LOWER is specified, a one-sided lower confidence limit is
56053    returned.  If UPPER is specified, a one-sided upper confidence
56054    limit is returned.  If neither is specified, a two-sided limit
56055    is returned.
56056
56057    This syntax supports matrix arguments for the response variable.
56058
56059Syntax 2:
56060    MULTIPLE <LOWER/UPPER> SD CONFIDENCE LIMITS  <y1> ... <yk>
56061                           <SUBSET/EXCEPT/FOR qualification>
56062    where <y1>  .... <yk> is a list of 1 to 30 response variables;
56063    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56064
56065    This syntax will generate a confidence interval for each of
56066    the response variables.  The word MULTIPLOT is optional.  That is,
56067
56068         MULTIPLE SD CONFIDENCE LIMITS Y1 Y2 Y3
56069
56070    is equivalent to
56071
56072         SD CONFIDENCE LIMITS Y1 Y2 Y3
56073
56074    If LOWER is specified, a one-sided lower confidence limit is
56075    returned.  If UPPER is specified, a one-sided upper confidence
56076    limit is returned.  If neither is specified, a two-sided limit
56077    is returned.
56078
56079    This syntax supports matrix arguments for the response variables.
56080
56081Syntax 3:
56082    REPLICATED <LOWER/UPPER> SD CONFIDENCE LIMITS  <y> <x1> ... <xk>
56083                             <SUBSET/EXCEPT/FOR qualification>
56084    where <y> is the response variable;
56085          <x1>  .... <xk> is a list of 1 to 6 group-id variables;
56086    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56087
56088    This syntax performs a cross-tabulation of the <x1> ... <xk>
56089    and generates a confidence interval for each unique combination
56090    of the cross-tabulated values.  For example, if X1 has 3 levels
56091    and X2 has 2 levels, six confidence intervals will be generated.
56092
56093    If LOWER is specified, a one-sided lower confidence limit is
56094    returned.  If UPPER is specified, a one-sided upper confidence
56095    limit is returned.  If neither is specified, a two-sided limit
56096    is returned.
56097
56098    This syntax does not support matrix arguments.
56099
56100Examples:
56101    SD CONFIDENCE LIMITS Y1
56102    SD CONFIDENCE LIMITS Y1  SUBSET TAG > 2
56103    MULTIPLE SD CONFIDENCE LIMITS Y1 TO Y5
56104    REPLICATED SD CONFIDENCE LIMITS Y X
56105
56106Note:
56107    As noted above, the confidence interval for the standard
56108    deviation is very sensitive to non-normality in the data.
56109    Bonett (2006) has proposed an interval that is nearly exact when
56110    the data is normally distributed and provides good performance
56111    for moderately non-normal data.  The interval for the variance (for
56112    the standard deviation, take the square root of these values) is
56113
56114          EXP{LOG(c*s**2) - z(alpha/2)*se} < sigma**2 <
56115              EXP{LOG(c*s**2) + z(alpha/2)*se}
56116
56117    where
56118
56119        s         = sample standard deviation
56120        c         = n/(n - z(alpha/2))
56121        z         = the normal percent point function
56122        se        = the standard error
56123                  = c*SQRT[(gamma4hat - (n-3)/n))/(n-1)]
56124        gam4hat   = an adjusted estimate of kurtosis
56125                  = N*SUM[i=1 to n][(x(i) - m)**4/
56126                    (SUM[i=1 to n][(x(i) - xbar)**2])**2
56127        m         = trimmed mean with trim proportion equal
56128                    to 1/(2*SQRT(n-4))
56129
56130    The use of the trimmed mean reduces the bias of the
56131    kurtosis estimate for heavy tailed and skewed data.
56132
56133    The justification and derivation of this interval is given
56134    in Bonett's paper.
56135
56136    To request that the Bonett interval be generated, enter
56137
56138        SET BONETT STANDARD DEVIATION CONFIDENCE LIMITS ON
56139
56140    Based on simulation studies by Bonett, this interval results
56141    in greatly improved coverage properties for moderately
56142    non-normal data.  For more extreme non-normality, large
56143    sample sizes may be required to obtain good coverage
56144    properties.  Often a transformation to reduce skewness
56145    (which may reduce the heavy tailedness as well), such as
56146    the LOG or square root, can significantly reduce the sample
56147    size required to obtain good coverage properties.
56148
56149    Bonett also suggests that improved estimates for the kurtosis can
56150    significantly improve the coverage properties.  Bonett's example is
56151    quality control applications where much historical data is frequently
56152    available.  If a prior estimate of kurtosis is available, then the
56153    above formula pools this prior estimate with the kurtosis estimate
56154    from the data using
56155
56156       gamma4hat = (n0*gam4(0) + n*gam4hat)/(n0 + n)
56157
56158    with gam4(0) and n0 denoting the prior estimate of kurtosis
56159    and the associated sample size, respectively.  Bonett gives
56160    guidance on pooling multiple estimates of kurtosis based on
56161    several small samples (it is often the case in quality control
56162    applications that a large number of small samples are available).
56163
56164    In Dataplot, you can specify a prior estimate of kurtosis by
56165    entering the commands
56166
56167       LET KURTOSIS = <value>
56168       LET N0 = <value>
56169
56170    Niwitpong and Kirdwichai (2008) suggested two modifications to
56171    Bonett's interval to improve the coverage for data that are
56172    skewed and heavy tailed.  Specifically, the following modifications
56173    are made to Bonett's interval
56174
56175        1. Use the median instead of the trimmed mean to compute
56176           the sample kurtosis.
56177
56178        2. Use the t percent point function rather than the normal
56179           percent point function.
56180
56181    This interval will be more conservative than the original
56182    Bonett data.  Based on simulation studies in their paper, these
56183    adjustments can improve the nominal coverage for data that are
56184    skewed.  However, it may be overly conservative for data that
56185    are only moderately non-normal.
56186
56187    To use the Niwitpong and Kirdwichai adjusted interval, enter
56188
56189        SET BONETT STANDARD DEVIATION CONFIDENCE LIMITS ADJUSTED ON
56190
56191Note:
56192    A table of confidence limits is printed for alpha levels of
56193    50.0, 80.0, 90.0, 95.0, 99.0, and 99.9.
56194
56195Note:
56196    In addition to the STANDARD DEVIATION CONFIDENCE LIMIT command, the
56197    following commands can also be used:
56198
56199        LET ALPHA = 0.05
56200
56201        LET A = LOWER STANDARD DEVIATION CONFIDENCE LIMIT Y
56202        LET A = UPPPER STANDARD DEVIATION CONFIDENCE LIMIT Y
56203        LET A = LOWER BONETT STANDARD DEVIATION CONFIDENCE LIMIT Y
56204        LET A = UPPPER BONETT STANDARD DEVIATION CONFIDENCE LIMIT Y
56205        LET A = ONE SIDED LOWER STANDARD DEVIATION CONFIDENCE LIMIT Y
56206        LET A = ONE SIDED UPPER STANDARD DEVIATION CONFIDENCE LIMIT Y
56207
56208        LET A = SUMMARY LOWER STANDARD DEVIATION CONFIDENCE LIMIT YSD N
56209        LET A = SUMMARY UPPPER STANDARD DEVIATION CONFIDENCE LIMIT YSD N
56210        LET A = SUMMARY ONE SIDED LOWER STANDARD DEVIATION CONFIDENCE LIMIT
56211                YSD N
56212        LET A = SUMMARY ONE SIDED UPPER STANDARD DEVIATION CONFIDENCE LIMIT
56213                YSD N
56214
56215    The first command specifies the significance level.  The next six
56216    commands are used when you have raw data.  The last four commands are
56217    used when only summary data (standard deviation, sample size) is
56218    available.
56219
56220    In addition to the above LET command, built-in statistics are
56221    supported for about 20 different commands (enter HELP STATISTICS
56222    for details).
56223
56224Default:
56225    None
56226
56227Synonyms:
56228    STANDARD DEVIATION CONFIDENCE INTERVAL is a synonym for
56229    STANDARD DEVIATION CONFIDENCE LIMITS
56230
56231    SD CONFIDENCE LIMIT is a synonym for STANDARD DEVIATION CONFIDENCE
56232    LIMIT
56233
56234Related Commands:
56235    SD PREDICTION LIMITS    = Generate a prediction limit for the
56236                              standard deviation.
56237    CONFIDENCE LIMITS       = Generate a confidence limit for the mean.
56238    PREDICTION LIMITS       = Generate prediction limits for the mean.
56239    PREDICTION BOUNDS       = Generate prediction limits to cover all
56240                              new observations.
56241    TOLERANCE LIMITS        = Generate a tolerance limit.
56242
56243Reference:
56244    Hahn and Meeker (1991), "Statistical Intervals: A Guide for
56245    Practitioners," Wiley, pp. 55-56.
56246
56247    Bonett (2006), "Approximate Confidence Interval for Standard
56248    Deviation of Nonnormal Distributions", Computational Statistics
56249    and Data Analysis, Vol. 50, pp. 775 - 782.
56250
56251    Niwitpong and Kirdwichai (2008), "Adjusted Bonett Confidence
56252    Interval for Standard Deviation of Non-Normal Distributions",
56253    Thailand Statistician, Vol. 6, No. 1, pp. 1-6.
56254
56255Applications:
56256    Confirmatory Data Analysis
56257
56258Implementation Date:
56259    2013/04
56260    2017/12: Support for Bonett intervals
56261
56262Program 1:
56263    SKIP 25
56264    READ ZARR13.DAT Y
56265    SET WRITE DECIMALS 5
56266    .
56267    SD CONFIDENCE LIMITS Y
56268    LOWER SD CONFIDENCE LIMITS Y
56269    UPPER SD CONFIDENCE LIMITS Y
56270
56271Program 2:
56272    SKIP 25
56273    READ GEAR.DAT Y X
56274    LET NNEW = 3
56275    .
56276    REPLICATED SD CONFIDENCE LIMITS Y X
56277
56278Program 3:
56279    .  Following example from Hahn and Meeker's book.
56280    .
56281    let ymean = 50.10
56282    let ysd   = 1.31
56283    let n1    = 5
56284    let alpha = 0.05
56285    .
56286    set write decimals 5
56287    let slow1 = summary lower sd confidence limits ysd n1
56288    let supp1 = summary upper sd confidence limits ysd n1
56289    let slow2 = summary one sided lower sd confidence limits ysd n1
56290    let supp2 = summary one sided upper sd confidence limits ysd n1
56291    print slow1 supp1 slow2 supp2
56292
56293Program 4:
56294    . Step 1:   Read the data (example from Bonett paper)
56295    .
56296    let y = data 15.83 16.01 16.24 16.42 15.33 15.44 16.88 16.31
56297    .
56298    . Step 2:   Compute the statistics
56299    .
56300    set write decimals 4
56301    let ysd = standard deviation y
56302    let lcl = lower bonett standard deviation confidence limit y
56303    let ucl = upper bonett standard deviation confidence limit y
56304    print ysd lcl ucl
56305    .
56306    set bonett standard deviation confidence limit on
56307    standard deviation confidence limits y
56308
56309-----STANDARD DEVIATION OF THE MEAN (LET)----------------------------
56310
56311STANDARD DEVIATION OF THE MEAN
56312
56313Name:
56314    STANDARD DEVIATION OF THE MEAN (LET)
56315
56316Type:
56317    Let Subcommand
56318
56319Purpose:
56320    Compute the standard deviation of the mean of a variable.
56321
56322Description:
56323    The standard deviation of the mean is:
56324        sd of mean = s/SQRT(N)
56325    where s is the standard deviation of the variable.
56326
56327Syntax:
56328    LET <par> = STANDARD DEVIATION OF THE MEAN <y>
56329                <SUBSET/EXCEPT/FOR qualification>
56330    where <y> is the variable for which the standard deviation of the
56331              mean is to be computed;
56332          <par> is a parameter where the computed standard deviation
56333              of the mean is saved;
56334    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56335
56336Examples:
56337    LET SD = STANDARD DEVIATION OF THE MEAN Y1
56338    LET SD = STANDARD DEVIATION OF THE MEAN Y1 SUBSET TAG > 2
56339
56340Default:
56341    None
56342
56343Synonyms:
56344    None
56345
56346Related Commands:
56347    MEAN         = Compute the mean of a variable.
56348    STAND DEVI   = Compute the standard deviation of a variable.
56349
56350Applications:
56351    XX
56352
56353Implementation Date:
56354    XX
56355
56356Program:
56357    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
56358    LET SD = STANDARD DEVIATION OF THE MEAN Y1
56359
56360-----STANDARD DEVIATION PLOT-------------------------------------
56361
56362STANDARD DEVIATION PLOT
56363
56364Name:
56365    STANDARD DEVIATION PLOT
56366
56367Type:
56368    Graphics Command
56369
56370Purpose:
56371    Generates a standard deviation plot.
56372
56373Description:
56374    A standard deviation plot is a plot consisting of subsample
56375    standard deviations versus subsample index.  The subsample standard
56376    deviation is the standard deviation (with divisor ni-1) of the data
56377    in the subsample.  The standard deviation plot is used to answer
56378    the question--"Does the subsample variation change over different
56379    subsamples?".  It consists of:
56380       Vertical   axis = subsample standard deviation;
56381       Horizontal axis = subsample index.
56382    The standard deviation plot yields 2 traces;
56383       1. a subsample standard deviation trace; and
56384       2. a full-sample standard deviation reference line.
56385    Like usual, the appearance of these 2 traces is
56386    controlled by the first 2 settings of the LINES,
56387    CHARACTERS, SPIKES, BARS, and similar attributes.
56388
56389Syntax:
56390    STANDARD DEVIATION PLOT <y> <x>  <SUBSET/EXCEPT/FOR qualification>
56391    where <y> is the response (= dependent) variable;
56392          <x> is the subsample identifier variable (this variable
56393              appears on the horizontal axis);
56394    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56395
56396Examples:
56397    STANDARD DEVIATION PLOT Y X
56398    STANDARD DEVIATION PLOT Y X1
56399
56400Default:
56401    None
56402
56403Synonyms:
56404    SD PLOT
56405    S PLOT
56406
56407Related Commands:
56408    CHARACTERS               = Sets the type for plot char.
56409    LINES                    = Sets the type for plot lines.
56410    VARIANCE  PLOT           = Generates a variance plot.
56411    STAN DEVI OF MEAN PLOT   = Generates standard deviation of the mean
56412                               plot.
56413    RANGE PLOT               = Generates a range plot.
56414    MEAN PLOT                = Generates a mean plot.
56415    MEDIAN PLOT              = Generates a median plot.
56416    BOX PLOT                 = Generates a box plot.
56417    S CHART                  = Generates a standard deviation
56418                               control chart.
56419    PLOT                     = Generates a data or function plot.
56420
56421Applications:
56422    Quality Control
56423
56424Implementation Date:
56425    88/2
56426
56427Program:
56428    SKIP 25
56429    READ GEAR.DAT DIAMETER BATCH
56430    LINE BLANK DASH
56431    CHARACTER X BLANK
56432    XTIC OFFSET 0.2 0.2
56433    Y1LABEL STANDARD DEVIATION
56434    X1LABEL BATCH
56435    TITLE STANDARD DEVIATION PLOT
56436    STANDARD DEVIATION PLOT DIAMETER BATCH
56437
56438-----STANDARD DEVIATION OF THE MEAN PLOT-------------------------
56439
56440STANDARD DEVIATION OF THE MEAN PLOT
56441
56442Name:
56443    STANDARD DEVIATION OF THE MEAN PLOT
56444
56445Type:
56446    Graphics Command
56447
56448Purpose:
56449    Generates a standard deviation of the mean plot.
56450
56451Description:
56452    A standard deviation of the mean plot consists of subsample
56453    standard deviations of the mean versus subsample index.  The
56454    subsample standard deviation of the mean is the subsample standard
56455    deviation divided by the square root of the subsample size.  The
56456    standard deviation of the mean plot is used to answer the
56457    question--"Does the subsample variation of the mean change over
56458    different subsamples?".  It consists of:
56459       Vertical   axis = subsample standard deviation;
56460       Horizontal axis = subsample index.
56461    The standard deviation of the mean plot yields 2 traces:
56462       1. a subsample standard deviation of the mean trace;
56463       2. a full-sample standard deviation of the mean reference line.
56464    Like usual, the appearance of these 2 traces is
56465    controlled by the first 2 settings of the LINES,
56466    CHARACTERS, SPIKES, BARS, and similar attributes.
56467
56468Syntax:
56469    STANDARD DEVIATION OF THE MEAN PLOT <y> <x>
56470                      <SUBSET/EXCEPT/FOR/qualification>
56471    where <y> is the response (= dependent) variable;
56472          <x> is the subsample identifier variable (this variable
56473              appears on the horizontal axis);
56474    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56475
56476Examples:
56477    STANDARD DEVIATION OF THE MEAN PLOT Y X
56478    STANDARD DEVIATION OF THE MEAN PLOT Y X1
56479
56480Default:
56481    None
56482
56483Synonyms:
56484    STANDARD DEVIATION OF MEAN PLOT
56485    SDM PLOT
56486
56487Related Commands:
56488    CHARACTERS                = Sets the type for plot char.
56489    LINES                     = Sets the type for plot lines.
56490    STANDARD DEVIATION PLOT   = Generates a standard deviation plot.
56491    VARIANCE  PLOT            = Generates a variance plot.
56492    VARIANCE OF MEAN PLOT     = Generates variance of the mean plot.
56493    RANGE PLOT                = Generates a range plot.
56494    MEAN PLOT                 = Generates a mean plot.
56495    MEDIAN PLOT               = Generates a median plot.
56496    BOX PLOT                  = Generates a box plot.
56497    S CHART                   = Generates a standard deviation control
56498                                chart.
56499    PLOT                      = Generates a data or function plot.
56500
56501Applications:
56502    Quality Control
56503
56504Implementation Date:
56505    88/2
56506
56507Program:
56508    SKIP 25
56509    READ GEAR.DAT DIAMETER BATCH
56510    LINE BLANK DASH
56511    CHARACTER X BLANK
56512    XTIC OFFSET 0.2 0.2
56513    Y1LABEL STANDARD DEVIATION OF THE MEAN
56514    X1LABEL BATCH
56515    TITLE STANDARD DEVIATION OF THE MEAN PLOT
56516    STANDARD DEVIATION OF THE MEAN PLOT DIAMETER BATCH
56517
56518-----SD PREDICTION LIMITS--------------------------------------
56519
56520SD PREDICTION LIMITS
56521
56522Name:
56523    SD PREDICTION LIMITS
56524
56525Type:
56526    Analysis Command
56527
56528Purpose:
56529    Generates a prediction interval for the standard deviation of one
56530    or more new observations given a previous sample.
56531
56532Description:
56533    Given a sample of n observations with standard deviation s, the
56534    two-sided prediction interval to contain the standard deviation
56535    of m new indpendent, identically distributed observations is
56536
56537       lower prediction limit = s*SQRT(1/F(1-alpha/2;n-1,m-1))
56538       upper prediction limit = s*SQRT(F(1-alpha/2;n-1,m-1))
56539
56540    with F denoting the percent point function of the F distribution.
56541
56542    The one-sided lower prediction limit is
56543
56544       lower prediction limit = s*SQRT(1/F(1-alpha;n-1,m-1))
56545
56546    The one-sided upper prediction limit is
56547
56548       upper prediction limit = s*SQRT(F(1-alpha;n-1,m-1))
56549
56550    In this formula, the only value from the new observations is the
56551    sample size.  That is, it can be applied before the new data is
56552    actually collected.  The number of observations for the new sample
56553    is entered with the command
56554
56555        LET NNEW = <value>
56556
56557    If NNEW is not defined, then a value of 1 is used.
56558
56559    This prediction interval is based on the assumption that
56560    the underlying data is approximately normally distributed.
56561    The prediction interval for the standard deviation is highly
56562    sensitive to non-normality in the data.  It is recommended
56563    that the original data be tested for normality before using
56564    these normal based intervals.
56565
56566Syntax 1:
56567    <LOWER/UPPER> <LOGNORMAL/BOXCOX> SD PREDICTION LIMITS  <y>
56568                                     <SUBSET/EXCEPT/FOR qualification>
56569    where <y> is the response variable;
56570    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56571
56572    If LOWER is specified, a one-sided lower prediction limit is
56573    returned.  If UPPER is specified, a one-sided upper prediction
56574    limit is returned.  If neither is specified, a two-sided limit
56575    is returned.
56576
56577    If the keyword LOGNORMAL is present, the log of the data will be
56578    taken, then the normal prediction limits will be computed, and then
56579    the computed normal lower and upper limits will be exponentiated to
56580    obtain the lognormal prediction limtis.
56581
56582    Similarly, if the keyword BOXCOX is present, a Box-Cox transformation
56583    to normality will be applied to the data before computing the normal
56584    prediction limits.  The computed lower and upper limits will then
56585    be transformed back to the original scale.
56586
56587    This syntax supports matrix arguments for the response variable.
56588
56589Syntax 2:
56590    MULTIPLE <LOWER/UPPER> <LOGNORMAL/BOXCOX> SD PREDICTION LIMITS
56591                           <y1> ... <yk>
56592                           <SUBSET/EXCEPT/FOR qualification>
56593    where <y1>  .... <yk> is a list of 1 to 30 response variables;
56594    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56595
56596    This syntax will generate a prediction interval for each of
56597    the response variables.  The word MULTIPLOT is optional.  That is,
56598
56599         MULTIPLE SD PREDICTION LIMITS Y1 Y2 Y3
56600
56601    is equivalent to
56602
56603         SD PREDICTION LIMITS Y1 Y2 Y3
56604
56605    If LOWER is specified, a one-sided lower prediction limit is
56606    returned.  If UPPER is specified, a one-sided upper prediction
56607    limit is returned.  If neither is specified, a two-sided limit
56608    is returned.
56609
56610    If the keyword LOGNORMAL is present, the log of the data will be
56611    taken, then the normal prediction limits will be computed, and then
56612    the computed normal lower and upper limits will be exponentiated to
56613    obtain the lognormal prediction limtis.
56614
56615    Similarly, if the keyword BOXCOX is present, a Box-Cox transformation
56616    to normality will be applied to the data before computing the normal
56617    prediction limits.  The computed lower and upper limits will then
56618    be transformed back to the original scale.
56619
56620    This syntax supports matrix arguments for the response variables.
56621
56622Syntax 3:
56623    REPLICATED <LOWER/UPPER> <LOGNORMAL/BOXCOX>
56624                             SD PREDICTION LIMITS  <y> <x1> ... <xk>
56625                             <SUBSET/EXCEPT/FOR qualification>
56626    where <y> is the response variable;
56627          <x1>  .... <xk> is a list of 1 to 6 group-id variables;
56628    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56629
56630    This syntax performs a cross-tabulation of the <x1> ... <xk>
56631    and generates a prediction interval for each unique combination
56632    of the cross-tabulated values.  For example, if X1 has 3 levels
56633    and X2 has 2 levels, six prediction intervals will be generated.
56634
56635    If LOWER is specified, a one-sided lower prediction limit is
56636    returned.  If UPPER is specified, a one-sided upper prediction
56637    limit is returned.  If neither is specified, a two-sided limit
56638    is returned.
56639
56640    If the keyword LOGNORMAL is present, the log of the data will be
56641    taken, then the normal prediction limits will be computed, and then
56642    the computed normal lower and upper limits will be exponentiated to
56643    obtain the lognormal prediction limtis.
56644
56645    Similarly, if the keyword BOXCOX is present, a Box-Cox transformation
56646    to normality will be applied to the data before computing the normal
56647    prediction limits.  The computed lower and upper limits will then
56648    be transformed back to the original scale.
56649
56650    This syntax does not support matrix arguments.
56651
56652Examples:
56653    SD PREDICTION LIMITS Y1
56654    SD PREDICTION LIMITS Y1  SUBSET TAG > 2
56655    MULTIPLE SD PREDICTION LIMITS Y1 TO Y5
56656    REPLICATED SD PREDICTION LIMITS Y X
56657
56658Note:
56659    A table of prediction limits is printed for alpha levels of
56660    50.0, 80.0, 90.0, 95.0, 99.0, and 99.9.
56661
56662Note:
56663    In addition to the STANDARD DEVIATION PREDICTION LIMIT command, the
56664    following commands can also be used:
56665
56666        LET ALPHA = 0.05
56667        LET NNEW = <value>
56668
56669        LET A = LOWER STANDARD DEVIATION PREDICTION LIMIT Y
56670        LET A = UPPPER STANDARD DEVIATION PREDICTION LIMIT Y
56671        LET A = ONE SIDED LOWER STANDARD DEVIATION PREDICTION LIMIT Y
56672        LET A = ONE SIDED UPPER STANDARD DEVIATION PREDICTION LIMIT Y
56673
56674        LET A = SUMMARY LOWER STANDARD DEVIATION PREDICTION LIMIT YSD N
56675        LET A = SUMMARY UPPPER STANDARD DEVIATION PREDICTION LIMIT YSD N
56676        LET A = SUMMARY ONE SIDED LOWER STANDARD DEVIATION PREDICTION LIMIT
56677                YSD N
56678        LET A = SUMMARY ONE SIDED UPPER STANDARD DEVIATION PREDICTION LIMIT
56679                YSD N
56680
56681    The first 2 commands specify the significance level and the number
56682    of new observations.  The next 4 commands are used when you have raw
56683    data.  The last 4 commands are used when only summary data (standard
56684    deviation, sample size) is available.
56685
56686    In addition to the above LET command, built-in statistics are
56687    supported for about 20 different commands (enter HELP STATISTICS
56688    for details).
56689
56690Default:
56691    None
56692
56693Synonyms:
56694    STANDARD DEVIATION PREDICTION INTERVAL is a synonym for
56695    STANDARD DEVIATION PREDICTION LIMITS
56696
56697    SD PREDICTION LIMIT is a synonym for STANDARD DEVIATION PREDICTION
56698    LIMIT
56699
56700Related Commands:
56701    SD CONFIDENCE LIMITS    = Generate a confidence limit for the
56702                              standard deviation.
56703    PREDICTION LIMITS       = Generate prediction limits for the mean.
56704    PREDICTION BOUNDS       = Generate prediction limits to cover all
56705                              new observations.
56706    CONFIDENCE LIMITS       = Generate a confidence limit for the mean.
56707    TOLERANCE LIMITS        = Generate a tolerance limit.
56708
56709Reference:
56710    Hahn and Meeker (1991), "Statistical Intervals: A Guide for
56711    Practitioners", Wiley, pp. 61-62.
56712
56713Applications:
56714    Confirmatory Data Analysis
56715
56716Implementation Date:
56717    2013/04
56718    2014/06: Support for LOGNORMAL and BOXCOX options
56719
56720Program 1:
56721    SKIP 25
56722    READ ZARR13.DAT Y
56723    SET WRITE DECIMALS 5
56724    LET NNEW = 5
56725    .
56726    SD PREDICTION LIMITS Y
56727    LOWER SD PREDICTION LIMITS Y
56728    UPPER SD PREDICTION LIMITS Y
56729
56730Program 2:
56731    SKIP 25
56732    READ GEAR.DAT Y X
56733    SET WRITE DECIMALS 5
56734    LET NNEW = 3
56735    .
56736    REPLICATED SD PREDICTION LIMITS Y X
56737
56738Program 3:
56739    .  Following example from Hahn and Meeker's book.
56740    .
56741    let ymean = 50.10
56742    let ysd   = 1.31
56743    let n1    = 5
56744    let nnew  = 3
56745    let alpha = 0.05
56746    .
56747    set write decimals 5
56748    let slow1 = summary lower sd prediction limits ysd n1
56749    let supp1 = summary upper sd prediction limits ysd n1
56750    let slow2 = summary one sided lower sd prediction limits ysd n1
56751    let supp2 = summary one sided upper sd prediction limits ysd n1
56752    print slow1 supp1 slow2 supp2
56753
56754-----STANDARDIZE (LET)-----------------------------------------
56755
56756STANDARDIZE
56757
56758Name:
56759    STANDARDIZE (LET)
56760
56761Type:
56762    Let Subcommand
56763
56764Purpose:
56765    Standardize, i.e., subtract the mean and divide by the
56766    standard deviation, a variable.
56767
56768Description:
56769    In many applications, it is desirable to standardize the
56770    data values.
56771
56772    This command provides additional flexibility in that either
56773    one or two group id variables can also be specified.  That is,
56774    if one group id variable is given, the mean and standard
56775    deviation is computed for each group and the data values
56776    are standardized by the corresponding group mean and standard
56777    deviation.  Likewise, if two group variables are specified,
56778    then a mean and standard deviaiton are computed for each cell
56779    of the cross tabulation and the data values are standardized
56780    by the corresponding cell mean and standard deviaition.
56781
56782    You can specify several alternative measures to the mean for
56783    the location statistic and several alternative measures to
56784    the standard deviaition for the scale statistic.  See the
56785    Note below for details.  In addition, you can choose to
56786    standardize only by location (i.e., subtract the mean but
56787    do not divide by the standard deviation) or only by scale.
56788
56789    You can also specifically specify a z-score or  u-score.
56790    A z-score subtracts the mean and divides by the standard
56791    deviation (i.e,, it scales to a standard normal distribution).
56792    Similarly, the u-score subtracts the minimum and divides by
56793    the range.  That is, it creates a standard uniform random
56794    variable (i.e., the data is scaled to a range between 0 and 1).
56795    If a z-score or u-score is explicitly requested, the
56796    settings for the SET LOCATION STATISTIC and SET SCALE STATISTIC
56797    (see Note below) are ignored.
56798
56799Syntax 1:
56800    LET <var> = STANDARDIZE <y>   <SUBSET/EXCEPT/FOR qualification>
56801    where <y> is the response variable;
56802          <var> is a variable where the standardized values are stored;
56803    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56804
56805    This syntax standardizes (with respect to both location and
56806    scale) the variable with no groups.
56807
56808Syntax 2:
56809    LET <var> = LOCATION STANDARDIZE <y>
56810                                     <SUBSET/EXCEPT/FOR qualification>
56811    where <y> is the response variable;
56812          <var> is a variable where the standardized values are stored;
56813    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56814
56815    This syntax standardizes the variable (with respect to location
56816    only) with no groups.
56817
56818Syntax 3:
56819    LET <var> = SCALE STANDARDIZE <y>
56820                                     <SUBSET/EXCEPT/FOR qualification>
56821    where <y> is the response variable;
56822          <var> is a variable where the standardized values are stored;
56823    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56824
56825    This syntax standardizes the variable (with respect to scale
56826    only) with no groups.
56827
56828Syntax 4:
56829    LET <var> = ZSCORE <y>      <SUBSET/EXCEPT/FOR qualification>
56830    where <y> is the response variable;
56831          <var> is a variable where the standardized values are stored;
56832    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56833
56834    This syntax specifically computes a z-score.
56835
56836Syntax 5:
56837    LET <var> = USCORE <y>      <SUBSET/EXCEPT/FOR qualification>
56838    where <y> is the response variable;
56839          <var> is a variable where the standardized values are stored;
56840    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56841
56842    This syntax specifically computes a u-score.
56843
56844Syntax 6:
56845    LET <var> = STANDARDIZE <y> <x1>  <SUBSET/EXCEPT/FOR qualification>
56846    where <y> is the response variable;
56847          <x1> is a group id variable;
56848          <var> is a variable where the standardized values are stored;
56849    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56850
56851    This syntax standardizes (with respect to both location and
56852    scale) the variable with one group variable.
56853
56854Syntax 7:
56855    LET <var> = LOCATION STANDARDIZE <y> <x1>
56856                                     <SUBSET/EXCEPT/FOR qualification>
56857    where <y> is the response variable;
56858          <x1> is a group id variable;
56859          <var> is a variable where the standardized values are stored;
56860    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56861
56862    This syntax standardizes the variable (with respect to location
56863    only) with one group variable.
56864
56865Syntax 8:
56866    LET <var> = SCALE STANDARDIZE <y> <x1>
56867                                     <SUBSET/EXCEPT/FOR qualification>
56868    where <y> is the response variable;
56869          <x1> is a group id variable;
56870          <var> is a variable where the standardized values are stored;
56871    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56872
56873    This syntax standardizes the variable (with respect to scale
56874    only) with one group variable.
56875
56876Syntax 9:
56877    LET <var> = ZSCORE <y> <x1> <SUBSET/EXCEPT/FOR qualification>
56878    where <y> is the response variable;
56879          <x1> is a group id variable;
56880          <var> is a variable where the standardized values are stored;
56881    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56882
56883    This syntax computes a z-score with one group variable.
56884
56885Syntax 10:
56886    LET <var> = USCORE <y> <x1> <SUBSET/EXCEPT/FOR qualification>
56887    where <y> is the response variable;
56888          <x1> is a group id variable;
56889          <var> is a variable where the standardized values are stored;
56890    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56891
56892    This syntax computes a u-score with one group variable.
56893
56894Syntax 11:
56895    LET <var> = STANDARDIZE <y> <x1> <x2>
56896                            <SUBSET/EXCEPT/FOR qualification>
56897    where <y> is the response variable;
56898          <x1> is the first group id variable;
56899          <x2> is the second group id variable;
56900          <var> is a variable where the standardized values are stored;
56901    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56902
56903    This syntax standardizes (with respect to both location and
56904    scale) the variable with two group variable.
56905
56906Syntax 12:
56907    LET <var> = LOCATION STANDARDIZE <y> <x1> <x2>
56908                                     <SUBSET/EXCEPT/FOR qualification>
56909    where <y> is the response variable;
56910          <x1> is a group id variable;
56911          <x2> is the second group id variable;
56912          <var> is a variable where the standardized values are stored;
56913    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56914
56915    This syntax standardizes the variable (with respect to location
56916    only) with two group variable.
56917
56918Syntax 13:
56919    LET <var> = SCALE STANDARDIZE <y> <x1> <x2>
56920                                     <SUBSET/EXCEPT/FOR qualification>
56921    where <y> is the response variable;
56922          <x1> is a group id variable;
56923          <x2> is the second group id variable;
56924          <var> is a variable where the standardized values are stored;
56925    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56926
56927    This syntax standardizes the variable (with respect to scale
56928    only) with two group variable.
56929
56930Syntax 14:
56931    LET <var> = ZSCORE <y> <x1> <x2> <SUBSET/EXCEPT/FOR qualification>
56932    where <y> is the response variable;
56933          <x1> is a group id variable;
56934          <x2> is the second group id variable;
56935          <var> is a variable where the standardized values are stored;
56936    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56937
56938    This syntax computes a z-score with two group variables.
56939
56940Syntax 15:
56941    LET <var> = USCORE <y> <x1> <x2> <SUBSET/EXCEPT/FOR qualification>
56942    where <y> is the response variable;
56943          <x1> is a group id variable;
56944          <x2> is the second group id variable;
56945          <var> is a variable where the standardized values are stored;
56946    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
56947
56948    This syntax computes a u-score with two group variables.
56949
56950Examples:
56951    LET Y2 = STANDARDIZE  Y1
56952    LET Y2 = LOCATION STANDARDIZE  Y1
56953    LET Y2 = LOCATION STANDARDIZE  Y1 X1
56954    LET Y2 = LOCATION STANDARDIZE  Y1 X1 X2
56955
56956    SET LOCATION STATISTIC MEDIAN
56957    SET SCALE STATISTIC MAD
56958    LET Y2 = STANDARDIZE  Y1 X1 X2
56959
56960Note:
56961    The most common application of this command is to standardize
56962    using the mean as the location measure and the standard
56963    deviation as the scale measure.  Several alternative measures
56964    are allowed.
56965
56966    To set the location measure, enter the command
56967
56968        SET LOCATION STATISTIC  <MEAN/MEDIAN/MIDMEAN/TRIMMED MEAN/
56969                                WINSORIZED MEAN/MIDRANGE/
56970                                HARMONIC MEAN/GEOMETRIC MEAN>
56971
56972    To set the scale measure, enter the command
56973
56974        SET SCALE STATISTIC  <SD/MAD/AAD/INTERQUARTILE RANGE/
56975                             GEOMETRIC STANDARD DEVIATION/
56976                             SN SCALE/QN SCALE>
56977
56978    Here, SD is the standard deviation, MAD is the median absolute
56979    deviation, and AAD is the average absolute deviation.
56980
56981    Note the using the ZSCORE or USCORE syntax overrides the settings
56982    specified by these SET commands.  That is, ZSCORE always uses the
56983    mean and standard deviation and USCORE always uses the minimum and
56984    the range.
56985
56986Default:
56987    The default location statistic is the mean and the default
56988    scale statistic is the standard deviation.
56989
56990Synonyms:
56991    IQ RANGE is a synonym for INTERQUARTILE RANGE.
56992
56993Related Commands:
56994    MEAN PLOT       = Generate a mean vs. subset plot.
56995    SD PLOT         = Generate a standard deviation vs. subset plot.
56996    TABULATE        = Compute group statistics (one group variable).
56997    CROSS TABULATE  = Compute group statistics (two group variables).
56998    MEDIAN          = Compute the median.
56999    MIDDMEAN        = Compute the midmean.
57000    TRIMMED MEAN    = Compute the trimmed mean.
57001    SD              = Compute the standard deviation.
57002    AAD             = Compute the average absolute deviation.
57003    MAD             = Compute the median absolute deviation.
57004
57005Applications:
57006    Data Analysis
57007
57008Implementation Date:
57009    2001/3: Initial Implementation
57010
57011    2001/9: Add support for following:
57012            1) Additional location statistics: MINIMUM, HARMONIC MEAN,
57013               GEOMETRIC MEAN, WINSORIZED MEAN, MIDRANGE
57014            2) Additional scale statistics: IQ RANGE, GEOMETRIC SD
57015            3) Support for USCORE
57016            4) Support for SCALE STANDARDIZE
57017    2003/5: Added support for SN SCALE, QN SCALE
57018
57019Program 1:
57020    SKIP 25
57021    READ GEAR.DAT Y X
57022    LET Y2 = STANDARDIZE Y X
57023
57024Program 2:
57025    SKIP 25
57026    READ GEAR.DAT Y X
57027    LET Y2 = LOCATION STANDARDIZE Y X
57028
57029Program 3:
57030    SKIP 25
57031    READ GEAR.DAT Y X
57032    SET LOCATION STATISTIC MEDIAN
57033    SET SCALE STATISTIC MAD
57034    LET Y2 = STANDARDIZE Y X
57035
57036Program 4:
57037    SKIP 25
57038    READ RIPKEN.DAT Y X1 X2
57039    LET Y2 = STANDARDIZE Y X1 X2
57040
57041-----STANDARD INPUT (SET)---------------------------------------
57042
57043STANDARD INPUT
57044
57045Name:
57046    STANDARD INPUT (SET)
57047
57048Type:
57049    Set Subcommand
57050
57051Purpose:
57052    Specify the name of a file that will be equivalenced to
57053    standard input.
57054
57055Description:
57056    By default, Dataplot reads commands from standard input (in Fortran,
57057    this is typically unit 5).  The SET STANDARD INPUT is used to specify
57058    the name of a file to read from when input is expected from standard
57059    input.
57060
57061    In it's simplest usage, this is essentially equivalent to using a
57062    CALL command (this is demonstrated in the Program 1 and Program 2
57063    sections below).
57064
57065    However, the SET STANDARD INPUT is typically used in a different
57066    context than the CALL command.  Specifcally, it is motivated by
57067    the idea of having an external program control the input to
57068    Dataplot in a dynamic fashion.
57069
57070    For example, suppose you have a Python script and you would like that
57071    script to use Dataplot to perform a certain analysis.  Suppose
57072    further that the user of the Python script has interactive control
57073    over what analysis he would like Dataplot to perform and when
57074    he would like that analysis performed.  A typical sequence would
57075    then be
57076
57077       1. The Python script initiates Dataplot and has Dataplot
57078          execute the commands
57079
57080             SET MAXIMUM COUNTER STANDARD INPUT 0
57081             SET DELAY STANDARD INPUT 2
57082             SET STANDARD INPUT POLL file.dp
57083
57084          When the POLL CLOSE option is used, Dataplot does the
57085          following
57086
57087             a. Check for the existence of the file.  If the file
57088                exists, then execute the commands in "file.dp" (the
57089                file name does not have to be "file.dp").
57090
57091             b. If the file does not exist, wait for a specified
57092                time and then check for the existence of the file
57093                again.  Repeat until the file is found.
57094
57095                The wait time is specified by the SET DELAY STANDARD
57096                INPUT command.  The value is specified in seconds.
57097                If this command is not given, the default value is 2.
57098                The SET MAXIMUM COUNTER STANDARD INPUT command can
57099                be used to specify a maximum number of iterations.
57100                If this command is omitted or a value of 0 is given,
57101                then Dataplot will keep repeating until the file is
57102                found.
57103
57104          If the POLL option is omitted, then Dataplot will check
57105          for the existence of the file only once.  If the file
57106          is not found, nothing is done and standard input is restored
57107          to unit 5.
57108
57109       2. The last line of the "file.dp" file will typically contain one
57110          of the following lines
57111
57112              SET STANDARD INPUT
57113              SET STANDARD INPUT CLOSE
57114              SET STANDARD INPUT CLOSE POLL
57115
57116          where
57117
57118          a. The SET STANDARD INPUT command closes "file.dp" and reverts
57119             standard input back to the terminal.  The "file.dp" file is
57120             not deleted.
57121
57122          b. The SET STANDARD INPUT CLOSE command close and deletes the
57123             "file.dp" file.  Standard input reverts back to the
57124             terminal.
57125
57126             This option is useful when the external program will not
57127             subsequently send additional commands to Dataplot.
57128
57129          c. The SET STANDARD INPUT CLOSE POLL command close and deletes
57130             the "file.dp" file.  However, it resumes polling mode.  That
57131             is, it effectively enters the command
57132
57133                SET STANDARD INPUT POLL file.dp
57134
57135             This option is used when the external program expects to
57136             subsequently send additonal commands to Dataplot.
57137
57138    The external program is not limited to Python.  A similar sequence
57139    can be used within Perl, Tcl/TK, or any number of other programs.
57140
57141Syntax 1:
57142    SET STANDARD INPUT <fname>
57143    where <fname> is a file name.
57144
57145    This syntax equates standard input to <fname>.  It will only
57146    search for the existence of <fname> one time.
57147
57148Syntax 2:
57149    SET STANDARD INPUT
57150
57151    This syntax closes the file equated to standard input and reverts
57152    standard input back to the terminal.
57153
57154Syntax 3:
57155    SET STANDARD INPUT POLL <fname>
57156    where <fname> is a file name.
57157
57158    This syntax equates standard input to <fname>.  It will continually
57159    search for the existence of <fname> (based on the SET MAXIMUM
57160    COUNTER STANDARD INPUT and SET DELAY STANDARD INPUT commands).
57161
57162Syntax 4:
57163    SET STANDARD INPUT CLOSE <fname>
57164    where <fname> is a file name.
57165
57166    This syntax closes and deletes the <fname> file and reverts standard
57167    input back to the terminal.
57168
57169Syntax 5:
57170    SET STANDARD INPUT POLL CLOSE <fname>
57171    where <fname> is a file name.
57172
57173    This syntax closes and deletes the <fname> file and reverts POLL
57174    mode for <fname>.
57175
57176Examples:
57177    SET STANDARD INPUT commands.dp
57178    SET STANDARD INPUT POLL commands.dp
57179
57180Note:
57181    SET RESUME POLL is a synonym for SET STANDARD INPUT POLL.  However,
57182    no file name is entered.  The previously defined file name (from
57183    the most recent SET STANDARD INPUT POLL command) will be used.
57184
57185Default:
57186    None
57187
57188Synonyms:
57189    SET SUSPEND POLL is a synonym for SET STANDARD INPUT.
57190    SET POLL SUSPEND is a synonym for SET STANDARD INPUT.
57191    SET POLL RESUME is a synonym for SET RESUME POLL.
57192
57193Related Commands:
57194    CALL      = Execute the commands from an external file.
57195
57196Applications:
57197    Program Control
57198
57199Implementation Date:
57200    2016/01
57201
57202Program 1:
57203    .  Put these lines in the external file
57204    .
57205    .     stdin.dp
57206    .
57207    .  These commands will be executed by the Program 2 example.
57208    .
57209    print "in file stdin.dp"
57210    let a = 3
57211    let b = 4
57212    set standard input
57213
57214Program 2:
57215    . Execute the commands in file stdin.dp
57216    .
57217    set standard input stdin.dp
57218
57219-----STANDARDIZED THIRD CENTRAL MOMENT (LET)------------------------
57220
57221STANDARDIZED THIRD CENTRAL MOMENT
57222
57223Name:
57224    STANDARDIZED THIRD CENTRAL MOMENT (LET)
57225
57226Type:
57227    Let Subcommand
57228
57229Purpose:
57230    Compute the standardized third central moment (or skewness) of a
57231    variable.
57232
57233Description:
57234    The skewness measures the lack of symmetry in a variable.  The
57235    formula is:
57236       skew = (SUM(Xi-Xmean)**3/(N-1))/s**3
57237    where s is the standard deviation and N is the number of
57238    observations.
57239
57240Syntax:
57241    LET <par> = STANDARDIZED THIRD CENTRAL MOMENT <x1>
57242               <SUBSET/EXCEPT/FOR qualification>
57243    where <x1> is the variable for which the skewnes is to be computed;
57244          <par> is a parameter where the skewness is saved;
57245    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
57246
57247Examples:
57248    LET N = STANDARDIZED THIRD CENTRAL MOMENT Y1
57249
57250Default:
57251    None
57252
57253Synonyms:
57254    SKEWNESS
57255    STANDARDIZED 3RD CENTRAL MOMENT
57256
57257Related Commands:
57258    MEAN         = Compute mean of a variable.
57259    STAND DEVI   = Compute the standard deviation of a variable.
57260    KURTOSIS     = Compute the Kurtosis of a variable.
57261
57262Applications:
57263    XX
57264
57265Implementation Date:
57266    XX
57267
57268Program:
57269    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
57270    LET SKEW = STANDARDIZED THIRD CENTRAL MOMENT Y1
57271
57272-----STANDARDIZED FOURTH CENTRAL MOMENT (LET)-----------------------
57273
57274STANDARDIZED FOURTH CENTRAL MOMENT
57275
57276Name:
57277    STANDARDIZED FOURTH CENTRAL MOMENT (LET)
57278
57279Type:
57280    Let Subcommand
57281
57282Purpose:
57283    Compute the standardized fourth central moment of a variable.
57284
57285Description:
57286    The formula is:
57287       F = (SUM(X-XMEAN)**4/(N-1))/XSD**4
57288    where X is the sample variable, XMEAN is the mean of X, XSD is the
57289    standard deviation of X, and N is the sample size.  This statistic
57290    (also called the kurtosis) is the measure of the "fatness" of the
57291    distribution.  The higher the kurtosis, the more spread out the
57292    distribution is.
57293
57294Syntax:
57295    LET <par> = STANDARDIZED FOURTH CENTRAL MOMENT <resp>
57296                 <SUBSET/EXCEPT/FOR qualification>
57297    where <resp> is the variable for which the fourth central moment is
57298                 to be computed;
57299          <par> is a parameter where the calculated fourth central
57300                 moment is stored;
57301    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
57302
57303Examples:
57304    LET A1 = STANDARDIZED FOURTH CENTRAL MOMENT Y1
57305
57306Default:
57307    None
57308
57309Synonyms:
57310    KURTOSIS
57311
57312Related Commands:
57313    SEQUENCE        = Generate a sequence of numbers.
57314    PATTERN         = Generate numbers with a specific pattern.
57315    MEAN            = Compute the mean of a variable.
57316    STAND DEVIATION = Compute the standard deviation of a variable.
57317    SKEWNESS        = Compute the skewness of a variable.
57318    VARIANCE        = Compute the variance of a variable.
57319
57320Applications:
57321    XX
57322
57323Implementation Date:
57324    XX
57325
57326Program:
57327    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
57328    LET A1 = STANDARDIZED FOURTH CENTRAL MOMENT Y1
57329
57330-----STAR PLOT---------------------------------------------------
57331
57332STAR PLOT
57333
57334Name:
57335    STAR PLOT
57336
57337Type:
57338    Graphics Command
57339
57340Purpose:
57341    Generates a star plot.
57342
57343Description:
57344    A star plot is a graphical data analysis technique for examining
57345    the relative behavior of all variables in a multivariate data set.
57346    The star plot consists of a sequence of equi-angular spokes
57347    (radii).  Each spoke represents a different variable in the
57348    multivariate data set.  An individual star plot examines the
57349    behavior of all such variables but only for a specified subset of
57350    the data (e.g., looking at all the attributes of car performance,
57351    but only for a particular car, such as Chevrolet).  The total
57352    length of a given spoke is uniformly set to unity for sake of
57353    reference.  The "data length" of a given spoke is proportional to
57354    the magnitude of the variable for the subset relative to the
57355    maximum magnitude of the variable across all subsets.  Thus we are
57356    looking at the ratio of the "local" value of the variable to the
57357    "global" maximum of the variable. An interconnecting line cutting
57358    across each spoke at the "data length" gives the star plot its
57359    unique appearance and name.
57360
57361Syntax:
57362    STAR PLOT <y1> <y2> ... <yk>   <SUBSET/EXCEPT/FOR qualification>
57363    where <y1> is the first  response variable;
57364          <y2> is the second response variable;
57365          <yk> is the last   response variable;
57366    and where the <SUBSET/EXCEPT/FOR qualification> must be given.
57367    It is not optional for this command as it is for most other
57368    DATAPLOT commands.
57369
57370Examples:
57371    STAR PLOT Y1 Y2 Y3 Y4 Y5 SUBSET AUTO 4
57372    STAR PLOT Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8 Y9 SUBSET STATE 25
57373
57374Note:
57375    A few variations of the star plot exist, all of which DATAPLOT
57376    can easily handle by judicious use of the components in the LINES
57377    command.  For example, suppose there are k variables in the star
57378    plot (and so k spokes), then
57379       1) element 1 of LINES controls the appearance of the
57380          interconnecting line (this is usually SOLID);
57381       2) the next k elements of LINES controls the appearance of the
57382          spokes from the origin out to the interconnecting line
57383          (some analysts prefer this to be SOLID, others prefer this
57384          to be DOTTED);
57385       3) the following k elements of LINES controls the appearance
57386          of the spokes from the interconnecting line out to the
57387          uniform end of the spoke (some analysts prefer this to be
57388          SOLID, others prefer this to be DOTTED, others prefer this
57389          to be BLANKed out).
57390    When using the LINES command in this context, note the convenient
57391    abbreviations SO for SOLID, DO for DOTTED, DA for DASHED, BL for
57392    BLANK, etc., as in LINES SO DO DO DO DO DO BL BL BL BL BL which
57393    for a 5-variable star plot, would set the interconnecting line to
57394    SOLID, the inner part of the spokes to DOTTED, and BLANK out the
57395    outer part of the spokes.
57396
57397Note:
57398    The generation of multiple star plots per page is typical (one
57399    star plot for each subset of interest).  This is easily done in
57400    DATAPLOT by using the STAR PLOT command in conjunction with the
57401    MULTIPLOT and LOOP commands.  The following generates 50 star
57402    plots on the same page with each star plot consisting of 6
57403    variables (spokes):
57404       MULTIPLOT 5 10
57405       LOOP FOR K = 1 1 50
57406       STAR PLOT Y1 Y2 Y3 Y4 Y5 Y6 SUBSET STATE K
57407       END OF LOOP
57408
57409Default:
57410    None
57411
57412Synonyms:
57413    None
57414
57415Related Commands:
57416    PROFILE PLOT  = Generates a (multivariate) profile plot.
57417    ANDREWS PLOT  = Generates an Andrews plot.
57418    SYMBOL PLOT   = Generates a symbol plot.
57419    LINES         = Sets the type for plot lines.
57420    MULTIPLOT     = Allows multiple plots per page.
57421    LOOP          = Starts a loop (iteration).
57422    END OF LOOP   = Terminates a loop.
57423    ^             = Allows string and value substitution.
57424
57425Reference:
57426    "Graphical Methods for Data Analysis", Chambers, Cleveland,
57427    Kleiner, and Tukey.  Wadsworth, 1983 (pp. 160-161).
57428
57429Applications:
57430    Multivariate Analysis
57431
57432Implementation Date:
57433    88/3
57434
57435Program:
57436    TITLE
57437    FEEDBACK OFF
57438    DIMENSION 100 COLUMNS
57439    SKIP 25
57440    COLUMN LIMITS 20 132
57441    READ AUTO79.DAT Y1 TO Y9
57442    LET N = SIZE Y1; LET CAR = SEQUENCE 1 1 N
57443    .
57444    COLUMN LIMITS 1 19; SKIP 0
57445    LOOP FOR K = 1 1 25
57446        LET K1 = 25+K; ROW LIMITS K1 K1; READ STRING AUTO79.DAT S^K
57447    END OF LOOP
57448    .
57449    MULTIPLOT 5 5; MULTIPLOT CORNER COORDINATES 0 0 100 100
57450    FRAME CORNER COORDINATES 15 10 95 95
57451    .
57452    LEGEND 1 COORDINATES 55 5
57453    LEGEND JUSTIFICATION CENTER
57454    LEGEND SIZE 4
57455    LOOP FOR K = 1 1 25
57456        LEGEND 1 ^S^K
57457        STAR PLOT Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8 Y9  SUBSET CAR K
57458    END OF LOOP
57459    END OF MULTIPLOT
57460
57461-----<dist> ANDERSON DARLING----------------------------------------
57462
57463STATISTIC ANDERSON DARLING
57464
57465Name:
57466    <dist> ANDERSON DARLING
57467
57468Type:
57469    LET Subcommand
57470
57471Purpose:
57472    Compute the Anderson-Darling (A-D) goodness of fit statistic for a
57473    specified distribution for a response variable.
57474
57475Description:
57476    The Anderson-Darling test is a goodness of fit statistic (see the
57477    documentation for the GOODNESS OF FIT command for details).
57478
57479    Although this value is normally determined using the GOODNESS OF FIT
57480    command, for a limited number of distributions you can also generate
57481    this as a statistic LET subcommand.  The advantage in this case is
57482    that you can use it with any of the commands that support built-in
57483    statistics (e.g., the STATISTIC PLOT or the TABULATION command).  For
57484    example, if you have groups of data, you can use the TABULATE or
57485    STATISTIC PLOT commands to easily compare the goodness of fit across
57486    the groups.
57487
57488    In order to compute the Anderson-Darling statistic, the distribution
57489    parameters are first computed using maximum likelihood.  This command
57490    can also return the maximum likelihood estimates.
57491
57492    This command is only supported for a subset of the distributions for
57493    which the Anderson-Darling statistic is supported with the GOODNESS
57494    OF FIT command.  See the Note section below for a list of
57495    distributions supported by this command.
57496
57497Syntax 1:
57498    LET <par> = <dist> ANDERSON DARLING  <y>
57499                       <SUBSET/EXCEPT/FOR qualification>
57500    where <y> is a response variable;
57501          <dist> is one of the supported distributions listed below;
57502          <par> is the parameter where the AD value is saved;
57503    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
57504
57505    This syntax is used for the case where there are no shape parameters.
57506
57507Syntax 2:
57508    LET <par> = <dist> ANDERSON DARLING  STATISTIC  <y>
57509                       <SUBSET/EXCEPT/FOR qualification>
57510    where <y> is a response variable;
57511          <dist> is one of the supported distributions listed below;
57512          <par> is the parameter where the AD value is saved;
57513    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
57514
57515    This syntax is used for those distributions that have a shape
57516    parameter.  When the distribution has a shape parameter, then the word
57517    STATISTIC is required to distinguish this command from the
57518    ANDERSON DARLING PLOT command.  Specifically it is used to distinguish
57519    the following two cases
57520
57521       WEIBULL ANDERSON DARLING PLOT Y
57522       WEIBULL ANDERSON DARLING STATISTIC PLOT Y X
57523
57524    The first command is the Weibull Anderson Darling plot (i.e., a plot
57525    of the Anderson-Darling goodness of fit across values of the shape
57526    parameter) while the second command plots the Anderson Darling statistic
57527    for Y for each group in X.
57528
57529Syntax 3:
57530    LET <par> = <dist> ANDERSON DARLING LOCATION  <y>
57531                       <SUBSET/EXCEPT/FOR qualification>
57532    where <y> is a response variable;
57533          <dist> is one of the supported distributions listed below;
57534          <par> is the parameter where the location value is saved;
57535    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
57536
57537    This syntax returns the estimate of the location parameter rather
57538    than the AD value.  Not all supported distributions have a location
57539    parameter.
57540
57541Syntax 4:
57542    LET <par> = <dist> ANDERSON DARLING SCALE  <y>
57543                       <SUBSET/EXCEPT/FOR qualification>
57544    where <y> is a response variable;
57545          <dist> is one of the supported distributions listed below;
57546          <par> is the parameter where the scale value is saved;
57547    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
57548
57549    This syntax returns the estimate of the scale parameter rather
57550    than the AD value.
57551
57552Syntax 5:
57553    LET <par> = <dist> ANDESON DARLING SHAPE  <y>
57554                <SUBSET/EXCEPT/FOR qualification>
57555    where <y> is a response variable;
57556          <dist> is one of the supported distributions listed below;
57557          <par> is the parameter where the shape value is saved;
57558    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
57559
57560    This syntax returns the estimate of the shape parameter rather
57561    than the Anderson-Darling statistic.  Not all supported distributions
57562    have a shape parameter.
57563
57564Examples:
57565    LET A = NORMAL ANDERSON DARLING Y
57566    LET A = NORMAL ANDERSON DARLING LOCATION Y
57567    LET A = NORMAL ANDERSON DARLING SCALE Y
57568
57569    LET A = LOGISTIC ANDERSON DARLING Y
57570
57571    LET A = WEIBULL ANDERSON DARLING STATISTIC Y
57572    LET A = WEIBULL ANDERSON DARLING SCALE Y
57573    LET A = WEIBULL ANDERSON DARLING SHAPE Y
57574
57575Note:
57576    The following location/scale distributions are supported.
57577
57578       LET A = DOUBLE EXPONENTIAL ANDERSON DARLING  Y
57579       LET A = EXPONENTIAL ANDERSON DARLING         Y
57580       LET A = GUMBEL ANDERSON DARLING              Y
57581       LET A = LOGISTIC ANDERSON DARLING            Y
57582       LET A = MAXWELL ANDERSON DARLING             Y
57583       LET A = NORMAL ANDERSON DARLING              Y
57584       LET A = RAYLEIGH ANDERSON DARLING            Y
57585       LET A = UNIFORM ANDERSON DARLING             Y
57586
57587    The Maxwell and Rayleigh support the 2-parameter case rather than
57588    the 1-parameter case (i.e., the location parameter will be
57589    estimated).
57590
57591    For the uniform distribution, the scale parameter will actually
57592    return the upper limit parameter.
57593
57594    In addition, the following distributions with a single shape
57595    parameter are supported.
57596
57597       LET A = BURR TYPE 10 ANDERSON DARLING STATISTIC Y
57598       LET A = FATIGUE LIFE ANDERSON DARLING STATISTIC Y
57599       LET A = FRECHET ANDERSON DARLING STATISTIC Y
57600       LET A = GAMMA ANDERSON DARLING STATISTIC Y
57601       LET A = GEOMETRIC EXTREME EXPONENTIAL ANDERSON DARLING STATISTIC Y
57602       LET A = INVERTED GAMMA ANDERSON DARLING STATISTIC Y
57603       LET A = LOGISTIC EXPONENTIAL ANDERSON DARLING STATISTIC Y
57604       LET A = LOGNORMAL ANDERSON DARLING STATISTIC Y
57605       LET A = WEIBULL ANDERSON DARLING STATISTIC Y
57606
57607    Note that the above support the 2-parameter form of the distribution
57608    (i.e., the scale and shape parameters are estimated from the data
57609    and the location parameter is set to zero).
57610
57611Note:
57612    The distribution parameters are estimated using maximum likelihood.
57613    For several distributions, you can choose an alternative estimation
57614    method using the command
57615
57616        SET DISTRIBUTIONAL FIT TYPE <value>
57617
57618    where <value> can be one of the following
57619
57620        ML                       - use the default maximum likelihood
57621                                   (available for all supported
57622                                   distributions)
57623        MOMENT                   - use the moment estimates, available for
57624                                   uniform, Gumbel, 2-par Maxwell,
57625                                   2-par gamma, 2-par inverted gamma,
57626                                   2-par fatigue life
57627        MODIFIED MOMENT          - use the modified moment estimates,
57628                                   available for 2-par Rayleigh
57629
57630Note:
57631    Dataplot statistics can be used in 20+ commands.  For details, enter
57632
57633         HELP STATISTICS
57634
57635Default:
57636    None
57637
57638Synonyms:
57639    AD is a synonym for ANDERSON DARLING
57640
57641Related Commands:
57642    GOODNESS OF FIT     = Perform a distributional goodness of fit test.
57643    MAXIMUM LIKELIHOOD  = Perform maximum likelihood to estimate
57644                          distributional parameters.
57645    STATISTIC PPCC      = Compute the ppcc value for a specified
57646                          distribution.
57647    STATISTIC PLOT      = Generates a statistic versus subset plot.
57648    TABULATE            = Compute a statistic based on a cross-tabulation.
57649    PPCC PLOT           = Generates a probability plot correlation
57650                          coefficient plot.
57651    PROBABILITY PLOT    = Generates a probability plot.
57652
57653Reference:
57654    Stephens, M. A. (1974), "EDF Statistics for Goodness of Fit and
57655    Some Comparisons," Journal of the American Statistical Association,
57656    Vol. 69, pp. 730-737.
57657
57658    Stephens, M. A. (1976), "Asymptotic Results for Goodness-of-Fit
57659    Statistics with Unknown Parameters," Annals of Statistics,
57660    Vol. 4, pp. 357-369.
57661
57662    Stephens, M. A.  (1977), "Goodness of Fit for the Extreme Value
57663    Distribution," Biometrika, Vol. 64, pp. 583-588.
57664
57665    Stephens, M. A. (1977), "Goodness of Fit with Special Reference to
57666    Tests for Exponentiality," Technical Report No. 262, Department of
57667    Statistics, Stanford University, Stanford, CA.
57668
57669    Stephens, M. A. (1979), "Tests of Fit for the Logistic Distribution
57670    Based on the Empirical Distribution Function," Biometrika, Vol. 66,
57671    pp. 591-595.
57672
57673Applications:
57674    Distributional Modeling
57675
57676Implementation Date:
57677    2015/2
57678
57679Program 1:
57680    . Step 1:   Read the data
57681    .
57682    skip 25
57683    read nor.dat      y1
57684    read exp.dat      y2
57685    read weibbury.dat y3
57686    read lgn.dat      y4
57687    read gamma.dat    y5
57688    read frechet.dat  y6
57689    let y x = stack y1 y2 y3 y4 y5 y6
57690    skip 0
57691    .
57692    case asis
57693    label case asis
57694    title case asis
57695    title offset 2
57696    multiplot corner coordinates 2 2 98 98
57697    multiplot scale factor 2
57698    .
57699    . Step 2:   Plot normal a-d statistic
57700    .
57701    multiplot 2 2
57702    y1label Anderson-Darling Statistic
57703    x3label Datasets
57704    xlimits 1 6
57705    major xtic mark number 6
57706    minor xtic mark number 0
57707    x1tic mark offset 0.5 0.5
57708    x1tic mark label format alpha
57709    x1tic mark label content NOR.DAT sp()cr()sp()cr()EXP.DAT WEIBBURY.DAT ...
57710          sp()cr()sp()cr()LGN.DAT GAMMA.DAT sp()cr()sp()cr()FRECHET.DAT
57711    x1tic mark label size 1.2
57712    y1label displacement 12
57713    ylimits 0 1
57714    character X
57715    line blank
57716    .
57717    title Normal AD
57718    normal anderson darling plot y x
57719    .
57720    ylimits
57721    y1label Location
57722    title Normal AD Location
57723    normal anderson darling location plot y x
57724    .
57725    y1label Scale
57726    title Normal AD Scale
57727    normal anderson darling scale plot y x
57728    .
57729    . Step 3:   Location/Scale distributions
57730    .
57731    multiplot 2 2
57732    label
57733    .
57734    ylimits 0 1
57735    title Normal AD
57736    normal anderson darling plot y x
57737    .
57738    ylimits 0 6
57739    title Exponential AD
57740    exponential anderson darling plot y x
57741    ylimits 0 1000
57742    title Double Exponential AD
57743    double exponential anderson darling plot y x
57744    ylimits 0  1.5
57745    title Gumbel (Maximum)
57746    gumbel anderson darling plot y x
57747    .
57748    end of multiplot
57749    .
57750    justification center
57751    move 50 3
57752    text Datasets
57753    direction vertical
57754    move 2 50
57755    text Anderson-Darling Statistic
57756    direction horizontal
57757    .
57758    multiplot 2 2
57759    x1tic mark label format numeric
57760    label
57761    .
57762    ylimits 0 20
57763    title Uniform AD
57764    uniform anderson darling plot y x
57765    .
57766    ylimits 0 1
57767    title Maxwell AD
57768    maxwell anderson darling plot y x
57769    .
57770    ylimits 0 10
57771    title Rayleigh AD
57772    rayleigh anderson darling plot y x
57773    .
57774    ylimits 0 1
57775    title Logistic
57776    logistic anderson darling plot y x
57777    .
57778    end of multiplot
57779    .
57780    justification center
57781    move 50 3
57782    text Datasets
57783    direction vertical
57784    move 2 50
57785    text Anderson-Darling Statistic
57786    direction horizontal
57787
57788Program 2:
57789    . Step 1:   Read the data
57790    .
57791    skip 25
57792    read nor.dat      y1
57793    read exp.dat      y2
57794    read weibbury.dat y3
57795    read lgn.dat      y4
57796    read gamma.dat    y5
57797    read frechet.dat  y6
57798    let y x = stack y1 y2 y3 y4 y5 y6
57799    skip 0
57800    .
57801    case asis
57802    title case asis
57803    title offset 2
57804    .
57805    xlimits 1 6
57806    major xtic mark number 6
57807    minor xtic mark number 0
57808    x1tic mark offset 0.5 0.5
57809    x1tic mark label size 1.5
57810    character X
57811    line blank
57812    .
57813    . Step 3:   Weibull, Lognormal, Gamma, Fatigue Life
57814    .
57815    multiplot corner coordinates 2 2 98 98
57816    multiplot scale factor 2
57817    multiplot 2 2
57818    x1tic mark label format numeric
57819    label
57820    .
57821    ylimits 0 1
57822    title Weibull AD
57823    weibull anderson darling statistic plot y x
57824    . weibull ad statistic plot y x
57825    .
57826    ylimits 0 1
57827    title Lognormal AD
57828    lognormal anderson darling statistic plot y x
57829    ylimits
57830    .
57831    .           Note that gamma has problem with datasets 1 and 4
57832    .
57833    ylimits 0 1
57834    title Gamma AD
57835    gamma anderson darling statistic plot y x  subset x 2 3 5 6
57836    .
57837    ylimits 0 2
57838    title Fatigue Life AD
57839    fatigue life anderson darling statistic plot y x
57840    .
57841    end of multiplot
57842    .
57843    justification center
57844    move 50 3
57845    text Datasets
57846    direction vertical
57847    move 2 50
57848    text Anderson-Darling Statistic
57849    direction horizontal
57850
57851-----SET STATISTIC MISSING VALUE (SET)----------------------------------
57852
57853STATISTIC MISSING VALUE
57854
57855Name:
57856    SET STATISTIC MISSING VALUE (SET)
57857
57858Type:
57859    Set Subcommand
57860
57861Purpose:
57862    Specify a numeric value that will interpreted as a missing
57863    value when computing one of the built-in statistics.
57864
57865Description:
57866    Data will often contain missing values.  In computing built-in
57867    statistics with the LET sub-commands, you can define a value that will
57868    be interpreted as a missing value.  Data that are equal to this
57869    missing value will be omitted from the computation of the statistic.
57870
57871    In computing a simple statistic LET sub-command such as
57872
57873         LET A = MEAN Y
57874
57875    it is relatively easy to omit missing values with a SUBSET clause.
57876    For example
57877
57878         LET A = MEAN Y  SUBSET Y <> -99999
57879
57880    You can also do this with the commands
57881
57882         SET STATISTIC MISSING VALUE -99999
57883         LET A = MEAN Y  SUBSET Y
57884
57885    Although in this simple case there is no need to use the
57886    SET STATISTIC MISSING VALUE, there are 20+ commands (such as
57887    CROSS TABULATE, STATISTIC PLOT) that utilize the built-in statistics.
57888    In these cases, using the SET STATISTIC MISSING VALUE can be more
57889    convenient than using the SUBSET clause.
57890
57891    Enter HELP STATISTICS for a list of built-in statistics and the
57892    commands that can utilize them.
57893
57894Syntax:
57895    SET STATISTIC MISSING VALUE <value>
57896    where <value> is a number or parameter that specifies a value that
57897               will be interpreted as a missing value code.
57898
57899Examples:
57900    SET STATISTIC MISSING VALUE -9999
57901    SET STATISTIC MISSING VALUE -1
57902
57903Note:
57904    In addition to built-in statistic LET sub-commands, the following
57905    commands also recognize the SET STATISTIC MISSING VALUE command
57906
57907        MANTEL HAENSZEL TEST
57908        ODDS RATIO CHI-SQUARE TEST
57909        ODDS RATIO INDEPENDENCE TEST
57910        LET ... = WEIBULL MOMENT ESTIMATE
57911        LET ... = LOGNORMAL MOMENT ESTIMATE
57912        LET ... = GAMMA MOMENT ESTIMATE
57913        LET ... = INVERSE GAUSSIAN MOMENT ESTIMATE
57914        LET ... = VARIABLE TO MATRIX
57915        LET ... = STANDARDIZE
57916
57917Default:
57918    The missing value is set to minimum real value on the machine (this
57919    can be determined with a PROBE CPUMIN command).
57920
57921Synonyms:
57922    None
57923
57924Related Commands:
57925    STATISTICS               = List built-in statistics and commands
57926                               that can utilize them.
57927    MANTEL HAENSZEL          = Perform a Mantel-Haenszel test.
57928    WEIBULL MOMENT ESTIMATE  = Compute Weibull parameter estimates based
57929                               on moments.
57930
57931Applications:
57932    Terminal usage
57933
57934Implementation Date:
57935    2007/04
57936
57937Program 1:
57938    read matrix m
57939    2 4 7 -9999
57940    2 -9999 2 3
57941    1 2 -9999 3
57942    end of data
57943    .
57944    set statistic missing value -9999
57945    .
57946    let meanv = matrix row mean m
57947    .
57948    set write decimals 3
57949    print meanv
57950
57951Program 2:
57952    let n1 = 105
57953    let n2 = 192
57954    let n3 = 145
57955    let n = n1 + n2 + n3
57956    let x = 3 for i = 1 1 n
57957    let x = 1 for i = 1 1 n1
57958    let istrt = n1 + 1
57959    let istop = n1 + n2
57960    let x = 2 for i = istrt 1 istop
57961    .
57962    set statistic missing value -99
57963    .
57964    .  Group 1 values
57965    .
57966    let y1 = 0 for i = 1 1 n
57967    let y2 = 0 for i = 1 1 n
57968    let y1 = 1 for i = 1 1  81
57969    let y2 = 1 for i = 1 1  34
57970    .
57971    .  Group 2 values (have unequal samples here, so fill
57972    .          with missing values
57973    .
57974    let istrt = n1 + 1
57975    let istop1 = istrt + 118 - 1
57976    let istop2 = istrt + 69 - 1
57977    let y1 = 1 for i = istrt 1 istop1
57978    let y2 = 1 for i = istrt 1 istop2
57979    let istrt2 = n1 + 174 + 1
57980    let istop2 = n1 + n2
57981    let y2 = -99 for i = istrt2 1 istop2
57982    .
57983    .  Group 3 values
57984    .
57985    let istrt = n1 + n2 + 1
57986    let istop1 = istrt + 82 - 1
57987    let istop2 = istrt + 52 - 1
57988    let y1 = 1 for i = istrt 1 istop1
57989    let y2 = 1 for i = istrt 1 istop2
57990    .
57991    set statistic missing value -99
57992    .
57993    odds ratio chi-square test y1 y2 x
57994
57995-----STATISTIC BLOCK-----------------------------------------------------
57996
57997STATISTIC BLOCK
57998
57999Name:
58000    statISTIC BLOCK
58001
58002Type:
58003    Analysis Command
58004
58005Purpose:
58006    Defines a statistic via a group of Dataplot commands.
58007
58008Description:
58009    Dataplot supports a large number of built-in statistics (enter
58010    HELP statISTICS for a complete list).  For example,
58011
58012        LET A = MEAN Y
58013        LET A = STANDARD DEVIATION Y
58014        LET A = CORRELATION Y1 Y2
58015
58016    Built-in statistics can be used in the following commands
58017
58018         1. LET A = <stat>
58019         2. <stat> STATISTIC PLOT
58020         3. CROSS TABULATE <stat> STATISTIC PLOT
58021         4. FLUCTUATION PLOT <stat>
58022         5. <stat> BLOCK PLOT
58023         6. BOOTSTRAP <stat> PLOT
58024         7. JACKNIFE <stat> PLOT
58025         8. DEX <stat> PLOT
58026         9. <stat> INFLUENCE CURVE
58027        10. CROSS TABULATE <stat>
58028        11. POSITIONAL TABULATION <stat>
58029        12. LET V = MATRIX COLUMN <stat>
58030        13. LET V = MATRIX ROW <stat>
58031        14. LET A = MATRIX GRAND <stat>
58032        15. LET M = MATRIX PARTITION <stat>
58033        16. LET V = CROSS TABULATE <stat>
58034        17. LET V = CROSS TABULATE CUMULATIVE <stat>
58035        18. LET V = SORT BY <stat>
58036        19. LET YOUT = MOVING <stat>
58037        20. LET YOUT = CUMULATIVE <stat>
58038        21. <STAT> INTERACTION PLOT
58039
58040    Although Dataplot provides a large number of built-in statistics,
58041    there may be situations where you would like to define a statistic
58042    not already supported by Dataplot.  Statistic blocks were introduced
58043    to address this limitation.  Statistic blocks allow you to define
58044    statistics using various Dataplot LET subcommands.
58045
58046    Statistic blocks are created using the CAPTURE syntax.  For
58047    example,
58048
58049        CAPTURE STATISTIC BLOCK ONE ZZZZMEAN A Y
58050        LET N = SIZE Y
58051        LET YSUM = SUM Y
58052        LET A  = YSUM/N
58053        END OF CAPTURE
58054
58055    The statistic block contains the following components
58056
58057        1. CAPTURE STATISTIC BLOCK - this initiates the creation
58058           of the statistic block.  The CAPTURE command is typically
58059           used to direct Dataplot output to a file.  However,  in this
58060           case it saves the specified commands in an internal
58061           structure that can be accessed later.
58062
58063        2. ONE - up to three statistic blocks can be defined.  In this
58064           example, "ONE" specifies that this is statistic block one.
58065           You can redefine these three statistic blocks as often as
58066           you need in a Dataplot session.
58067
58068        3. ZZZZMEAN - this is the name of the statistic block.  This is
58069           the name that will be used to execute the statistic block in
58070           subsequent commands.  This follows the rules for other
58071           Dataplot names (i.e., up to eight alphanumeric characters).
58072
58073           Note that this name should not be the same as one of Dataplot's
58074           built-in statistics.
58075
58076        4. A - this is name of the parameter that will contain the
58077           response for the statistic block.  This is the value that
58078           is typically defined in the last line of the statistic block.
58079           For statistic blocks, the response must be a parameter.  If
58080           the response is a variable, an error will be returned.
58081
58082        5. Y - this is the response variable for which the statistic is
58083           being computed.  You can specify from one to three response
58084           variables.
58085
58086    The following Dataplot commands can be included in a statistic block:
58087
58088         1. LET ... = PATTERN ...
58089         2. LET ... = DATA ...
58090         3. LET ... = ... RANDOM NUMBERS ...
58091         4. ARITHMETIC OPERATIONS
58092         5. STATISTIC LET SUB-COMMANDS
58093         6. MATH LET SUB-COMMANDS
58094            The following MATH LET sub-commands are not allowed:
58095
58096            a. MATRIX sub-commands
58097            b. DERIVATIVE
58098            c. NUMERICAL DERIVATIVE
58099            d. INTEGRAL
58100            e. RUNGE-KUTTA
58101            f. OPTIMIZE
58102            g. ROOTS
58103
58104    The arithmetic operations and statistics LET sub-commands are of
58105    particular interest.  Commands that are not supported are not added
58106    to the statistic block during the CAPTURE operation.  Up to 30
58107    commands can be saved to a given statistic block.
58108
58109Syntax 1:
58110    CAPTURE STATISTIC BLOCK <one/two/three> <name>  <resp> <variable list>
58111    where <one/two/three> specifies which statistic block is being created;
58112          <name> is the name of the statistic block;
58113          <resp> is the name of parameter that is the result of the
58114                statistic block;
58115    and where <variable list> is a list of 1 to 3 variable names that are
58116                used to compute the statistic.
58117
58118    This syntax is used to create the contents of a statistic block.
58119
58120Syntax 2:
58121    LIST STATISTIC BLOCK <one/two/three>
58122    where <one/two/three> specifies which statistic block is being listed.
58123
58124    This syntax is used to list the contents of a statistic block.
58125
58126Examples:
58127    capture statistic block one zzzzsd a y
58128    let n = size y
58129    let ysum = sum y
58130    let ymean = ysum/n
58131    let y2 = (y - ymean)**2
58132    let y2sum = sum y2
58133    let a = sqrt(y2sum/(n-1))
58134    end of capture
58135
58136Note:
58137    Error checking (e.g., matching parenthesis, valid number of
58138    arguments for a built-in function) is performed when the statistic
58139    block is evaluated, not when it is created.
58140
58141Note:
58142    There may be cases where you cannot create the needed statistic even
58143    with the STATISTIC BLOCK command.  The LET ... = EXECUTE ... command
58144    can be used to run an external prorgram.  That is, your statistic
58145    block can use the EXECUTE command to compute the desired statistic.
58146    You can create the external program in whatever language is most
58147    convenient for your application.  The basic requirement is that the
58148    resulting external file can be run from the command line and that it
58149    can read from standard input and write to standard output.
58150
58151    This is demonstrated in the Program 2 example below.
58152
58153Default:
58154    None
58155
58156Synonyms:
58157    None
58158
58159Related Commands:
58160    LET              = Carries out a variety of operations on variables,
58161                       parameters, and functions.
58162    LET FUNCTION     = Define a function.
58163    FUNCTION BLOCK   = Define a function block.
58164    EXECUTE          = Run an external program.
58165    CAPTURE          = Re-direct Dataplot output to an external file.
58166
58167Applications:
58168    Statistics
58169
58170Implementation Date:
58171    2016/08
58172
58173Program 1:
58174    skip 25
58175    read gear.dat y x
58176    skip 0
58177    .
58178    . Step 2:   Define the statistic block
58179    .
58180    capture statistic block one zzzzsd a y
58181    let n = size y
58182    let ysum = sum y
58183    let ymean = ysum/n
58184    let y2 = (y - ymean)**2
58185    let y2sum = sum y2
58186    let a = sqrt(y2sum/(n-1))
58187    end of capture
58188    .
58189    xlimits 1 10
58190    major xtic mark number 10
58191    x1tic mark offset 0.5 0.5
58192    x1label Batch
58193    y1label SD of Batch
58194    line blank
58195    char X
58196    .
58197    multiplot corner coordinates 2 2 98 98
58198    multiplot scale factor 2
58199    multiplot 2 1
58200    title automatic
58201    .
58202    zzzzsd plot y x
58203    sd     plot y x
58204    .
58205    end of multiplot
58206
58207Program 2:
58208    . Step 1:   Read the data
58209    .
58210    skip 25
58211    read gear.dat y x
58212    skip 0
58213    .
58214    . Step 2:   Create and compile the Fortran code
58215    .
58216    capture script exec.for
58217          program test
58218    c
58219    c     For this simple example, read in a data set and
58220    c     compute the mean and standard deviation.
58221    c
58222          real x(10000)
58223    c
58224          xmean=0.0
58225          xsd=0.0
58226          nval=0
58227          read(*,*,end=19,err=9020)nval
58228    c
58229          sum1=0.0
58230          do 10 i=1,min(nval,10000)
58231             read(*,*,end=19,err=9020)x(i)
58232             sum1=sum1 + x(i)
58233       10 continue
58234       19 continue
58235          if(nval.ge.1)then
58236            xmean=sum1/real(nval)
58237          endif
58238    c
58239          if(nval.gt.1)then
58240            sum1=0.0
58241            do 20 i=1,nval
58242               sum1=sum1 + (x(i)-xmean)**2
58243      20    continue
58244            xsd=sqrt(sum1/real(nval-1))
58245          endif
58246    c
58247    c     Now write sd to standard output
58248    c
58249     9020 continue
58250          write(*,*)xsd
58251    c
58252          stop
58253          end
58254    end of capture
58255    .
58256    system gfortran -o exec.exe  exec.for
58257    .
58258    . Step 3:   Define the statistic block
58259    .
58260    capture statistic block one zzzzsd a y
58261    let ztemp = execute ./exec.exe y
58262    let a = ztemp(1)
58263    end of capture
58264    .
58265    xlimits 1 10
58266    major xtic mark number 10
58267    x1tic mark offset 0.5 0.5
58268    x1label Batch
58269    y1label SD of Batch
58270    line blank
58271    char X
58272    .
58273    multiplot corner coordinates 2 2 98 98
58274    multiplot scale factor 2
58275    multiplot 2 1
58276    title automatic
58277    .
58278    zzzzsd plot y x
58279    sd     plot y x
58280    .
58281    end of multiplot
58282
58283-----STATISTIC PLOT---------------------------------------------------
58284
58285STATISTIC PLOT
58286
58287Name:
58288    ... STATISTIC PLOT
58289
58290Type:
58291    Graphics Command
58292
58293Purpose:
58294    Generates a statistic versus index plot for a given statistic.
58295
58296Description:
58297    A statistic plot consists of subsample statistic versus subsample
58298    index.  The subsample statistic is the value of some statistic for
58299    the data in the subsample.  The statistic plot is used to answer the
58300    question--"Does the subsample statistic change over different
58301    subsamples?".  The plot consists of:
58302
58303       Vertical   axis = subsample statistic;
58304       Horizontal axis = subsample index.
58305
58306    The statistic plot yields 2 traces:
58307
58308       1. a subsample statistic trace; and
58309       2. a full-sample statistic reference line.
58310
58311    The appearance of these two traces is controlled by the first two
58312    settings of the LINES, CHARACTERS, SPIKES, BARS, and similar
58313    attributes.
58314
58315Syntax 1:
58316    <stat> STATISTIC PLOT  <y1> ... <yk>  <x>
58317                           <SUBSET/EXCEPT/FOR qualification>
58318    where <stat> is one of Dataplot's supported statistics;
58319          <y1> ... <yk> is a list of 1 to 3 response variables
58320              (<stat> determines how many response variables);
58321          <x> is the subsample identifier variable (this variable
58322              appears on the horizontal axis);
58323    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
58324
58325    For a list of supported statistics, enter
58326
58327          HELP STATISTICS
58328
58329Syntax 2:
58330    <stat> STATISTIC PLOT  <y1> ... <yk>  <x>
58331                           <SUBSET/EXCEPT/FOR qualification>
58332    where <stat> is one of Dataplot's supported statistics;
58333          <y1> ... <yk> is a list of 1 to 30 response variables;
58334          <x> is the subsample identifier variable (this variable
58335              appears on the horizontal axis);
58336    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
58337
58338    This syntax is used for multiple response variables.  See the
58339    Note section below for details on this syntax.
58340
58341Syntax 3:
58342    <stat> STATISTIC TAG PLOT <y>  <x> <tag>
58343                              <SUBSET/EXCEPT/FOR qualification>
58344    where <stat> is one of Dataplot's supported statistics;
58345          <y1> ... <yk> is a list of 1 to 3 response variables
58346              (<stat> determines how many response variables);
58347          <x> is the subsample identifier variable (this variable
58348              appears on the horizontal axis);
58349          <tag> is group-id variable;
58350    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
58351
58352    For this syntax, there are two group variables.  The <x>
58353    variable is used as in syntax 1.  That is, this variable
58354    is used to define the sub-groups for computing the statistic.
58355    In syntax 1, there are two plot traces created.  The first
58356    contains the statistic value for each group and the second
58357    contains the statistic for the full data set.  With this
58358    syntax, the <tag> variable is used to define groups with the
58359    same plot attributes.  For example, if <tag> contains three
58360    distinct values (1, 2, and 3), there will be four plot traces
58361    created.  The first trace is for groups (<x>) where the
58362    corresponding <tag> value is 1, the second trace is where the
58363    corresponding <tag> value is 2, the third trace is where the
58364    corresponding <tag> value is 3, and the fourth trace is
58365    the statistic for the full data set.
58366
58367    The <tag> value should be the same for all rows in a
58368    group defined by <x>.  However, if this is not the case,
58369    the <tag> value corresponding to the first row in <x> for
58370    that group will be used.
58371
58372    This syntax is used to highlight certain groups.  For
58373    example, groups that denote potential outliers might be
58374    highlighted in a different color.
58375
58376    This syntax is demonstrated in the Program 3 example.
58377
58378Examples:
58379    MEAN PLOT Y X
58380    STANDARD DEVIATION PLOT Y X1
58381    MEAN PLOT Y1 TO Y5 X
58382    MEAN TAG PLOT Y X TAG
58383
58384Note:
58385    A number of the subcommands (e.g., MEAN PLOT) are documented
58386    individually.
58387
58388Note:
58389    Although DATAPLOT supports this command for a large number of
58390    statistics, there may be cases where you want it for another one.
58391    The following example shows how to compute the rank correlation
58392    (assume Y1 and Y2 are the response variables and TAG is the group
58393    identifier).
58394
58395        LET TAGDIST = DISTINCT TAG
58396        LET NGROUP = SIZE TAGDIST
58397        LOOP FOR K = 1 1 NGROUP
58398            LET IGROUP TAGDIST(K)
58399            LET A = RANK CORRELATION Y1 Y2 SUBSET TAG = IGROUP
58400            LET YNEW(K) = A
58401            LET XNEW(K) = K
58402        END OF LOOP
58403        LET A = RANK CORRELATION Y1 Y2
58404        LET YNEW2 = DATA A A
58405        LET XNEW2 = DATA 1 NGROUP
58406        PLOT YNEW XNEW AND
58407        PLOT YNEW2 XNEW2
58408
58409    This basic idea can be easily adapted to other statistics (even ones
58410    that are not built-in to DATAPLOT).  It can also be adapted to
58411    statistics requiring any arbitrary number of variables to compute.
58412
58413    The 2016/08 version of Dataplot added the STATISTIC BLOCK
58414    command that can be used to define a statistic.
58415
58416Note:
58417    The 2009/05 version of Dataplot updated the <stat> PLOT command to
58418    support multiple response variables (Syntax 2).  For example,
58419
58420        MEAN PLOT Y1 TO Y4 X
58421
58422    That is, for each distinct value of X, there are now 4 means
58423    plotted instead of just one.
58424
58425    The following commands can be used to control the appearance of
58426    the plot:
58427
58428        SET STATISTIC PLOT FORMAT   <DEX/OVERLAY>
58429        SET STATISTIC PLOT SUMMARY  <VARIABLE/GROUP>
58430
58431    If the FORMAT option is set to OVERLAY and the SUMMARY option
58432    is set to VARIABLE, this is equivalent to the following:
58433
58434        YLIMITS ...
58435        PRE-ERASE OFF
58436        ERASE
58437        MEAN PLOT Y1 X
58438        MEAN PLOT Y2 X
58439        MEAN PLOT Y3 X
58440        MEAN PLOT Y4 X
58441        PRE-ERASE ON
58442
58443    That is, there will be a curve corresponding to each response
58444    variable and there will be a reference line corresponding to
58445    each variable.
58446
58447    If the FORMAT option is set to DEX, then this plot uses a
58448    format similar to the DEX <stat> PLOT command.  That is, for
58449    each distinct value of X, there will be curve connecting the
58450    mean values for the 4 response variables.
58451
58452    If the SUMMARY option is set to GROUP, there will be a single
58453    reference curve.  At each distinct value of X, a single overall
58454    mean is computed for all 4 of the response variables.
58455
58456    In addition, the following option is added to this command:
58457
58458        <stat> <zscore/uscore> PLOT
58459
58460    If ZSCORE is given, then a z-score transformation (subtract the
58461    mean and then divide by the standard deviation) is computed
58462    on each response variable first.  If USCORE is given, then a
58463    u-score transformation (subtract the minimum and divide by the
58464    range) is computed on each column.  Note these z-score and
58465    u-score transformations apply to the entire response variable, not
58466    to each distinct group within the response variable.
58467
58468Note:
58469    By default, Dataplot draws a reference line where the vertical
58470    axis coordinate is the value of the statistic for all of the
58471    data.
58472
58473    For some statistics (e.g., STANDARD DEVIATION and other scale
58474    statistics), this may not be particularly meaningful.  Alternatively
58475    you can specify either the mean or the median value of the
58476    statistic over the groups.  For example, if you are generating
58477    a standard deviation plot and you have 10 groups, you can
58478    specify that the reference line be drawn at the mean (or the
58479    median) of the 10 computed standard deviations.
58480
58481    To specify what reference line is drawn, enter
58482
58483         SET STATISTIC PLOT REFERENCE LINE <OVERALL/AVERAGE/MEDIAN>
58484
58485    where OVERALL is the value of the statistic for all of the data,
58486    AVERAGE is the mean of the statistic over the groups, and
58487    MEDIAN is the median of the statistic over the groups.
58488
58489    The default is OVERALL.
58490
58491Default:
58492    None
58493
58494Synonyms:
58495    On most of the commands, the word STATISTIC is optional and is
58496    usually omitted (e.g., the mean plot is documented under MEAN PLOT
58497    rather than MEAN STATISTIC PLOT).
58498
58499Related Commands:
58500    CHARACTERS              = Sets the type for plot characters.
58501    LINES                   = Sets the type for plot lines.
58502    BOX PLOT                = Generates a box plot.
58503    CONTROL CHART           = Generates a control chart.
58504    PLOT                    = Generates a data or function plot.
58505    SUMMARY                 = Computes various statistics for a
58506                              variable.
58507    STATISTIC BLOCK         = Define a new statistic.
58508
58509Applications:
58510    Exploratory Data Analysis
58511
58512Implementation Date:
58513    1988/02
58514    2009/04: support for multiple response variables
58515    2015/04: added SET STATISTIC PLOT REFERENCE LINE
58516    2018/02: support for a tag variable (Syntax 3)
58517
58518    The list of supported statistics has been regulary updated
58519    since the original 1988/2 implementation.
58520
58521Program 1:
58522    SKIP 25
58523    READ GEAR.DAT DIAMETER BATCH
58524    .
58525    TITLE AUTOMATIC
58526    TITLE OFFSET 2
58527    MULTIPLOT 2 2
58528    MULTIPLOT CORNER COORDINATES 3 0 100 100
58529    MULTIPLOT SCALE FACTOR 2
58530    X1LABEL DISPLACEMENT 14
58531    Y1LABEL DISPLACEMENT 12
58532    TIC MARK LABEL SIZE 1.8
58533    .
58534    XTIC OFFSET 1 1
58535    X1LABEL BATCH
58536    LINE BLANK SOLID
58537    CHARACTER X BLANK
58538    Y1LABEL MEAN
58539    TITLE MEAN PLOT
58540    MEAN PLOT DIAMETER BATCH
58541    Y1LABEL STANDARD DEVIATION
58542    TITLE SD PLOT
58543    STANDARD DEVIATION PLOT DIAMETER BATCH
58544    Y1LABEL RELATIVE STANDARD DEVIATION
58545    TITLE RELSD PLOT
58546    RELSD PLOT DIAMETER BATCH
58547    Y1LABEL RANGE
58548    TITLE RANGE PLOT
58549    RANGE PLOT DIAMETER BATCH
58550    .
58551    END OF MULTIPLOT
58552
58553Program 2:
58554    skip 25
58555    read iris.dat y1 to y4 x
58556    .
58557    title case asis
58558    title offset 2
58559    label case asis
58560    y1label Mean
58561    x1label Group-ID
58562    xlimits 1 3
58563    major xtic mark number 3
58564    minor xtic mark number 0
58565    xtic offset 0.6 0.6
58566    ytic offset 1 1
58567    .
58568    set stat plot format  dex
58569    set stat plot summary vari
58570    title sp()Case 1: Format = DEX, Summary = Variable
58571    line color black black black blue red green cyan
58572    mean plot y1 to y4 x
58573    title sp()Case 1b: Z-Score - Format = DEX, Summary = Variable
58574    mean zscore plot y1 to y4 x
58575    .
58576    set stat plot format  dex
58577    set stat plot summary group
58578    title sp()Case 2: Format = DEX, Summary = Group
58579    mean plot y1 to y4 x
58580    title sp()Case 2: Z-Score - Format = DEX, Summary = Group
58581    mean zscore plot y1 to y4 x
58582    .
58583    set stat plot format overlay
58584    set stat plot summary group
58585    line color blue red green cyan
58586    line so so so so bl
58587    char bl bl bl bl x
58588    title sp()Case 3: Format = Overlay, Summary = Group
58589    mean plot y1 to y4 x
58590    title sp()Case 3: Z-Score Format = Overlay, Summary = Group
58591    mean zscore plot y1 to y4 x
58592    .
58593    set stat plot format overlay
58594    set stat plot summary variable
58595    line so all
58596    char bl all
58597    line color blue red green cyan blue red green cyan
58598    title sp()Case 4: Format = Overlay, Summary = Variable
58599    mean plot y1 to y4 x
58600    title sp()Case 4: Z-Score - Format = Overlay, Summary = Variable
58601    mean zscore plot y1 to y4 x
58602
58603Program 3:
58604    . Name:     meantag.dp
58605    . Purpose:  Test "tag" option on statistic plot case
58606    .
58607    . Step 0:   Define output devices
58608    .
58609    let string fplot = meantag.ps
58610    set ipl1na ^fplot
58611    call checksys.dp
58612    .
58613    . Step 1:   Read the data
58614    .
58615    skip 25
58616    read gear.dat y x
58617    skip 0
58618    let tag = sequence 1 10 1 2 for i = 1 1 100
58619    .
58620    . Step 2:   Define plot control settings
58621    .
58622    case asis
58623    label case asis
58624    title case asis
58625    title offset 2
58626    .
58627    xlimits 1 10
58628    major x1tic mark number 10
58629    minor x1tic mark number  0
58630    tic offset units data
58631    x1tic mark offset 0.5 0.5
58632    .
58633    title Mean Plot of GEAR.DAT
58634    y1label Mean Diameter
58635    x1label Batch
58636    .
58637    . Step 3:   Generate the plot without tags
58638    .
58639    character circle blank
58640    character fill on
58641    character hw 1.0 0.75 all
58642    line blank solid
58643    mean plot y x
58644    .
58645    . Step 4:   Generate the plot with tags
58646    .
58647    character circle circle blank
58648    character fill on on
58649    character hw 1.0 0.75 all
58650    character color blue red
58651    line blank blank solid
58652    .
58653    . mean tag plot y x tag
58654    mean character plot y x tag
58655
58656-----<dist> PPCC------------------------------------------------
58657
58658STATISTIC PPCC
58659
58660Name:
58661    <dist> PPCC
58662
58663Type:
58664    LET Subcommand
58665
58666Purpose:
58667    Compute the probability plot correlation coefficient (also
58668    called the ppcc) value for a variable for a specified distribution.
58669
58670Description:
58671    The ppcc value is the correlation coefficient of the straight line
58672    fitted to a probability plot (see the documentation for PPCC PLOT for
58673    details).
58674
58675    Although this value is normally determined using either a probability
58676    plot or a ppcc plot, for a limited number of distributions you can
58677    also generate this as a statistic LET subcommand.  The advantage in
58678    this case is that you can use it with any of the commands that
58679    support built-in statistics (e.g., the STATISTIC PLOT or the
58680    TABULATION command).
58681
58682    This command was updated 2013/02 in the following ways.
58683
58684        1. In addition to the PPCC value, you can now extract the
58685           estimates of the location and scale parameters based on
58686           the probability plot.  See Syntax 2 and Syntax 3 below.
58687
58688        2. For certain one and two shape parameter distritutions, you
58689           can extract the shape parameter based on the
58690           PPCC plot/probability plot method.
58691
58692           In using these commands, the shape parameter can be
58693           be handled in one of two ways.
58694
58695              a. You can assume a fixed shape parameter.  For example,
58696
58697                     LET GAMMA = 2.6
58698                     WEIBULL PPCC STATISTIC PLOT Y X
58699
58700                 This command will plot the ppcc value for a Weibull
58701                 distribution with a shape parameter of 2.6 for the
58702                 groups defined by the X variable.
58703
58704              b. No shape parameter will be pre-defined.
58705
58706                 In the example above, if GAMMA is not pre-defined then
58707                 the shape parameter will be estimated using the PPCC
58708                 plot method (this is done in the background) for each
58709                 distinct group.
58710
58711           See the Note section below for a list of supported
58712           distributions.
58713
58714Syntax 1:
58715    LET <par> =  <dist>  PPCC  <y>   <SUBSET/EXCEPT/FOR qualification>
58716    where <y> is a response variable;
58717          <dist> is one of the distributions listed in the Note section
58718                 below;
58719          <par> is the parameter where the ppcc value is saved;
58720    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
58721
58722Syntax 2:
58723    LET <par> =  <dist>  PPCC LOCATION  <y>
58724                 <SUBSET/EXCEPT/FOR qualification>
58725    where <y> is a response variable;
58726          <dist> is one of the distributions described in the Note
58727              section below;
58728          <par> is the parameter where the location value is
58729              saved;
58730    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
58731
58732    This syntax returns the estimate of the location parameter rather
58733    than the PPCC value.
58734
58735Syntax 3:
58736    LET <par> =  <dist>  PPCC SCALE  <y>
58737                 <SUBSET/EXCEPT/FOR qualification>
58738    where <y> is a response variable;
58739          <dist> is one of the distributions described in the Note
58740              section below;
58741          <par> is the parameter where the normal location value is
58742              saved;
58743    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
58744
58745    This syntax returns the estimate of the location parameter rather
58746    than the PPCC value.
58747
58748Syntax 4:
58749    LET <par> =  <dist>  PPCC  STATISTIC  <y>
58750                 <SUBSET/EXCEPT/FOR qualification>
58751    where <y> is a response variable;
58752          <dist> is one of the distributions with shape parameters
58753              described in the Note section below;
58754          <par> is the parameter where the normal ppcc value is saved;
58755    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
58756
58757    When the distribution has a shape parameter, then the word
58758    STATISTIC is required to distinguish this command from the
58759    PPCC PLOT command.  Specifically the following can conflict
58760
58761       WEIBULL PPCC PLOT Y
58762       WEIBULL PPCC STATISTIC PLOT Y X
58763
58764    The first command is the Weibull PPCC plot while the second
58765    command plots the PPCC value for Y for each group in X.
58766
58767Syntax 5:
58768    LET <par> =  <dist>  PPCC SHAPE  <y>
58769                 <SUBSET/EXCEPT/FOR qualification>
58770    where <y> is a response variable;
58771          <dist> is one of the distributions with a single shape
58772              parameters described in the Note section below;
58773          <par> is the parameter where the normal ppcc value is saved;
58774    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
58775
58776    This syntax returns the estimate of the shape parameter rather
58777    than the PPCC value.
58778
58779Syntax 6:
58780    LET <par> =  <dist>  PPCC SHAPE ONE  <y>
58781                 <SUBSET/EXCEPT/FOR qualification>
58782    where <y> is a response variable;
58783          <dist> is one of the distributions with two shape
58784              parameters described in the Note section below;
58785          <par> is the parameter where the normal ppcc value is saved;
58786    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
58787
58788    This syntax returns the estimate of the first shape parameter
58789    rather than the PPCC value.
58790
58791Syntax 7:
58792    LET <par> =  <dist>  PPCC SHAPE TWO  <y>
58793                 <SUBSET/EXCEPT/FOR qualification>
58794    where <y> is a response variable;
58795          <dist> is one of the distributions with two shape
58796              parameters described in the Note section below;
58797          <par> is the parameter where the normal ppcc value is saved;
58798    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
58799
58800    This syntax returns the estimate of the second shape parameter
58801    rather than the PPCC value.
58802
58803Examples:
58804    LET A = LOGISTIC PPCC Y
58805    LET A = DOUBLE EXPONENTIAL PPCC Y SUBSET Y > -3
58806
58807Note:
58808    The following location/scale distributions are supported.
58809
58810       LET A = ANGLIT PPCC              Y
58811       LET A = ARCSINE PPCC             Y
58812       LET A = CAUCHY PPCC              Y
58813       LET A = COSINE PPCC              Y
58814       LET A = DOUBLE EXPONENTIAL PPCC  Y
58815       LET A = EXPONENTIAL PPCC         Y
58816       LET A = HALF CAUCHY PPCC         Y
58817       LET A = HALF NORMAL PPCC         Y
58818       LET A = HYPERBOLIC SECANT PPCC   Y
58819       LET A = LOGISTIC PPCC            Y
58820       LET A = MAXWELL PPCC             Y
58821       LET A = MAXIMUM GUMBEL PPCC      Y
58822       LET A = MINIMUM GUMBEL PPCC      Y
58823       LET A = MAXWELL PPCC             Y
58824       LET A = NORMAL PPCC              Y
58825       LET A = RAYLEIGH PPCC            Y
58826       LET A = SEMICIRCULAR PPCC        Y
58827       LET A = SLASH PPCC               Y
58828       LET A = UNIFORM PPCC             Y
58829
58830    In addition, the following distributions with a single shape
58831    parameter are supported.  If you want a fixed value of the
58832    shape parameter, you can specify it as shown here:
58833
58834       LET GAMMA = <value>
58835       LET A = WEIBULL PPCC STATISTIC Y
58836       LET A = 2PARAMETER WEIBULL PPCC STATISTIC Y
58837
58838       LET GAMMA = <value>
58839       LET A = INVERTED WEIBULL PPCC STATISTIC Y
58840
58841       LET GAMMA = <value>
58842       LET A = GAMMA PPCC STATISTIC Y
58843
58844       LET GAMMA = <value>
58845       LET A = WALD PPCC STATISTIC Y
58846
58847       LET GAMMA = <value>
58848       LET A = FATIGUE LIFE PPCC STATISTIC Y
58849
58850       LET GAMMA = <value>
58851       LET A = GENERALIZED PARETO PPCC STATISTIC Y
58852
58853       LET SIGMA = <value>
58854       LET A = LOGNORMAL PPCC STATISTIC Y
58855
58856       LET LAMBDA = <value>
58857       LET A = TUKEY LAMBDA PPCC STATISTIC Y
58858
58859       LET G = <value>
58860       LET A = G PPCC STATISTIC Y
58861
58862    In addition, the following distribution with two shape
58863    parameters is supported.  If you want fixed values of the
58864    shape parameters, you can specify it as shown here:
58865
58866       LET G = <value>
58867       LET H = <value>
58868       LET A = G AND H PPCC STATISTIC Y
58869
58870Note:
58871    Dataplot statistics can be used in a number of commands.  For
58872    details, enter
58873
58874         HELP STATISTICS
58875
58876Default:
58877    None
58878
58879Synonyms:
58880    None
58881
58882Related Commands:
58883    STATISTIC PLOT      = Generates a statistic versus subset plot.
58884    CROSS TABULATE      = Compute a statistic based on a cross-tabulation.
58885    PPCC PLOT           = Generates a probability plot correlation
58886                          coefficient plot.
58887    PROBABILITY PLOT    = Generates a probability plot.
58888
58889Reference:
58890    James J. Filliben (1975), "The Probability Plot Correlation Coefficient
58891    Test for Normality," Technometrics, Vol. 17, No. 1.
58892
58893Applications:
58894    Exploratory Data Analysis
58895
58896Implementation Date:
58897    2011/06
58898    2013/02: Support for location, scale and shape parameters
58899    2013/02: Support for additional distributions
58900    2015/02: Support for g distribution
58901    2016/06: Support for 2-parameter Weibull
58902
58903Program 1:
58904    SKIP 25
58905    READ GEAR.DAT  Y X
58906    .
58907    LABEL CASE ASIS
58908    Y1LABEL Correlation
58909    X1LABEL Batch
58910    Y1LABEL DISPLACEMENT 15
58911    X1LABEL DISPLACEMENT 12
58912    TITLE CASE ASIS
58913    TITLE OFFSET 2
58914    XLIMITS 1 10
58915    X1TIC MARK OFFSET 0.5 0.5
58916    Y1LIMITS 0.92 0.99
58917    TIC MARK OFFSET UNITS DATA
58918    LINE BLANK SOLID
58919    CHARACTER X BLANK
58920    .
58921    MULTIPLOT CORNER COORDIANTES 2 2 98 98
58922    MULTIPLOT SCALE FACTOR 2
58923    MULTIPLOT 2 2
58924    .
58925    TITLE Normal PPCC Values
58926    NORMAL PPCC PLOT Y X
58927    TITLE Logistic PPCC Values
58928    LOGISTIC PPCC PLOT Y X
58929    TITLE Double Exponential PPCC Values
58930    DOUBLE EXPONENTIAL PPCC PLOT Y X
58931    TITLE Uniform PPCC Values
58932    UNIFORM PPCC PLOT Y X
58933    .
58934    END OF MULTIPLOT
58935
58936Program 2:
58937    skip 25
58938    read gear.dat y x
58939    .
58940    tic mark offset units screen
58941    tic mark offset 5 5
58942    char X
58943    line blank
58944    .
58945    multiplot scale factor 2
58946    multiplot corner coordinates 5 5 95 95
58947    .
58948    y1label displacement 16
58949    x1label displacement 12
58950    title offset 2
58951    label case asis
58952    title automatic
58953    x1label Batch
58954    .
58955    multiplot 2 2
58956    y1label Correlation
58957    normal ppcc statistic plot y x
58958    y1label Location
58959    normal ppcc location plot y x
58960    y1label Scale
58961    normal ppcc scale plot y x
58962    char X all
58963    line blank all
58964    y1label Raw Data
58965    plot y x x
58966    end of multiplot
58967
58968-----STCDF (LET)--------------------------------
58969
58970STCDF
58971
58972Name:
58973    STCDF (LET)
58974
58975Type:
58976    Library Function
58977
58978Purpose:
58979    Compute the skew-t cumulative distribution function.
58980
58981Description:
58982    The skew-t distribution has the following probability density
58983    function:
58984
58985       f(x,nu,lambda)=2*TCDF(lambda*x*SQRT((1+nu)/(x**2+nu)),nu+1)*
58986                      TPDF(x,nu)    -infinity < x, lambda < infinity
58987
58988    For lambda = 0, the skew-t reduces to a t distribution.
58989    As lambda goes to infinity, the skew-t tends to the
58990    folded-t distribution.
58991
58992    The cumulative distribution is computed by numerically
58993    integrating the skew-t probability density function.
58994
58995    The standard skew-t distribution can be generalized with
58996    location and scale parameters.
58997
58998Syntax:
58999    LET <y> = STCDF(<x>,<nu>,<lambda>)
59000                                <SUBSET/EXCEPT/FOR qualification>
59001    where <x> is a variable or a parameter;
59002          <nu> is a number of parameter that specifies the
59003              value of the degrees of freedom shape parameter;
59004          <lambda> is a number of parameter that specifies the
59005              value of the skewness shape parameter;
59006          <y> is a variable or a parameter (depending on what <x> is)
59007               where the computed skew-t cdf value is stored;
59008    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
59009
59010Examples:
59011    LET A = STCDF(3,5,1)
59012    LET A = STCDF(A1,DF,LAMBDA)
59013    LET X2 = STCDF(X1,NU,0.5)
59014
59015Note:
59016    Library functions are distinguished from let subcommands
59017    in the following ways.
59018    1) Functions enclose the input value in parenthesis.  Let
59019       subcommands use spaces.
59020    2) Functions can accept (and return) either parameters
59021       (i.e., single values) or variables (i.e., an array of
59022       values) while let subcommands are specific in which they
59023       accept as input and what they return as output.
59024    3) Functions can accept expressions while let subcommands
59025       do not.  For example, the following is legal:
59026           LET Y2 = ABS(Y1-INT(Y1))
59027       For let subcommands, you typically have to do something
59028       like the following:
59029           LET YTEMP = Y**2 + 8
59030           LET A = SUM YTEMP
59031
59032Default:
59033    None
59034
59035Synonyms:
59036    None
59037
59038Related Commands:
59039    STPDF  = Compute the skew-t probability density function.
59040    STPPF  = Compute the skew-t percent point function.
59041    SNPDF  = Compute the skew-normal probability density function.
59042    TPDF   = Compute the t probability density function.
59043    FTPDF  = Compute the folded t probability density function.
59044    NORPDF = Compute the normal density function.
59045    CHSPDF = Compute the chi-square probability density function.
59046
59047Reference:
59048    "A Class of Distributions Which Includes the Normal Ones",
59049    Azzalini, Scandinavian Journal of Statistics, 12, 171-178.
59050
59051    "Log-Skew-Normal and Log-Skew-t Distributions as Models for
59052    Familiy Income Data", Azzalini and Dal Cappello,
59053    unpublished paper downloaded from Azzallini web site.
59054
59055Applications:
59056    Distributional Modeling
59057
59058Implementation Date:
59059    1/2004
59060
59061Program:
59062    MULTIPLOT 2 2
59063    MULTIPLOT CORNER COORDINATES 0 0 100 100
59064    TITLE SKEW-T (NU=3): LAMBDA = 0
59065    PLOT STCDF(X,3,0) FOR X = -5 0.1 5
59066    TITLE SKEW-T (NU=3): LAMBDA = 1
59067    PLOT STCDF(X,3,1) FOR X = -5 0.1 5
59068    TITLE SKEW-T (NU=3): LAMBDA = 5
59069    PLOT STCDF(X,3,5) FOR X = -5 0.1 5
59070    TITLE SKEW-T (NU=3): LAMBDA = 10
59071    PLOT STCDF(X,3,10) FOR X = -5 0.1 5
59072    END OF MULTIPLOT
59073
59074-----STEM AND LEAF PLOT-----------------------------------------------
59075
59076STEM AND LEAF PLOT
59077
59078Name:
59079    STEM AND LEAF PLOT
59080
59081Type:
59082    Graphics Command
59083
59084Purpose:
59085    Generates a stem and leaf plot.
59086
59087Description:
59088    A stem and leaf plot is a graphical data analysis technique for
59089    summarizing the distributional information of a variable.  It is
59090    similar to a histogram, but it preserves the original numeric
59091    values in the data.  As such, it is an effective alternative to
59092    the histogram for small to moderate size data sets.  It is not
59093    recommended for large data sets.
59094
59095Syntax:
59096    STEM AND LEAF PLOT   <x>   <SUBSET/EXCEPT/FOR qualification>
59097    where <x> is the variable of raw data values;
59098    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
59099
59100Examples:
59101    STEM AND LEAF PLOT TEMP
59102
59103Note:
59104    Although the stem and leaf plot is a graphics command, the
59105    plot is generated as alphanumeric output, not as graphics output.
59106    This means that if device 2 is on, the stem and leaf plot is not
59107    generated in the plot file DPPL1F.DAT.  The CAPTURE command can
59108    be used to direct the stem and leaf output to a text file.
59109
59110Default:
59111    None
59112
59113Synonyms:
59114    None
59115
59116Related Commands:
59117    FREQUENCY PLOT     = Generates a frequency plot.
59118    HISTOGRAM          = Generates a histogram.
59119    PIE CHART          = Generates a pie chart.
59120    PERCENT POINT PLOT = Generates a percent point plot.
59121    PROBABILITY PLOT   = Generates a probability plot.
59122    PPCC PLOT          = Generates probability plot correlation
59123                         coefficient plot.
59124    CAPTURE            = Redirect alphanumeric output to a file.
59125
59126Applications:
59127    Exploratory Data Analysis
59128
59129Implementation Date:
59130    Pre-1987
59131
59132Program:
59133    SKIP 25
59134    READ GEAR.DAT DIAMETER
59135    .
59136    CAPTURE STEM_LEAF_OUT.DAT
59137    STEM AND LEAF PLOT DIAMETER
59138    END OF CAPTURE
59139
59140    The following output is generated:
59141
59142      97 :
59143      98 : 01244
59144      98 : 788
59145      99 : 00111123344444
59146      99 : 5555566666666666666677777788888888888889999
59147      00 : 000000000122222222224444
59148      00 : 56666699
59149      01 : 03
59150      01 : 8
59151
59152-----STATUS-------------------------------------------------------
59153
59154STATUS
59155
59156Name:
59157    STATUS
59158
59159Type:
59160    Support Command
59161
59162Purpose:
59163    Prints the current character types, line type variable names,
59164    parameter values, functions, etc.
59165
59166Syntax 1:
59167    STATUS
59168
59169    This lists all status information.
59170
59171Syntax 2:
59172    STATUS <keyword>
59173    where <keyword> is one of the following:
59174             MACHINE      - print host name and machine constants
59175             FILE         - print DATAPLOT file names
59176             ARROWS       - print current ARROW settings
59177             SEGMENTS     - print current SEGMENT settings
59178             LEGENDS      - print current LEGEND settings
59179             BOXES        - print current BOX settings
59180             SPIKES       - print current SPIKE settings
59181             BARS         - print current BAR settings
59182             DIMENSION    - print current dimension settings
59183             CHARACTERS   - print current CHARACTER settings
59184             LINES        - print current LINE settings
59185             VARIABLES    - print information on currently defined
59186                            variables
59187             PARAMETERS   - print information on currently defined
59188                            parameters
59189             FUNCTIONS    - print the currently defined functions
59190             MATRICES     - print information on currently defined
59191                            matrices.
59192
59193Syntax 3:
59194    STATUS VARIABLES <a>
59195    where <a> is a single alphabetic character.
59196
59197    This syntax displays all variables beginning with the letter
59198    <a>.  For example, STATUS VARIABLES X displays all variables
59199    beginning with the letter X.  This can be useful when you have
59200    created a large number of variables.
59201
59202Syntax 4:
59203    GUI STATUS VARIABLE
59204
59205    This is a special form of the command that is sent by the Tcl/Tk
59206    scripts for the Dataplot Graphical User Interface (GUI).  If this
59207    command is entered directly by the Dataplot user, it is equivalent
59208    to entering a STATUS VARIABLES command.
59209
59210    The command
59211
59212        SET GUI FEEDBACK <ON/OFF>
59213
59214    is used to set the FEEDBACK switch for this command.
59215
59216Examples:
59217    STATUS
59218    STATUS VARIABLES
59219    STATUS VARIABLES  X
59220    STATUS V X
59221    STATUS PARAMETERS
59222
59223Note:
59224    If the variable status is requested, the following information will
59225    be written to "dpst1f.dat".
59226
59227
59228       1) Line 1 will contain the number of currently defined variables.
59229
59230       2) For each currently defined variable, the succeeding lines will
59231          contain
59232
59233           a) The variable name
59234           b) The number of observations
59235           c) The number of distinct observations
59236           d) The first 10 distinct values
59237
59238Default:
59239    None
59240
59241Synonyms:
59242    LS is a synonym for STATUS
59243
59244Related Commands:
59245    RESET        = Reset DATAPLOT internal parameters, variables,
59246                   functions, and switches to their default values.
59247
59248Applications:
59249    Interactive Usage
59250
59251Implementation Date:
59252    Pre-1987
59253    1991/12: Support for STATUS <keyword> syntax
59254    2010/07: Support for Syntax 3
59255    2010/09: Added LS as a synonym
59256    2014/11: Write variable list to dpst1f.dat
59257    2015/12: Additional info to dpst1f.dat
59258
59259Program:
59260    SKIP 25
59261    READ BERGER1.DAT Y X BAT
59262    STATUS VARIABLES
59263
59264-----STEP (LET)--------------------------------
59265
59266STEP
59267
59268Name:
59269    STEP (LET)
59270
59271Type:
59272    Library Function
59273
59274Purpose:
59275    Return the integer portion of a number or variable rounded to
59276    positive integer.
59277
59278Syntax:
59279    LET <y2> = STEP(<y1>)  <SUBSET/EXCEPT/FOR qualification>
59280    where <y1> is a variable or a parameter;
59281          <y2> is a variable or a parameter (depending on what <y1>
59282               is) where the computed integer values are stored;
59283    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
59284
59285Examples:
59286    LET A = STEP(2.83)
59287    LET A = STEP(A1)
59288    LET X2 = STEP(X1)
59289    LET X2 = STEP(X1-4.2)
59290
59291Note:
59292    Library functions are distinguished from let subcommands
59293    in the following ways.
59294    1) Functions enclose the input value in parenthesis.  Let
59295       subcommands use spaces.
59296    2) Functions can accept (and return) either parameters
59297       (i.e., single values) or variables (i.e., an array of
59298       values) while let subcommands are specific in which they
59299       accept as input and what they return as output.
59300    3) Functions can accept expressions while let subcommands
59301       do not.  For example, the following is legal:
59302           LET Y2 = ABS(Y1-INT(Y1))
59303       For let subcommands, you typically have to do something
59304       like the following:
59305           LET YTEMP = Y**2 + 8
59306           LET A = SUM YTEMP
59307
59308Default:
59309    None
59310
59311Synonyms:
59312    FLOOR
59313
59314Related Commands:
59315    CEIL   = Compute the integer value rounded to positive infinity.
59316    INT    = Compute the integer value rounded to zero.
59317    SIGN   = Compute the sign of a number.
59318    FRACT  = Compute the fractional portion of number.
59319    MSD    = Compute the most significant digit of a number.
59320    ROUND  = Round to the closest integer of a number.
59321
59322Applications:
59323    Elementary function
59324
59325Implementation Date:
59326    95/4
59327
59328Program:
59329    LET Y1 = SEQUENCE -5 0.1 5
59330    LET Y2 = STEP(Y1)
59331    PRINT Y1 Y2
59332
59333-----STOP-------------------------------------------------------
59334
59335STOP
59336
59337Name:
59338    STOP
59339
59340Type:
59341    Support Command
59342
59343Purpose:
59344    Terminates a DATAPLOT run.
59345
59346Syntax:
59347    STOP
59348
59349Examples:
59350    STOP
59351
59352Default:
59353    None
59354
59355Synonyms:
59356    EXIT, END, HALT, QUIT
59357
59358Related Commands:
59359    XX
59360
59361Applications:
59362    Interactive Usage
59363
59364Implementation Date:
59365    Pre-1987
59366
59367Program:
59368    XX
59369
59370-----STPDF (LET)--------------------------------
59371
59372STPDF
59373
59374Name:
59375    STPDF (LET)
59376
59377Type:
59378    Library Function
59379
59380Purpose:
59381    Compute the skew-t probability density function.
59382
59383Description:
59384    The skew-t distribution has the following probability density
59385    function:
59386
59387       f(x,nu,lambda)=2*TCDF(lambda*x*SQRT((1+nu)/(x**2+nu)),nu+1)*
59388                      TPDF(x,nu)    -infinity < x, lambda < infinity
59389
59390    For lambda = 0, the skew-t reduces to a t distribution.
59391    As lambda goes to infinity, the skew-t tends to the
59392    folded-t distribution.
59393
59394    The standard skew-t distribution can be generalized with
59395    location and scale parameters.
59396
59397Syntax:
59398    LET <y> = STPDF(<x>,<nu>,<lambda>)
59399                                <SUBSET/EXCEPT/FOR qualification>
59400    where <x> is a variable or a parameter;
59401          <nu> is a number of parameter that specifies the
59402              value of the degrees of freedom shape parameter;
59403          <lambda> is a number of parameter that specifies the
59404              value of the skewness shape parameter;
59405          <y> is a variable or a parameter (depending on what <x> is)
59406               where the computed skew-t pdf value is stored;
59407    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
59408
59409Examples:
59410    LET A = STPDF(3,5,1)
59411    LET A = STPDF(A1,DF,LAMBDA)
59412    LET X2 = STPDF(X1,NU,0.5)
59413
59414Note:
59415    Library functions are distinguished from let subcommands
59416    in the following ways.
59417    1) Functions enclose the input value in parenthesis.  Let
59418       subcommands use spaces.
59419    2) Functions can accept (and return) either parameters
59420       (i.e., single values) or variables (i.e., an array of
59421       values) while let subcommands are specific in which they
59422       accept as input and what they return as output.
59423    3) Functions can accept expressions while let subcommands
59424       do not.  For example, the following is legal:
59425           LET Y2 = ABS(Y1-INT(Y1))
59426       For let subcommands, you typically have to do something
59427       like the following:
59428           LET YTEMP = Y**2 + 8
59429           LET A = SUM YTEMP
59430
59431Default:
59432    None
59433
59434Synonyms:
59435    None
59436
59437Related Commands:
59438    STCDF  = Compute the skew-t cumulative distribution function.
59439    STPPF  = Compute the skew-t percent point function.
59440    SNPDF  = Compute the skew-normal probability density function.
59441    TPDF   = Compute the t probability density function.
59442    FTPDF  = Compute the folded t probability density function.
59443    NORPDF = Compute the normal density function.
59444    CHSPDF = Compute the chi-square probability density function.
59445
59446Reference:
59447    "A Class of Distributions Which Includes the Normal Ones",
59448    Azzalini, Scandinavian Journal of Statistics, 12, 171-178.
59449
59450    "Log-Skew-Normal and Log-Skew-t Distributions as Models for
59451    Familiy Income Data", Azzalini and Dal Cappello,
59452    unpublished paper downloaded from Azzallini web site.
59453
59454Applications:
59455    Distributional Modeling
59456
59457Implementation Date:
59458    1/2004
59459
59460Program:
59461    MULTIPLOT 2 2
59462    MULTIPLOT CORNER COORDINATES 0 0 100 100
59463    TITLE SKEW-T (NU=3): LAMBDA = 0
59464    PLOT STPDF(X,3,0) FOR X = -5 0.1 5
59465    TITLE SKEW-T (NU=3): LAMBDA = 1
59466    PLOT STPDF(X,3,1) FOR X = -5 0.1 5
59467    TITLE SKEW-T (NU=3): LAMBDA = 5
59468    PLOT STPDF(X,3,5) FOR X = -5 0.1 5
59469    TITLE SKEW-T (NU=3): LAMBDA = 10
59470    PLOT STPDF(X,3,10) FOR X = -5 0.1 5
59471    END OF MULTIPLOT
59472
59473-----STPPF (LET)--------------------------------
59474
59475STPPF
59476
59477Name:
59478    STPPF (LET)
59479
59480Type:
59481    Library Function
59482
59483Purpose:
59484    Compute the skew-t percent point function.
59485
59486Description:
59487    The skew-t distribution has the following probability density
59488    function:
59489
59490       f(x,nu,lambda)=2*TCDF(lambda*x*SQRT((1+nu)/(x**2+nu)),nu+1)*
59491                      TPDF(x,nu)    -infinity < x, lambda < infinity
59492
59493    For lambda = 0, the skew-t reduces to a t distribution.
59494    As lambda goes to infinity, the skew-t tends to the
59495    folded-t distribution.
59496
59497    The skew-t percent point function is computed numerically
59498    (by inverting the skew-t cdf function with the bisection
59499    method).
59500
59501    The standard skew-t distribution can be generalized with
59502    location and scale parameters.
59503
59504Syntax:
59505    LET <y> = STPPF(<p>,<nu>,<lambda>)
59506                                <SUBSET/EXCEPT/FOR qualification>
59507    where <p> is a variable or a parameter in the range [0,1];
59508          <nu> is a number of parameter that specifies the
59509              value of the degrees of freedom shape parameter;
59510          <lambda> is a number of parameter that specifies the
59511              value of the skewness shape parameter;
59512          <y> is a variable or a parameter (depending on what <p> is)
59513               where the computed skew-t ppf value is stored;
59514    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
59515
59516Examples:
59517    LET A = STPPF(0.95,5,1)
59518    LET A = STPPF(A1,DF,LAMBDA)
59519    LET X2 = STPPF(P1,NU,0.5)
59520
59521Note:
59522    Library functions are distinguished from let subcommands
59523    in the following ways.
59524    1) Functions enclose the input value in parenthesis.  Let
59525       subcommands use spaces.
59526    2) Functions can accept (and return) either parameters
59527       (i.e., single values) or variables (i.e., an array of
59528       values) while let subcommands are specific in which they
59529       accept as input and what they return as output.
59530    3) Functions can accept expressions while let subcommands
59531       do not.  For example, the following is legal:
59532           LET Y2 = ABS(Y1-INT(Y1))
59533       For let subcommands, you typically have to do something
59534       like the following:
59535           LET YTEMP = Y**2 + 8
59536           LET A = SUM YTEMP
59537
59538Default:
59539    None
59540
59541Synonyms:
59542    None
59543
59544Related Commands:
59545    STCDF  = Compute the skew-t cumulative distribution function.
59546    STPDF  = Compute the skew-t probability density function.
59547    SNPDF  = Compute the skew-normal probability density function.
59548    TPDF   = Compute the t probability density function.
59549    FTPDF  = Compute the folded t probability density function.
59550    NORPDF = Compute the normal density function.
59551    CHSPDF = Compute the chi-square probability density function.
59552
59553Reference:
59554    "A Class of Distributions Which Includes the Normal Ones",
59555    Azzalini, Scandinavian Journal of Statistics, 12, 171-178.
59556
59557    "Log-Skew-Normal and Log-Skew-t Distributions as Models for
59558    Familiy Income Data", Azzalini and Dal Cappello,
59559    unpublished paper downloaded from Azzallini web site.
59560
59561Applications:
59562    Distributional Modeling
59563
59564Implementation Date:
59565    1/2004
59566
59567Program:
59568    MULTIPLOT 2 2
59569    MULTIPLOT CORNER COORDINATES 0 0 100 100
59570    TITLE SKEW-T (NU=3): LAMBDA = 0
59571    PLOT STPPF(P,3,0) FOR P = 0.01  0.01  0.99
59572    TITLE SKEW-T (NU=3): LAMBDA = 1
59573    PLOT STPPF(P,3,1) FOR P = 0.01  0.01  0.99
59574    TITLE SKEW-T (NU=3): LAMBDA = 5
59575    PLOT STPPF(P,3,5) FOR P = 0.01  0.01  0.99
59576    TITLE SKEW-T (NU=3): LAMBDA = 10
59577    PLOT STPPF(P,3,10) FOR P = 0.01  0.01  0.99
59578    END OF MULTIPLOT
59579
59580-----STREAM READ-------------------------------------------------------
59581
59582STREAM READ
59583
59584Name:
59585    STREAM READ
59586
59587Type:
59588    Support Command
59589
59590Purpose:
59591    Read data and perform certain computations for data sets that
59592    are too large to read into memory.
59593
59594Description:
59595    Dataplot was designed primarily for interactive usage.  For this reason,
59596    it reads all data into memory.  The current default is to have a
59597    workspace that accomodates 10 columns with 1,500,000 rows (you can
59598    re-dimension to obtain more columns at the expense of fewer rows, however
59599    you cannot increase the maximum number of rows).
59600
59601    With the advent of "big data", there are more data files that cannot be
59602    read into Dataplot's available memory.  For these data files, there are
59603    several things that can potentially be done
59604
59605       1. For some platforms, if you have a large amount of memory you may
59606          be able to build a version of Dataplot that raises the maximum
59607          number of rows.  For example, on a Linux system with 64MB of RAM,
59608          we were able to build a version that supports a maximum of
59609          10,000,000 rows.  Contact Alan Heckert if you need assistance
59610          with this.
59611
59612       2. The STREAM READ command was added.  This command uses one pass
59613          algorithms to do a number of things.
59614
59615          a. You can create a new file that uses SET WRITE FORMAT.  This
59616             is typically done once so that you can use SET READ FORMAT on
59617             subsequent reading of the data file (this can substantially
59618             speed up processing of these large files).
59619
59620          b. You can generate various summary statistics either for the
59621             full data set or for groups in the data.
59622
59623          c. You can generate cross tabulation statistics (up to 4 cross
59624             tabulation variables can be specified).
59625
59626          d. You can create various types of distance or similarity
59627             (e.g., Euclidean distances, correlation) matrices either for
59628             the full data set or for cross tabulations of the data.
59629
59630             Distance and similarity matrices are often used for various
59631             types of multivariate analysis.
59632
59633          e. You can generate approximate percentiles either for the full
59634             data set or for cross tabulations of the data.  Based on this,
59635             you can perform distributional modeling for a single variable
59636             or distributional comparisons between variables (e.g.,
59637             quantile quantile plots, bihistograms, two sample KS tests,
59638             and so on).
59639
59640          Although Dataplot may not be able to read many of these large
59641          data sets into memory, the STREAM READ command does allow you to
59642          perform certain types of exploratory analyses on these large data
59643          sets.
59644
59645Syntax 1:
59646    STREAM READ WRITE <file>  <x1>  <x2> ... <xk>
59647    where <file> is the name of the file to read;
59648    and where <x1>, <x2>, ... <xk> is a list of variables to read.
59649
59650    This version of the command is used to read the input file and to
59651    write a new version of the data using a specified Fortran-like format.
59652
59653    This command is useful in the following way.  Large data files can
59654    take a long time to read.  If you can use the SET READ FORMAT command
59655    to read the data, this can significantly speed up the reading of the
59656    data.  For example, reading the data set used by the example programs
59657    below used 24.7 cpu seconds on a Linux machine running CentOS.
59658    Performing the same read on the same platform with a SET READ FORMAT
59659    required 0.6 cpu seconds.  Cpu times will vary depending on the
59660    hardware and operating system, but this is indicative of the relative
59661    performance improvement that can be obtained by using the SET READ
59662    FORMAT command.  This example file is not particularly large
59663    (361,920 rows).  The speed improvement becomes even more important
59664    when we start dealing with multiple millions of rows.
59665
59666    Often large data sets will initially not be in a format where the
59667    SET READ FORMAT can be used.  So this command can be used once, with
59668    the SET WRITE FORMAT command, to create a new version of the file that
59669    is formatted in a way that the SET READ FORMAT can be used.  This new
59670    file is then used for subsequent Dataplot sessions that use this data.
59671
59672Syntax 2:
59673    STREAM READ GROUP STATISTICS <stat> <file> <x1> <x2> ... <xk>
59674    where <stat> is one of Dataplot's supported univariate statistics;
59675          <file> is the name of the file to read;
59676    and where <x1>, <x2>, ... <xk> is a list of variables to read.
59677
59678    This syntax will read the file a user-specified number of rows at a
59679    time.  It will then replace those rows with the specified statistic.
59680    That is, the original data will be replaced with the specified
59681    statistic  for fixed intervals of the data.
59682
59683    For example, you can read 1,000 rows, compute (and save) the mean
59684    for those 1,000 rows for each variable, then repeat for the next
59685    1,000 rows.  That is, the original data will be replaced with the
59686    means of fixed intervals of the data.
59687
59688    To specify the number of rows to read at a time, enter
59689
59690         SET STREAM READ SIZE <value>
59691
59692    Alternatively, you can specify one of the variabes to define
59693    the group (i.e., when the value of the specified variable
59694    changes, this denotes the start of a new group).  For this
59695    option, enter
59696
59697         SET STREAM READ GROUP VARIBLE <var-name>
59698
59699    This capability is motivated by the desire to handle large data
59700    sets that may exceed Dataplot's storage limits.  This command
59701    allows you to compute some basic statistics (mean, minimum,
59702    maximum, standard deviation, and so on) for slices of the data.
59703    Often, some useful exploratory analysis can be performed on this
59704    compressed data.
59705
59706    To see a list of supported univariate statistics, enter
59707
59708         HELP STATISTICS
59709
59710Syntax 3:
59711    STREAM READ DEFAULT STATISTICS <file>  <x1> <x2> ... <xk>
59712    where <file> is the name of te file to read;
59713    and where <x1>, <x2>, ... <xk> is a list of variables to read.
59714
59715    This is a variant of Syntax 2 that allows a default set of statistics
59716    to be computed on a single pass of the data.
59717
59718    This computes the statistic for slices of the data as in Syntax 2
59719    (it uses the SET STREAM READ SIZE and SET STREAM READ GROUP VARIABLE
59720    commands as in Syntax 2).
59721
59722    The following statistics are computed:
59723
59724         1. VALUE OF LAST ROW OF GROUP
59725         2. GROUP-ID
59726         3. SIZE
59727         4. MINIMUM
59728         5. MAXIMUM
59729         6. MEAN
59730         7. STANDARD DEVIATION
59731         8. SKEWNESS
59732         9. KURTOSIS
59733        10. MEDIAN
59734        11. INTERQUARTILE RANGE
59735        12. RANGE
59736        13. AUTOCORRELATION
59737        14. LOWER QUARTILE
59738        15. UPPER QUARTILE
59739        16. 0.01 QUANTILE
59740        17. 0.05 QUANTILE
59741        18. 0.10 QUANTILE
59742        19. 0.90 QUANTILE
59743        20. 0.95 QUANTILE
59744        21. 0.99 QUANTILE
59745
59746    For this syntax, a tag variable (TAGSTAT) will be created that
59747    defines the statistic (i.e., each row of TAGSTAT contains a
59748    value from 1 to 21).  TAGSTAT can be used to exract the desired
59749    statistic for each group.
59750
59751    If a group variable was specified, that variable will contain the
59752    group-id.  For example, if X is the group id variable and it has
59753    3 groups with values of 1, 2, and 3, then the X will have a value of
59754    1 in rows 1 to 21, a value of 2 in rows 22 to 42, and a value of 3
59755    in rows 43 to 63.
59756
59757Syntax 4:
59758    STREAM READ FULL STATISTICS <file>  <x1> <x2> ... <xk>
59759    where <file> is the name of the file to read;
59760    and where <x1>, <x2>, ... <xk> is a list of variables to read.
59761
59762    This syntax will compute the following statistics using 1-pass
59763    algorithms for all of the data:
59764
59765         1. COUNT
59766         2. MINIMUM
59767         3. MAXIMUM
59768         4. MEAN
59769         5. STANDARD DEVIATION
59770         6. SKEWNESS
59771         7. KURTOSIS
59772         8. RANGE
59773
59774    Each of the <x1> ... <xk> will have 8 rows containing the above
59775    eight statistics for each column read.
59776
59777Syntax 5:
59778    STREAM READ CROSS TABULATE <file>  <var-list>
59779    where <file> is the name of the file to read;
59780    and where <x1>, <x2>, ... <xk> is a list of variables to read.
59781
59782    This is similar to syntax 4.  However, instead of computing
59783    the statistics for the full data set, it will compute them for
59784    cross tabulations of the data.
59785
59786    You can specify from one to four cross-tabulation variables
59787    with the commands
59788
59789        SET STREAM READ CROSS TABULATE VARIABLE ONE <name>
59790        SET STREAM READ CROSS TABULATE VARIABLE TWO <name>
59791        SET STREAM READ CROSS TABULATE VARIABLE THREE <name>
59792        SET STREAM READ CROSS TABULATE VARIABLE FOUR <name>
59793
59794    With this syntax, the following nine statistics will be computed
59795    for each cross-tabulation cell
59796
59797         1. COUNT
59798         2. MINIMUM
59799         3. MAXIMUM
59800         4. MEAN
59801         5. STANDARD DEVIATION
59802         6. SKEWNESS
59803         7. KURTOSIS
59804         8. RANGE
59805         9. NUMBER OF MISSING VALUES
59806
59807    For this syntax, a tag variable (TAGSTAT) will be created that
59808    defines the statistic (i.e., each row of TAGSTAT contains a
59809    value from 1 to 9).  TAGSTAT can be used to exract the desired
59810    statistic for each group.
59811
59812    For each cell, 9 rows will be generated.  The variables defined as
59813    cross tabulation variables will simply have their value for that
59814    cell for all 9 rows.  For the variables that are not defined as
59815    cross tabulation variables, the 9 rows will contain the values of
59816    the above 9 statistics.
59817
59818Syntax 6:
59819    STREAM READ <metric> <file>  <x1> <x2> ... <xk>
59820    where <file> is the name of the file to read;
59821          <metric> is one of the measures defined below;
59822    and where <x1>, <x2>, ... <xk> is a list of variables to read.
59823
59824    With this option, the STREAM READ will return a distance, similarity,
59825    covariance, or correlation matrix.  The raw data is not saved.  For
59826    example,
59827
59828         STREAM READ CORRELATION FILE.DAT Y1 Y2 Y3
59829
59830    will return the 3 variables Y1, Y2, and Y3 where each of these variables
59831    will contain 3 rows.  For example, Y2(3) contains the correlation between
59832    the second response column and the third response column.
59833
59834    The <metric> option can be any of the following
59835
59836        EUCLIDEAN DISTANCE
59837        MANHATTAN DISTANCE
59838        CHEBYCHEV DISTANCE
59839        CANBERRA DISTANCE
59840        HAMMING DISTANCE
59841        COSINE DISTANCE
59842        COSINE SIMILARITY
59843        ANGULAR COSINE DISTANCE
59844        ANGULAR COSINE SIMILARITY
59845        COVARIANCE
59846        CORRELATION
59847
59848    This syntax will ignore character fields.  If you do not want some fields
59849    in the file to be included, you can do something like the following
59850
59851        LET ITYPE = DATA 1 1 1 0 1
59852        SET STREAM READ VARIABLE TYPE ITYPE
59853
59854    These commands specify that fields 1, 2, 3, and 5 will be included while
59855    field 4 will be excluded.  This can be useful if some of the fields are
59856    categorical variables where distance and covariance/correlation do not
59857    make sense.
59858
59859Syntax 7:
59860    STREAM READ CROSS TABULATE <metric> <file>  <x1> <x2> ... <xk>
59861    where <file> is the name of the file to read;
59862          <metric> is one of measures specified in Syntax 6;
59863    and where <x1>, <x2>, ... <xk> is a list of variables to read.
59864
59865    This is similar to Syntax 6.  However, the metric will be
59866    computed separately for each cross tabulation cell.
59867
59868    The cross tabulation variables are specified as in Syntax 5.  This
59869    syntax also creates a TAGSTAT variable.  However, in this case the
59870    TAGSTAT variable is the "cell id" value.
59871
59872    For each cell, the number of rows generated will be equal to the
59873    number of columns used to compute the distance metric (i.e., the cross
59874    tabulation variables or variables omitted by the SET STREAM READ
59875    VARIABLE TYPE command).  The variables defined as cross tabulation
59876    variables will simply have their value for that cell for all the rows.
59877
59878Syntax 8:
59879    STREAM READ PERCENTILES <file>  <x1> <x2> ... <xk>
59880    where <file> is the name of the file to read;
59881    and where <x1>, <x2>, ... <xk> is a list of variables to read.
59882
59883    This syntax will replace the raw data with a user-specified number
59884    of approximate percentiles.  To specify the number of equally spaced
59885    percentiles to generate, enter the command
59886
59887       SET STREAM READ NUMBER OF PERCENTILES <value>
59888
59889    where <value> is one of 9, 99, 999, or 9999.  The default is 999.
59890    The minimum and maximum values are also saved.  So if the number of
59891    percentiles is 999, 1001 points will be returned.
59892
59893    Dataplot uses the extended P2 algorithm (the P2 algorithm was
59894    originally proposed by Jain and Chlamtac and was extended for
59895    multiple percentiles by Raatikanien).  This algorithm requires
59896    2*m+3 points where m is the desired number of percentiles.
59897    So if the number of values read is less than or equal to 2*m+3,
59898    Dataplot returns the original data (in sorted order).  If the
59899    number of points is greater than this, then the approximate
59900    percentiles are returned.
59901
59902Syntax 9:
59903    STREAM READ CROSS TABULATE PERCENTILES <file>  <x1> <x2> ... <xk>
59904    where <file> is the name of the file to read;
59905    and where <x1>, <x2>, ... <xk> is a list of variables to read.
59906
59907    This is similar to Syntax 8.  However, the percentiles will be
59908    computed separately for each cross tabulation cell.
59909
59910    The cross tabulation variables are specified as in Syntax 5.  This
59911    syntax also creates a TAGSTAT variable.  However, in this case the
59912    TAGSTAT variable is the "cell id" value.
59913
59914    For each cell, the number of rows generated will be equal to the
59915    number of percentiles requested.  The variables defined as cross
59916    tabulation variables will simply have their value for that cell for
59917    all the rows.
59918
59919Examples:
59920    SET WRITE FORMAT 10E15.7
59921    STREAM READ WRITE BIG.DAT X1 TO X10
59922
59923    SET STREAM READ SIZE 100
59924    STREAM READ GROUP STATISTIC MEAN BIG.DAT X1 TO X10
59925    STREAM READ GROUP STATISTIC STANDARD DEVIATION BIG.DAT X1 TO X10
59926    STREAM READ DEFAULT STATISTICS BIG.DAT X1 TO X10
59927
59928    STREAM READ FULL STATISTICS BIG.DAT X1 TO X10
59929    STREAM READ CROSS TABULATE BIG.DAT X1 TO X10
59930
59931Note:
59932    For the WRITE and CROSS TABULATE cases, character variables
59933    will be automatically converted to categorical variables.  For
59934    the GROUP STATISITC, DEFAULT STATISTIC, FULL STATISTIC, and
59935    PERCENTILE cases, character variables will still be ignored.
59936
59937    If you would like to save the character strings from the
59938    character variables as group labels, enter the command
59939
59940        SET STREAM READ GROUP LABEL ON
59941
59942    If you have specified a column to be the row label variable
59943    using the SET ROW LABEL COLUMN command, this variable will
59944    not be converted to a numeric variable and group labels will
59945    not be created.
59946
59947Note:
59948    When computing statistics, missing values (as specified by the
59949    SET READ MISSING VALUE command) will be omitted.
59950
59951Note:
59952    Note that the STREAM READ command has a number of limitations compared
59953    to the standard READ command.
59954
59955        1. Functions/strings, parameters, matrices, and images are not
59956           supported.
59957
59958        2. Reading from the clipboard is not supported.
59959
59960        3. Automatic name detection is not supported.
59961
59962        4. The STREAM READ command is restricted to files (i.e., reading
59963           from the terminal is not supported).
59964
59965Default:
59966    None
59967
59968Synonyms:
59969    None
59970
59971Related Commands:
59972    READ                   = Read variables from a file or the terminal.
59973    SERIAL READ            = Perform a serial read.
59974    READ FUNCTION          = Read a function.
59975    READ MATRIX            = Read a matrix.
59976    READ PARAMETER         = Read a parameter.
59977    READ STRING            = Read a string.
59978    READ IMAGE             = Read an image format into numeric arrays.
59979    READ STACKED VARIABLE  = Read a list of variables into a single
59980                             response variable and a group-id variable.
59981    SET READ FORMAT        = Define a FORTRAN style format for reads.
59982    DATA (LET)             = Enter data values into a variable.
59983    CLIPBOARD              = Various commands for reading from the
59984                             system clipboard.
59985
59986References:
59987    Jain and Chlamtac (1985), "The P^2 Algorithm for Dynamic Calculation
59988    of Quantiles and Histograms without Storing Observations,"
59989    Communications of the ACM, 28, No. 10, pp. 1076-1085.
59990
59991    Raatikanien (1987), "Simultaneous Estimation of Several Percentiles,"
59992    Simulation, pp. 159-164.
59993
59994Applications:
59995    Data Input
59996
59997Implementation Date:
59998    2016/07: Original implementation
59999    2018/07: Interpret character variables as categorical numeric
60000             variables for the WRITE and CROSS TABULATE cases
60001    2018/07: Support for CROSS TABULATION
60002    2018/07: Omit missing values when computing statistics
60003    2018/07: Option to automatically create group labels from character
60004             data
60005    2018/07: Allow specification of a "row label" column
60006    2018/07: Support for DISTANCE metrics
60007    2018/08: Support for CROSS TABULATION for DISTANCE metrics
60008    2018/08: Support for PERCENTILE and CROSS TABULATE PERCENTILE
60009
60010Program 1:
60011    . Step 1:   Demonstrate the group statistic option of stream read
60012    .
60013    skip 25
60014    set read format 3F7.0
60015    set stream read group variable rowid
60016    stream read group statistics mean elliottr.dat redcolme rowid colid
60017    .
60018    . Step 2:   Generate plot of column means
60019    .
60020    title offset 2
60021    title case asis
60022    label case asis
60023    .
60024    title Column Means for Red Pixels for ELLIOTTR.DAT
60025    y1label Column Mean
60026    x1label Row
60027    .
60028    plot redcolme vs rowid
60029    .
60030    . Step 3:   Reset read settings
60031    .
60032    skip 0
60033    set read format
60034
60035Program 2:
60036    . Step 1:   Demonstrate the default statistic option of stream read
60037    .
60038    skip 25
60039    set read format 3F7.0
60040    set stream read group variable rowid
60041    stream read default statistics elliottr.dat red rowid colid
60042    .
60043    let redmean = red
60044    retain redmean subset tagstat = 6
60045    let redsd = red
60046    retain redsd subset tagstat = 7
60047    let redmin = red
60048    retain redmin subset tagstat = 4
60049    let redmax = red
60050    retain redmax subset tagstat = 5
60051    .
60052    . Step 2:   Plot some of the statistics
60053    .
60054    multiplot corner coordinates 5 5 95 95
60055    multiplot scale factor 2
60056    multiplot 2 2
60057    .
60058    label case asis
60059    title case asis
60060    case asis
60061    title offset 2
60062    .
60063    title Mean of Columns
60064    plot redmean
60065    .
60066    title SD of Columns
60067    plot redsd
60068    .
60069    title Minimum of Columns
60070    plot redmin
60071    .
60072    title Maximum of Columns
60073    plot redmax
60074    .
60075    end of multiplot
60076    .
60077    justification center
60078    move 50 97
60079    text Statistics for Columns of Red Pixels in ELLIOTTR.DAT
60080    .
60081    . Step 2:   Reset read settings
60082    .
60083    skip 0
60084    set read format
60085
60086Program 3:
60087    . Step 1:   Demonstrate the default statistic option of stream read
60088    .
60089    skip 25
60090    set read format 3F7.0
60091    stream read full statistics elliottr.dat red rowid colid
60092    .
60093    . Step 2:   Print statistics for red variable
60094    .
60095    feedback off
60096    set write decimals 2
60097    print "Statistics for variable RED:"
60098    print " "
60099    print " "
60100    let aval = red(1)
60101    print "Size:      ^aval"
60102    let aval = red(2)
60103    print "Minimum:   ^aval"
60104    let aval = red(3)
60105    print "Maximum:   ^aval"
60106    let aval = red(4)
60107    let aval = round(aval,2)
60108    print "Mean:      ^aval"
60109    let aval = red(5)
60110    let aval = round(aval,2)
60111    print "SD:        ^aval"
60112    let aval = red(6)
60113    let aval = round(aval,2)
60114    print "Skewness:  ^aval"
60115    let aval = red(7)
60116    let aval = round(aval,2)
60117    print "Kurtosis:  ^aval"
60118    let aval = red(8)
60119    print "Range:     ^aval"
60120    feedback on
60121    .
60122    . Step 3:   Reset read settings
60123    .
60124    skip 0
60125    set read format
60126
60127Program 4:
60128    set write decimals 4
60129    set read missing value -999
60130    let itype = data 1 1 1 1 0
60131    set stream read variable type itype
60132    set stream read cross tabulate variable one groupid
60133    .
60134    skip 25
60135    stream read cross tabulate iris.dat y1 y2 y3 y4 groupid
60136    print y1 y2 y3 y4 groupid tagstat
60137
60138Program 5:
60139    set write decimals 4
60140    set read missing value -999
60141    let itype = data 1 1 1 1 0
60142    set stream read variable type itype
60143    skip 25
60144    .
60145    .  Options to pick which distance/similarity metric to compute
60146    . let iflag1 = 1
60147    let iflag1 = 2
60148    let iflag2 = 1
60149    . let iflag2 = 2
60150    . let iflag2 = 3
60151    . let iflag2 = 4
60152    . let iflag2 = 5
60153    . let iflag2 = 6
60154    . let iflag2 = 7
60155    . let iflag2 = 8
60156    . let iflag2 = 9
60157    . let iflag2 = 10
60158    . let iflag2 = 11
60159    .
60160    if iflag1 = 1
60161       if iflag2 = 1
60162          stream read covariance iris.dat y1 y2 y3 y4
60163       else if iflag2 = 2
60164          stream read correlation iris.dat y1 y2 y3 y4
60165       end of if
60166    else if iflag1 = 2
60167       if iflag2 = 1
60168          stream read euclidean distance iris.dat y1 y2 y3 y4
60169       else if iflag2 = 2
60170          stream read manhattan distance iris.dat y1 y2 y3 y4
60171       else if iflag2 = 3
60172          stream read chebychev distance iris.dat y1 y2 y3 y4
60173       else if iflag2 = 4
60174          stream read cosine distance iris.dat y1 y2 y3 y4
60175       else if iflag2 = 5
60176          stream read cosine similarity iris.dat y1 y2 y3 y4
60177       else if iflag2 = 6
60178          stream read angular cosine distance iris.dat y1 y2 y3 y4
60179       else if iflag2 = 7
60180          stream read angular cosine similarity iris.dat y1 y2 y3 y4
60181       else if iflag2 = 8
60182          let v = jaccard column similarity x
60183          stream read jaccard similarity iris.dat y1 y2 y3 y4
60184       else if iflag2 = 9
60185          stream read jaccard distance iris.dat y1 y2 y3 y4
60186       else if iflag2 = 10
60187          stream read hamming distance iris.dat y1 y2 y3 y4
60188       else if iflag2 = 11
60189          stream read canberra distance iris.dat y1 y2 y3 y4
60190       end of if
60191    end of if
60192    .
60193    print y1 y2 y3 y4
60194
60195Program 6:
60196    set write decimals 4
60197    set read missing value -999
60198    set stream read cross tabulate variable one groupid
60199    let itype = data 1 1 1 1 0
60200    set stream read variable type itype
60201    skip 25
60202    .
60203    .  Options to select which distance metric to use
60204    .
60205    . let iflag1 = 1
60206    let iflag1 = 2
60207    let iflag2 = 1
60208    . let iflag2 = 2
60209    . let iflag2 = 3
60210    . let iflag2 = 4
60211    . let iflag2 = 5
60212    . let iflag2 = 6
60213    . let iflag2 = 7
60214    . let iflag2 = 8
60215    . let iflag2 = 9
60216    . let iflag2 = 10
60217    . let iflag2 = 11
60218    .
60219    if iflag1 = 1
60220       if iflag2 = 1
60221          stream read cross tabulate covariance iris.dat y1 y2 y3 y4 groupid
60222       else if iflag2 = 2
60223          stream read cross tabulate correlation iris.dat y1 y2 y3 y4 groupid
60224       end of if
60225    else if iflag1 = 2
60226       if iflag2 = 1
60227          stream read cross tabulate euclidean distance iris.dat y1 y2 y3 y4 groupid
60228       else if iflag2 = 2
60229          stream read cross tabulate manhattan distance iris.dat y1 y2 y3 y4 groupid
60230       else if iflag2 = 3
60231          stream read cross tabulate chebychev distance iris.dat y1 y2 y3 y4 groupid
60232       else if iflag2 = 4
60233          stream read cross tabulate cosine distance iris.dat y1 y2 y3 y4 groupid
60234       else if iflag2 = 5
60235          stream read cross tabulate cosine similarity iris.dat y1 y2 y3 y4 groupid
60236       else if iflag2 = 6
60237          stream read cross tabulate angular cosine distance iris.dat y1 y2 y3 y4 groupid
60238       else if iflag2 = 7
60239          stream read cross tabulate angular cosine similarity iris.dat y1 y2 y3 y4 groupid
60240       else if iflag2 = 8
60241          stream read cross tabulate jaccard similarity iris.dat y1 y2 y3 y4 groupid
60242       else if iflag2 = 9
60243          stream read cross tabulate jaccard distance iris.dat y1 y2 y3 y4 groupid
60244       else if iflag2 = 10
60245          stream read cross tabulate hamming distance iris.dat y1 y2 y3 y4 groupid
60246       else if iflag2 = 11
60247          stream read cross tabulate canberra distance iris.dat y1 y2 y3 y4 groupid
60248       end of if
60249    end of if
60250    .
60251    print y1 y2 y3 y4 groupid tagstat
60252
60253-----STRING COMBINE-------------------------------------------
60254
60255STRING COMBINE
60256
60257Name:
60258    STRING COMBINE
60259
60260Type:
60261    Let Subcommand
60262
60263Purpose:
60264    Combine strings or create a string from a list of arguments.
60265
60266Description:
60267    The STRING CONCATENATE command is used to concatenate strings.
60268    The STRING COMBINE command is a variant of STRING CONCATENATE
60269    that varies in the following ways:
60270
60271       1. With STRING CONCATENATE, the arguments are previously
60272          defined strings.  With STRING COMBINE, Dataplot first
60273          checks to see if the argument is the name of a previously
60274          defined string.  If yes, the contents of the string
60275          are added to the contents of the output string (i.e.,
60276          the same as STRING CONCATENATE).  However if the argument
60277          is of any type other than string or it is not a previously
60278          defined name, the argument is added to the output string
60279          as literal text.
60280
60281       2. The STRING COMBINE inserts a space between the input
60282          strings/arguments.  With STRING CONCATENATE, this has
60283          to be done manually (i.e., you need to define a string
60284          that contains a space and use this between the other
60285          arguments).
60286
60287       3. The STRING COMBINE command supports the TO syntax.  That
60288          is, entering
60289
60290              LET SOUT = STRING COMBINE X1 TO X8
60291
60292          is equivalent to entering
60293
60294              LET SOUT = STRING COMBINE X1 X2 X3 X4 X5 X6 X7 X8
60295
60296    This command has two primary uses:
60297
60298       1. As an alternative to STRING CONCATENATE when you want to
60299          automatically include a space between the input strings.
60300
60301       2. Most Dataplot analysis and graphics commands now support
60302          the TO syntax.  However, there are cases, such as the
60303          LET command, where the TO syntax can be useful.  The
60304          STRING COMBINE can be used to easily create a command
60305          string.  This is demonstrated in the program example
60306          below.
60307
60308Syntax:
60309    LET <sout> = STRING COMBINE  <s1>  ... <sk>
60310    where <sout> is the name of the resulting string;
60311    and   <s1> ... <sk> is a list of one or more previously defined strings.
60312
60313Examples:
60314    LET STALL = STRING COMBINE X1 X2 X3
60315    LET STALL = STRING COMBINE X1 TO X8
60316
60317Note:
60318    The name of the output string can be the same as one of the
60319    input strings.  For example,
60320
60321        LET STRING S1 = One
60322        LET STRING S2 = Two
60323        LET STRING S3 = Three
60324        LET SOUT = STRING COMBINE S1 S2 S3
60325
60326Note:
60327    By default, a space character is used as the separator character.
60328    To specify a different separator command, enter
60329
60330        SET STRING SEPARATOR <char>
60331
60332    where <char> denotes the character to be used as the separator.
60333
60334Note:
60335    The total number of characters that DATAPLOT can use for storing
60336    functions and strings is set when DATAPLOT is built.  The current
60337    default (11/2008) is 50,000 characters.  Previous versions may set
60338    this limit at 1,000 or 10,000 characters.  This limit applies to
60339    the combined number of characters for all functions and strings.
60340
60341Default:
60342    None
60343
60344Synonyms:
60345    None
60346
60347Related Commands:
60348    STRING CONCATENATE  = Concatenate two or more strings.
60349    &                   = Concatenate two strings.
60350    SUBSTITUTE CHARACTE = Substitute the value of a string or parameter.
60351    LET FUNCTION        = Defines a function.
60352    LET STRING          = Defines a string.
60353    READ STRING         = Reads a string from a file.
60354    SUBTRING            = Extract a substring from an existing string.
60355    STRING INDEX        = Extract the start/stop positions of a substring
60356                          within a string.
60357    STRING EDIT         = Edit a string.
60358    STRING LENGTH       = Return the length of a string.
60359    STRING MERGE        = Insert a string into another string without
60360                          overwrite.
60361    STRING REPLACE      = Insert a string into another string with
60362                          overwrite.
60363    LOWER CASE          = Convert a string to lower case.
60364    UPPER CASE          = Convert a string to upper case.
60365    CHARACTER           = Convert numeric values to strings based on
60366                          the ASCII collating sequence.
60367    ICHAR               = Convert a string to numeric values based on
60368                          the ASCII collating sequence.
60369    GROUP LABEL         = Define the text for group labels.
60370
60371Applications:
60372    Data Management
60373
60374Implementation Date:
60375    2018/02
60376    2019/12: Added SET STRING SEPARATOR
60377
60378Program 1:
60379    SKIP 25
60380    READ BOXREACT.DAT Y X1 TO X5
60381    LET STALL = STRING COMBINE X1 TO X5
60382    LET CONFTAG1 CONFTAG2 = DEX CONFOUND ^STALL
60383
60384-----STRING COMPARE-----------------------------------------------------
60385
60386STRING COMPARE
60387
60388Name:
60389    STRING COMPARE
60390
60391Type:
60392    Let Subcommand
60393
60394Purpose:
60395    Compare two strings and return a 1 if they are identical and
60396    return a 0 if they are not.
60397
60398Syntax:
60399    LET <ival> = STRING COMPARE  <s1>  <s2>
60400    where <ival> is a parameter containing a 1 if the strings are
60401              identical and 0 if they are not;
60402          <s1> is the name of the first string;
60403    and   <s2> is the name of the second string.
60404
60405Examples:
60406    LET IVAL = STRING COMPARE S1  S2
60407
60408Default:
60409    None
60410
60411Synonyms:
60412    None
60413
60414Related Commands:
60415    LET FUNCTION        = Defines a function.
60416    LET STRING          = Defines a string.
60417    READ STRING         = Reads a string from a file.
60418    SUBSTITUTE CHARACTE = Substitute the value of a string or parameter.
60419    &                   = Concatenate two strings.
60420    SUBTRING            = Extract a substring from an existing string.
60421    STRING LENGTH       = Return the length of the string.
60422    STRING INDEX        = Extract the start/stop positions of a substring
60423                          within a string.
60424    STRING CONCATENATE  = Concatenate one or more previously defined
60425                          strings.
60426    STRING EDIT         = Edit a string.
60427    STRING MERGE        = Insert a string into another string without
60428                          overwrite.
60429    STRING REPLACE      = Insert a string into another string with
60430                          overwrite.
60431    LOWER CASE          = Convert a string to lower case.
60432    UPPER CASE          = Convert a string to upper case.
60433    CHARACTER           = Convert numeric values to strings based on
60434                          the ASCII collating sequence.
60435    ICHAR               = Convert a string to numeric values based on
60436                          the ASCII collating sequence.
60437    GROUP LABEL         = Define the text for group labels.
60438
60439Applications:
60440    Data Management
60441
60442Implementation Date:
60443    1/2011
60444
60445Program:
60446    LET STRING S1 = file23.dat
60447    LET STRING S2 = file13.dat
60448    LET STRING S3 = file23.dat
60449    LET IVAL1 = STRING COMPARE S1 S2
60450    LET IVAL2 = STRING COMPARE S1 S3
60451
60452    The resulting values of IVAL1 and IVAL2 are 0 and 1, respectively.
60453
60454-----STRING COMPARE AND REPLACE--------------------------------------------
60455
60456STRING COMPARE AND REPLACE
60457
60458Name:
60459    STRING COMPARE AND REPLACE
60460
60461Type:
60462    Let Subcommand
60463
60464Purpose:
60465    Compare a string to a list of strings and if a match is found
60466    define a replacement string.
60467
60468Description:
60469    This is a specialized command that was developed to improve
60470    performance in the EST.DP macro used by the 10-step macros for
60471    the analysis of 2-level full or fractional factorial designs.
60472
60473    The specific code that motivated this command was
60474
60475       loop for j1 = 1 1 numeff
60476          let string stefc^j1 = -999
60477          let string stprobe = ^stmain^j1
60478          loop for j2 = 1 1 numconf
60479             let string starch = ^stt^j2
60480             if stprobe = starch
60481                let string stefc^j1 = ^stc^j2
60482             end if
60483          end loop
60484       end loop
60485
60486    In this code, we are looping over the main factors.  For
60487    each main factor, a string is compared to a list of strings.
60488    The numconf parameter defines the number of strings being
60489    compared.  This value can grow fairly large.  For example,
60490    for a 2**(8-4) design, numconf is 96.  If a match is
60491    found, a new string (stefc^j1) is set to a string that
60492    is not in the list being compared (^stc^j2).
60493
60494    The updated code using the STRING AND REPLACE command is
60495
60496       loop for j1 = 1 1 numeff
60497           let string stefc^j1 = -999
60498           let stefc^j1 = string compare and replace stmain^j1 stc ...
60499                          stt1 to stt^numconf
60500       end loop
60501
60502    This command eliminates the inner loop.  For our 2**(8-4)
60503    example, this reduces the number of loop iterations from
60504    8*96 = 768 to 8.  The string stmain^j1 is being compared
60505    to the strings stt1 to stt^numconf.  If stt9 matches stmain^j1,
60506    the stefc^j1 is set equal to stc9.  That is, the replacement
60507    string defines a base name to which the index of the matching
60508    string is appended to define the replacement string name.
60509
60510    If in our example, the string "stc" is a previously defined
60511    string, then this would be used rather than "stc9".
60512
60513Syntax:
60514    LET <sout> = STRING COMPARE AND REPLACE <sorg>  <sold>  <srepl>
60515                 <sc1> ...  <sck>
60516    where <sout> is the name of the resulting string;
60517          <sorg> is a pre-existing string that will be compared
60518                to each of <sc1> ... <sck>;
60519          <srepl> is pre-existing string that will be set to
60520                <sout> if a match is found;
60521    and where <sc1> ... <sck> is a list of pre-existing strings.
60522
60523    If <srepl> does not exist but <srepl1> ... <sreplk> do exist,
60524    the replacement string will be <sreplj> where j denotes the
60525    index of the match.
60526
60527    If no match is found, <sout> will not be created.
60528
60529    The TO syntax can be used for <sc1> ... <sck>.
60530
60531Examples:
60532    LET STRING STNEW = STRING COMPARE AND REPLACE SOLD SREPLACE ...
60533                       S1 S2 S3 S4 S5 S6
60534    LET STRING STNEW = STRING COMPARE AND REPLACE SOLD SREPLACE ...
60535                       S1 TO S6
60536
60537Default:
60538    None
60539
60540Synonyms:
60541    None
60542
60543Related Commands:
60544    LET FUNCTION        = Defines a function.
60545    LET STRING          = Defines a string.
60546    READ STRING         = Reads a string from a file.
60547    SUBSTITUTE CHARACTE = Substitute the value of a string or parameter.
60548    &                   = Concatenate two strings.
60549    SUBTRING            = Extract a substring from an existing string.
60550    STRING EDIT         = Edit the contents of a string.
60551    STRING INDEX        = Extract the start/stop positions of a substring
60552                          within a string.
60553    STRING CONCATENATE  = Concatenate one or more previously defined
60554                          strings.
60555    STRING LENGTH       = Return the length of a string.
60556    STRING MERGE        = Insert a string into another string without
60557                          overwrite.
60558    STRING REPLACE      = Insert a string into another string with
60559                          overwrite.
60560    LOWER CASE          = Convert a string to lower case.
60561    UPPER CASE          = Convert a string to upper case.
60562    CHARACTER           = Convert numeric values to strings based on
60563                          the ASCII collating sequence.
60564    ICHAR               = Convert a string to numeric values based on
60565                          the ASCII collating sequence.
60566    GROUP LABEL         = Define the text for group labels.
60567
60568Applications:
60569    Data Management
60570
60571Implementation Date:
60572    2018/03
60573
60574Program:
60575    LET STRING S1 = One
60576    LET STRING S2 = Two
60577    LET STRING S3 = Three
60578    LET STRING S4 = Four
60579    LET STRING S5 = Five
60580    .
60581    LET STRING SOLD = Four
60582    LET STRING SREPL = String Found
60583    LET STRING SNEW = String Not Found
60584    LET SNEW = STRING COMPARE AND REPLACE SOLD SREPL S1 TO S5
60585    PRINT "SNEW: ^SNEW"
60586
60587-----STRING CONCATENATE-------------------------------------------
60588
60589STRING CONCATENATE
60590
60591Name:
60592    STRING CONCATENATE
60593
60594Type:
60595    Let Subcommand
60596
60597Purpose:
60598    Concatenate one or more strings.
60599
60600Description:
60601    This command allows you to concatenate strings.  Although this
60602    can also be done using the "^" and "&" characters, using the
60603    STRING CONCATENATE command may result in Dataplot code that is
60604    somewhat easier to use and read (particularly when many strings
60605    are being concatenated).
60606
60607Syntax:
60608    LET <sout> = STRING CONCATENATE  <s1>  ... <sk>
60609    where <sout> is the name of the resulting string;
60610    and   <s1> ... <sk> is a list of one or more previously defined strings.
60611
60612Examples:
60613    LET STRING S1 = file
60614    LET STRING S2 = 99
60615    LET STRING S3 = .dat
60616    LET SOUT = STRING CONCATENATE S1 S2 S3
60617
60618Note:
60619    The name of the new string can be the same as one of the
60620    previously defined strings.  For example,
60621
60622        LET FNAME = FILE
60623        LET SINDEX = ^K
60624        LET SEXT = .DAT
60625        LET FNAME = STRING CONCATENATE FNAME SINDEX SEXT
60626
60627Note:
60628    All strings on the right hand side of the equal sign must be
60629    previously existing strings.  That is, expressions are not allowed.
60630    For example, instead of
60631
60632        LET FNAME = STRING CONCATENATE FNAME  ".txt"
60633
60634    you need to do
60635
60636        LET STRING SEXT = .txt
60637        LET FNAME = STRING CONCATENATE FNAME  SEXT
60638
60639Note:
60640    The total number of characters that DATAPLOT can use for storing
60641    functions and strings is set when DATAPLOT is built.  The current
60642    default (11/2008) is 50,000 characters.  Previous versions may set
60643    this limit at 1,000 or 10,000 characters.  This limit applies to
60644    the combined number of characters for all functions and strings.
60645
60646Default:
60647    None
60648
60649Synonyms:
60650    None
60651
60652Related Commands:
60653    &                   = Concatenate two strings.
60654    SUBSTITUTE CHARACTE = Substitute the value of a string or parameter.
60655    LET FUNCTION        = Defines a function.
60656    LET STRING          = Defines a string.
60657    READ STRING         = Reads a string from a file.
60658    SUBTRING            = Extract a substring from an existing string.
60659    STRING INDEX        = Extract the start/stop positions of a substring
60660                          within a string.
60661    STRING EDIT         = Edit a string.
60662    STRING LENGTH       = Return the length of a string.
60663    STRING MERGE        = Insert a string into another string without
60664                          overwrite.
60665    STRING REPLACE      = Insert a string into another string with
60666                          overwrite.
60667    LOWER CASE          = Convert a string to lower case.
60668    UPPER CASE          = Convert a string to upper case.
60669    CHARACTER           = Convert numeric values to strings based on
60670                          the ASCII collating sequence.
60671    ICHAR               = Convert a string to numeric values based on
60672                          the ASCII collating sequence.
60673    GROUP LABEL         = Define the text for group labels.
60674
60675Applications:
60676    Data Management
60677
60678Implementation Date:
60679    11/2008
60680
60681Program 1:
60682    LET STRING S1 = file
60683    LET STRING S2 = 23
60684    LET STRING S3 = .txt
60685    LET SOUT = STRING CONCATENATE S1 S2 S3
60686
60687    The resulting string SOUT will contain
60688
60689       file23.txt
60690
60691Program 2:
60692    .  Assume we have variables X and Y in the files "file1.dat" to
60693    .  "file10.dat" and we want to plot each of these in turn.
60694    .
60695    LET STRING SBASE = file
60696    LET STRING SEXT = xx
60697    TITLE CASE ASIS
60698    LOOP FOR K = 1 1 10
60699        LET STRING SINDEX = ^K
60700        LET FNAME = STRING CONCATENATE SBASE SINDEX SEXT
60701        READ ^FNAME  Y X
60702        TITLE Data from File ^SOUT
60703        PLOT Y X
60704        DELETE Y X
60705    END OF LOOP
60706
60707-----STRING CONTAIN----------------------------------------------
60708
60709STRING CONTAIN
60710
60711Name:
60712    STRING CONTAIN
60713
60714Type:
60715    Let Subcommand
60716
60717Purpose:
60718    Return a 1 if a string contains a specified substring and a 0 if it
60719    does not.
60720
60721Syntax:
60722    LET <iflag> = STRING CONTAIN  <s1>  <s2>
60723    where <iflag> is a parameter containing a 1 if <s1> contains
60724              the string <s2> and 0 otherwise;
60725          <s1> is the name of a pre-existing string;
60726    and   <s2> is the name of a pre-existing string.
60727
60728Examples:
60729    LET IFLAG = STRING CONTAINS SORG  SMATCH
60730
60731Note:
60732    The strings on the right hand side of the equal sign must be
60733    previously existing strings.  That is, expressions are not allowed.
60734    For example, the following will result in an error message
60735
60736        LET IFLAG = STRING CONTAINS "alan.heckert@nist.gov"  "alan"
60737
60738    you need to do
60739
60740        LET STRING SORG = alan.heckert@nist.gov
60741        LET STRING SMATCH = alan
60742        LET SOUT = STRING CONTAINS SORG SMATCH
60743
60744    The name on the left hand side of the equal sign should either be a
60745    previously existing parameter or not previously defined.  If it is a
60746    previously existing string, variable, or matrix name, an error will
60747    be reported and the requested parameter will not be created.
60748
60749Note:
60750    The total number of characters that DATAPLOT can use for storing
60751    functions and strings is set when DATAPLOT is built.  The current
60752    default (11/2008) is 50,000 characters.  Previous versions may set
60753    this limit at 1,000 or 10,000 characters.  This limit applies to
60754    the combined number of characters for all functions and strings.
60755
60756Default:
60757    None
60758
60759Synonyms:
60760    None
60761
60762Related Commands:
60763    SUBTRING            = Extract a substring from an existing string.
60764    STRING ENDS WITH    = Check whether a string starts with a
60765                          specified substring.
60766    STRING ENDS WITH    = Check whether a string ends with a
60767                          specified substring.
60768    LET STRING          = Defines a string.
60769    READ STRING         = Reads a string from a file.
60770    SUBSTITUTE CHARACTE = Substitute the value of a string or parameter.
60771    &                   = Concatenate two strings.
60772    STRING LENGTH       = Return the length of the string.
60773    STRING INDEX        = Extract the start/stop positions of a substring
60774                          within a string.
60775    STRING CONCATENATE  = Concatenate one or more previously defined
60776                          strings.
60777    STRING EDIT         = Edit a string.
60778    STRING MERGE        = Insert a string into another string without
60779                          overwrite.
60780    STRING REPLACE      = Insert a string into another string with
60781                          overwrite.
60782    LOWER CASE          = Convert a string to lower case.
60783    UPPER CASE          = Convert a string to upper case.
60784    CHARACTER           = Convert numeric values to strings based on
60785                          the ASCII collating sequence.
60786    ICHAR               = Convert a string to numeric values based on
60787                          the ASCII collating sequence.
60788    GROUP LABEL         = Define the text for group labels.
60789
60790Applications:
60791    Data Management
60792
60793Implementation Date:
60794    2019/01
60795
60796Program:
60797    LET STRING S1 = alan.heckert@gmail.com
60798    LET STRING S2 = alan
60799    LET IFLAG = STRING CONTAINS S1 S2
60800
60801-----STRING DELETE------------------------------------------
60802
60803STRING DELETE
60804
60805Name:
60806    STRING DELETE
60807
60808Type:
60809    Let Subcommand
60810
60811Purpose:
60812    Remove a user specified list of characters from a string.
60813
60814Description:
60815    The STRING REMOVE SPACES, STRING REMOVE WHITESPACE, and STRING
60816    REMOVE PUNCTUATION commands can be used to remove certain pre-defined
60817    sets of characters from a string.  However, there may be times when
60818    you need to specifiy a specific list of characters to remove.  The
60819    STRING DELETE command can be used to do that.
60820
60821Syntax:
60822    LET <sout> = STRING DELETE  <sorg>  <slist>
60823    where <sout> is the name of the resulting string;
60824          <sorg> is the name of the original string;
60825    and   <slist> is the name of the original string.
60826
60827    You specifiy the characters you want to delete by defining the
60828    <slist> string.  That is, <sorg> will be checked against each
60829    character in <slist>.
60830
60831Examples:
60832    LET SOUT = STRING DELETE STIN SLIST
60833
60834Note:
60835    The name of the new string can be the same as the original
60836    string.  For example,
60837
60838        LET STR = STRING DELETE STR  SDELETE
60839
60840    In this case, STR will now contain the the string with the
60841    characters removed rather than the original string.
60842
60843Note:
60844    The strings on the right hand side of the equal sign must be
60845    previously existing strings.  That is, expressions are not allowed.
60846    For example, the following will result in an error message
60847
60848        LET STOUT = STRING DELETE "alan.heckert@nist.gov"  "@"
60849
60850    you need to do
60851
60852        LET STRING SORG = alan.heckert@nist.gov
60853        LET STRING SLIST = @
60854        LET SOUT = STRING DELETE SORG SLIST
60855
60856    The name on the left hand side of the equal sign may be a
60857    previously existing string.  However, if it is a previously
60858    existing parameter, variable, or matrix name, an error will
60859    be reported and the requested string will not be created.
60860
60861Note:
60862    The total number of characters that DATAPLOT can use for storing
60863    functions and strings is set when DATAPLOT is built.  The current
60864    default (11/2008) is 50,000 characters.  Previous versions may set
60865    this limit at 1,000 or 10,000 characters.  This limit applies to the
60866    combined number of characters for all functions and strings.
60867
60868Default:
60869    None
60870
60871Synonyms:
60872    None
60873
60874Related Commands:
60875    STRING REMOVE PUNCTUATION = Remove punctuatuin characters from a string.
60876    STRING REMOVE SPACE       = Remove spaces from a string.
60877    STRING REMOVE WHITESPACE  = Remove white space characters from a string.
60878    NUMBER OF WORDS           = Return the number of words in a string.
60879    UPPER CASE                = Convert a string to upper case.
60880    LOWER CASE                = Convert a string to lower case.
60881    LET FUNCTION              = Defines a function.
60882    LET STRING                = Defines a string.
60883    READ STRING               = Reads a string from a file.
60884    SUBSTITUTE CHARACTER (^)  = Substitute the value of a string or
60885                                parameter.
60886    CONCATENATE CHARACTER (&) = Concatenate two strings.
60887    SUBTRING                  = Extract a substring from an existing
60888                                string.
60889    STRING INDEX              = Extract the start/stop positions of a
60890                                substring within a string.
60891    STRING CONCATENATE        = Concatenate one or more previously
60892                                defined strings.
60893    STRING EDIT               = Edit a string.
60894    STRING MERGE              = Insert a string into another string
60895                                without overwrite.
60896    STRING LENGTH             = Return the length of a string.
60897    STRING WORD               = Extract a specified word from a string.
60898    CHARACTER                 = Convert numeric values to strings based
60899                                on the ASCII collating sequence.
60900    ICHAR                     = Convert a string to numeric values based
60901                                on the ASCII collating sequence.
60902    GROUP LABEL               = Define the text for group labels.
60903
60904Applications:
60905    Data Management
60906
60907Implementation Date:
60908    2018/10
60909
60910Program:
60911    let string stin = abcdefgabcdefg
60912    let string slist = cde
60913    let stout = string delete stin slist
60914    print stin stout
60915
60916-----STRING EDIT-----------------------------------------------------
60917
60918STRING EDIT
60919
60920Name:
60921    STRING EDIT
60922
60923Type:
60924    Let Subcommand
60925
60926Purpose:
60927    Edit the contents of a string.
60928
60929Description:
60930    This command allows you to edit the contents of a previosuly defined
60931    string.
60932
60933    The STRING EDIT command involves three string:
60934
60935       1) The original string which we will call SORG.
60936
60937       2) A substring, which we will call SOLD, that contains the text
60938          to be changed.
60939
60940       3) A substring, which we will call SNEW, which contains the
60941          replacement text.
60942
60943    The STRING EDIT command searches the string SORG for the
60944    substring SOLD.  If found, it replaces the SOLD text with
60945    the SNEW text.  If no match is found, an error message is
60946    printed and the new string is not created.
60947
60948Syntax 1:
60949    LET <sout> = STRING EDIT  <sorg>  <sold>  <snew>
60950    where <sout> is the name of the resulting string;
60951          <sorg> is the name of the original string to be edited;
60952          <sold> is the name of the match string;
60953    and where <snew> is the name of the replacement string.
60954
60955    This syntax edits the first occurence of <sold> only.
60956
60957Syntax 2:
60958    LET <sout> = STRING GLOBAL EDIT  <sorg>  <sold>  <snew>
60959    where <sout> is the name of the resulting string;
60960          <sorg> is the name of the original string to be edited;
60961          <sold> is the name of the match string;
60962    and where <snew> is the name of the replacement string.
60963
60964    This syntax edits all occurences of <sold>.
60965
60966Examples:
60967    LET STRING S1 = filexx.dat
60968    LET STRING S2 = xx
60969    LET STRING S3 = 23
60970    LET SOUT = STRING EDIT S1 S2 S3
60971
60972    LET SOUT = STRING GLOBAL EDIT SIN SOLD SNEW
60973
60974Note:
60975    The name of the new string can be the same as the original string.
60976    For example,
60977
60978        LET FNAME = STRING EDIT FNAME SOLD SNEW
60979
60980Note:
60981    All three strings on the right hand side of the equal sign must be
60982    previously existing strings.  That is, expressions are not allowed.
60983    For example, instead of
60984
60985        LET FNAME = STRING EDIT FNAME  ".dat"  ".txt"
60986
60987    you need to do
60988
60989        LET STRING SOLD = .dat
60990        LET STRING SNEW = .txt
60991        LET FNAME = STRING EDIT FNAME  SOLD SNEW
60992
60993Note:
60994    The total number of characters that DATAPLOT can use for storing
60995    functions and strings is set when DATAPLOT is built.  The current
60996    default (11/2008) is 50,000 characters.  Previous versions may set
60997    this limit at 1,000 or 10,000 characters.  This limit applies to
60998    the combined number of characters for all functions and strings.
60999
61000Note:
61001    Only the first occurrence that is matched is changed.  That is,
61002    there is currently no "global" option and no option to specify
61003    that the second or third or last occurence be changed.
61004
61005    Also, there is currently no support for wild cards or regular
61006    expressions.
61007
61008Note:
61009    If you want the replacement string to be null (i.e., you want
61010    to delete the match string), then you can do the following
61011
61012       LET STRING SOUT = NULL()
61013       LET SOUT = STRING EDIT STIN SOLD SNEW
61014
61015    or
61016
61017       LET SOUT = STRING EDIT STIN NULL() SNEW
61018
61019    The use of "NULL()" is currently specific to this command.
61020
61021Default:
61022    None
61023
61024Synonyms:
61025    None
61026
61027Related Commands:
61028    LET FUNCTION        = Defines a function.
61029    LET STRING          = Defines a string.
61030    READ STRING         = Reads a string from a file.
61031    SUBSTITUTE CHARACTE = Substitute the value of a string or parameter.
61032    &                   = Concatenate two strings.
61033    SUBTRING            = Extract a substring from an existing string.
61034    STRING INDEX        = Extract the start/stop positions of a substring
61035                          within a string.
61036    STRING CONCATENATE  = Concatenate one or more previously defined
61037                          strings.
61038    STRING LENGTH       = Return the length of a string.
61039    STRING MERGE        = Insert a string into another string without
61040                          overwrite.
61041    STRING REPLACE      = Insert a string into another string with
61042                          overwrite.
61043    LOWER CASE          = Convert a string to lower case.
61044    UPPER CASE          = Convert a string to upper case.
61045    CHARACTER           = Convert numeric values to strings based on
61046                          the ASCII collating sequence.
61047    ICHAR               = Convert a string to numeric values based on
61048                          the ASCII collating sequence.
61049    GROUP LABEL         = Define the text for group labels.
61050
61051Applications:
61052    Data Management
61053
61054Implementation Date:
61055    2008/11
61056    2015/02: Support for STRING GLOBAL EDIT<BR>
61057    2015/02: Support for "NULL()" for replacement string<BR>
61058
61059Program 1:
61060    LET STRING S1 = file23.dat
61061    LET STRING S2 = dat
61062    LET STRING S3 = txt
61063    LET SOUT = STRING EDIT S1 S2 S3
61064
61065    The resulting string SOUT will contain
61066
61067       file23.txt
61068
61069Program 2:
61070    .  Assume we have variables X and Y in the files "file1.dat" to
61071    .  "file10.dat" and we want to plot each of these in turn.
61072    .
61073    LET STRING SOLD = filexx.dat
61074    LET STRING S3 = xx
61075    TITLE CASE ASIS
61076    LOOP FOR K = 1 1 10
61077        LET STRING S2 = ^K
61078        LET FNAME = STRING EDIT SOLD S3 S2
61079        READ ^FNAME  Y X
61080        TITLE Data from File ^SOUT
61081        PLOT Y X
61082        DELETE Y X
61083    END OF LOOP
61084
61085-----STRING ENDS WITH----------------------------------------------
61086
61087STRING ENDS WITH
61088
61089Name:
61090    STRING ENDS WITH
61091
61092Type:
61093    Let Subcommand
61094
61095Purpose:
61096    Return a 1 if a string ends with a specified substring
61097    and a 0 if it does not.
61098
61099Syntax:
61100    LET <iflag> = STRING ENDS WITH  <s1>  <s2>
61101    where <iflag> is a parameter containing a 1 if <s1> ends
61102              with <s2> and 0 otherwise;
61103          <s1> is the name of a pre-existing string;
61104    and   <s2> is the name of a pre-existing string.
61105
61106Examples:
61107    LET IFLAG = STRING ENDS WITH S1  S2
61108
61109Note:
61110    The strings on the right hand side of the equal sign must be
61111    previously existing strings.  That is, expressions are not allowed.
61112    For example, the following will result in an error message
61113
61114        LET IFLAG = STRING ENDS WITH "alan.heckert@nist.gov"  "nist.gov"
61115
61116    you need to do
61117
61118        LET STRING SORG = alan.heckert@nist.gov
61119        LET STRING SMATCH = nist.gov
61120        LET SOUT = STRING ENDS WITH SORG SMATCH
61121
61122    The name on the left hand side of the equal sign should either be a
61123    previously existing parameter or not previously defined.  If it is a
61124    previously existing string, variable, or matrix name, an error will
61125    be reported and the requested parameter will not be created.
61126
61127Note:
61128    The total number of characters that DATAPLOT can use for storing
61129    functions and strings is set when DATAPLOT is built.  The current
61130    default (11/2008) is 50,000 characters.  Previous versions may set
61131    this limit at 1,000 or 10,000 characters.  This limit applies to
61132    the combined number of characters for all functions and strings.
61133
61134Default:
61135    None
61136
61137Synonyms:
61138    None
61139
61140Related Commands:
61141    STRING STARTS WITH  = Check whether a string starts with a
61142                          specified substring.
61143    LET FUNCTION        = Defines a function.
61144    LET STRING          = Defines a string.
61145    READ STRING         = Reads a string from a file.
61146    SUBSTITUTE CHARACTE = Substitute the value of a string or parameter.
61147    &                   = Concatenate two strings.
61148    SUBTRING            = Extract a substring from an existing string.
61149    STRING LENGTH       = Return the length of the string.
61150    STRING INDEX        = Extract the start/stop positions of a substring
61151                          within a string.
61152    STRING CONCATENATE  = Concatenate one or more previously defined
61153                          strings.
61154    STRING EDIT         = Edit a string.
61155    STRING MERGE        = Insert a string into another string without
61156                          overwrite.
61157    STRING REPLACE      = Insert a string into another string with
61158                          overwrite.
61159    LOWER CASE          = Convert a string to lower case.
61160    UPPER CASE          = Convert a string to upper case.
61161    CHARACTER           = Convert numeric values to strings based on
61162                          the ASCII collating sequence.
61163    ICHAR               = Convert a string to numeric values based on
61164                          the ASCII collating sequence.
61165    GROUP LABEL         = Define the text for group labels.
61166
61167Applications:
61168    Data Management
61169
61170Implementation Date:
61171    2018/10
61172
61173Program:
61174    LET STRING S1 = alan.heckert@gmail.com
61175    LET STRING S2 = gmail.com
61176    LET IFLAG = STRING ENDS WITH S1 S2
61177
61178-----STRING EXPAND WHITESPACE----------------------------------------
61179
61180STRING EXPAND WHITESPACE
61181
61182Name:
61183    STRING EXPAND WHITESPACE
61184
61185Type:
61186    Let Subcommand
61187
61188Purpose:
61189    Replace non-printing characters in a string with a single space
61190    character.
61191
61192Description:
61193    When extracting strings from external sources, you may encounter
61194    non-printing characters.  The STRING REMOVE WHITESPACE can be used
61195    to simply remove these characters from the string.  Alternatively,
61196    the STRING EXPAND WHITESPACE can be used to convert non-printing
61197    characters to a single space character.
61198
61199    The tab character is treated somewhat differently.  Specifically,
61200    you can use the command
61201
61202       SET TAB EXPAND <value>
61203
61204    to specify how tab characters are handled.  Specifically, if <value>
61205    is 0, then the tab character is retained in the string (no space
61206    is added).  If <value> is a positive integer, the tab character
61207    will be replaced with <value> spaces.
61208
61209    The non-printing characters are the ones with codes 0 to 31 and 127
61210    in the ASCII collating sequence.  Currently, Dataplot only checks
61211    for characters in the 0 - 127 range of the ASCII collating sequence.
61212
61213Syntax:
61214    LET <sout> = STRING EXPAND WHITESPACE  <sorg>
61215    where <sout> is the name of the resulting string;
61216    and   <sorg> is the name of the original string.
61217
61218Examples:
61219    LET SOUT = STRING EXPAND WHITESPACE STIN
61220
61221Note:
61222    The name of the new string can be the same as the original
61223    string.  For example,
61224
61225        LET STR = STRING EXPAND WHITESPACE STR
61226
61227    In this case, STR will now contain the the string with all white
61228    space characters removed rather than the original string.
61229
61230Note:
61231    The string on the right hand side of the equal sign must be a
61232    previously existing string.  That is, expressions are not allowed.
61233    For example, the following will result in an error message
61234
61235        LET STOUT = STRING EXPAND WHITESPACE "a b c d"
61236
61237    you need to do
61238
61239        LET STRING SORG = a b c d
61240        LET SOUT = STRING EXPAND WHITESPACE SORG
61241
61242    The name on the left hand side of the equal sign may be a
61243    previously existing string.  However, if it is a previously
61244    existing parameter, variable, or matrix name, an error will
61245    be reported and the requested string will not be created.
61246
61247Note:
61248    The total number of characters that DATAPLOT can use for storing
61249    functions and strings is set when DATAPLOT is built.  The current
61250    default (11/2008) is 50,000 characters.  Previous versions may set
61251    this limit at 1,000 or 10,000 characters.  This limit applies to the
61252    combined number of characters for all functions and strings.
61253
61254Default:
61255    None
61256
61257Synonyms:
61258    None
61259
61260Related Commands:
61261    STRING REMOVE WHITE SPACE = Remove white space and non-printing
61262                                characters from a string.
61263    STRING REMOVE SPACE       = Remove spaces from a string.
61264    STRING REMOVE PUNCTUATION = Remove punctuation from a string.
61265    STRING DELETE             = Remove user specifed characters from a
61266                                string.
61267    NUMBER OF WORDS           = Return the number of words in a string.
61268    UPPER CASE                = Convert a string to upper case.
61269    LOWER CASE                = Convert a string to lower case.
61270    LET FUNCTION              = Defines a function.
61271    LET STRING                = Defines a string.
61272    READ STRING               = Reads a string from a file.
61273    SUBSTITUTE CHARACTER (^)  = Substitute the value of a string or
61274                                parameter.
61275    CONCATENATE CHARACTER (&) = Concatenate two strings.
61276    SUBTRING                  = Extract a substring from an existing
61277                                string.
61278    STRING INDEX              = Extract the start/stop positions of a
61279                                substring within a string.
61280    STRING CONCATENATE        = Concatenate one or more previously
61281                                defined strings.
61282    STRING EDIT               = Edit a string.
61283    STRING MERGE              = Insert a string into another string
61284                                without overwrite.
61285    STRING LENGTH             = Return the length of a string.
61286    STRING WORD               = Extract a specified word from a string.
61287    CHARACTER                 = Convert numeric values to strings based
61288                                on the ASCII collating sequence.
61289    ICHAR                     = Convert a string to numeric values based
61290                                on the ASCII collating sequence.
61291    GROUP LABEL               = Define the text for group labels.
61292
61293Applications:
61294    Data Management
61295
61296Implementation Date:
61297    2019/02
61298
61299Program:
61300    set tab expand 3
61301    read string tab.dat t
61302    let tout = string expand whitespace t
61303    print t tout
61304
61305-----STRING HAMMING DISTANCE-----------------------------------------
61306
61307STRING HAMMING DISTANCE
61308
61309Name:
61310    STRING HAMMING DISTANCE
61311
61312Type:
61313    Let Subcommand
61314
61315Purpose:
61316    Given two equal length strings, returns the count of the number
61317    of character positions that match.
61318
61319Syntax:
61320    LET <dist> = STRING HAMMING DISTANCE  <s1>  <s2>
61321    where <dist> is a parameter containing the Hamming distance;
61322          <s1> is the name of a pre-existing string;
61323    and   <s2> is the name of a pre-existing string.
61324
61325    The <s1> and <s2> strings must be the same length.
61326
61327Examples:
61328    LET IFLAG = STRING HAMMING DISTANCE S1  S2
61329
61330Note:
61331    The strings on the right hand side of the equal sign must be
61332    previously existing strings.  That is, expressions are not allowed.
61333    For example, the following will result in an error message
61334
61335        LET IFLAG = STRING HAMMING DISTANCE "gmail.com" "gmail.org"
61336
61337    you need to do
61338
61339        LET STRING S1 = gmail.com
61340        LET STRING S2 = gmail.org
61341        LET SOUT = STRING HAMMING DISTANCE S1 S2
61342
61343    The name on the left hand side of the equal sign may be a
61344    previously existing parameter.  However, if it is a previously
61345    existing string, variable, or matrix name, an error will
61346    be reported and the requested parameter will not be created.
61347
61348Default:
61349    None
61350
61351Synonyms:
61352    None
61353
61354Related Commands:
61355    HAMMING DISTANCE    = Compute the Hamming distance of two
61356                          vectors.
61357    EUCLIDEAN DISTANCE  = Compute the Euclidean distance.
61358    COSINE DISTANCE     = Compute the cosine distance.
61359    MANHATTAN DISTANCE  = Compute the Manhattan distance.
61360    LET STRING          = Defines a string.
61361    READ STRING         = Reads a string from a file.
61362
61363Applications:
61364    Data Management
61365
61366Implementation Date:
61367    2018/10
61368
61369Program:
61370    LET STRING S1 = 1011100111
61371    LET STRING S2 = 1010010110
61372    LET DIST = STRING HAMMING DISTANCE S1 S2
61373
61374-----STRING INDEX-----------------------------------------------------
61375
61376STRING INDEX
61377
61378Name:
61379    STRING INDEX
61380    STRING RIGHT INDEX
61381
61382Type:
61383    Let Subcommand
61384
61385Purpose:
61386    Return the start and stop position of a substring within a
61387    string.
61388
61389Syntax 1:
61390    LET <nstart> <nstop> = STRING INDEX  <sorg> <smatch>
61391    where <nstart> is a parameter containing the returned start position;
61392          <nstop> is a parameter containing the returned stop position;
61393          <sorg> is the original string;
61394    and   <smatch> is the substring to be matched within <sorg>.
61395
61396    This syntax searches <sorg> from left to right.
61397
61398Syntax 2:
61399    LET <nstart> <nstop> = STRING RIGHT INDEX  <sorg> <smatch>
61400    where <nstart> is a parameter containing the returned start position;
61401          <nstop> is a parameter containing the returned stop position;
61402          <sorg> is the original string;
61403    and   <smatch> is the substring to be matched within <sorg>.
61404
61405    This syntax searches <sorg> from right to left.
61406
61407Examples:
61408    LET NSTART NSTOP = STRING INDEX S1 S2
61409    LET NSTART NSTOP = STRING RIGHT INDEX SORG SMATCH
61410
61411Note:
61412    Both of the strings on the right hand side of the equal sign
61413    must be previously defined strings.  String expressions are
61414    not allowed.  So
61415
61416        LET NSTART NSTOP = STRING INDEX SORG  ".dat"
61417
61418    should be coded as
61419
61420        LET STRING S2 = .dat
61421        LET NSTART NSTOP = STRING INDEX SORG  S2
61422
61423Default:
61424    None
61425
61426Synonyms:
61427    STRING FIND is a synonym for STRING INDEX
61428    STRING RIGHT FIND is a synonym for STRING RIGHT INDEX
61429
61430Related Commands:
61431    LET FUNCTION        = Defines a function.
61432    LET STRING          = Defines a string.
61433    READ STRING         = Reads a string from a file.
61434    SUBSTITUTE CHARACTE = Substitute the value of a string or parameter.
61435    &                   = Concatenate two strings.
61436    SUBTRING            = Extract a substring from an existing string.
61437    STRING LENGTH       = Return the length of a string.
61438    STRING CONCATENATE  = Concatenate one or more previously defined
61439                          strings.
61440    STRING EDIT         = Edit a string.
61441    STRING MERGE        = Insert a string into another string without
61442                          overwrite.
61443    STRING REPLACE      = Insert a string into another string with
61444                          overwrite.
61445    LOWER CASE          = Convert a string to lower case.
61446    UPPER CASE          = Convert a string to upper case.
61447    CHARACTER           = Convert numeric values to strings based on
61448                          the ASCII collating sequence.
61449    ICHAR               = Convert a string to numeric values based on
61450                          the ASCII collating sequence.
61451    GROUP LABEL         = Define the text for group labels.
61452
61453Applications:
61454    Data Management
61455
61456Implementation Date:
61457    2008/11
61458    2018/10: Added STRING RIGHT INDEX
61459    2018/10: Added STRING FIND as a synonym for STRING INDEX
61460
61461Program:
61462    LET STRING S1 = file23.dat
61463    LET STRING S2 = 23
61464    LET NSTART NSTOP = STRING INDEX S1 S2
61465
61466    The resulting values of NSTART and NSTOP are 5 and 6,
61467    respectively.
61468
61469-----STRING INTERACTION-------------------------------------------------
61470
61471STRING INTERACTION
61472
61473Name:
61474    STRING INTERACTION
61475
61476Type:
61477    Let Subcommand
61478
61479Purpose:
61480    Given a list of parameters, create a string that represents
61481    an interaction term.
61482
61483Description:
61484    This is a specialized command that is used in creating labels
61485    in the context of a 2-level full or fractional factorial design.
61486
61487    As an example, suppose we have the parameters J1, J2, and J3
61488    where J1 = 3, J2 = 1, and J3 = 5, then this command will create a
61489    string containing
61490
61491         X3 * X1 * X5
61492
61493    The parameters identify factors of interest, so they will
61494    typically contain integers in the range 1 to k where k is the
61495    number of factors in the design.  If the parameter is negative,
61496    then that parameter will not be included in the output string.
61497
61498Syntax:
61499    LET <sout> = STRING INTERACTION <j1> ... <jk>
61500    where <sout> is the name of the resulting string;
61501    and   <j1> ... <jk> is a list of parameters.
61502
61503Examples:
61504    LET SOUT = STRING INTERACTION J1 J2 J3
61505    LET SOUT = STRING INTERACTION J1 J2 J3 J4 J5
61506
61507Note:
61508    The total number of characters that DATAPLOT can use for storing
61509    functions and strings is set when DATAPLOT is built.  The current
61510    default (11/2008) is 50,000 characters.  Previous versions may set
61511    this limit at 1,000 or 10,000 characters.  This limit applies to the
61512    combined number of characters for all functions and strings.
61513
61514Default:
61515    None
61516
61517Synonyms:
61518    None
61519
61520Related Commands:
61521    NUMBER OF WORDS           = Return the number of words in a string.
61522    UPPER CASE                = Convert a string to upper case.
61523    LOWER CASE                = Convert a string to lower case.
61524    LET FUNCTION              = Defines a function.
61525    LET STRING                = Defines a string.
61526    READ STRING               = Reads a string from a file.
61527    SUBSTITUTE CHARACTER (^)  = Substitute the value of a string or
61528                                parameter.
61529    CONCATENATE CHARACTER (&) = Concatenate two strings.
61530    BLANK STRING              = Create a blank string.
61531    SUBTRING                  = Extract a substring from an existing
61532                                string.
61533    STRING INDEX              = Extract the start/stop positions of a
61534                                substring within a string.
61535    STRING CONCATENATE        = Concatenate one or more previously
61536                                defined strings.
61537    STRING EDIT               = Edit a string.
61538    STRING MERGE              = Insert a string into another string
61539                                without overwrite.
61540    STRING LENGTH             = Return the length of a string.
61541    CHARACTER                 = Convert numeric values to strings based
61542                                on the ASCII collating sequence.
61543    ICHAR                     = Convert a string to numeric values based
61544                                on the ASCII collating sequence.
61545    GROUP LABEL               = Define the text for group labels.
61546
61547Applications:
61548    2-Level Full and Fractional Factorial Designs
61549
61550Implementation Date:
61551    2018/04
61552
61553Program:
61554    . Step 1:   Define inputs
61555    .
61556    let j1 = 1
61557    let j2 = 2
61558    let j3 = 3
61559    let j4 = 4
61560    let j5 = 5
61561    .
61562    . Step 2:   Execute the command
61563    .
61564    let stnew  = string interaction j1 j2 j3 j4 j5
61565    .
61566    let j4 = -9999
61567    let j5 = -9999
61568    let stnew2  = string interaction j1 j2 j3 j4 j5
61569    .
61570    print "stnew:  ^stnew"
61571    print "stnew2: ^stnew2"
61572
61573-----STRING JUSTIFY-------------------------------------------------
61574
61575STRING JUSTIFY
61576
61577Name:
61578    STRING <LEFT/CENTER/RIGHT> JUSTIFY
61579
61580Type:
61581    Let Subcommand
61582
61583Purpose:
61584    Left, center, or right justify a string.
61585
61586Description:
61587    The STRING REMOVE SPACES command can be used to remove leading or
61588    trailing spaces from a string.  This command allows you to add
61589    leading or trailing spaces.
61590
61591    That is, you specify the desired length of the string.  If LEFT
61592    justification is requested, trailing spaces will be added to the end
61593    of the string so that the string has the desired length.  Likewise, if
61594    RIGHT justification is requested, leading spaces will be added to the
61595    beginning of the string.  If CENTER justification is requested, both
61596    leading and trailing spaces will be added.
61597
61598    If the requested string already has a length greater than the
61599    requested length, the output string will be set equal to the input
61600    string.
61601
61602    By default, the added leading and trailing characters are spaces.
61603    You can specify a different character by entering the command
61604
61605         SET STRING JUSTIFICATION CHARACTER <char>
61606
61607    To reset the default of spaces, enter
61608
61609         SET STRING JUSTIFICATION CHARACTER SPACE
61610
61611Syntax 1:
61612    LET <sout> = STRING LEFT JUSTIFY <sorg>  <nlen>
61613    where <sout> is the name of the resulting string;
61614          <sorg> is the name of the original string;
61615    and   <nlen> is the desired length of the output string.
61616
61617    If n1 is the length of the original string and <nlen> is n2, then
61618    n2 - n1 spaces will be added to the end of <sorg>.  If n1 >= n2,
61619    <sout> will be set equal to <sorg>.
61620
61621Syntax 2:
61622    LET <sout> = STRING RIGHT JUSTIFY <sorg>  <nlen>
61623    where <sout> is the name of the resulting string;
61624          <sorg> is the name of the original string;
61625    and   <nlen> is the desired length of the output string.
61626
61627    If n1 is the length of the original string and <nlen> is n2, then
61628    n2 - n1 spaces will be added to the beginning of <sorg>.  If n1 >= n2,
61629    <sout> will be set equal to <sorg>.
61630
61631Syntax 3:
61632    LET <sout> = STRING CENTER JUSTIFY <sorg>  <nlen>
61633    where <sout> is the name of the resulting string;
61634          <sorg> is the name of the original string;
61635    and   <nlen> is the desired length of the output string.
61636
61637    If n1 is the length of the original string and <nlen> is n2, then
61638    (n2 - n1)/2 spaces will be added to the beginning of <sorg> and
61639    (n2 - n1)/2 spaces will be added to the end of <sorg>.  If n2 - n1
61640    is odd, the extra space will be added to the beginning of <sorg>.  If
61641    n1 >= n2, <sout> will be set equal to <sorg>.
61642
61643Examples:
61644    LET SOUT = STRING LEFT JUSTIFY S1 NLEN
61645    LET SOUT = STRING RIGHT JUSTIFY S1 20
61646    LET SOUT = STRING CENTER JUSTIFY S1 NLEN
61647
61648Note:
61649    The name of the new string can be the same as the original
61650    string.  For example,
61651
61652        LET SORG = STRING RIGHT JUSTIFY SORG NLEN
61653
61654Note:
61655    The string on the right hand side of the equal sign must be a
61656    previously existing string.  That is, expressions are not allowed.
61657    For example, instead of
61658
61659        LET SOUT = STRING RIGHT JUSTIFY  "XXXXX"  10
61660
61661    you need to do
61662
61663        LET STRING SORG = XXXXX
61664        LET SOUT = STRING RIGHT JUSTIFY SORG 10
61665
61666    The length parameter can be either a parameter or a numeric
61667    value.  However, it cannot be a numeric expression.  So
61668
61669        LET SOUT = STRING RIGHT JUSTIFY SORG 10
61670        LET SOUT = STRING RIGHT JUSTIFY SORG NLEN
61671
61672    are both allowed but
61673
61674        LET SOUT = STRING RIGHT JUSTIFY SORG NLEN/2
61675
61676    is not allowed.  You would need to enter this as
61677
61678        LET NLEN2 = NLEN/2
61679        LET SOUT = STRING RIGHT JUSTIFY SORG NLEN2
61680
61681Note:
61682    The total number of characters that DATAPLOT can use for storing
61683    functions and strings is set when DATAPLOT is built.  The current
61684    default (11/2008) is 50,000 characters.  Previous versions may set
61685    this limit at 1,000 or 10,000 characters.  This limit applies to the
61686    combined number of characters for all functions and strings.
61687
61688Default:
61689    None
61690
61691Synonyms:
61692    None
61693
61694Related Commands:
61695    LET FUNCTION        = Defines a function.
61696    LET STRING          = Defines a string.
61697    READ STRING         = Reads a string from a file.
61698    SUBSTITUTE CHARACTE = Substitute the value of a string or parameter.
61699    &                   = Concatenate two strings.
61700    STRING INDEX        = Extract the start/stop positions of a substring
61701                          within a string.
61702    STRING CONCATENATE  = Concatenate one or more previously defined
61703                          strings.
61704    STRING LENGTH       = Return the length of a string.
61705    STRING EDIT         = Edit a string.
61706    STRING MERGE        = Insert a string into another string without
61707                          overwrite.
61708    STRING REPLACE      = Insert a string into another string with
61709                          overwrite.
61710    LOWER CASE          = Convert a string to lower case.
61711    UPPER CASE          = Convert a string to upper case.
61712    CHARACTER           = Convert numeric values to strings based on
61713                          the ASCII collating sequence.
61714    ICHAR               = Convert a string to numeric values based on
61715                          the ASCII collating sequence.
61716    GROUP LABEL         = Define the text for group labels.
61717
61718Applications:
61719    Data Management
61720
61721Implementation Date:
61722    2019/01
61723
61724Program:
61725    SKIP 25
61726    READ BERGER1.DAT Y X
61727    FIT Y X
61728    LET CC = CORRELATION Y X
61729    .
61730    LET STRING S1 = A0:
61731    LET STRING S2 = A1:
61732    LET STRING S3 = CORR:
61733    LET NLEN = 8
61734    LET S1 = STRING LEFT JUSTIFY S1 NLEN
61735    LET S2 = STRING LEFT JUSTIFY S2 NLEN
61736    LET S3 = STRING LEFT JUSTIFY S3 NLEN
61737    LET A0 = ROUND(A0,2)
61738    LET A1 = ROUND(A1,2)
61739    LET CC = ROUND(CC,2)
61740    LEGEND 1 ^S1 ^A0
61741    LEGEND 2 ^S2 ^A1
61742    LEGEND 3 ^S3 ^CC
61743    .
61744    CHARACTER X BLANK
61745    LINE BLANK SOLID
61746    .
61747    PLOT Y PRED VS X
61748
61749-----STRING LENGTH-----------------------------------------------------
61750
61751STRING LENGTH
61752
61753Name:
61754    STRING LENGTH
61755
61756Type:
61757    Let Subcommand
61758
61759Purpose:
61760    Return the number of characters in a previously defined string.
61761
61762Syntax:
61763    LET <nlen> = STRING LENGTH  <sorg>
61764    where <nlen> is a parameter containing the returned length
61765              of the string;
61766    and   <sorg> is the name of the string.
61767
61768Examples:
61769    LET NLEN = STRING LENGTH S1
61770
61771Default:
61772    None
61773
61774Synonyms:
61775    None
61776
61777Related Commands:
61778    LET FUNCTION        = Defines a function.
61779    LET STRING          = Defines a string.
61780    READ STRING         = Reads a string from a file.
61781    SUBSTITUTE CHARACTE = Substitute the value of a string or parameter.
61782    &                   = Concatenate two strings.
61783    SUBTRING            = Extract a substring from an existing string.
61784    STRING INDEX        = Extract the start/stop positions of a substring
61785                          within a string.
61786    STRING CONCATENATE  = Concatenate one or more previously defined
61787                          strings.
61788    STRING EDIT         = Edit a string.
61789    STRING MERGE        = Insert a string into another string without
61790                          overwrite.
61791    STRING REPLACE      = Insert a string into another string with
61792                          overwrite.
61793    LOWER CASE          = Convert a string to lower case.
61794    UPPER CASE          = Convert a string to upper case.
61795    CHARACTER           = Convert numeric values to strings based on
61796                          the ASCII collating sequence.
61797    ICHAR               = Convert a string to numeric values based on
61798                          the ASCII collating sequence.
61799    GROUP LABEL         = Define the text for group labels.
61800
61801Applications:
61802    Data Management
61803
61804Implementation Date:
61805    11/2008
61806
61807Program:
61808    LET STRING S1 = file23.dat
61809    LET NLEN = STRING LENGTH S1
61810
61811    The resulting value of NLEN is 10.
61812
61813-----STRING MERGE-----------------------------------------------------
61814
61815STRING MERGE
61816
61817Name:
61818    STRING MERGE
61819
61820Type:
61821    Let Subcommand
61822
61823Purpose:
61824    Insert the contents of one string into another string at a
61825    specified position.
61826
61827Description:
61828    This command is used to insert the contents of one string
61829    into an arbitrary position of another string.  For example,
61830    if the original string is
61831
61832         FILE.DAT
61833
61834    and the insertion string is
61835
61836         99
61837
61838    and the merge position is given as 5, then the resulting
61839    merged string would be
61840
61841         FILE99.DAT
61842
61843    Note that if the the merge position is 5, then the
61844    insertion string starts at position 5 (i.e., the position
61845    parameter is the before position rather than the after
61846    position).
61847
61848    The STRING REPLACE command performs a similar function.
61849    However, the original string is not shifted.  In the above
61850    example, the resulting string from the STRING REPLACE command
61851    would be
61852
61853         FILE99AT
61854
61855    The STRING EDIT command can be used to perform more
61856    general edits of a string.
61857
61858Syntax:
61859    LET <sout> = STRING MERGE  <sorg>  <snew>  <nstart>
61860    where <sout> is the name of the resulting string;
61861          <sorg> is the name of the original string;
61862          <snew> is the name of the insertion string;
61863    and   <nstart> is the merge position.
61864
61865Examples:
61866    LET SOUT = STRING MERGE S1 SNEW NSTART
61867
61868Note:
61869    The name of the new string can be the same as the original
61870    string.  For example,
61871
61872        LET FNAME = STRING MERGE FNAME SNEW NSTART
61873
61874Note:
61875    Both strings on the right hand side of the equal sign must be
61876    previously existing strings.  That is, expressions are not allowed.
61877    For example, instead of
61878
61879        LET FNAME = STRING MERGE FNAME  ".dat"  NSTART
61880
61881    you need to do
61882
61883        LET STRING SNEW = .dat
61884        LET FNAME = STRING MERGE FNAME  SNEW  NSTART
61885
61886    The starting position can be either a parameter or a numeric
61887    value.  However, it cannot be a numeric expression.  So
61888
61889        LET FNAME = STRING MERGE FNAME  SNEW  NSTART
61890        LET FNAME = STRING MERGE FNAME  SNEW  5
61891
61892    are both allowed but
61893
61894        LET FNAME = STRING MERGE FNAME  SNEW  NLEN/2
61895
61896    is not allowed.  You would need to enter this as
61897
61898        LET NSTART = NLEN/2
61899        LET FNAME = STRING MERGE FNAME  SNEW  NSTART
61900
61901Note:
61902    The total number of characters that DATAPLOT can use for storing
61903    functions and strings is set when DATAPLOT is built.  The current
61904    default (11/2008) is 50,000 characters.  Previous versions may set
61905    this limit at 1,000 or 10,000 characters.  This limit applies to the
61906    combined number of characters for all functions and strings.
61907
61908Default:
61909    None
61910
61911Synonyms:
61912    None
61913
61914Related Commands:
61915    LET FUNCTION        = Defines a function.
61916    LET STRING          = Defines a string.
61917    READ STRING         = Reads a string from a file.
61918    SUBSTITUTE CHARACTE = Substitute the value of a string or parameter.
61919    &                   = Concatenate two strings.
61920    SUBTRING            = Extract a substring from an existing string.
61921    STRING INDEX        = Extract the start/stop positions of a substring
61922                          within a string.
61923    STRING CONCATENATE  = Concatenate one or more previously defined
61924                          strings.
61925    STRING LENGTH       = Return the length of a string.
61926    STRING EDIT         = Edit a string.
61927    STRING REPLACE      = Insert a string into another string with
61928                          overwrite.
61929    LOWER CASE          = Convert a string to lower case.
61930    UPPER CASE          = Convert a string to upper case.
61931    CHARACTER           = Convert numeric values to strings based on
61932                          the ASCII collating sequence.
61933    ICHAR               = Convert a string to numeric values based on
61934                          the ASCII collating sequence.
61935    GROUP LABEL         = Define the text for group labels.
61936
61937Applications:
61938    Data Management
61939
61940Implementation Date:
61941    11/2008
61942
61943Program 1:
61944    LET STRING S1 = file.dat
61945    LET STRING S2 = 23
61946    LET NPOS = 5
61947    LET SOUT = STRING MERGE S1 S2 NPOS
61948
61949    The resulting string SOUT will contain
61950
61951       file23.txt
61952
61953Program 2:
61954    .  Assume we have variables X and Y in the files "file1.dat" to
61955    .  "file10.dat" and we want to plot each of these in turn.
61956    .
61957    LET STRING SOLD = file.dat
61958    LET NPOS = 5
61959    TITLE CASE ASIS
61960    LOOP FOR K = 1 1 10
61961        LET STRING S2 = ^K
61962        LET FNAME = STRING MERGE SOLD S2 NPOS
61963        READ ^FNAME  Y X
61964        TITLE Data from File ^SOUT
61965        PLOT Y X
61966        DELETE Y X
61967    END OF LOOP
61968
61969-----STRING REMOVE PUNCTUATION--------------------------------------
61970
61971STRING REMOVE PUNCTUATION
61972
61973Name:
61974    STRING REMOVE PUNCTUATION
61975
61976Type:
61977    Let Subcommand
61978
61979Purpose:
61980    Remove the punctuation characters from a string.
61981
61982Description:
61983    The following punctuation characters will be removed from the string
61984
61985        !"'#$%&\()*+,-./:;<=>?@[]^_`~{}|
61986
61987    If you would like to define your own list of characters to delete,
61988    you can use the command STRING DELETE.
61989
61990Syntax:
61991    LET <sout> = STRING REMOVE PUNCTUATION  <sorg>
61992    where <sout> is the name of the resulting string;
61993    and   <sorg> is the name of the original string.
61994
61995Examples:
61996    LET SOUT = STRING REMOVE PUNCTUATION STIN
61997
61998Note:
61999    The name of the new string can be the same as the original
62000    string.  For example,
62001
62002        LET STR = STRING REMOVE PUNCTUATION STR
62003
62004    In this case, STR will now contain the the string with punctuation
62005    characters removed rather than the original string.
62006
62007Note:
62008    The string on the right hand side of the equal sign must be a
62009    previously existing string.  That is, expressions are not allowed.
62010    For example, the following will result in an error message
62011
62012        LET STOUT = STRING REMOVE PUNCTUATION "alan.heckert@nist.gov"
62013
62014    you need to do
62015
62016        LET STRING SORG = alan.heckert@nist.gov
62017        LET SOUT = STRING REMOVE PUNCTUATION SORG
62018
62019    The name on the left hand side of the equal sign may be a
62020    previously existing string.  However, if it is a previously
62021    existing parameter, variable, or matrix name, an error will
62022    be reported and the requested string will not be created.
62023
62024Note:
62025    The total number of characters that DATAPLOT can use for storing
62026    functions and strings is set when DATAPLOT is built.  The current
62027    default (11/2008) is 50,000 characters.  Previous versions may set
62028    this limit at 1,000 or 10,000 characters.  This limit applies to the
62029    combined number of characters for all functions and strings.
62030
62031Default:
62032    None
62033
62034Synonyms:
62035    None
62036
62037Related Commands:
62038    STRING REMOVE SPACE       = Remove spaces from a string.
62039    STRING REMOVE WHITESPACE  = Remove white space characters from a string.
62040    STRING DELETE             = Remove user specifed characters from a
62041                                string.
62042    NUMBER OF WORDS           = Return the number of words in a string.
62043    UPPER CASE                = Convert a string to upper case.
62044    LOWER CASE                = Convert a string to lower case.
62045    LET FUNCTION              = Defines a function.
62046    LET STRING                = Defines a string.
62047    READ STRING               = Reads a string from a file.
62048    SUBSTITUTE CHARACTER (^)  = Substitute the value of a string or
62049                                parameter.
62050    CONCATENATE CHARACTER (&) = Concatenate two strings.
62051    SUBTRING                  = Extract a substring from an existing
62052                                string.
62053    STRING INDEX              = Extract the start/stop positions of a
62054                                substring within a string.
62055    STRING CONCATENATE        = Concatenate one or more previously
62056                                defined strings.
62057    STRING EDIT               = Edit a string.
62058    STRING MERGE              = Insert a string into another string
62059                                without overwrite.
62060    STRING LENGTH             = Return the length of a string.
62061    STRING WORD               = Extract a specified word from a string.
62062    CHARACTER                 = Convert numeric values to strings based
62063                                on the ASCII collating sequence.
62064    ICHAR                     = Convert a string to numeric values based
62065                                on the ASCII collating sequence.
62066    GROUP LABEL               = Define the text for group labels.
62067
62068Applications:
62069    Data Management
62070
62071Implementation Date:
62072    2018/10
62073
62074Program:
62075    read string stin
62076    alan.heckert@nist.gov;james.filliben@nist.gov
62077    let stout = string remove punctuation stin
62078    print stin stout
62079
62080-----STRING REMOVE SPACES------------------------------------------
62081
62082STRING REMOVE SPACES
62083
62084Name:
62085    STRING REMOVE SPACES
62086
62087Type:
62088    Let Subcommand
62089
62090Purpose:
62091    Remove the spaces from a string.
62092
62093Description:
62094    You can optionally remove all spaces, just the leading spaces, or
62095    just the trailing spaces from a string.
62096
62097Syntax 1:
62098    LET <sout> = STRING REMOVE SPACES  <sorg>
62099    where <sout> is the name of the resulting string;
62100    and   <sorg> is the name of the original string.
62101
62102    This syntax removes all spaces from the string.
62103
62104Syntax 2:
62105    LET <sout> = STRING REMOVE LEADING SPACES  <sorg>
62106    where <sout> is the name of the resulting string;
62107    and   <sorg> is the name of the original string.
62108
62109    This syntax removes only leading spaces from the string.
62110
62111Syntax 3:
62112    LET <sout> = STRING REMOVE TRAILING SPACES  <sorg>
62113    where <sout> is the name of the resulting string;
62114    and   <sorg> is the name of the original string.
62115
62116    This syntax removes only trailing spaces from the string.
62117
62118Examples:
62119    LET SOUT = STRING REMOVE SPACES STIN
62120    LET SOUT = STRING REMOVE LEADING SPACES STIN
62121    LET SOUT = STRING REMOVE TRAILING SPACES STIN
62122
62123Note:
62124    The name of the new string can be the same as the original
62125    string.  For example,
62126
62127        LET FNAME = STRING REMOVE SPACES FNAME
62128
62129    In this case, FNAME will now contain the the string with all spaces
62130    removed rather than the original string.
62131
62132Note:
62133    The string on the right hand side of the equal sign must be a
62134    previously existing string.  That is, expressions are not allowed.
62135    For example, the following will result in an error message
62136
62137        LET STOUT = STRING REMOVE SPACES "a b c d"
62138
62139    you need to do
62140
62141        LET STRING SORG = a b c d
62142        LET SOUT = STRING REMOVE SPACES SORG
62143
62144    The name on the left hand side of the equal sign may be a
62145    previously existing string.  However, if it is a previously
62146    existing parameter, variable, or matrix name, an error will
62147    be reported and the requested string will not be created.
62148
62149Note:
62150    The total number of characters that DATAPLOT can use for storing
62151    functions and strings is set when DATAPLOT is built.  The current
62152    default (11/2008) is 50,000 characters.  Previous versions may set
62153    this limit at 1,000 or 10,000 characters.  This limit applies to the
62154    combined number of characters for all functions and strings.
62155
62156Default:
62157    None
62158
62159Synonyms:
62160    None
62161
62162Related Commands:
62163    NUMBER OF WORDS           = Return the number of words in a string.
62164    UPPER CASE                = Convert a string to upper case.
62165    LOWER CASE                = Convert a string to lower case.
62166    LET FUNCTION              = Defines a function.
62167    LET STRING                = Defines a string.
62168    READ STRING               = Reads a string from a file.
62169    SUBSTITUTE CHARACTER (^)  = Substitute the value of a string or
62170                                parameter.
62171    CONCATENATE CHARACTER (&) = Concatenate two strings.
62172    SUBTRING                  = Extract a substring from an existing
62173                                string.
62174    STRING INDEX              = Extract the start/stop positions of a
62175                                substring within a string.
62176    STRING CONCATENATE        = Concatenate one or more previously
62177                                defined strings.
62178    STRING EDIT               = Edit a string.
62179    STRING MERGE              = Insert a string into another string
62180                                without overwrite.
62181    STRING LENGTH             = Return the length of a string.
62182    STRING WORD               = Extract a specified word from a string.
62183    CHARACTER                 = Convert numeric values to strings based
62184                                on the ASCII collating sequence.
62185    ICHAR                     = Convert a string to numeric values based
62186                                on the ASCII collating sequence.
62187    GROUP LABEL               = Define the text for group labels.
62188
62189Applications:
62190    Data Management
62191
62192Implementation Date:
62193    2015/03
62194
62195Program:
62196    let string stin = a b c d
62197    let stout = string remove spaces stin
62198    print stin stout
62199
62200-----STRING REMOVE WHITESPACE------------------------------------------
62201
62202STRING REMOVE WHITESPACE
62203
62204Name:
62205    STRING REMOVE WHITESPACE
62206
62207Type:
62208    Let Subcommand
62209
62210Purpose:
62211    Remove the white space characters from a string.
62212
62213Description:
62214    The STRING REMOVE SPACES command can be used to remove spaces from a
62215    string.  This command will remove, in addition to spaces, the
62216    non-printing characters (i.e., codes 0 to 32 and 127 in the ASCII
62217    collating sequence).  Currently, Dataplot only checks for characters
62218    in the 0 - 127 range of the ASCII collating sequence.
62219
62220Syntax:
62221    LET <sout> = STRING REMOVE WHITESPACE  <sorg>
62222    where <sout> is the name of the resulting string;
62223    and   <sorg> is the name of the original string.
62224
62225Examples:
62226    LET SOUT = STRING REMOVE WHITESPACE STIN
62227
62228Note:
62229    The name of the new string can be the same as the original
62230    string.  For example,
62231
62232        LET STR = STRING REMOVE WHITESPACE STR
62233
62234    In this case, STR will now contain the the string with all white
62235    space characters removed rather than the original string.
62236
62237Note:
62238    The string on the right hand side of the equal sign must be a
62239    previously existing string.  That is, expressions are not allowed.
62240    For example, the following will result in an error message
62241
62242        LET STOUT = STRING REMOVE WHITESPACE "a b c d"
62243
62244    you need to do
62245
62246        LET STRING SORG = a b c d
62247        LET SOUT = STRING REMOVE SPACES SORG
62248
62249    The name on the left hand side of the equal sign may be a
62250    previously existing string.  However, if it is a previously
62251    existing parameter, variable, or matrix name, an error will
62252    be reported and the requested string will not be created.
62253
62254Note:
62255    The total number of characters that DATAPLOT can use for storing
62256    functions and strings is set when DATAPLOT is built.  The current
62257    default (11/2008) is 50,000 characters.  Previous versions may set
62258    this limit at 1,000 or 10,000 characters.  This limit applies to the
62259    combined number of characters for all functions and strings.
62260
62261Default:
62262    None
62263
62264Synonyms:
62265    None
62266
62267Related Commands:
62268    STRING REMOVE SPACE       = Remove spaces from a string.
62269    STRING REMOVE PUNCTUATION = Remove punctuation from a string.
62270    STRING DELETE             = Remove user specifed characters from a
62271                                string.
62272    NUMBER OF WORDS           = Return the number of words in a string.
62273    UPPER CASE                = Convert a string to upper case.
62274    LOWER CASE                = Convert a string to lower case.
62275    LET FUNCTION              = Defines a function.
62276    LET STRING                = Defines a string.
62277    READ STRING               = Reads a string from a file.
62278    SUBSTITUTE CHARACTER (^)  = Substitute the value of a string or
62279                                parameter.
62280    CONCATENATE CHARACTER (&) = Concatenate two strings.
62281    SUBTRING                  = Extract a substring from an existing
62282                                string.
62283    STRING INDEX              = Extract the start/stop positions of a
62284                                substring within a string.
62285    STRING CONCATENATE        = Concatenate one or more previously
62286                                defined strings.
62287    STRING EDIT               = Edit a string.
62288    STRING MERGE              = Insert a string into another string
62289                                without overwrite.
62290    STRING LENGTH             = Return the length of a string.
62291    STRING WORD               = Extract a specified word from a string.
62292    CHARACTER                 = Convert numeric values to strings based
62293                                on the ASCII collating sequence.
62294    ICHAR                     = Convert a string to numeric values based
62295                                on the ASCII collating sequence.
62296    GROUP LABEL               = Define the text for group labels.
62297
62298Applications:
62299    Data Management
62300
62301Implementation Date:
62302    2018/10
62303
62304Program:
62305    let string stin = a b c d
62306    let stout = string remove whitespace stin
62307    print stin stout
62308
62309-----STRING REPLACE-----------------------------------------------------
62310
62311STRING REPLACE
62312
62313Name:
62314    STRING REPLACE
62315
62316Type:
62317    Let Subcommand
62318
62319Purpose:
62320    Insert the contents of one string into another string at a
62321    specified position.
62322
62323Description:
62324    This command is used to insert the contents of one string
62325    into an arbitrary position of another string.  For example,
62326    if the original string is
62327
62328         FILExx.DAT
62329
62330    and the insertion string is
62331
62332         99
62333
62334    and the replacement position is given as 5, then the
62335    resulting string would be
62336
62337         FILE99.DAT
62338
62339    Note that the replacement string overwrites the contents
62340    of the original string.  Also note that if the the replacement
62341    position is 5, then the replacement string starts at position 5
62342    (i.e., the position parameter is the before position rather than
62343    the after position).
62344
62345    The STRING MERGE command performs a similar function.
62346    However, the original string is shifted to the right at the
62347    replacement position rather than overwritten.  In the above
62348    example, the resulting string from the STRING MERGE command
62349    would be
62350
62351         FILE99xx.DAT
62352
62353    The STRING EDIT command can be used to perform more
62354    general edits of a string.
62355
62356Syntax:
62357    LET <sout> = STRING REPLACE  <sorg>  <snew>  <nstart>
62358    where <sout> is the name of the resulting string;
62359          <sorg> is the name of the original string;
62360          <snew> is the name of the replacement string;
62361    and   <nstart> is the replacement position.
62362
62363Examples:
62364    LET SOUT = STRING REPLACE S1 SNEW NSTART
62365
62366Note:
62367    The name of the new string can be the same as the original
62368    string.  For example,
62369
62370        LET FNAME = STRING REPLACE FNAME SNEW NSTART
62371
62372Note:
62373    Both strings on the right hand side of the equal sign must be
62374    previously existing strings.  That is, expressions are not
62375    allowed.  For example, instead of
62376
62377        LET FNAME = STRING REPLACE FNAME  ".dat"  NSTART
62378
62379    you need to do
62380
62381        LET STRING SNEW = .dat
62382        LET FNAME = STRING REPLACE FNAME  SNEW  NSTART
62383
62384    The starting position can be either a parameter or a numeric
62385    value.  However, it cannot be a numeric expression.  So
62386
62387        LET FNAME = STRING REPLACE FNAME  SNEW  NSTART
62388        LET FNAME = STRING REPLACE FNAME  SNEW  5
62389
62390    are both allowed but
62391
62392        LET FNAME = STRING REPLACE FNAME  SNEW  NLEN/2
62393
62394    is not allowed.  You would need to enter this as
62395
62396        LET NSTART = NLEN/2
62397        LET FNAME = STRING REPLACE FNAME  SNEW  NSTART
62398
62399Note:
62400    The total number of characters that DATAPLOT can use for storing
62401    functions and strings is set when DATAPLOT is built.  The current
62402    default (11/2008) is 50,000 characters.  Previous versions may set
62403    this limit at 1,000 or 10,000 characters.  This limit applies to the
62404    combined number of characters for all functions and strings.
62405
62406Default:
62407    None
62408
62409Synonyms:
62410    None
62411
62412Related Commands:
62413    LET FUNCTION        = Defines a function.
62414    LET STRING          = Defines a string.
62415    READ STRING         = Reads a string from a file.
62416    SUBSTITUTE CHARACTE = Substitute the value of a string or parameter.
62417    &                   = Concatenate two strings.
62418    SUBTRING            = Extract a substring from an existing string.
62419    STRING INDEX        = Extract the start/stop positions of a substring
62420                          within a string.
62421    STRING CONCATENATE  = Concatenate one or more previously defined
62422                          strings.
62423    STRING LENGTH       = Return the length of a string.
62424    STRING EDIT         = Edit a string.
62425    STRING MERGE        = Insert a string into another string without
62426                          overwrite.
62427    LOWER CASE          = Convert a string to lower case.
62428    UPPER CASE          = Convert a string to upper case.
62429    CHARACTER           = Convert numeric values to strings based on
62430                          the ASCII collating sequence.
62431    ICHAR               = Convert a string to numeric values based on
62432                          the ASCII collating sequence.
62433    GROUP LABEL         = Define the text for group labels.
62434
62435Applications:
62436    Data Management
62437
62438Implementation Date:
62439    11/2008
62440
62441Program 1:
62442    LET STRING S1 = filexx.dat
62443    LET STRING S2 = 23
62444    LET NPOS = 5
62445    LET SOUT = STRING REPLACE S1 S2 NPOS
62446
62447    The resulting string SOUT will contain
62448
62449       file23.txt
62450
62451Program 2:
62452    .  Assume we have variables X and Y in the files "file1.dat" to
62453    .  "file10.dat" and we want to plot each of these in turn.
62454    .
62455    LET STRING SOLD = filex.dat
62456    LET NPOS = 5
62457    TITLE CASE ASIS
62458    LOOP FOR K = 1 1 9
62459        LET STRING S2 = ^K
62460        LET FNAME = STRING REPLACE SOLD S2 NPOS
62461        READ ^FNAME  Y X
62462        TITLE Data from File ^SOUT
62463        PLOT Y X
62464        DELETE Y X
62465    END OF LOOP
62466
62467-----STRING SPACE (SET)--------------------------------------------
62468
62469STRING SPACE
62470
62471Name:
62472    STRING SPACE (SET)
62473
62474Type:
62475    Set Subcommand
62476
62477Purpose:
62478    Specify how a "SP()" is interpreted in a string.
62479
62480Description:
62481    By default, the command
62482
62483        LET STRING S = SP()
62484
62485    will create a string S with a single space character.
62486
62487    However, if you do something like
62488
62489       LET STRING S = SP()
62490       LET STRING T = ^S
62491
62492    you will get an error message and the string T will not be
62493    created.  This is due to the fact that the substitution
62494    (i.e., the "^") is performed before the command is
62495    interpreted.  That is, the command that Dataplot tries to
62496    interpret is
62497
62498        LET STRING T =
62499
62500    However, if you enter the commands
62501
62502       SET STRING SPACE IGNORE
62503       LET STRING S = SP()
62504       SET STRING SPACE EXPAND
62505       LET STRING T = ^S
62506
62507    then Dataplot sees the command
62508
62509       LET STRING T = SP()
62510
62511    and it creates the string T with a single space character.
62512
62513    Since in most cases you want the SP() to be converted to a
62514    single space, EXPAND is the default.
62515
62516Syntax:
62517    SET STRING SPACE <EXPAND/IGNORE>
62518
62519    Specifying EXPAND means that if SP() is encountered in a
62520    LET STRING command, it will be converted to a single space.
62521    Specifying IGNORE means that if SP() is encountered in a
62522    LET STRING command, it will left as SP().
62523
62524    Any argument other than PROMPT or TERMINATE will be treated as
62525    equivalent to IGNORE (for example, SET FATAL ERROR DEFAULT).
62526
62527Examples:
62528    SET STRING SPACE IGNORE
62529    SET STRING SPACE EXPAND
62530
62531Default:
62532    EXPAND is the default.
62533
62534Synonyms:
62535    OFF and NO will be interpreted as IGNORE.  All other arguments
62536    will be interpreted as EXPAND.
62537
62538Related Commands:
62539    LET STRING    = Define a string.
62540    ^             = Substitute the value of a string or parameter.
62541
62542Applications:
62543    String Manipulation
62544
62545Implementation Date:
62546    2009/02
62547
62548Program:
62549    . The following sequence of commands results in an error
62550    . for the string st2.
62551    .
62552    let string st1 = sp()
62553    let string st2 = ^st1
62554    .
62555    . The following successfully creates st2 as a string with
62556    . single blank character.
62557    .
62558    set string space ignore
62559    let string st1 = sp()
62560    set string space expand
62561    let string st2 = ^st1
62562
62563-----STRING SPLIT-------------------------------------------
62564
62565STRING SPLIT
62566
62567Name:
62568    STRING SPLIT
62569
62570Type:
62571    Let Subcommand
62572
62573Purpose:
62574    Extract the individual words from a currently existing string.
62575
62576Description:
62577    This command is used to extract the individual words from a string.
62578
62579    This command is an alternative to using STRING WORD.  STRING WORD is
62580    used to extract a specific word in the string while STRING SPLIT will
62581    extract all the words in a string to individual strings.  Note that
62582    only the base name will be specified.  For example, if you specify
62583    SOUT as the base name and there are three words in the original
62584    string, then string SOUT1 will contain the first word, SOUT2 will
62585    contain the second word, and SOUT3 will contain the third word.
62586
62587    In Dataplot, spaces are used to separate words.
62588
62589Syntax:
62590    LET <sout> = STRING SPLIT  <sorg>
62591    where <sorg> is the name of a pre-existing string.
62592    and   <sout> is the base name of the resulting strings;
62593
62594    The <sout> defines the base name.  An integer index will be appended
62595    to the base name for each string (the index starts at 1).
62596
62597Examples:
62598    LET STBASE = STRING SPLIT SORG
62599
62600Note:
62601    The original string being processed must be a pre-existing string.
62602    If you want to split literal text, you need to do something like
62603
62604        LET STRING SORG = xxxx yyyy zzzz
62605        LET SOUT = STRING SPLIT SORG
62606
62607    Using
62608
62609        LET SOUT = STRING SPLIT xxxx yyyy zzzz
62610
62611    will not work.  It will try to see if "xxxx" is the name of currently
62612    defined string.  If it is not, no new strings will be created.
62613    Enclosing the literal text in quotes will not make this work.
62614
62615    The name on the left hand side of the equal sign may be a
62616    previously existing string.  However, if it is a previously
62617    existing parameter, variable, or matrix name, an error will
62618    be reported and the requested string will not be created.
62619
62620Note:
62621    By default, Dataplot uses a space as the word delimiter.  You can
62622    specify an alternative character to be the word delimiter with
62623    the command
62624
62625        SET WORD DELIMITER  <char>
62626
62627    with <char> denoting the character to use as the word delimiter.
62628
62629Note:
62630    The total number of characters that DATAPLOT can use for storing
62631    functions and strings is set when DATAPLOT is built.  The current
62632    default (11/2008) is 50,000 characters.  Previous versions may set
62633    this limit at 1,000 or 10,000 characters.  This limit applies to
62634    the combined number of characters for all functions and strings.
62635
62636Default:
62637    None
62638
62639Synonyms:
62640    None
62641
62642Related Commands:
62643    STRING CONCATENATE  = Concatenate two or more strings.
62644    &                   = Concatenate two strings.
62645    SUBSTITUTE CHARACTE = Substitute the value of a string or parameter.
62646    LET FUNCTION        = Defines a function.
62647    LET STRING          = Defines a string.
62648    READ STRING         = Reads a string from a file.
62649    SUBTRING            = Extract a substring from an existing string.
62650    STRING INDEX        = Extract the start/stop positions of a substring
62651                          within a string.
62652    STRING EDIT         = Edit a string.
62653    STRING LENGTH       = Return the length of a string.
62654    STRING MERGE        = Insert a string into another string without
62655                          overwrite.
62656    STRING REPLACE      = Insert a string into another string with
62657                          overwrite.
62658    LOWER CASE          = Convert a string to lower case.
62659    UPPER CASE          = Convert a string to upper case.
62660    CHARACTER           = Convert numeric values to strings based on
62661                          the ASCII collating sequence.
62662    ICHAR               = Convert a string to numeric values based on
62663                          the ASCII collating sequence.
62664    GROUP LABEL         = Define the text for group labels.
62665
62666Applications:
62667    Data Management
62668
62669Implementation Date:
62670    2018/10
62671
62672Program:
62673    LET STRING SORG = X1 X2 X3 X4 X5
62674    LET SNAME = STRING SPLIT SORG
62675    PRINT SNAME1 SNAME2 SNAME3 SNAME4 SNAME5
62676
62677-----STRING STARTS WITH----------------------------------------------
62678
62679STRING STARTS WITH
62680
62681Name:
62682    STRING STARTS WITH
62683
62684Type:
62685    Let Subcommand
62686
62687Purpose:
62688    Return a 1 if a string starts with a specified substring
62689    and a 0 if it does not.
62690
62691Syntax:
62692    LET <iflag> = STRING STARTS WITH  <s1>  <s2>
62693    where <iflag> is a parameter containing a 1 if <s1> starts
62694              with <s2> and 0 otherwise;
62695          <s1> is the name of a pre-existing string;
62696    and   <s2> is the name of a pre-existing string.
62697
62698Examples:
62699    LET IFLAG = STRING STARTS WITH S1  S2
62700
62701Note:
62702    The strings on the right hand side of the equal sign must be
62703    previously existing strings.  That is, expressions are not allowed.
62704    For example, the following will result in an error message
62705
62706        LET IFLAG = STRING STARTS WITH "alan.heckert@nist.gov"  "alan"
62707
62708    you need to do
62709
62710        LET STRING SORG = alan.heckert@nist.gov
62711        LET STRING SMATCH = alan
62712        LET SOUT = STRING STARTS WITH SORG SMATCH
62713
62714    The name on the left hand side of the equal sign should either be a
62715    previously existing parameter or not previously defined.  If it is a
62716    previously existing string, variable, or matrix name, an error will
62717    be reported and the requested parameter will not be created.
62718
62719Note:
62720    The total number of characters that DATAPLOT can use for storing
62721    functions and strings is set when DATAPLOT is built.  The current
62722    default (11/2008) is 50,000 characters.  Previous versions may set
62723    this limit at 1,000 or 10,000 characters.  This limit applies to
62724    the combined number of characters for all functions and strings.
62725
62726Default:
62727    None
62728
62729Synonyms:
62730    None
62731
62732Related Commands:
62733    STRING ENDS WITH    = Check whether a string ends with a
62734                          specified substring.
62735    LET FUNCTION        = Defines a function.
62736    LET STRING          = Defines a string.
62737    READ STRING         = Reads a string from a file.
62738    SUBSTITUTE CHARACTE = Substitute the value of a string or parameter.
62739    &                   = Concatenate two strings.
62740    SUBTRING            = Extract a substring from an existing string.
62741    STRING LENGTH       = Return the length of the string.
62742    STRING INDEX        = Extract the start/stop positions of a substring
62743                          within a string.
62744    STRING CONCATENATE  = Concatenate one or more previously defined
62745                          strings.
62746    STRING EDIT         = Edit a string.
62747    STRING MERGE        = Insert a string into another string without
62748                          overwrite.
62749    STRING REPLACE      = Insert a string into another string with
62750                          overwrite.
62751    LOWER CASE          = Convert a string to lower case.
62752    UPPER CASE          = Convert a string to upper case.
62753    CHARACTER           = Convert numeric values to strings based on
62754                          the ASCII collating sequence.
62755    ICHAR               = Convert a string to numeric values based on
62756                          the ASCII collating sequence.
62757    GROUP LABEL         = Define the text for group labels.
62758
62759Applications:
62760    Data Management
62761
62762Implementation Date:
62763    2018/10
62764
62765Program:
62766    LET STRING S1 = alan.heckert@gmail.com
62767    LET STRING S2 = alan
62768    LET IFLAG = STRING STARTS WITH S1 S2
62769
62770-----STRING SUBSET COUNT-----------------------------------------
62771
62772STRING SUBSET COUNT
62773
62774Name:
62775    STRING SUBSET COUNT
62776
62777Type:
62778    Let Subcommand
62779
62780Purpose:
62781    Return the number of times a substring occurs within another string.
62782
62783Syntax:
62784    LET <count> = STRING SUBSET COUNT  <sorg>  <smatch>
62785    where <count> is a parameter containing the number of times <smatch>
62786              is found in <sorg>;
62787          <sorg> is the name of a pre-existing string;
62788    and   <smatch> is the name of a pre-existing string.
62789
62790Examples:
62791    LET NC = STRING SUBSET COUNT SORG SMATCH
62792
62793Note:
62794    The strings on the right hand side of the equal sign must be
62795    previously existing strings.  That is, expressions are not allowed.
62796    For example, the following will result in an error message
62797
62798        LET NC = STRING SUBSET COUNT "alan.heckert@nist.gov"  "@"
62799
62800    you need to do
62801
62802        LET STRING SORG = alan.heckert@nist.gov
62803        LET STRING SMATCH = @
62804        LET NC = STRING SUBSET COUNT SORG SMATCH
62805
62806    The name on the left hand side of the equal sign should either be a
62807    previously existing parameter or not previously defined.  If it is a
62808    previously existing string, variable, or matrix name, an error will
62809    be reported and the requested parameter will not be created.
62810
62811Note:
62812    The total number of characters that Dataplot can use for storing
62813    functions and strings is set when Dataplot is built.  The current
62814    default (11/2008) is 50,000 characters.
62815
62816Default:
62817    None
62818
62819Synonyms:
62820    None
62821
62822Related Commands:
62823    SUBTRING            = Extract a substring from an existing string.
62824    STRING ENDS WITH    = Check whether a string starts with a
62825                          specified substring.
62826    STRING ENDS WITH    = Check whether a string ends with a
62827                          specified substring.
62828    LET STRING          = Defines a string.
62829    READ STRING         = Reads a string from a file.
62830    SUBSTITUTE CHARACTE = Substitute the value of a string or parameter.
62831    &                   = Concatenate two strings.
62832    STRING LENGTH       = Return the length of the string.
62833    STRING INDEX        = Extract the start/stop positions of a substring
62834                          within a string.
62835    STRING CONCATENATE  = Concatenate one or more previously defined
62836                          strings.
62837    STRING EDIT         = Edit a string.
62838    STRING MERGE        = Insert a string into another string without
62839                          overwrite.
62840    STRING REPLACE      = Insert a string into another string with
62841                          overwrite.
62842    LOWER CASE          = Convert a string to lower case.
62843    UPPER CASE          = Convert a string to upper case.
62844    CHARACTER           = Convert numeric values to strings based on
62845                          the ASCII collating sequence.
62846    ICHAR               = Convert a string to numeric values based on
62847                          the ASCII collating sequence.
62848    GROUP LABEL         = Define the text for group labels.
62849
62850Applications:
62851    Data Management
62852
62853Implementation Date:
62854    2019/02
62855
62856Program:
62857    LET STRING S1 = alan.heckert@nist.gov,james.filliben@nist.gov
62858    LET STRING S2 = @
62859    LET NNAMES = STRING SUBSET COUNT S1 S2
62860
62861-----STRING VARIABLE (SET)---------------------------------------
62862
62863SET STRING VARIABLE
62864
62865Name:
62866    STRING VARIABLE (SET)
62867
62868Type:
62869    Set Subcommand
62870
62871Purpose:
62872    Specify whether the READ and STRING VARIABLE commands will overwrite
62873    the contents of the dpzchf.dat file or append the new data to the
62874    current contents of the dpzchf.dat file.
62875
62876Description:
62877    The READ command can optionally read character variables
62878    (HELP SET CONVERT CHARACTER).  Dataplot saves the character
62879    variables in the file "dpzchf.dat".  In addition, the
62880    LET ... = STRING VARIABLE command can be used to create a character
62881    variable from a list of strings.  This variable will be saved in
62882    the "dpzchf.dat" as well.
62883
62884    By default, Dataplot overwrites the current contents of the
62885    "dpzchf.dat" file whenever a READ or STRING VARIABLE command
62886    creates new character variables.  To have these commands append
62887    the contents of the new character variables to the current contents
62888    of "dpzchf.dat", enter the command
62889
62890         SET STRING VARIABLE APPEND
62891
62892    To reset the default of overwriting the current contents of
62893    "dpzchf.dat", enter
62894
62895         SET STRING VARIABLE OVERWRITE
62896
62897Syntax:
62898    SET STRING VARIABLE <OVERWRITE/APPEND>
62899    where OVERWRITE replaces the current contents of "dpzchf.dat"
62900    and APPEND appends to the current contents of "dpzchf.dat".
62901
62902Examples:
62903    SET STRING VARIABLE APPEND
62904    SET STRING VARIABLE OVERWRITE
62905
62906Default:
62907    None
62908
62909Synonyms:
62910    None
62911
62912Related Commands:
62913    STRING VARIABLE    = Create a character variable from a list of
62914                         strings.
62915    READ               = Read numeric/character variables from a file.
62916
62917Applications:
62918    Character Data
62919
62920Implementation Date:
62921    2019/09
62922
62923Program:
62924    set string variable overwrite
62925    let string s1 = Group 1
62926    let string s2 = Group 2
62927    let string s3 = Group 3
62928    let ix = string variable s1 s2 s3
62929    list dpzchf.dat
62930    pause
62931    .
62932    set string variable append
62933    let string s4 = Group 4
62934    let string s5 = Group 5
62935    let string s6 = Group 6
62936    let iy = string variable s4 s5 s6
62937    list dpzchf.dat
62938
62939-----STRING VARIABLE-------------------------------------------
62940
62941STRING VARIABLE
62942
62943Name:
62944    STRING VARIABLE
62945
62946Type:
62947    Let Subcommand
62948
62949Purpose:
62950    Create a string variable from a list of strings and save it to
62951    the file dpzchf.dat.
62952
62953Description:
62954    The Dataplot READ command can optionally read character data.  The
62955    READ command saves these character variables to the file
62956    "dpzchf.dat".
62957
62958    The STRING VARIABLE command allows you to add character variables
62959    to "dpzchf.dat" from a list of scalar strings.
62960
62961    You can specify whether you want Dataplot to overwrite the current
62962    contents of "dpzchf.dat" or append the new variable to the current
62963    contents of "dpzchf.dat".
62964
62965    To have the STRING VARIABLE command overwrite the current contents
62966    of "dpzchf.dat", enter
62967
62968        SET CHARACTER VARIABLE OVERWRITE
62969
62970    To have the STRING VARIABLE command append the new string variable to
62971    the current contents of "dpzchf.dat", enter
62972
62973        SET CHARACTER VARIABLE APPEND
62974
62975Syntax:
62976    LET <sout> = STRING VARIABLE  <s1>  ... <sk>
62977    where <sout> is the name of the resulting string variable;
62978    and   <s1> ... <sk> is a list of one or more previously defined
62979          strings or literal text strings.
62980
62981    Literal text strings should be enclosed in quotes.  If an
62982    argument on the right hand side of the equal sign is not enclosed
62983    in quotes, it will be assumed to be a previously defined string.
62984    If an argument is not enclosed in quotes and is not the name of
62985    a previously defined string, an error message will be returned and
62986    <sout> will not be created.
62987
62988    The TO syntax is supported for the argument list (see the Examples).
62989
62990Examples:
62991    LET IX = STRING VARIABLE  S1 S2 S3
62992    LET IX = STRING VARIABLE  S1 TO S10
62993    LET IX = STRING VARIABLE  "Group 1"  "Group 2"  "Group 3"
62994    LET IX = STRING VARIABLE  "Group 1"  S2  "Group 3" S4
62995
62996Default:
62997    None
62998
62999Synonyms:
63000    None
63001
63002Related Commands:
63003    READ                = Read variables from the terminal or a file.
63004    READ STRING         = Reads a string from a file.
63005    LET STRING          = Defines a string.
63006    STRING CONCATENATE  = Concatenate two or more strings.
63007    &                   = Concatenate two strings.
63008    SUBSTITUTE CHARACTE = Substitute the value of a string or parameter.
63009    LET FUNCTION        = Defines a function.
63010    SUBTRING            = Extract a substring from an existing string.
63011    STRING INDEX        = Extract the start/stop positions of a substring
63012                          within a string.
63013    STRING EDIT         = Edit a string.
63014    STRING LENGTH       = Return the length of a string.
63015    STRING MERGE        = Insert a string into another string without
63016                          overwrite.
63017    STRING REPLACE      = Insert a string into another string with
63018                          overwrite.
63019    LOWER CASE          = Convert a string to lower case.
63020    UPPER CASE          = Convert a string to upper case.
63021    CHARACTER           = Convert numeric values to strings based on
63022                          the ASCII collating sequence.
63023    ICHAR               = Convert a string to numeric values based on
63024                          the ASCII collating sequence.
63025    GROUP LABEL         = Define the text for group labels.
63026
63027Applications:
63028    Data Management
63029
63030Implementation Date:
63031    2019/10
63032
63033Program 1:
63034    set string variable overwrite
63035    let ix = string variable "Group 1" "Group 2"  "Group 3"
63036    list dpzchf.dat
63037
63038Program 2:
63039    set string variable overwrite
63040    let string s1 = Group 1
63041    let string s2 = Group 2
63042    let string s3 = Group 3
63043    let ix = string variable s1 s2 s3
63044    list dpzchf.dat
63045    pause
63046    .
63047    set string variable append
63048    let string s4 = Group 4
63049    let string s5 = Group 5
63050    let string s6 = Group 6
63051    let iy = string variable s4 s5 s6
63052    list dpzchf.dat
63053
63054-----STRING WORD-----------------------------------------------------
63055
63056STRING WORD
63057
63058Name:
63059    STRING WORD
63060
63061Type:
63062    Let Subcommand
63063
63064Purpose:
63065    Extract a specified word from a string.
63066
63067Description:
63068    There may be times when it is useful to extract the individual
63069    words in a string.
63070
63071    Dataplot delineates words in a string by spaces.  It will treat
63072    non-printing characters in the string as spaces.  That is,
63073    any character in the string with an ASCII collating index less
63074    than or equal to 32 or greater than 127 will be treated as a space.
63075    In particular, tabs will be treated as spaces.  However, hyphens
63076    and other special characters such as "&" will not be treated as
63077    word boundaries.
63078
63079Syntax:
63080    LET <sout> = STRING WORD  <sorg>  <nword>
63081    where <sout> is the name of the resulting string;
63082          <sorg> is the name of the original string;
63083    and   <nword> is the index of the word to extract.
63084
63085Examples:
63086    LET SOUT = STRING WORD S1 NWORD
63087    LET SOUT = STRING WORD S1 5
63088
63089Note:
63090    The name of the new string can be the same as the original
63091    string.  For example,
63092
63093        LET FNAME = STRING WORD FNAME NWORD
63094
63095    In this case, FNAME will now contain the extracted word rather than
63096    the original string.
63097
63098Note:
63099    The string on the right hand side of the equal sign must be a
63100    previously existing string.  That is, expressions are not allowed.
63101    For example, instead of
63102
63103        LET FNAME = STRING WORD "a b c d"  2
63104
63105    you need to do
63106
63107        LET STRING SORG = a b c d
63108        LET FNAME = STRING WORD SORG  2
63109
63110    The word index position can be either a parameter or a numeric
63111    value.  However, it cannot be a numeric expression.  So
63112
63113        LET FNAME = STRING WORD SORG  5
63114        LET FNAME = STRING WORD SORG  NWORD
63115
63116    are both allowed but
63117
63118        LET FNAME = STRING WORD SORG  NWORD/2
63119
63120    is not allowed.  You would need to enter this as
63121
63122        LET NWORD = NWORD/2
63123        LET FNAME = STRING WORD FNAME  NWORD
63124
63125    The name on the left hand side of the equal sign may be a
63126    previously existing string.  However, if it is a previously
63127    existing parameter, variable, or matrix name, an error will
63128    be reported and the requested string will not be created.
63129
63130Note:
63131    If the requested word is less than one or is greater than the
63132    number of words in the string, an error is reported and the
63133    requested string will not be created.
63134
63135Note:
63136    The total number of characters that DATAPLOT can use for storing
63137    functions and strings is set when DATAPLOT is built.  The current
63138    default (11/2008) is 50,000 characters.  Previous versions may set
63139    this limit at 1,000 or 10,000 characters.  This limit applies to the
63140    combined number of characters for all functions and strings.
63141
63142Default:
63143    None
63144
63145Synonyms:
63146    None
63147
63148Related Commands:
63149    NUMBER OF WORDS           = Return the number of words in a string.
63150    UPPER CASE                = Convert a string to upper case.
63151    LOWER CASE                = Convert a string to lower case.
63152    LET FUNCTION              = Defines a function.
63153    LET STRING                = Defines a string.
63154    READ STRING               = Reads a string from a file.
63155    SUBSTITUTE CHARACTER (^)  = Substitute the value of a string or
63156                                parameter.
63157    CONCATENATE CHARACTER (&) = Concatenate two strings.
63158    SUBTRING                  = Extract a substring from an existing
63159                                string.
63160    STRING INDEX              = Extract the start/stop positions of a
63161                                substring within a string.
63162    STRING CONCATENATE        = Concatenate one or more previously
63163                                defined strings.
63164    STRING EDIT               = Edit a string.
63165    STRING MERGE              = Insert a string into another string
63166                                without overwrite.
63167    STRING LENGTH             = Return the length of a string.
63168    CHARACTER                 = Convert numeric values to strings based
63169                                on the ASCII collating sequence.
63170    ICHAR                     = Convert a string to numeric values based
63171                                on the ASCII collating sequence.
63172    GROUP LABEL               = Define the text for group labels.
63173
63174Applications:
63175    Data Management
63176
63177Implementation Date:
63178    10/2010
63179
63180Program:
63181    let string s = funnel ramp cone square
63182    .
63183    feedback off
63184    print "String s = ^s"
63185    let nword = number of words s
63186    loop for k = 1 1 nword
63187        let s^k = string word s k
63188        print "String ^k = ^s^k"
63189    end of loop
63190    feedback on
63191
63192-----STRIP PLOT-------------------------------------------------------
63193
63194STRIP PLOT
63195
63196Name:
63197    ... STRIP PLOT
63198
63199Type:
63200    Graphics Command
63201
63202Purpose:
63203    Generates a strip plot (also known as a dot plot).
63204
63205Description:
63206    A strip plot is a graphical data anlysis technique for
63207    summarizing a univariate data set.  The strip plot consists of:
63208
63209        Horizontal axis = the value of the response variable;
63210        Verticalal axis = all values are set to 1.
63211
63212    That is, a strip plot is simply a plot of the sorted response
63213    values along one axis.  The strip plot is an alternative
63214    to a histogram or a density plot.  It is typically used for
63215    small data sets (histograms and density plots are typically
63216    preferred for larger data sets).
63217
63218    There are a few variations supported for the strip plot.
63219
63220       1) One problem with strip plots is how to display
63221          multiple points with the same value.  Dataplot provides
63222          two options to address this.
63223
63224           i) With the jitter option, a small amount of random
63225              noise is added to the vertical coordinate.
63226
63227          ii) With the stack option, repeated values add a
63228              fixed increment to the vertical coordinate.
63229              So if there are 3 points with the same value,
63230              the y coordinates might be 1, 1.1, and 1.2.
63231              This gives the strip plot a histogram-like
63232              appearance.
63233
63234              The value of the fixed increment can be set
63235              with the command
63236
63237                  SET STRIP PLOT INCREMENT <value>
63238
63239              The default value is 1, although a value of
63240              on the order of 0.1 is often desirable.  This
63241              command can be used with the YLIMITS command and
63242              the CHARACTER SIZE command to generate the desired
63243              appearance for the plot.
63244
63245          You can specify your preference with the command
63246
63247              SET STRIP PLOT STYLE <STACK/JITTER>
63248
63249          The default value is STACK.
63250
63251       2) The strip plot can be generated with a group-id
63252          variable.  For this variant, the y coordinate is
63253          is set equal to the corresponding value of the
63254          group-id variable.  This results in a set of parallel
63255          strip plots.
63256
63257
63258       3) You can generate a strip plot with binned data.
63259          In this case, the STACK option is automatically
63260          used.  This option is essentially an alternative
63261          form for a histogram.  Binned data can also be
63262          grouped.
63263
63264          You can bin your data with the command
63265
63266              LET Y2 X2 = BINNED Y
63267
63268          The binning algorithm can be controlled with the
63269          commands
63270
63271              CLASS LOWER  <value>
63272              CLASS UPPER  <value>
63273              CLASS WIDTH  <value>
63274
63275Syntax 1:
63276    STRIP PLOT <y>            <SUBSET/EXCEPT/FOR qualification>
63277    where <y> is the response variable;
63278    and where the <SUBSET/EXCEPT/FOR qualification is optional.
63279
63280    This syntax is used when you have raw data with a single group.
63281
63282Syntax 2:
63283    STRIP PLOT <y> <x>        <SUBSET/EXCEPT/FOR qualification>
63284    where <y> is the variable of pre-computed frequencies;
63285          <x> is the variable containing the class mid-points;
63286    and where the <SUBSET/EXCEPT/FOR qualification is optional.
63287
63288    This syntax is used when you have binned data with a single
63289    group.
63290
63291Syntax 3:
63292    BATCH STRIP PLOT <y> <tag>     <SUBSET/EXCEPT/FOR qualification>
63293    where <y> is the response variable;
63294          <tag> is a group-id variable;
63295    and where the <SUBSET/EXCEPT/FOR qualification is optional.
63296
63297    This syntax is used when you have raw data with multiple
63298    groups.
63299
63300    The word BATCH is required here to distinguish the
63301    multiple groups case from the binned data case.
63302
63303Syntax 4:
63304    BATCH STRIP PLOT <y> <x> <tag>
63305                     <SUBSET/EXCEPT/FOR qualification>
63306    where <y> is the variable of pre-computed frequencies;
63307          <x> is the variable containing the class mid-points;
63308          <tag> is a group-id variable;
63309    and where the <SUBSET/EXCEPT/FOR qualification is optional.
63310
63311    This syntax is used when you have binned data with multiple
63312    groups.
63313
63314    In this case, the word BATCH is optional.
63315
63316Syntax 5:
63317    BATCH MULTIPLE STRIP PLOT <y> <tag1> <tag2>
63318                              <SUBSET/EXCEPT/FOR qualification>
63319    where <y> is the response variable;
63320          <tag1> is a group-id variable;
63321          <tag2> is a group-id variable;
63322    and where the <SUBSET/EXCEPT/FOR qualification is optional.
63323
63324    This syntax is used when you have raw data with two group-id
63325    variables.
63326
63327    The first group-id variable works as in Syntax 3.  That is, it
63328    defines the position on the y-axis.  The second group-id variable
63329    is used to identify multiple curves within the first group-id
63330    variable.  Appropriate settings for the the CHARACTER command
63331    and its various attribute setting commands can be used to highlight
63332    the different sub-groups within a group.  This option is
63333    demonstrated with the Program 4 example below.
63334
63335Examples:
63336    STRIP PLOT Y
63337    STRIP PLOT Y  SUBSET Y > 2
63338    STRIP PLOT Y X
63339
63340Note:
63341    The appearance of the strip plot can be controlled by
63342    appropriate settings for the CHARACTER command (and its
63343    attributes).
63344
63345    This is demonstrated in the sample programs below.
63346
63347Note:
63348    You may want to generate strip plots for the case where there
63349    are multiple group variables.  This can done using the
63350    CODE CROSS TABULATE command.  For example, if there are two
63351    group id variables, you can do something like
63352
63353         LET ICODE = CODE CROSS TABULATE X1 X2
63354
63355    Then use ICODE as the single group id variable.
63356
63357Default:
63358    None
63359
63360Synonyms:
63361    None
63362
63363Related Commands:
63364    HISTOGRAM             = Generates a histogram.
63365    FREQUENCY PLOT        = Generates a frequency plot.
63366    CLASS LOWER           = Sets the lower class minimum for
63367                            histograms, frequency plots, and
63368                            pie charts.
63369    CLASS UPPER           = Sets the upper class maximum for
63370                            histograms, frequency plots, and
63371                            pie charts.
63372    CLASS WIDTH           = Sets the class width for histograms,
63373                            frequency plots, and pie charts.
63374    HISTOGRAM CLASS WIDTH = Specify alternative default class wdith
63375                            algorithms for histograms.
63376    LIMITS                = Sets the frame limits for all plots.
63377    CHARACTERS            = Sets the character symbol for plots.
63378
63379Reference:
63380    "Standard Practice for Statistical Analysis of One-Sample and
63381    Two-Sample Interlaboratory Proficiency Testing Programs", 2006,
63382    ASTM International, 100 Barr Harbor Drive, PO BOX C700,
63383    West Conshohoceken, PA 19428-2959, USA.
63384
63385    Unwin, Theus, and Hofmann (2006), "Graphics of Large
63386    Datasets: Visualizing a Million", Springer, p. 36.
63387
63388Applications:
63389    Data Analysis
63390
63391Implementation Date:
63392    11/2008
63393    10/2009: Added the "BATCH MULTIPLE" option
63394
63395Program 1:
63396    .
63397    .  Step 1: Read the data
63398    .
63399    skip 25
63400    read E2489A.DAT labid y
63401    .
63402    title case asis
63403    title offset 2
63404    label
63405    x2frame off
63406    y2frame off
63407    char circle all
63408    char hw 1 0.75 all
63409    char fill on all
63410    line blank all
63411    tic offset units data
63412    tic offset 0 0
63413    xtic offset 0.2 0.2
63414    .
63415    set strip plot increment 0.1
63416    set strip plot style stack
63417    .
63418    multiplot corner coordiantes 5 5 95 95
63419    multiplot scale factor 2 1
63420    multiplot 2 1
63421    .
63422    .  Step 2a: Generate the strip plot for unbinned data
63423    .           (with one group) Stack Option
63424    .
63425    ylimits 0 2
63426    y1tic marks off
63427    y1tic mark labels off
63428    y1frame off
63429    title Strip Plot - Stacked, Single Group
63430    y1label Number of Occurrences
63431    x1label Data Values
63432    label case asis
63433    strip plot y
63434    .
63435    .  Step 2b: Generate the strip plot for unbinned data
63436    .           (with one group) Jitter Option
63437    .
63438    set strip plot style jitter
63439    .
63440    title Strip Plot - Jittered, Single Group
63441    x1label Data Values
63442    strip plot y
63443    .
63444    end of multiplot
63445
63446Program 2:
63447    .
63448    .  Step 1: Read the data
63449    .
63450    skip 25
63451    read gear.dat y x
63452    .
63453    title case asis
63454    title offset 2
63455    label
63456    x2frame off
63457    y2frame off
63458    char circle all
63459    char hw 1 0.75 all
63460    char fill on all
63461    line blank all
63462    .
63463    set strip plot increment 0.15
63464    set strip plot style stack
63465    .
63466    ylimits 1 10
63467    major ytic mark number 10
63468    minor ytic mark number 0
63469    y1tic mark offset 1 1
63470    tic offset unit data
63471    ygrid on
63472    title Strip Plot - Stacked, Multiple Groups
63473    y1label Batch Number
63474    x1label Data Values
63475    label case asis
63476    xlimits 0.98 1.02
63477    major xtic mark number 5
63478    minor xtic mark number 1
63479    xtic mark offset 0.002 0.002
63480    .
63481    batch strip plot y x
63482
63483Program 3:
63484    .
63485    .  Step 1: Read the data
63486    .
63487    skip 25
63488    read E2489A.DAT labid y
63489    .
63490    .  Step 2: Bin the data
63491    .
63492    class lower 0.0
63493    class upper 5.0
63494    class width 0.1
63495    let y2 x2 = binned y
63496    .
63497    .  Step 3: Define the appearance of the plot
63498    .
63499    title case asis
63500    title offset 2
63501    label
63502    x2frame off
63503    y2frame off
63504    char circle all
63505    char hw 1 0.75 all
63506    char fill on all
63507    line blank all
63508    tic offset units data
63509    tic offset 0 0
63510    xtic offset 0.2 0.2
63511    .
63512    ylimits 0.8 2
63513    y1tic marks off
63514    y1tic mark labels off
63515    y1frame off
63516    title Strip Plot - Single Group with Binned Data
63517    y1label Number of Occurrences
63518    x1label Data Values
63519    label case asis
63520    .
63521    .  Step 4: Generate the strip plot
63522    .
63523    frame corner coordinate 15 35 85 70
63524    set strip plot increment 0.1
63525    set strip plot style stack
63526    strip plot y2 x2
63527
63528Program 4:
63529    .
63530    .  Step 1: Read the data
63531    .
63532    skip 25
63533    read ripken.dat y x1 x2
63534    .
63535    .  Step 2: Set Plot Options
63536    .
63537    title case asis
63538    title offset 2
63539    label
63540    x2frame off
63541    y2frame off
63542    char circle all
63543    char hw 1 0.75 all
63544    char fill on all
63545    char color red blue green red blue green red blue green
63546    line blank all
63547    .
63548    tic offset unit data
63549    ylimits 1 3
63550    major ytic mark number 3
63551    minor ytic mark number 0
63552    y1tic mark label format alpha
63553    y1tic mark label content Inside Middle Outside
63554    y1label Horizontal Location
63555    y1tic mark offset 0.2  0.2
63556    ygrid on
63557    grid pattern dotted
63558    x1label Batting Average
63559    label case asis
63560    tic mark label case asis
63561    xlimits 0 1
63562    major xtic mark number 6
63563    minor xtic mark number 1
63564    xtic mark offset 0.05 0.05
63565    x3label Vertical Location: Red = Low, Blue = Middle, Green = High
63566    .
63567    .  Step 3: Generate the Strip Plot
63568    .
63569    set strip plot increment 0.1
63570    . set strip plot style stack
63571    set strip plot style jitter
63572    title Strip Plot - Stacked, Multiple Batch Option
63573    batch multiple strip plot y x1 x2
63574
63575-----STROM (LET)--------------------------------
63576
63577STROM
63578
63579Name:
63580    STROM (LET)
63581
63582Type:
63583    Library Function
63584
63585Purpose:
63586    Compute the Stromgren integral.
63587
63588Description:
63589    The Stromgren integral is defined as:
63590
63591        f(x) = C*INTEGRAL[t**7*EXP(2*t)/((EXP(t)-1)**3)dt]   x >= 0
63592
63593    where C = (15/(4*PI**4)) and the integral is defined from
63594    0 to x.
63595
63596    Dataplot computes this function using ACM Algorithm 757 (see
63597    Reference: below).
63598
63599Syntax:
63600    LET <y> = STROM(<x>)    <SUBSET/EXCEPT/FOR qualification>
63601    where <x> is a non-negative number, variable or parameter;
63602          <y> is a variable or a parameter (depending on what <x>
63603               is) where the computed Stromgren integral values are
63604               stored;
63605    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
63606
63607Examples:
63608    LET A = STROM(2)
63609    LET A = STROM(X)
63610    LET X2 = STROM(X) FOR X1 = 0.1 0.1 3.0
63611
63612Note:
63613    Library functions are distinguished from let subcommands
63614    in the following ways.
63615    1) Functions enclose the input value in parenthesis.  Let
63616       subcommands use spaces.
63617    2) Functions can accept (and return) either parameters
63618       (i.e., single values) or variables (i.e., an array of
63619       values) while let subcommands are specific in which they
63620       accept as input and what they return as output.
63621    3) Functions can accept expressions while let subcommands
63622       do not.  For example, the following is legal:
63623           LET Y2 = ABS(Y1-INT(Y1))
63624       For let subcommands, you typically have to do something
63625       like the following:
63626           LET YTEMP = Y**2 + 8
63627           LET A = SUM YTEMP
63628
63629Default:
63630    None
63631
63632Synonyms:
63633    None
63634
63635Related Commands:
63636    ABRAM      = Compute the Abramowitz integral.
63637    CLAUSN     = Compute the Clausen integral.
63638    DEBYE      = Compute the Debye function.
63639    EXP3       = Compute the cubic exponential integral.
63640    GOODST     = Compute the Goodwin and Stanton integral.
63641    LOBACH     = Compute the Lobachevski integral.
63642    SYNCH1     = Compute the synchrotron radiation function.
63643    SYNCH2     = Compute the synchrotron radiation function.
63644    TRAN       = Compute the transport integral.
63645
63646Reference:
63647    "ACM Transactions of Mathematical Software", Allan MacLead,
63648    Vol. 22, No. 3, September, 1996, pp. 288-301.
63649
63650Applications:
63651    Special Functions
63652
63653Implementation Date:
63654    1999/6
63655
63656Program:
63657    TITLE AUTOMATIC
63658    PLOT STROM(X) FOR X = 0 0.01 10
63659
63660-----SUBREGION --------------------------------------------------
63661
63662SUBREGION
63663
63664Name:
63665    SUBREGION
63666
63667Type:
63668    Plot Control Command
63669
63670Purpose:
63671    Specifies whether subregions on subsequent plots are on (active)
63672    or off (inactive).
63673
63674Description:
63675    Dataplot now supports subregions on plots.  Subregions are
63676    motivated by the desire to denote "engineering limits" on a
63677    plot.  That is, a rectangle, denoting an acceptance region in
63678    both the X and Y directions, is drawn and then the plot is
63679    overlaid on top of this.
63680
63681    Although the subregion capability was motivated for the purpose
63682    of denoting engineering limits, they can in fact be used for
63683    whatever purpose you want.  Subregions apply to all subsequent
63684    2-D plots (but not 3-D plots).
63685
63686    Currently, subregions are limited to rectangular regions.  This
63687    will be upgraded to polygonal regions in a future implementation.
63688
63689    The SUBREGION command is used to turn subregions on or off and
63690    up to 10 subregions can be specified.  In most cases where
63691    subregions are defined, only a single subregion is used.
63692
63693Syntax:
63694    SUBREGION <ON/OFF> <ON/OFF> ... <ON/OFF>
63695    where <ON> specifies that the subregion is active and OFF
63696               specifies that it is inactive.  Up to 10 subregion
63697               switches can be set.
63698
63699    In most cases, only a single subregion is specified.
63700
63701Examples:
63702    SUBREGION ON
63703    SUBREGION OFF
63704    SUBREGION ON ON ON
63705
63706Note:
63707    The coordinates for the subregion areas are set with the
63708    SUBREGION LIMITS command.
63709
63710Note:
63711    The subregions are plotted before any of the plot
63712    curves.  The significance of this is that a solid filled
63713    subregion will be drawn and then the regular plot points
63714    are drawn on top.  The effect of this can be hardware
63715    dependent.  On X11 and Postscript devices, a solid character
63716    can be seen on top of a light gray scale box (if the gray
63717    scale gets too dark, the plot points are no longer
63718    distinguishable).  However, on some hardware devices, you may
63719    not be able to see points plotted on top of a solid fill
63720    region.  In this case, plot the border of the subregion and
63721    leave the interior blank.
63722
63723    It is this order of plotting that distinguishes the
63724    subregion from simply using a BOX <id> command to plot
63725    rectangular regions on the screen.
63726
63727Note:
63728    For the first subregion defined, Dataplot returns the following
63729    internal parameters on subsequent plots:
63730
63731       NACCEPT = number of plot points inside the subregion.
63732       NREJECT = number of plot points outisde the subregion.
63733       NTOTAL  = number of plot points (NACCEPT + NREJECT).
63734
63735Note:
63736    You do not need to adjust the settings for the CHARACTER, LINE,
63737    BAR, and SPIKE when using subregions.  DATAPLOT automatically
63738    shifts these in the background.  The attributes for the subregion
63739    are set with the following commands:
63740
63741       REGION FILL <ON/OFF>
63742       REGION COLOR <COLOR>
63743       REGION BORDER LINE <LINETYPE>
63744       REGION BORDER COLOR <COLOR>
63745
63746    The REGION FILL and REGION COLOR determine the attributes of the
63747    interior of the rectangle.  The two most common choices are
63748    to leave it blank or to fill it with some type of light
63749    gray scale color.  The attributes of the rectangle border are
63750    set with the REGION BORDER LINE and REGION BORDER COLOR commands.
63751    The standard line types (SOLID, BLANK, DASH, DOTTED) are supported.
63752    If you have more than one subregion defined, you should specify
63753    multiple settings on the above commands.  For example,
63754
63755       REGION FILL ON ON ON
63756       REGION COLOR G25 G25 G25
63757
63758Note:
63759    The SUBREGION command with no argument turns off all subregions.
63760
63761Default:
63762    No subregions are drawn.
63763
63764Synonyms:
63765    None
63766
63767Related Commands:
63768    PLOT              = Generates a data or function plot.
63769    SUBREGION LIMITS  = Specifiy the limits for a subregion.
63770
63771Applications:
63772    Denoting "Engineering Limits" on plots.
63773
63774Implementation Date:
63775    2000/1
63776
63777Program:
63778    dimension 50 varialbes
63779    skip 25
63780    read simon1.dat y1 y2 x1 x2 x3 x4 x5 block runseq
63781    .
63782    char x
63783    line blank
63784    .
63785    subregion on
63786    subregion xlimits 0.35 0.42
63787    subregion ylimits 2000 3000
63788    region fill on
63789    region border line dash
63790    region color g90
63791    .
63792    plot y1 vs x1
63793    .
63794    move 20 80
63795    text n = ^ntotal
63796    move 20 75
63797    text accept = ^naccept
63798    move 20 70
63799    text reject = ^nreject
63800
63801-----SUBREGION LIMITS--------------------------------------------------
63802
63803SUBREGION LIMITS
63804
63805Name:
63806    ...SUBREGION LIMITS
63807
63808Type:
63809    Plot Control Command
63810
63811Purpose:
63812    Specifies the limits (minimum and maximum) for subregions
63813    of subsequent plots.
63814
63815Description:
63816    Dataplot now supports subregions on plots.  Subregions are
63817    motivated by the desire to denote "engineering limits" on a
63818    plot.  That is, a rectangle, denoting an acceptance region in
63819    both the X and Y directions, is drawn and then the plot is
63820    overlaid on top of this.
63821
63822    Although the subregion capability was motivated for the purpose
63823    of denoting engineering limits, they can in fact be used for
63824    whatever purpose you want.  Subregions apply to all subsequent
63825    2-D plots (but not 3-D plots).
63826
63827    Currently, subregions are limited to rectangular regions.  This
63828    will be upgraded to polygonal regions in a future implementation.
63829
63830    The SUBREGION command is used to turn subregions on or off and
63831    up to 10 subregions can be specified.  In most cases where
63832    subregions are defined, only a single subregion is used.
63833
63834Syntax 1:
63835    SUBREGION <prefix>LIMITS   <n1>   <n2>
63836    where <n1> is a number or parameter that specifies the desired
63837               lower limit;
63838          <n2> is a number or parameter that specifies the desired
63839               upper limit;
63840    and   <prefix> is one of the following:
63841               X             refers to vertical axis
63842               Y             refers to horizontal axis
63843               no prefix     refers to both axes.
63844
63845    This syntax sets the subregion limits for the first subregion.
63846
63847Syntax 2:
63848    SUBREGION <id> <prefix>LIMITS   <n1>   <n2>
63849    where <id> is a number or parameter between 1 and 10 that specifies
63850               which of the 10 subregions that these limits apply to;
63851          <n1> is a number or parameter that specifies the desired
63852               lower limit;
63853          <n2> is a number or parameter that specifies the desired
63854               upper limit;
63855    and   <prefix> is one of the following:
63856               X             refers to vertical axis
63857               Y             refers to horizontal axis
63858               no prefix     refers to both axes.
63859
63860Examples:
63861    SUBREGION LIMITS 0.5 4.5
63862    SUBREGION XLIMITS 0 100
63863    SUBREGION YLIMITS 0 100
63864    SUBREGION XLIMITS A B
63865    SUBREGION 2 LIMITS 0.5 4.5
63866
63867Note:
63868    You do not need to adjust the settings for the CHARACTER, LINE,
63869    BAR, and SPIKE when using subregions.  DATAPLOT automatically
63870    shifts these in the background.  The attributes for the subregion
63871    are set with the following commands:
63872
63873       REGION FILL <ON/OFF>
63874       REGION COLOR <COLOR>
63875       REGION BORDER LINE <LINETYPE>
63876       REGION BORDER COLOR <COLOR>
63877
63878    The REGION FILL and REGION COLOR determine the attributes of the
63879    interior of the rectangle.  The two most common choices are
63880    to leave it blank or to fill it with some type of light
63881    gray scale color.  The attributes of the rectangle border are
63882    set with the REGION BORDER LINE and REGION BORDER COLOR commands.
63883    The standard line types (SOLID, BLANK, DASH, DOTTED) are supported.
63884    If you have more than one subregion defined, you should specify
63885    multiple settings on the above commands.  For example,
63886
63887       REGION FILL ON ON ON
63888       REGION COLOR G25 G25 G25
63889
63890Note:
63891    The SUBREGION ...LIMITS command with no argument reverts the limits
63892    to the default.  A SUBREGION ...LIMITS command with no prefix refers
63893    to both axes.  Thus SUBREGION LIMITS 3 7 sets the limits for both
63894    axes to 3 and 7.
63895
63896Default:
63897    No subregions are drawn.  If a subregion is turned on, but no
63898    limits are specified, then the subregion extends to the minimum and
63899    maximum points in both the X and Y axes.
63900
63901Synonyms:
63902    None
63903
63904Related Commands:
63905    PLOT        = Generates a data or function plot.
63906    SUBREGION   = Specifiy whether a subregion is on or off.
63907
63908Applications:
63909    Denoting "Engineering Limits" on plots.
63910
63911Implementation Date:
63912    2000/1
63913
63914Program:
63915    dimension 50 varialbes
63916    skip 25
63917    read simon1.dat y1 y2 x1 x2 x3 x4 x5 block runseq
63918    .
63919    char x
63920    line blank
63921    .
63922    subregion on
63923    subregion xlimits 0.35 0.42
63924    subregion ylimits 2000 3000
63925    region fill on
63926    region border line dash
63927    region color g90
63928    .
63929    plot y1 vs x1
63930    .
63931    move 20 80
63932    text n = ^ntotal
63933    move 20 75
63934    text accept = ^naccept
63935    move 20 70
63936    text reject = ^nreject
63937
63938-----SUBSAMPLE (LET)--------------------------------
63939
63940SUBSAMPLE
63941
63942Name:
63943    SUBSAMPLE (LET)
63944
63945Type:
63946    Let Subcommand
63947
63948Purpose:
63949    Compute a subsample for a variable based on another index variable.
63950
63951Description:
63952    The SUBSAMPLE command is similar to the BOOTSTRAP SAMPLE command.
63953    In either case, an index variable is generated (often with the
63954    DISCRETE UNIFORM RANDOM NUMBERS, BOOTSTRAP INDEX or JACKNIFE INDEX
63955    commands).  This index variable contains integer entries into the
63956    original variable.  For example, an index variable containing the
63957    values 3, 5, 1, and 8 refers to Y(3), Y(5), Y(1), and Y(8) where Y
63958    is the original data variable.
63959
63960    The distinction between SUBSAMPLE and BOOTSTRAP SAMPLE is that
63961    BOOTSTRAP SAMPLE expects the original variable and the index
63962    variable to be the same length while SUBSAMPLE allows the index
63963    variable to be smaller than the original variable.  With SUBSAMPLE,
63964    the returned variable is the same length as the index variable.
63965
63966    Both commands allow repeated values (i.e., sampling with
63967    replacement).  This is determined by repeat values in the index
63968    variable.
63969
63970Syntax:
63971    LET <resp> = SUBSAMPLE <var> <ind> <SUBSET/EXCEPT/FOR qualification>
63972    where <var> is the variable being sampled;
63973          <ind> is the index variable (size less than or equal to
63974                <var>);
63975          <resp> is a variable (with the same length as <ind>) where the
63976                sampled values are returned;
63977    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
63978
63979Examples:
63980    LET RES3 = SUBSAMPLE RES2 IND
63981
63982Note:
63983    Index values less than 1 or greater than the size of the variable
63984    being sampled are ignored.
63985
63986Default:
63987    None
63988
63989Synonyms:
63990    None
63991
63992Related Commands:
63993    BOOTSTRAP SAMPLE    = Generate a bootstrap sample.
63994    BOOTSTRAP INDEX     = Generate a bootstrap index.
63995    LOOP                = Initiate a loop.
63996    BOOTSTRAP PLOT      = Generate a bootstrap plot.
63997    JACKNIFE PLOT       = Generate a jacknife plot.
63998    JACKNIFE INDEX      = Generate a jacknife index.
63999
64000Applications:
64001    XX
64002
64003Implementation Date:
64004    89/2
64005
64006Program:
64007    . PERFORM A JACKNIFE ANALYSIS
64008    LET Y = NORMAL RANDOM NUMBERS FOR I = 1 1 100
64009    LOOP FOR K = 1 1 100
64010        LET IND = SEQUENCE 1 1 100
64011        LET IND(K) = 0
64012        LET JUNK = SUBSAMPLE Y IND
64013        LET YMEAN = MEAN JUNK
64014        LET Y0(K) = YMEAN
64015    END OF LOOP
64016    HISTOGRAM Y0
64017
64018-----SUBSET-------------------------------------------------------
64019
64020SUBSET
64021
64022Name:
64023    SUBSET
64024
64025Type:
64026    Keyword
64027
64028Purpose:
64029    Specifies a subset to be included for any plot, analysis, and
64030    certain support commands.
64031
64032Syntax 1:
64033    <command> SUBSET <var> <qual> <list of values>
64034    where <command> is a DATAPLOT command that allows subsets;
64035          <var> is a variable for which the subset is defined;
64036          <qual> is an optional qualifier (=, <, >, <>, <=, >=);
64037    and   <list of values> are the values of <var> to be excluded.
64038
64039    If <qual> is omitted, equality (i.e, =) is assumed.
64040
64041Syntax 2:
64042    <command> SUBSET <var> <min> TO <max>
64043    <command> SUBSET <var> = <min> TO <max>
64044    where <command> is a DATAPLOT command that allows subsets;
64045          <var> is a variable for which the subset is defined;
64046          <min> is the minimum value of <var> to exclude;
64047    and   <max> is the maximum value of <var> to exclude.
64048
64049    The "=" qualifier is optional in this syntax.  This syntax excludes
64050    all values between (inclusive) <min> and <max>.
64051
64052Examples:
64053    FIT Y=A*EXP(B*X) SUBSET X 101 TO 1000
64054    PLOT Y PRED VERSUS X SUBSET LAB 4
64055    PLOT Y X SUBSET LAB 2 TO 8 SUBSET LAB 4
64056    LET Y1 = Y2 SUBSET TAG = 4
64057
64058Note:
64059    The SUBSET variable does not have to be one of the variables used
64060    in the command (e.g., PLOT X SUBSET TAG > 0).
64061
64062Note:
64063    Using SUBSET TAG 101 1000 means to subset on the specific values
64064    101 and 1000 (you can list more than two values) while using
64065    SUBSET 101 TO 1000 means to subset on the values between 101 and
64066    1000 (inclusive).
64067
64068Note:
64069    Although DATAPLOT does not explicitly support missing values, the
64070    SUBSET command can be used to exclude missing data (pick a value
64071    to mean missing and SUBSET on that value).
64072
64073Note:
64074    More than one SUBSET clause can be used on a single command.
64075
64076Default:
64077    None
64078
64079Synonyms:
64080    None
64081
64082Related Commands:
64083    EXCEPT = Allows exclusion-specification of a subset.
64084    FOR    = Allows row-specification of a subset.
64085    <      = Allows "less than" subset.
64086    <=     = Allows "less than or equal to" subset.
64087    =      = Allows "equal to" subset.
64088    >=     = Allows "greater than or equal to" subset.
64089    >      = Allows "greater than" subset.
64090    <>     = Allows "not equal" subset.
64091
64092Applications:
64093    XX
64094
64095Implementation Date:
64096    Pre-1987
64097
64098Program:
64099    XX
64100
64101-----SUBSTITUTE CHARACTER--------------------------------------------
64102
64103SUBSTITUTE CHARACTER
64104
64105Name:
64106    SUBSTITUTE CHARACTER
64107
64108Type:
64109    Support Command
64110
64111Purpose:
64112    Specify the character to use as the substitution character.
64113
64114Description:
64115    The substitute character signifies that the parameter name
64116    following it should be replaced with the value of that parameter.
64117
64118    The following name types can be substituted.
64119
64120        1. If the name is a parameter, the value of the parameter
64121           will be substituted.
64122
64123        2. If the name is a string, the value of the string will
64124           be substituted.
64125
64126        3. If the name is a variable, Dataplot will check to see
64127           if an alias for the variable name has been defined
64128           (via the VARIABLE LABEL command).  If so, that alias
64129           will be substituted.  If an alias has not been defined,
64130           the substitution may be unpredictable.
64131
64132           If Y is a variable, the following is not currently
64133           supported
64134
64135               LET STRING S = ^Y(2)
64136
64137           For this case, you need to do something like
64138
64139               LET A = Y(2)
64140               LET STRING S = ^A
64141
64142        4. If you have defined row labels (via READ ROW LABEL or
64143           LET ... = ROW LABEL ...), you can do something like
64144
64145              ^ROWLABEL^K
64146
64147           where K in an index to the desired row of the row
64148           labels.
64149
64150        5. Any other name type will result in an error message
64151           with no substitution being performed.
64152
64153Syntax:
64154    SUBSTITUTE CHARACTER  <char>
64155    where <char> is the character to use as the substitute character.
64156
64157Examples:
64158    SUBSTITUTE CHARACTER @
64159    SUBSTITUTE CHARACTER ^
64160
64161Note:
64162    Generally it is not necessary to change the substitute character.
64163    The one exception is if you want to define strings that contain
64164    the default substitute character.
64165
64166Note:
64167    The substitute character can be used effectively with the LOOP
64168    command.  For example, assume that variables Y1 thru YN and
64169    strings S1 and SN have been previously defined:
64170
64171        LOOP FOR K = 1 1 N
64172            TITLE Y^K VS X
64173            LEGEND 1 ^S^K
64174            PLOT Y^K VS X
64175        END OF LOOP
64176
64177    Note the distinction between Y^K in the PLOT command and ^S^K in
64178    the LEGEND command.  For the plot command, we want PLOT Y1 VS X
64179    while for the LEGEND command we want to insert the value of the
64180    string S1.  This is the reason that the Y^K has no preceding ^
64181    while the ^S^K does.
64182
64183Note:
64184    The following characters are used to determine the end of the
64185    parameter name:
64186               - a space
64187       (       - a left parenthesis
64188       )       - a right parenthesis
64189       "       - a quote character
64190       &       - an ampersand character
64191       .       - a period
64192       ^       - another substitute character
64193       ,       - a comma
64194       :       - a colon
64195       ;       - a semi-colon
64196       ]       - a right bracket
64197       +       - a plus
64198       -       - a minus
64199       *       - an asterisk
64200       /       - a forward slash
64201
64202Note:
64203    The substitution is performed before the command is interpreted.
64204
64205Note:
64206    If the parameter is undefined, it is replaced with a space
64207    character in the command line.
64208
64209Note:
64210    The VALU() command also performs parameter substitution.  However,
64211    it only works for a few commands (specifically LEGEND, TITLE,
64212    LABEL, and TEXT) while the substitute character works on any
64213    command.
64214
64215Note:
64216    The substitute character can also be changed with the command
64217
64218        SET REPLACE <char>
64219
64220Note:
64221    There may be occassions where you want to suppress the
64222    character substitution.  For examle, you may want to use
64223    the "^" character in a string.  You can suspend character
64224    substitution with the command
64225
64226        SET COMMAND SUBSTITUTION OFF
64227
64228    To resume character substitution, enter
64229
64230        SET COMMAND SUBSTITUTION ON
64231
64232Note:
64233    If you are substituting for a parameter, there are several
64234    ways you can control the appearance.
64235
64236       1. You can use the ROUND command.  For example,
64237
64238             LET CC = ROUND(CC,2)
64239             LET STRING S = CORR: ^CC
64240
64241       2. By default, parameters are expanded into numeric
64242          format (e.g., 0.0017).  If you would like the parameter
64243          expanded in exponential format, enter the command
64244
64245              SET PARAMETER EXPANSION EXPONENTIAL
64246
64247          To restore the default, enter
64248
64249              SET PARAMETER EXPANSION NUMERIC
64250
64251       3. For the most control, you can specify a Fortran
64252          format by entering the command
64253
64254              SET SUBSTITUTION FORMAT <string>
64255
64256          For example,
64257
64258              SET SUBSTITUTION FORMAT F4.2
64259              SET SUBSTITUTION FORMAT E15.7
64260
64261          To turn this off, enter
64262
64263              SET SUBSTITUTION FORMAT OFF
64264
64265           Dataplot uses the specified format with an internal Fortran
64266           WRITE statement.  That is
64267
64268              WRITE(ISTR,IFORMT,ERR=statement)VAL
64269
64270           where IFORMT is the specified format and VAL is the
64271           value of the parameter.  Dataplot does no parsing or
64272           error checking on the specified format.  Typically, only
64273           F, E, or G formats should be used.  If there is an error
64274           using the Fortran format specification, Dataplot will
64275           revert to its default parameter expansion (no error
64276           message will be generated).  The format string is limited
64277           to a maximum of 8 characters and the maximum number of
64278           characters for the expanded parameter is 20.
64279
64280Synonyms:
64281    REPLACEMENT CHARACTER
64282
64283Related Commands:
64284    LOOP                  = Perform a loop.
64285    VALU()                = Perform parameter substitution within
64286                            certain
64287                            commands.
64288    TERMINATOR CHARACTER  = Define the character that terminates a
64289                            command.
64290    CONTINUE CHARACTER    = Define the character that specifies that
64291                            a command is continued onto the next line.
64292
64293Applications:
64294    XX
64295
64296Implementation Date:
64297    Pre-1987
64298    2000/01: Support for VARIABLE LABEL substitution
64299    2007/09: Support for ^ROWLABEL^K
64300    2019/01: Support for SET SUBSTITUTION FORMAT
64301    2019/01: Support for SET COMMAND SUBSTITUTION
64302
64303Program:
64304    . Step 1:   Read the data
64305    .
64306    skip 25
64307    read weibbury.dat y
64308    skip 0
64309    .
64310    . Step 2:   Maximum likelihood estimates
64311    .
64312    set write decimals 5
64313    weibull mle y
64314    let gamma = gammaml
64315    let pploc   = 0
64316    let ppscale = alphaml
64317    .
64318    title case asis
64319    label case asis
64320    title Weibull Probability Plot
64321    y1label Sorted Data
64322    x1label Percentiles for Fitted Weibull Distribution
64323    character circle
64324    character hw 1 0.75
64325    character fill on
64326    line blank
64327    .
64328    . Step 3:   Generate probability plot
64329    .
64330    weibull probability plot y
64331    .
64332    let gamma = round(gamma,2)
64333    move 20 85
64334    text Gamma = ^gamma
64335    let ppscale = round(ppscale,2)
64336    move 20 82
64337    text Scale = ^ppscale
64338    let ppcc = round(ppcc,3)
64339    move 20 79
64340    text PPCC = ^ppcc
64341
64342-----SUBSTRING-----------------------------------------------------
64343
64344SUBSTRING
64345
64346Name:
64347    SUBSTRING
64348
64349Type:
64350    Let Subcommand
64351
64352Purpose:
64353    Extract a substring of a previously defined string.
64354    specified position.
64355
64356Syntax:
64357    LET <sout> = SUBSTRING  <sorg>  <nstart>  <nstop>
64358    where <sout> is the name of the resulting string;
64359          <sorg> is the name of the original string;
64360          <nstart> is the start position in <sorg>;
64361    and   <nstop> is the stop position in <sorg>.
64362
64363Examples:
64364    LET SOUT = SUBSTRING S1 NSTART  NSTOP
64365    LET SOUT = SUBSTRING S1 3  8
64366
64367Note:
64368    The name of the new string can be the same as the original
64369    string.  For example,
64370
64371        LET FNAME = SUBSTRING FNAME NSTART NSTOP
64372
64373    In this case, FNAME will now contain the substring rather than
64374    the original string.
64375
64376Note:
64377    The string on the right hand side of the equal sign must be a
64378    previously existing string.  That is, expressions are not allowed.
64379    For example, instead of
64380
64381        LET FNAME = SUBSTRING "file99.dat"  5  6
64382
64383    you need to do
64384
64385        LET STRING SORG = file99.dat
64386        LET FNAME = SUBSTRING SORG  5  6
64387
64388    The start and stop position can be either a parameter or a numeric
64389    value.  However, it cannot be a numeric expression.  So
64390
64391        LET FNAME = SUBSTRING SORG  5  6
64392        LET FNAME = SUBSTRING SORG  NSTART  NSTOP
64393
64394    are both allowed but
64395
64396        LET FNAME = SUBSTRING SORG  NSTART  NLEN/2
64397
64398    is not allowed.  You would need to enter this as
64399
64400        LET NSTOP = NLEN/2
64401        LET FNAME = SUBSTRING FNAME  NSTART  NSTOP
64402
64403Note:
64404    The total number of characters that DATAPLOT can use for storing
64405    functions and strings is set when DATAPLOT is built.  The current
64406    default (11/2008) is 50,000 characters.  Previous versions may set
64407    this limit at 1,000 or 10,000 characters.  This limit applies to the
64408    combined number of characters for all functions and strings.
64409
64410Default:
64411    None
64412
64413Synonyms:
64414    None
64415
64416Related Commands:
64417    LET FUNCTION        = Defines a function.
64418    LET STRING          = Defines a string.
64419    READ STRING         = Reads a string from a file.
64420    SUBSTITUTE CHARACTE = Substitute the value of a string or parameter.
64421    &                   = Concatenate two strings.
64422    STRING INDEX        = Extract the start/stop positions of a substring
64423                          within a string.
64424    STRING CONCATENATE  = Concatenate one or more previously defined
64425                          strings.
64426    STRING LENGTH       = Return the length of a string.
64427    STRING EDIT         = Edit a string.
64428    STRING MERGE        = Insert a string into another string without
64429                          overwrite.
64430    STRING REPLACE      = Insert a string into another string with
64431                          overwrite.
64432    LOWER CASE          = Convert a string to lower case.
64433    UPPER CASE          = Convert a string to upper case.
64434    CHARACTER           = Convert numeric values to strings based on
64435                          the ASCII collating sequence.
64436    ICHAR               = Convert a string to numeric values based on
64437                          the ASCII collating sequence.
64438    GROUP LABEL         = Define the text for group labels.
64439
64440Applications:
64441    Data Management
64442
64443Implementation Date:
64444    11/2008
64445
64446Program:
64447    LET STRING S1 = file23.dat
64448    LET NSTOP = STRING LENGTH S1
64449    LET NSTART = STRING INDEX S1 SPERIOD
64450    LET SEXT = SUBSTRING S1 NSTART NSTOP
64451    LET NSTOP = NSTART - 1
64452    LET NSTART = 1
64453    LET SBASE = SUBSTRING S1 NSTART NSTOP
64454
64455    The resulting strings SEXT and SBASE will contain
64456
64457       .dat
64458       file23
64459
64460-----SUM (LET)---------------------------------------------------
64461
64462SUM
64463
64464Name:
64465    SUM (LET)
64466
64467Type:
64468    Let Subcommand
64469
64470Purpose:
64471    Sum the elements of a variable.
64472
64473Syntax:
64474    LET <par> = SUM <x1>  <SUBSET/EXCEPT/FOR qualification>
64475    where <x1> is the variable for which the sum is to be computed;
64476          <par> is a parameter where the computed sum is saved;
64477    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
64478
64479Examples:
64480    LET A = SUM Y
64481    LET A = SUM Y SUBSET TAG > 2
64482
64483Default:
64484    None
64485
64486Synonyms:
64487    None
64488
64489Related Commands:
64490    PRODUCT        = Compute the product of the elements of a variable.
64491    INTEGRAL       = Compute the integral of elements in a variable.
64492    SUM PLOT       = Generate a sums (vs subsets) plot.
64493
64494Applications:
64495    XX
64496
64497Implementation Date:
64498    XX
64499
64500Program:
64501    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
64502    LET A = SUM Y1
64503
64504-----SUM OF SQUARES (LET)-----------------------------------------
64505
64506SUM OF SQUARES
64507
64508Name:
64509    SUM OF SQUARES (LET)
64510
64511Type:
64512    Let Subcommand
64513
64514Purpose:
64515    Compute the sum of squares of a variable.
64516
64517Description:
64518    The sum of squares has the formula:
64519
64520         SSQ = SUM[i=1 to N][X(i)**2]
64521
64522Syntax 1:
64523    LET <par> = SUM OF SQUARES <y>   <SUBSET/EXCEPT/FOR qualification>
64524    where <y> is the response variable;
64525          <par> is a parameter where the computed sum of squares is saved;
64526    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
64527
64528Syntax 2:
64529    LET <par> = DIFFERENCE OF SUM OF SQUARES <y1> <y2>
64530                <SUBSET/EXCEPT/FOR qualification>
64531    where <y1> is the first response variable;
64532          <y2> is the second response variable;
64533          <par> is a parameter where the computed difference of
64534              the sum of squares is saved;
64535    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
64536
64537    This syntax computes the sum of squares of <y1> and <y2> and then
64538    computes the difference of the two sum of squares values.
64539
64540Examples:
64541    LET A = SUM OF SQUARES Y1
64542    LET A = SUM OF SQUARES Y1  SUBSET TAG > 2
64543    LET A = DIFFERENCE OF SUM OF SQUARES Y1 Y2
64544
64545Note:
64546    In some applications it may be desired to cap the value
64547    of outliers.  This is most common when the response variable
64548    is a z-score or some other standardized score.
64549
64550    To specify this value, enter the command
64551
64552        LET CAPVALUE = <value>
64553
64554    where <value> is typically 3 or 4 (if the reponse data are
64555    z-scores or z-score type data).  Note that the value represents
64556    an absolute value.  For example, if CAPVALUE is 4, values greater
64557    than 4 will be set to 4 and values less than -4 will be set to -4.
64558
64559Note:
64560    Dataplot statistics can be used in a number of commands.  For
64561    details, enter
64562
64563         HELP STATISTICS
64564
64565Default:
64566    None
64567
64568Synonyms:
64569    SSQ is a synonym for SUM OF SQUARES
64570
64571Related Commands:
64572    MEAN                 = Compute the mean of a variable.
64573    STANDARD DEVIATION   = Compute the standard deviation of a variable.
64574    ROOT MEAN SQUARE     = Compute the root mean square error of a
64575                           variable.
64576
64577Applications:
64578    Statistics
64579
64580Implementation Date:
64581    2012/2
64582    2012/6: Added DIFFERENCE OF SUM OF SQUARES
64583
64584Program:
64585    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
64586    LET SSQ = SUM OF SQUARES Y1
64587
64588-----SUM OF SQUARES FROM MEAN (LET)----------------------------------
64589
64590SUM OF SQUARES FROM MEAN
64591
64592Name:
64593    SUM OF SQUARES FROM MEAN (LET)
64594
64595Type:
64596    Let Subcommand
64597
64598Purpose:
64599    Compute the sum of squares from the mean of a variable.
64600
64601Description:
64602    The sum of squares from the mean has the formula:
64603
64604         SSQ = SUM[i=1 to N][(X(i) - Xbar)**2]
64605
64606    with Xbar denoting the mean of the X(i).
64607
64608Syntax 1:
64609    LET <par> = SUM OF SQUARES FROM MEAN <y>
64610                <SUBSET/EXCEPT/FOR qualification>
64611    where <y> is the response variable;
64612          <par> is a parameter where the computed sum of squares from the
64613               mean is saved;
64614    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
64615
64616Syntax 2:
64617    LET <par> = DIFFERENCE OF SUM OF SQUARES FROM MEAN <y1> <y2>
64618                <SUBSET/EXCEPT/FOR qualification>
64619    where <y1> is the first response variable;
64620          <y2> is the second response variable;
64621          <par> is a parameter where the computed difference of
64622              the sum of squares from the mean is saved;
64623    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
64624
64625    This syntax computes the sum of squares from the mean of <y1> and
64626    <y2> and then computes the difference of the two sum of squares
64627    values.
64628
64629Examples:
64630    LET A = SUM OF SQUARES FROM MEAN Y1
64631    LET A = SUM OF SQUARES FROM MEAN Y1  SUBSET TAG > 2
64632    LET A = DIFFERENCE OF SUM OF SQUARES FROM MEAN Y1 Y2
64633
64634Default:
64635    None
64636
64637Synonyms:
64638    SUMS OF SQUARES FROM MEAN is a synonym for SUM OF SQUARES FROM MEAN
64639
64640Related Commands:
64641    SUM OF SQUARES       = Compute the sum of squares for a variable.
64642    MEAN                 = Compute the mean of a variable.
64643    STANDARD DEVIATION   = Compute the standard deviation of a variable.
64644    ROOT MEAN SQUARE     = Compute the root mean square error of a
64645                           variable.
64646
64647Applications:
64648    Statistics
64649
64650Implementation Date:
64651    2013/2
64652
64653Program:
64654    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
64655    LET Y1 = 10 + 5*Y1
64656    LET SSQM = SUM OF SQUARES FROM MEAN Y1
64657    SET WRITE DECIMALS 4
64658    PRINT "Sum of Squares from Mean = ^SSQM"
64659
64660-----SUM PLOT---------------------------------------------------
64661
64662SUM PLOT
64663
64664Name:
64665    SUM PLOT
64666
64667Type:
64668    Graphics Command
64669
64670Purpose:
64671    Generates a sum plot.
64672
64673Description:
64674    A sum plot is a plot consisting of subsample sums versus
64675    subsample index.  The subsample sum is the sum of the data in the
64676    subsample.  The sum plot is used to answer the question-- "Does
64677    the subsample sum-of-counts change over different subsamples?".
64678    It consists of:
64679       Vertical   axis = subsample sum;
64680       Horizontal axis = subsample index.
64681    The sum plot yields 2 traces:
64682       1. a subsample sum trace; and
64683       2. a full-sample sum reference line.
64684    Like usual, the appearance of these 2 traces is
64685    controlled by the first 2 settings of the LINES,
64686    CHARACTERS, SPIKES, BARS, and similar attributes.
64687
64688Syntax:
64689    SUM PLOT   <y>   <x>     <SUBSET/EXCEPT/FOR qualification>
64690    where <y> is the response (= dependent) variable;
64691          <x> is the subsample identifier variable (this variable
64692              will appear on the horizontal axis);
64693    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
64694
64695Examples:
64696    SUM PLOT Y X
64697    SUM PLOT Y X1
64698
64699Default:
64700    None
64701
64702Synonyms:
64703    None
64704
64705Related Commands:
64706    CHARACTERS         = Sets the type for plot characters.
64707    LINES              = Sets the type for plot lines.
64708    FREQUENCY (LET)    = Compute subsample frequencies.
64709    HISTOGRAM          = Generates a histogram.
64710    PRODUCT  PLOT      = Generates a product plot.
64711    MEAN  PLOT         = Generates a mean plot.
64712    BOX PLOT           = Generates a box plot.
64713    PLOT               = Generates a data or function plot.
64714
64715Applications:
64716    Exploratory Data Analysis
64717
64718Implementation Date:
64719    88/9
64720
64721Program:
64722    LET Y = DATA 2 4 5 10 10 20 25 30 35
64723    LET X = DATA 1 1 1 2 2 3 3 3 3
64724    LINE BLANK DASH
64725    CHARACTER X BLANK
64726    XLIMITS 0.5 3.5
64727    Y1LABEL SUM
64728    X1LABEL GROUP ID
64729    SUM PLOT Y X
64730
64731-----SUMMARY-------------------------------------------------------
64732
64733SUMMARY
64734
64735Name:
64736    SUMMARY
64737
64738Type:
64739    Analysis Command
64740
64741Purpose:
64742    Carries out a summary analysis.
64743
64744Description:
64745    A summary analysis is a data analysis technique for computing and
64746    tabulating a variety of summary statistics for a data set.  This
64747    includes measures of location (e.g., the mean), of dispersion
64748    (e.g., the standard deviation), of randomness (the
64749    autocorrelation), and of the distribution (e.g., the skewness).
64750
64751Syntax:
64752    SUMMARY  <y1>   <SUBSET/EXCEPT/FOR qualification>
64753    where <y1> is a response variable;
64754    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
64755
64756Examples:
64757    SUMMARY Y
64758    SUMMARY Y2
64759
64760Note:
64761    Most of the statistics computed by SUMMARY can also be computed
64762    individually as LET subcommands.
64763
64764Default:
64765    None
64766
64767Synonyms:
64768    None
64769
64770Related Commands:
64771    LET     = Compute various statistics and transformations.
64772
64773Applications:
64774    XX
64775
64776Implementation Date:
64777    XX
64778
64779Program:
64780    LET Y = NORMAL RANDOM NUMBERS FOR I = 1 1 100
64781    SUMMARY Y
64782
64783-----SUPERSCRIPT SCALE (SET)---------------------------------------
64784
64785SUPERSCRIPT SCALE
64786
64787Name:
64788    SUPERSCRIPT SCALE (SET)
64789
64790Type:
64791    Set Subcommand
64792
64793Purpose:
64794    Specify the horizontal and vertical scale factors for the size
64795    of superscript and subscript characters.
64796
64797Description:
64798    By default, Dataplot sets the height and width of characters
64799    drawn in superscripts and subscripts to 0.5 of the current
64800    character height and width.
64801
64802    This command allows you to specify a different size factor.
64803    Note that the value is entered as a fraction of the current
64804    character size.  For example, a size of 1.0 leaves the
64805    character size unchanged and the default size is 0.5.
64806
64807Syntax 1:
64808    SET SUPERSCRIPT HORIZONTAL SCALE <value>
64809    where <value> is positive number between 0 and 20.
64810
64811    This syntax sets the width of the superscript/subscript
64812    characters relative to the current character width.
64813
64814Syntax 2:
64815    SET SUPERSCRIPT VERTICAL SCALE <value>
64816    where <value> is positive number between 0 and 20.
64817
64818    This syntax sets the height of the superscript/subscript
64819    characters relative to the current character height.
64820
64821Examples:
64822    SET SUPERSCRIPT VERTICAL SCALE  1.0
64823    SET SUPERSCRIPT HORIZONTAL SCALE  1.0
64824
64825    SET SUPERSCRIPT VERTICAL SCALE  0.75
64826    SET SUPERSCRIPT HORIZONTAL SCALE  0.5
64827
64828    SET SUPERSCRIPT VERTICAL SCALE  0.25
64829    SET SUPERSCRIPT HORIZONTAL SCALE  0.5
64830
64831Default:
64832    The default is to set both the character height and width to
64833    0.5 of their current value.
64834
64835Synonyms:
64836    SET SUBSCRIPT VERTICAL SCALE is a synonym for SET SUPERSCRIPT
64837    VERTICAL SCALE and SET SUBSCRIPT HORIZONTAL SCALE is a synonym for
64838    SET SUPERSCRIPT HORIZONTAL SCALE.
64839
64840Related Commands:
64841    SUP()    = Initiate a superscript in a text string.
64842    UNSP()   = Terminate a superscript in a text string.
64843    SUB()    = Initiate a subscript in a text string.
64844    UNSB()   = Terminate a subscript in a text string.
64845    TEXT     = Generate a text string on a graph.
64846
64847Applications:
64848    Presentation Graphics
64849
64850Implementation Date:
64851    2001/3
64852
64853Program:
64854    erase
64855    font triplex italic
64856    crlf off
64857    hw 4 3
64858    .
64859    move 20 95
64860    text default size:
64861    move 20 90
64862    text sub()tunsb()nsup()()13unsp()
64863    hw .5 1
64864    arrow 36 91 44 91
64865    hw 4 3
64866    text sub()6unsb()csup()13unsp() + lc()beta()sup()+unsp() + nu()
64867    .
64868    move 20 75
64869    text size 1:
64870    move 20 70
64871    set superscript horizontal scale 1
64872    set superscript vertical scale 1
64873    text sub()tunsb()nsup()()13unsp()
64874    hw .5 1
64875    arrow 36 71 44 71
64876    hw 4 3
64877    text sub()6unsb()csup()13unsp() + lc()beta()sup()+unsp() + nu()
64878    .
64879    move 20 55
64880    text size 0.5, 0.75:
64881    move 20 50
64882    set superscript horizontal scale 0.5
64883    set superscript vertical scale 0.75
64884    text sub()tunsb()nsup()()13unsp()
64885    hw .5 1
64886    arrow 36 51 44 51
64887    hw 4 3
64888    text sub()6unsb()csup()13unsp() + lc()beta()sup()+unsp() + nu()
64889
64890-----SYMBOL PLOT--------------------------------------
64891
64892SYMBOL PLOT
64893
64894Name:
64895    SYMBOL PLOT
64896
64897Type:
64898    Graphics Command
64899
64900Purpose:
64901    Generates a symbol plot.
64902
64903Description:
64904    A symbol plot is a scatter plot for which the attributes of the
64905    plot symbols are controlled by the values of other variables.
64906    This plot allows the size, type, color, and fill attribute to be
64907    controlled.
64908
64909Syntax 1:
64910    SYMBOL PLOT <y> <x> <size>  <SUBSET/EXCEPT/FOR qualification>
64911    where <y> is the vertical axis variable;
64912          <x> is the horizontal axis variable;
64913          <size> is a variable that controls the size of the plot
64914              symbol;
64915    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
64916
64917Syntax 2:
64918    SYMBOL PLOT <y> <x> <size> <symbol>
64919              <SUBSET/EXCEPT/FOR qualification>
64920    where <y> is the vertical axis variable;
64921          <x> is the horizontal axis variable;
64922          <size> is a variable that controls the size of the plot
64923              symbol;
64924          <symbol> is a variable that controls the type of symbol
64925              plotted;
64926    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
64927
64928Syntax 3:
64929    SYMBOL PLOT <y> <x> <size> <symbol> <color>
64930              <SUBSET/EXCEPT/FOR qualification>
64931    where <y> is the vertical axis variable;
64932          <x> is the horizontal axis variable;
64933          <size> is a variable that controls the size of the plot
64934              symbol;
64935          <symbol> is a variable that controls the type of symbol
64936              plotted;
64937          <color> is a variable that controls the color of the symbol;
64938    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
64939
64940Syntax 4:
64941    SYMBOL PLOT <y> <x> <size> <symbol> <color> <fill>
64942              <SUBSET/EXCEPT/FOR qualification>
64943    where <y> is the vertical axis variable;
64944          <x> is the horizontal axis variable;
64945          <size> is a variable that controls the size of the plot
64946              symbol;
64947          <symbol> is a variable that controls the type of symbol
64948              plotted;
64949          <color> is a variable that controls the color of the symbol;
64950          <fill> is an optional variable that controls whether the
64951              symbol is filled or not;
64952    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
64953
64954Examples:
64955    SYMBOL PLOT Y X PRESSURE
64956    SYMBOL PLOT Y X PRESSURE TYPE
64957    SYMBOL PLOT Y X PRESSURE TYPE ICOL
64958    SYMBOL PLOT Y X PRESSURE TYPE ICOL IFILL
64959
64960Note:
64961    SYMBOL PLOT Y and SYMBOL PLOT Y X are equivalent to PLOT Y and
64962    PLOT Y X respectively.  The only difference is that the line
64963    pattern is automatically set to blank.
64964
64965Note:
64966    The <size>, <symbol>, <color>, and <fill> variables are optional,
64967    but must be entered in that order.  To skip one, set all the
64968    elements of the skipped variable to 1.  For example,
64969       LET N = SIZE Y
64970       LET SYMBOL = 1 FOR I = 1 1 N
64971       SYMBOL PLOT Y X SIZE SYMBOL COLOR
64972
64973Note:
64974    The size for Y(i) is scaled to: Y(i)/MAXIMUM(ABS(Y)).  The maximum
64975    value of Y is set to the size given in the CHARACTER SIZE (or
64976    CHARACTER HW) command while the others multiply this size by the
64977    scale factor.  The minimum scale factor is truncated at 5%.
64978
64979Note:
64980    The <symbol> and <color> variables define indices to the CHARACTER
64981    and CHARACTER COLOR commands respectively.  That is, they contain
64982    values between 1 and 100 (e.g., a value of 3 would go to the third
64983    setting of these commands).
64984
64985Note:
64986    Zero values for the <fill> variable indicate non-filled characters
64987    while non-zero values indicate filled characters.  In addition, to
64988    generate filled characters a fillable symbol must be used (e.g.,
64989    CIRCLE or SQUARE).
64990
64991Default:
64992    None
64993
64994Synonyms:
64995    None
64996
64997Related Commands:
64998    CHARACTER        = Sets the type for plot characters.
64999    CHARACTER COLOR  = Sets the color for plot characters.
65000    CHARACTER FILL   = Sets the fill for plot characters.
65001    ANDREWS PLOT     = Generates an Andrews plot.
65002    PROFILE PLOT     = Generates a profile plot.
65003    STAR PLOT        = Generates a star plot.
65004    PLOT             = Generates a data or function plot.
65005
65006Reference:
65007    "Graphical Methods of Data Analysis", Chambers, Cleveland, Kleiner,
65008    and Tukey.  Wadsworth, 1983.
65009
65010Applications:
65011    Multivariate Analysis
65012
65013Implementation Date:
65014    92/12
65015
65016Program:
65017    DIMENSION 20 COLUMNS
65018    MULTIPLOT 2 2; MULTIPLOT CORNER COORDINATES 0 0 100 100
65019    SKIP 25
65020    READ CURRIE.DAT ID1 ID2 FRWC CTOTAL POT LEAD IRON
65021    LET TYPE = ID1
65022    LET TYPE = 1 SUBSET ID1 < 10
65023    LET TYPE = 2 SUBSET ID1 = 11 TO 19
65024    LET TYPE = 3 SUBSET ID1 > 19
65025    LET N = SIZE ID1
65026    LET DUMMY = 1 FOR I = 1 1 N
65027    TITLE AUTOMATIC
65028    Y1LABEL POTASSIUM
65029    X1LABEL LEAD
65030    LEGEND SIZE 1.2
65031    CHARACTER SIZE 6.0 ALL
65032    .
65033    CHARACTER CIRCLE SQUARE DIAMOND TRIANGLE
65034    LEGEND 1 IRON DETERMINES SYMBOL SIZE
65035    SYMBOL PLOT POT LEAD IRON
65036    .
65037    CHARACTER SIZE 2.0 ALL
65038    LEGEND 1 ID1 DETERMINES SYMBOL TYPE
65039    SYMBOL PLOT POT LEAD DUMMY TYPE
65040    .
65041    CHARACTER SIZE 6.0 ALL
65042    LEGEND 1 IRON DETERMINES SYMBOL SIZE
65043    LEGEND 2 ID1 DETERMINES SYMBOL TYPE
65044    SYMBOL PLOT POT LEAD IRON TYPE
65045    .
65046    LET AFILL = 0 FOR I = 1 1 N
65047    LET AFILL = 1 SUBSET ID2 = 1
65048    LEGEND 3 ID2 DETERMINES FILL
65049    SYMBOL PLOT POT LEAD IRON TYPE DUMMY AFILL
65050    END OF MULTIPLOT
65051
65052-----SYMMETRY PLOT--------------------------------------
65053
65054SYMMETRY PLOT
65055
65056Name:
65057    SYMMETRY PLOT
65058
65059Type:
65060    Graphics Command
65061
65062Purpose:
65063    Generates a symmetry plot.
65064
65065Description:
65066    A symmetry plot is a graphical data analysis technique for
65067    assessing if a data set is symmetric about the mean.  It consists
65068    of:
65069       Vertical   axis = Y(n-i+1) - median;
65070       Horizontal axis = median - Y(i);
65071    where median is the sample median, Y is sample variable, and i goes
65072    from 1 to the index of the median point.  This plot graphs the
65073    distance from the median of points above the median against the
65074    corresponding points below the median.  The interpretation of this
65075    plot is that the closer these points lie to the 45% line, the
65076    more symmetric the data is.  The symmetry plot can be generated
65077    for either raw data of for pre-computed frequencies (i.e., grouped
65078    data).
65079
65080Syntax 1:
65081    SYMMETRY PLOT   <y>     <SUBSET/EXCEPT/FOR qualification>
65082    where <y> is the variable of raw data values;
65083    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
65084
65085    This syntax is used when you have raw data.
65086
65087Syntax 2:
65088    SYMMETRY PLOT  <y>  <X>   <SUBSET/EXCEPT/FOR qualification>
65089    where <y> is the variable of pre-computed frequencies;
65090          <x> is the variable of group identifiers;
65091    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
65092
65093    This syntax is used when you have raw data.
65094
65095Examples:
65096    SYMMETRY PLOT Y1
65097    SYMMETRY PLOT Y1 GROUP
65098    SYMMETRY PLOT Y1  SUBSET Y1 > -3.0
65099
65100Default:
65101    None
65102
65103Synonyms:
65104    None
65105
65106Related Commands:
65107    LINES              = Sets the type for plot lines.
65108    CHARACTERS         = Sets the type for plot characters.
65109    PLOT               = Generates a data or function plot.
65110    PROBABILITY PLOT   = Generate a probability plot.
65111    PERCENT POINT PLOT = Generates a percent point plot.
65112
65113Reference:
65114    "Graphical Methods for Data Analysis", Chambers, Cleveland,
65115    Kleiner, and Tukey.  Wadsworth, 1983.
65116
65117Applications:
65118    Exploratory Data Analysis
65119
65120Implementation Date:
65121    88/9
65122
65123Program:
65124    SKIP 25
65125    READ MARSHAK.DAT Y
65126    CHARACTER CIRCLE
65127    CHARACTER HW 2.0 1.5
65128    LINE BLANK
65129    Y1LABEL POINTS ABOVE MEDIAN
65130    X1LABEL POINTS BELOW MEDIAN
65131    TITLE AUTOMATIC
65132    SYMMETRY PLOT Y
65133
65134-----SYNTAX-------------------------------------------------------
65135
65136
65137Syntax:
65138
65139Name:
65140    SYNTAX
65141
65142Type:
65143    Keyword
65144
65145Purpose:
65146    Symbolic name for DATAPLOT's syntax file.  It is used with the
65147    SEARCH and LIST commands.
65148
65149Description:
65150    DATAPLOT's syntax file contains an example of the syntax for each
65151    DATAPLOT command sorted alphabetically.
65152
65153Syntax:
65154    None
65155
65156Examples:
65157    SEARCH SYNTAX FIT
65158    LIST SYNTAX FOR I = 1 1 35
65159
65160Note:
65161    The SYNTAX file is stored in the DATAPLOT directory.  It has the
65162    name SYNTAX (or syntax for Unix systems).  The exact file name and
65163    the directory where it is stored can vary depending on the
65164    installation (see your local DATAPLOT implementor to find the
65165    exact name on your system).
65166
65167Note:
65168    If DATAPLOT is unable to open the syntax file, it is most likely
65169    because the directory name is not specified correctly in the local
65170    DATAPLOT code.  See your local DATAPLOT implementor to have this
65171    corrected.
65172
65173Default:
65174    None
65175
65176Synonyms:
65177    None
65178
65179Related Commands:
65180    SEARCH        = Search a file for a string.
65181    LIST          = Lists the contents of a file.
65182    DIRECTORY     = Symbolic name for DATAPLOT's directory file.
65183    DICTIONARY    = Symbolic name for DATAPLOT's dictionary file.
65184    DATASETS      = Symbolic name for DATAPLOT's data sets file.
65185    DESIGNS       = Symbolic name for DATAPLOT's design of experiments
65186                    file.
65187    COMMANDS      = Symbolic name for DATAPLOT's command file.
65188    MACROS        = Symbolic name for DATAPLOT's macros file.
65189    PROGRAMS      = Symbolic name for DATAPLOT's programs file.
65190    DISTRIBU      = Symbolic name for DATAPLOT's distributions file.
65191    FUNCTION      = Symbolic name for DATAPLOT's function file.
65192
65193Applications:
65194    XX
65195
65196Implementation Date:
65197    93/12
65198
65199Program:
65200    XX
65201
65202-----SYNCH (LET)--------------------------------
65203
65204SYNCH
65205
65206Name:
65207    SYNCH (LET)
65208
65209Type:
65210    Library Function
65211
65212Purpose:
65213    Compute the synchrotron radiation function.
65214
65215Description:
65216    The synchrotron radiation function of order 1 is
65217    defined as:
65218
65219        f(x,1) = x*INTEGRAL[K(5/3)(t)dt],   x >= 0
65220
65221    where the integral is defined from x to positive
65222    infinity and K(n) is the modified Bessel function of
65223    order n.
65224
65225    The synchrotron radiation function of order 2 is
65226    defined as:
65227
65228        f(x,2) = x*K(2/3)(x)       x >= 0
65229
65230    where K(n) is the modified Bessel function of order n.
65231
65232    Dataplot computes this function using ACM Algorithm 757 (see
65233    Reference: below).
65234
65235Syntax 1:
65236    LET <y> = SYNCH1(<x>)    <SUBSET/EXCEPT/FOR qualification>
65237    where <x> is a non-negative number, variable or parameter;
65238          <y> is a variable or a parameter (depending on what <x>
65239              is) where the computed synchrotron radiation
65240              function values are stored;
65241    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
65242
65243    This syntax computes the order 1 synchrotron radiation
65244    function.
65245
65246Syntax 2:
65247    LET <y> = SYNCH2(<x>)    <SUBSET/EXCEPT/FOR qualification>
65248    where <x> is a non-negative number, variable or parameter;
65249          <y> is a variable or a parameter (depending on what <x>
65250              is) where the computed synchrotron radiation
65251              function values are stored;
65252    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
65253
65254    This syntax computes the order 2 synchrotron radiation
65255    function.
65256
65257Examples:
65258    LET A = SYNCH1(2)
65259    LET A = SYNCH2(X)
65260    LET X2 = SYNCH1(X) FOR X1 = 0.1 0.1 3.0
65261
65262Note:
65263    Library functions are distinguished from let subcommands
65264    in the following ways.
65265    1) Functions enclose the input value in parenthesis.  Let
65266       subcommands use spaces.
65267    2) Functions can accept (and return) either parameters
65268       (i.e., single values) or variables (i.e., an array of
65269       values) while let subcommands are specific in which they
65270       accept as input and what they return as output.
65271    3) Functions can accept expressions while let subcommands
65272       do not.  For example, the following is legal:
65273           LET Y2 = ABS(Y1-INT(Y1))
65274       For let subcommands, you typically have to do something
65275       like the following:
65276           LET YTEMP = Y**2 + 8
65277           LET A = SUM YTEMP
65278
65279Default:
65280    None
65281
65282Synonyms:
65283    None
65284
65285Related Commands:
65286    ABRAM      = Compute the Abramowitz integral.
65287    CLAUSN     = Compute the Clausen integral.
65288    DEBYE      = Compute the Debye function.
65289    EXP3       = Compute the cubic exponential integral.
65290    GOODST     = Compute the Goodwin and Stanton integral.
65291    LOBACH     = Compute the Lobachevski integral.
65292    STROM      = Compute the Stromgren integral.
65293    TRAN       = Compute the transport integral.
65294
65295Reference:
65296    "ACM Transactions of Mathematical Software", Allan MacLead,
65297    Vol. 22, No. 3, September, 1996, pp. 288-301.
65298
65299Applications:
65300    Special Functions
65301
65302Implementation Date:
65303    1999/6
65304
65305Program:
65306    LINE SOLID DOTTED
65307    PLOT SYNCH1(X) FOR X = 0 0.01 10 AND
65308    PLOT SYNCH2(X) FOR X = 0 0.01 10
65309
65310-----SYSTEM-------------------------------------------------------
65311
65312SYSTEM
65313
65314Name:
65315    SYSTEM
65316
65317Type:
65318    Support Command
65319
65320Purpose:
65321    This command allows DATAPLOT to issue an operating system command
65322    on the host computer.
65323
65324Description:
65325    The Fortran 77/90 standard do not explicitly support a SYSTEM
65326    library function, so this command is compiler dependent.  However,
65327    most Fortran compilers do provide a library function that supports
65328    this capability.
65329
65330    This command should be available on most currently suppported
65331    platforms.  However, it is possible that the command is not
65332    available on your local platform.
65333
65334Syntax:
65335    SYSTEM <string>
65336    where <string> contains a command to be executed on the local
65337              operating system.
65338
65339Examples:
65340    SYSTEM  DIR       (on an IBM/PC system)
65341    SYSTEM  ls        (on a Unix system)
65342
65343Note:
65344    This command is host dependent.  It is operational on the
65345    following systems:
65346
65347        UNIX/Linux          (except Cray UNICOS)
65348        Microsoft Windows   (based on Intel compiler)
65349        CYBER NOS/VE
65350
65351    It has been coded, but not tested, on the VAX/VMS system.
65352
65353Note:
65354    DATAPLOT does no error checking on the requested command.  It is
65355    the users responsibility to enter the correct operating system
65356    command.
65357
65358Note:
65359    Systems may vary somewhat in how sophisticated a command can be
65360    executed.  Also be aware that on most systems, a separate process
65361    is spawned and the environment is not passed back to the calling
65362    system.  Specifically, on a Unix system, the following does not
65363    work:
65364
65365         SYSTEM cd ~/datasets
65366
65367    since the current environment is restored after the command
65368    completes execution.
65369
65370Note:
65371    The following updates were made to the SYSTEM command 03/2019.
65372
65373    For the Windows 7/8/10 platforms, the SYSTEM command works
65374    as follows:
65375
65376      1) A new terminal window is opened.
65377      2) The requested command is executed.
65378      3) When the requested command is completed, the new window is
65379         closed and control returns to the Dataplot session.
65380
65381    Several SET commands have been added to control this behavior.
65382    Specifically,
65383
65384      1) In some cases, it is desirable to leave the new Window up.
65385         For example, you may need to view the results from the
65386         SYSTEM command.  To specify that the new command window
65387         should remain, enter the command
65388
65389              SET SYSTEM PERSIST ON
65390
65391         To reset the default, enter
65392
65393              SET SYSTEM PERSIST OFF
65394
65395         Note that control does not return to the Dataplot session
65396         until the new terminal window is closed.
65397
65398         This command has no effect on Unix/Linux and MacOS platforms.
65399
65400      2) In some cases, you may want the SYSTEM command to operate in
65401         the background and not open a new terminal window.  To specify
65402         this, enter the command
65403
65404              SET SYSTEM HIDDEN ON
65405
65406         For Windows, Dataplot normally executes the SYSTEM command with
65407         the SYSTEMQQ system call in the Intel Fortran library.  If
65408         HIDDEN is set to ON, Dataplot will use the EXECUTE_COMMAND_LINE
65409         routine that was added in the Fortran 2008 standard.  If you
65410         compile Dataplot for Windows using an older version of the Intel
65411         compiler or a non-Intel compiler, the EXECUTE_COMMAND_LINE
65412         subroutine may or may not be available.  If not, Dataplot will
65413         revert to using SYSTEMQQ (and HIDDEN ON will have no effect).
65414
65415         To reset the default, enter
65416
65417              SET SYSTEM HIDDEN OFF
65418
65419         This command has no effect on Unix/Linux and MacOS platforms.
65420
65421      3) By default, Dataplot uses "CALL SYSTEM" for Linux/Unix and
65422         MacOS platforms and "CALL SYSTEMQQ" for Windows platforms.
65423
65424         You can request that Dataplot use the EXECUTE_COMMAND_LINE
65425         subroutine instead by entering the command
65426
65427              SET QWIN SYSTEM EXECUTE COMMAND LINE
65428
65429         Be aware that this is relatively new addition to the Fortran
65430         standard and may not be available in all Fortran compilers (or
65431         in older versions of compilers).  Specifically, it is not
65432         supported in gfortran (Linux, MacOS) until version 5.x and
65433         version 16 of the Intel compiler.  So this option may not be
65434         available on all platforms.  The Windows executable for 2019/03
65435         that can be downloaded from the Dataplot web site uses version 17
65436         of the Intel compiler, so this feature is available.  If you are
65437         running Dataplot on a platform where EXECUTE_COMMAND_LINE is not
65438         available, Dataplot will revert to "CALL SYSTEM" or
65439         "CALL SYSTEMQQ".
65440
65441         One advantage of using EXECUTE_COMMAND_LINE is that it supports
65442         either synchronous or asynchronous execution.  By synchronous, we
65443         mean that control does not return to the Dataplot session until
65444         the SYSTEM command completes execution.  By asynchronous, we
65445         mean that control returns to the Dataplot session after the
65446         SYSTEM command is initated (but not neccessarily completed).
65447
65448         To specify asynchronous, enter
65449
65450             SET COMMAND LINE EXECUTE WAIT ON
65451
65452         To restore the default of synchronous, enter
65453
65454             SET COMMAND LINE EXECUTE WAIT OFF
65455
65456         Note that this command only applies if EXECUTE_COMMAND_LINE is
65457         used to implement the SYSTEM command.
65458
65459Note:
65460    This command preserves the case as entered.  This is
65461    important for the Unix implementation since Unix commands are
65462    case sensitive.  DATAPLOT does not try to guess what case
65463    should be passed to the local host.
65464
65465Default:
65466    None
65467
65468Synonyms:
65469    DOS
65470    UNIX
65471
65472Related Commands:
65473    SLEEP         = Pause for <n> seconds.
65474    CD            = Change the current directory
65475    PWD           = Retrieve the current working directory.
65476
65477Applications:
65478    Interact with the local operating system
65479
65480Implementation Date:
65481    1989/02: Original implementation
65482    2019/03: Support for SET SYSTEM PERSIST
65483    2019/03: Support for SET SYSTEM HIDDEN
65484    2019/03: Support for SET QWIN SYSTEM EXECUTE COMMAND LINE
65485    2019/03: Support for SET COMMAND LINE EXECUTE WAIT
65486
65487Program:
65488    DEVICE 2 POSTSCRIPT
65489    PLOT X**2 FOR X = 1 1 9
65490    DEVICE 2 CLOSE
65491    SYSTEM lpr dppl1f.dat
65492
65493-----SYSTEM SWITCHES (SET)--------------------------------------------
65494
65495SYSTEM SWITCHES
65496
65497Name:
65498    SYSTEM SWITCHES (SET)
65499
65500Type:
65501    Set Subcommand
65502
65503Purpose:
65504    Probe for values pertaining to certain operating system values.
65505
65506Description:
65507    Dataplot extracts the values of several operating system
65508    environment variables.  These values can be obtained by the user
65509    using the PROBE command.  Note that these settings cannot be
65510    modified with the SET command.
65511
65512    The list of available environment variable switches is
65513
65514        HOME              - Returns the user's home directory.
65515
65516                            On Windows platforms, this is the value of
65517                            the USERPROFILE environment variable.
65518
65519                            On Linux platforms, this is the value of the
65520                            HOME environment variable.
65521
65522        USER              - Returns the user name.
65523
65524                            On Windows platforms, this is the value of the
65525                            USERPNAME environment variable.
65526
65527                            On Linux platforms, this is the value of the
65528                            USER environment variable.
65529
65530        HOST              - Returns the computer name.
65531
65532                            On Windows platforms, this is the value of the
65533                            COMPUTERNAME environment variable.
65534
65535                            On Linux platforms, this is the value of the
65536                            HOST environment variable for the c-shell or
65537                            t-shell and the HOSTNAME variable for the
65538                            bash shell.
65539
65540        DEFAULT PRINTER   - Returns the default printer.
65541
65542                            On Linux platforms, this is the value of the
65543                            PRINTER environment variable.
65544
65545                            This is not supported on Windows platforms.
65546
65547        SHELL             - Returns the current shell.
65548
65549                            On Linux platforms, this is the value of the
65550                            SHELL environment variable.
65551
65552                            This is not supported on Windows platforms.
65553
65554        WINDOWS BITS      - Returns "64" if the machine is a 64-bit
65555                            machine and "32" if the machine is a
65556                            32-bit machine.
65557
65558                            On Windows platforms, this is determined
65559                            from the PROCESSOR_ARCHITECTURE environment
65560                            variable.
65561
65562                            This is not supported on Linux platforms.
65563
65564        PROGRAM FILES     - On Windows platforms, this is the value of
65565                            the PROGRAMFILES environment variable.
65566
65567                            This is not supported on Linux platforms.
65568
65569        PROGRAM FILES X86 - On Windows platforms, this is the value
65570                            of the PROGRAMFILES(X86) environment
65571                            variable.
65572
65573                            This is not supported on Linux platforms.
65574
65575Syntax:
65576    PROBE <SYSTEM SWITCH>
65577    where <SYSTEM SWITCH> is one of the names listed above.
65578
65579Examples:
65580    PROBE HOME
65581    PROBE USER
65582    PROBE HOST
65583    PROBE DEFAULT PRINTER
65584    PROBE SHELL
65585    PROBE PROGRAM FILES X86
65586    PROBE PROGRAM FILES
65587    PROBE WINDOW BITS
65588
65589Note:
65590    The value is saved in the string PROBESTR.  You can save the
65591    value to your own string as follows
65592
65593        PROBE USER
65594        LET STRING USERNAME = ^PROBESTR
65595
65596Default:
65597    Dataplot queries the values of these settings when Dataplot
65598    is first initialized.
65599
65600Synonyms:
65601    USER PROFILE is a synonym for HOME
65602    USER NAME is a synonym for USER
65603    HOST NAME is a synonym for HOST
65604    COMPUTER NAME is a synonym for HOST
65605
65606Related Commands:
65607    WORKSPACE SWITCHES     = Probe for values pertaining to the Dataplot
65608                             workspace.
65609    HOUSEKEEPING SWITCHES  = Probe for values pertaining to certain
65610                             Dataplot housekeeping settings.
65611    SYSTEM LIMITS          = Parameters defining certain Dataplot limits.
65612    MACHINE CONSTANTS      = Return the values for certain machine
65613                             constants.
65614
65615Applications:
65616    Debugging
65617
65618Implementation Date:
65619    2020/01
65620
65621Program:
65622    PROBE USER
65623    LET STRING USERNAME = ^PROBESTR
65624    PROBE HOST
65625    LET STRING COMPNAME = ^PROBESTR
65626    PROBE HOME
65627    LET STRING USERHOME = ^PROBESTR
65628    .
65629    PRINT "Computer Name:   ^COMPNAME"
65630    PRINT "User Name:       ^USERNAME"
65631    PRINT "Home Directory:  ^USERHOME"
65632
65633-----SUN-------------------------------------------------------
65634
65635SUN
65636
65637Name:
65638    SUN
65639
65640Type:
65641    Output Device Command
65642
65643Purpose:
65644    The SUN command is used to direct graphical output to a SUN
65645    workstation running in SunWindows (either in a gfxtool or a Sun
65646    View window).
65647
65648Description:
65649    As gfxtool and Sun View are no longer supported, this is an obsolete
65650    device.
65651
65652Syntax 1:
65653    SUN
65654
65655    This form designates device 1 as a Sun device.
65656
65657Syntax 2:
65658    DEVICE <1/2/3> SUN
65659
65660    This form designates one of DATAPLOT's 3 devices (typically device
65661    1) as a Sun device.
65662
65663Examples:
65664    SUN
65665    DEVICE 1 SUN
65666
65667Note:
65668    The SUN driver only works if DATAPLOT is running on the SUN using
65669    the Sun View window system.  The SUN driver uses SUN specific
65670    libraries.  This means the local DATAPLOT installers must uncomment
65671    some source code before this driver is operational.  If the SUN is
65672    running DATAPLOT from another host machine, or if the SUN driver
65673    has not been activated at your site, then run DATAPLOT in a
65674    TEKTOOLS window (and specify a Tektronix 4014 device).
65675
65676Note:
65677    The SUN driver can automatically determine whether you are running
65678    on a color or a black and white device.
65679
65680Note:
65681    This driver is becoming obsolete since Sun is switching to OpenLook
65682    and Motif based window systems.  Use the X11 driver (HELP X11 for
65683    details) with OpenLook, Motif, or a plain vanilla X11 window
65684    system.
65685
65686Default:
65687    Off
65688
65689Synonyms:
65690    None
65691DEVICE NOTES
65692    1) HARDWARE TEXT - Hardware characters are scalable.  No special
65693       fonts are supported.  Vertical strings are not rotated.
65694    2) COLOR - The colors WHITE, BLACK, RED, GREEN, BLUE, MAGENTA, and
65695       YELLOW are supported.  All other colors are mapped to one of
65696       these colors (enter SHOW COLORS SUN for the list).
65697    3) HARDWARE FILL - Solid area fills are generated in hardware.
65698    4) DASH PATTERNS - Unique dash patterns are generated for DASH,
65699       DOT, DASH2, and DASH3.  DASH4 and DASH5 generate whatever the
65700       most recently set pattern was.
65701    5) LINE WIDTH - Thick lines are generated in hardware.
65702    6) GRAPHICS INPUT - The CROSS-HAIR command is supported for this
65703       device.
65704
65705Related Commands:
65706    TEKTRONIX       = Direct graphical output to a Tektronix device.
65707    X11             = Direct graphical output to an X11 device.
65708    HP              = Direct graphical output to an HP device.
65709    POSTSCRIPT      = Direct graphical output to a Postscript device.
65710    DEVICE          = Specify certain actions for the graphics output.
65711
65712Applications:
65713    Device Specification
65714
65715Implementation Date:
65716    1989/02
65717
65718Program:
65719    XX
65720
65721-----SWAP CASE-----------------------------------------------------
65722
65723SWAP CASE
65724
65725Name:
65726    SWAP CASE
65727
65728Type:
65729    Let Subcommand
65730
65731Purpose:
65732    Given a string, convert all upper case characters to lower case and
65733    convert all lower case characters to upper case.
65734
65735Syntax:
65736    LET <sout> = SWAP CASE  <sorg>
65737    where <sout> is the resulting string;
65738    and   <sorg> is the name of the original string.
65739
65740Examples:
65741    LET SOUT = SWAP CASE S1
65742
65743Default:
65744    None
65745
65746Synonyms:
65747    None
65748
65749Related Commands:
65750    LOWER CASE          = Convert a string to lower case.
65751    UPPER CASE          = Convert a string to upper case.
65752    LET FUNCTION        = Defines a function.
65753    LET STRING          = Defines a string.
65754    READ STRING         = Reads a string from a file.
65755    SUBSTITUTE CHARACTE = Substitute the value of a string or parameter.
65756    &                   = Concatenate two strings.
65757    SUBTRING            = Extract a substring from an existing string.
65758    STRING INDEX        = Extract the start/stop positions of a substring
65759                          within a string.
65760    STRING CONCATENATE  = Concatenate one or more previously defined
65761                          strings.
65762    STRING EDIT         = Edit a string.
65763    STRING MERGE        = Insert a string into another string without
65764                          overwrite.
65765    STRING REPLACE      = Insert a string into another string with
65766                          overwrite.
65767    STRING LENGTH       = Return the length of a string.
65768    CHARACTER           = Convert numeric values to strings based on
65769                          the ASCII collating sequence.
65770    ICHAR               = Convert a string to numeric values based on
65771                          the ASCII collating sequence.
65772    GROUP LABEL         = Define the text for group labels.
65773
65774Applications:
65775    Data Management
65776
65777Implementation Date:
65778    2019/02
65779
65780Program:
65781    LET STRING S1 = XXXXyyyyZZZZwwww
65782    LET SOUT = UPPER CASE S1
65783
65784    The resulting string is xxxxYYYYzzzzWWWW.
65785
65786-----SVG---------------------------------------------------------
65787
65788SVG
65789
65790Name:
65791    SVG
65792
65793Type:
65794    Output Device Command
65795
65796Purpose:
65797    Create SVG (Scalable Vector Graphics) format graphics files.
65798
65799Description:
65800    The ability to generate graphics for web based applications is
65801    increasingly important.  The three most common formats for
65802    web applications are:
65803
65804        1) GIF
65805        2) JPEG
65806        3) PNG (Portable Network Graphics)
65807
65808    Note that these are all bit mapped formats.
65809
65810    SVG (Scalable Vector Graphics) is an XML based graphics format
65811    for web applications.  Note that XML is a meta markup language,
65812    that is it is a langauge for defining languages.  SVG is one
65813    specific implementation of an XML language.  This is analogous
65814    to HTML being a specific implementation of a SGML (Standard
65815    Generalized Markup Language) language.
65816
65817    As of 9/2010, most major browsers provide native support for
65818    SVG files.  The one exception is Internet Explorer.  However,
65819    version 9 of Internet Explorer is expected to provide native
65820    support and various SVG plugins are available for earlier
65821    versions.
65822
65823    In addition to web browsers, a number of image viewers and
65824    graphics editing programs now support SVG files.  For example,
65825    the open source GIMP program can view SVG files.  Having a
65826    non web-based viewer can be helpful when debugging web applications
65827    in addition to providing another alternative for graphics output.
65828
65829    SVG is a vector based rather than a bitmap based protocol.
65830    Also, SVG is an ASCII file that contains a textual
65831    description of the graph.  One of the primary advantages
65832    of this approach is that web graphics can be easily edited
65833    much the way the HTML files can be edited.  This can make
65834    the maintenance of the graphics on a web site easier.
65835
65836    This driver was substantially overhauled 10/2010.  If you
65837    are interested in using this driver, it is strongly recommended
65838    that you upgrade to a version of Dataplot that is at least as
65839    new as 10/2010.
65840
65841Syntax 1:
65842    SVG
65843
65844    This form designates device 1 as an SVG graphics device,
65845    which results in the SVG output being written to the
65846    screen.  This syntax is not partiucularly useful since the
65847    SVG needs to be saved in a file so that an external SVG viewer
65848    or web browser can read it.
65849
65850Syntax 2:
65851    DEVICE <1/2/3> SVG
65852
65853    This form designates one of DATAPLOT's 3 devices (typically
65854    device 2) as an SVG device.
65855
65856Syntax 3:
65857    DEVICE <1/2/3> SVG  <hor>   <vert>
65858    where <hor> specifies the width (in pixels) of the graph;
65859    and where <vert> specifies the height (in pixels) of the graph.
65860
65861    By default, Dataplot generates the SVG graph at 600x465
65862    pixels.  Since the dimensions of the SVG graph are defined when
65863    the device is intialized (i.e., when the DEVICE 2 SVG command is
65864    entered), the typical method for specifying the pixel dimensions
65865
65866         DEVICE 2 PICTURE POINTS 800 600
65867
65868    cannot be used.  This syntax provides a method for overriding
65869    the default dimensions.  Note that the minimum dimension is 200
65870    pixels and the maximum dimension is 1200 pixels.
65871
65872Examples:
65873    SET IPL1NA plot1.svg
65874    DEVICE 2 SVG
65875
65876    DEVICE 2 SVG 800 600
65877
65878Note:
65879    For SVG, it is typically desirable to put each plot in a
65880    separate file with a unique name.  This can be accomplished
65881    with a sequence of commands like the following:
65882
65883        SET IPL1NA  plot1.svg
65884        DEVICE 2 SVG
65885           generate first plot
65886        DEVICE 2 CLOSE
65887        SET IPL1NA  plot2.svg
65888        DEVICE 2 SVG
65889           generate second plot
65890        DEVICE 2 CLOSE
65891
65892    The SET IPL1NA command must come before the DEVICE 2 SVG command
65893    in order for the name to be used.
65894
65895Note:
65896    SVG was designed primarily as a graphics format for web pages.
65897    In Dataplot, you can generate an HTML page with embedded SVG
65898    graphics by using the CAPTURE HTML command.  This is
65899    demonstrated in the Program example below.  Note that
65900    when the CAPTURE HTML is in effect, a DEVICE 2 CLOSE will
65901    cause the following lines are inserted into the HTML output:
65902
65903        <OBJECT data="plot.svg"
65904                width="  600" height="  465"
65905                type="image/svg+xml">
65906        </OBJECT>
65907
65908    The "plot.svg" will actually be the name specified on the
65909    SET IPL1NA command.
65910
65911    Note that in some cases, you may want to specify a URL for
65912    the file name.  This can be specified with the command
65913
65914        SET SVG URL <url>
65915
65916    In this case, the path will be removed from the file name
65917    and replaced with the specified URL.  To turn this off, enter
65918
65919        SET SVG URL NULL
65920
65921Note:
65922    Style sheets allow easier maintenance/editing by specifying
65923    default attributes in an external style sheet file.  The
65924    default Dataplot style sheet is "dataplot.css" and it is
65925    stored in the Dataplot "HELP" sub-directory.
65926
65927    Currently, Dataplot supports the following class for
65928    the background (this only sets the color, not the size):
65929
65930       rect.background
65931
65932    Currently, Dataplot supports the following classes for
65933    lines:
65934
65935       polyline.narrow-solid
65936       polyline.medium-solid
65937       polyline.wide-solid
65938       polyline.extrawide-solid
65939       polyline.narrow-dotted
65940       polyline.medium-dotted
65941       polyline.wide-dotted
65942       polyline.extrawide-dotted
65943       polyline.narrow-dash
65944       polyline.medium-dash
65945       polyline.wide-dash
65946       polyline.extrawide-dash
65947       polyline.narrow-dash2
65948       polyline.medium-dash2
65949       polyline.wide-dash2
65950       polyline.extrawide-dash2
65951       polyline.narrow-dash3
65952       polyline.medium-dash3
65953       polyline.wide-dash3
65954       polyline.extrawide-dash3
65955       polyline.narrow-dash4
65956       polyline.medium-dash4
65957       polyline.wide-dash4
65958       polyline.extrawide-dash4
65959       polyline.narrow-dash5
65960       polyline.medium-dash5
65961       polyline.wide-dash5
65962       polyline.extrawide-dash5
65963
65964    Currently, Dataplot supports the following classes for
65965    text:
65966
65967       text.left-horizontal
65968       text.center-horizontal
65969       text.right-horizontal
65970
65971    Currently, no classes are supported for region fills.
65972
65973    As we develop more experience with SVG graphics, we may
65974    expand the supported classes.
65975
65976    When using external style sheets, you modify the attributes
65977    of the clases.  However, you do not edit which classes are
65978    available (Dataplot generates the SVG file based on the above
65979    classes.
65980
65981    Dataplot will check the value of certain attributes
65982    (color for lines, color and size for text) when generating
65983    the SVG file.  If these are not the default values, then
65984    a local "style" option will be added for that element
65985    to override the value in the style sheet.
65986
65987    To make your own style sheets, simply copy the default
65988    file "dataplot.css" to a new file name and then edit that
65989    file.  Use the SET SVG STYLE SHEET NAME command (see below)
65990    to specify the location of the style sheet you wish to use
65991    (this should be the location of the style sheet relative to
65992    the location of the SVG file on your web pages).
65993
65994Note:
65995    The following SET commands apply to the SVG output.
65996
65997        SET SVG COORDINATE SYSTEM  <PIXEL/PERCENT>
65998            - specify whether coordinates are specified in
65999              pixel units or percent untis.  Currently, only
66000              pixel units are supported.  The PERCENT option is
66001              reserved for possible future implementation.
66002
66003        SET SVG FONT NAME <SERIF/SANS/MONOSPACE>
66004            - specify the font name for hardware characters.
66005              Generic names (i.e., supported on all SVG viewers)
66006              are: serif, sans-serif, and monospace.  Specific
66007              font names (e.g., Arial) depend on what fonts are
66008              installed on your local system.  Currently, only
66009              the generic fonts are supported.  For specific
66010              fonts, use style sheets and set the name in the
66011              style sheet.  The default is sans-serif.
66012        SET SVG FONT WEIGHT <NORMAL/BOLD>
66013            - specify whether text is drawn as bold or normal.
66014              The default is bold.
66015        SET SVG FONT STYLE <NORMAL/ITALIC>
66016            - specify whether text is drawn in an italic style
66017              or a normal style.  The default is normal.
66018
66019        SET SVG CAP STYLE <BUTT/ROUND/SQUARE/NONE>
66020            - specify the cap style for line drawing.  The default
66021              is butt.
66022        SET SVG JOIN STYLE <MITER/ROUND/BEVEL/NONE>
66023            - specify the join style for line draweing.  The default
66024              is miter.
66025
66026        SET SVG HARDWARE FILL SWITCH <NONZERO/EVENODD/SOFTWARE>
66027            - by default, region fills are performed in hardware
66028              using a "non-zero" rule.  You can also specify
66029              that an "evenodd" rule be used.  In general, using
66030              hardware region fill will have better performance.
66031              However, hardware fills can occassionally have
66032              unpredictable results.  In this case, you can
66033              have Dataplot perform region fills in software
66034              by specifing SOFTWARE.
66035
66036        SET SVG STYLE SHEET <INTERNAL/EXTERNAL/NONE>
66037            - specify whether the SVG graphics are generated
66038              using style sheets (EXTERNAL) or not (NONE).  In
66039              general, style sheets are most beneficial when
66040              multiple graphics are being used on a web site.
66041              SVG supports both external style sheets (i.e.,
66042              stored in a separate file) or internal to the
66043              SVG file.  Currently, Dataplot only supports
66044              external style sheets.  The INTERNAL switch is
66045              reserved for possible future implementation.
66046              There is also an EXTERNAL USE and an EXTERNAL
66047              CREATE option.  This is reserved for future use,
66048              but it currently has no effect.
66049        SET SVG STYLE SHEET NAME <file name>
66050            - specify the name of the external file sheet
66051              (up to 80 characters).  The default name is
66052              "dataplot.css".
66053        SET SVG FOREGROUND COLOR <color>
66054            - specify the default foreground color when style
66055              sheets are being used.  If a line or text color
66056              does not match this foreground color, then Dataplot
66057              inserts a "style" option that overrides the style
66058              sheet value.  Note that the default color is
66059              set independently in the style sheet file.  So
66060              you may need to edit the style sheet as well.
66061
66062Note:
66063    Each "page" is assigned an ID using the "<g>" element.
66064    You can add your own translate, scale, and rotate options
66065    to the SVG file to transform the full plot (this is an element
66066    of the "Scalable" part of Scalable Vector Graphics).
66067
66068Note:
66069    Currently, Dataplot generates static plots in SVG format.
66070    SVG supports advanced capabilities such as animation,
66071    gradients, and Javascript scripting.  Support for at least
66072    some of these capabilities may be added in future
66073    implementations.  However, you can edit the SVG file
66074    (either via an ASCII text editor or a graphics editing
66075    program) to add such capabilities.
66076
66077Note:
66078    Graphic elements are now assigned "layers".  This may be
66079    useful if you import the SVG graphic into a graphics editing
66080    program (i.e., it may allow individual elements of the graph
66081    to be edited).
66082
66083Default:
66084    None
66085
66086Synonyms:
66087    None
66088
66089Device Notes:
66090    HARDWARE TEXT  - The SVG device currently supports
66091                     hardware characters.  Available fonts may
66092                     depend on what fonts you have supported on
66093                     your system.
66094    COLOR          - SVG supports the full range of 88 colors supported
66095                     by Dataplot.
66096    HARDWARE FILL  - Solid area fills are performed in hardware.  You
66097                     can override this to generate them in software.
66098    DASH PATTERNS  - The following dash patterns are available:
66099
66100                        DASH  - 3 pixels on, 3 pixels off;
66101                        DOT   - 1 pixel on, 1 pixels off;
66102                        DASH2 - 9 pixels on, 5 pixels off
66103                        DASH3 - 5 pixels on, 3 pixels off,
66104                                9 pixel on, 2 pixel off;
66105                        DASH4 - 9 pixels on, 3 pixels off,
66106                                5 pixel on, 9 pixel off,
66107                                3 pixel on, 5 pixel off;
66108                        DASH5 - 5 pixels on, 2 pixels off;
66109
66110                     If you want to modify these patterns, it is
66111                     recommended that you use external style sheets.
66112    LINE WIDTH     - Thick lines are generated in hardware.
66113    GRAPHICS INPUT - The CROSS-HAIR command is not supported
66114                     for this device.
66115    The CHARACTER PIXEL option is supported on this device.
66116
66117Related Commands:
66118    GD PNG/JPEG     = Direct graphical output to a file in PNG/JPEG
66119                      format.
66120    POSTSCRIPT      = Direct graphical output to a Postscript device.
66121    LATEX           = Direct graphical output to a file in Latex format.
66122    HPGL            = Direct graphical output to an HPGL device.
66123    DEVICE          = Specify certain actions for the graphics output.
66124
66125Applications:
66126    Web Applications, Graphics Import Into Graphics Editing
66127    Programs
66128
66129Reference:
66130    David Eisenberg (2002), "SVG Essentials", O'Reilly.
66131
66132    Andrew Watt (2002), "Designing SVG Web Graphics", New Riders.
66133
66134Implementation Date:
66135    2002/3
66136    2008/3 - Added support for layers
66137    2010/9 - Substantially overhauled this driver
66138
66139Program 1:
66140    SET IPL1NA PLOT1.SVG
66141    DEVICE 2 SVG
66142    DEVICE 2 PICTURE POINTS 400 300
66143    TITLE SAMPLE SVG PLOT
66144    PLOT X**2 FOR X = 1 1 9
66145    DEVICE 2 CLOSE
66146    SET IPL1NA PLOT2.SVG
66147    DEVICE 2 SVG
66148    DEVICE 2 PICTURE POINTS 500 400
66149    TITLE SECOND SAMPLE SVG PLOT
66150    PLOT X**3 FOR X = 1 1 9
66151    DEVICE 2 CLOSE
66152
66153Program 2:
66154    .  svg.dp  - Sample SVG program
66155    .
66156    .            Demonstrate how to generate SVG within an
66157    .            HTML page
66158    .
66159    background color yellow
66160    .
66161    set ipl1na plot.svg
66162    device 2 svg  800 600
66163    .
66164    title size 3
66165    title offset 2
66166    title case asis
66167    label case asis
66168    title Sample SVG Plot
66169    title offset 2
66170    y1label Y Axis
66171    x1label X Axis
66172    label size 1.5
66173    char size 1
66174    .
66175    char x circle box
66176    char hw 1 0.5  0.5 0.375 0.5 0.375
66177    char fill off on on
66178    line solid dash dotted
66179    .
66180    feedback off
66181    capture html svg.htm
66182    plot x      for x = 1 1 9 and
66183    plot x**1.5 for x = 1 1 9 and
66184    plot x**2   for x = 1 1 9
66185    device 2 close
66186    end of capture
66187    feedback on
66188
66189---------------------------------------------------------
66190
66191
66192
66193
66194
66195
66196
66197
66198
66199
66200
66201
66202
66203
66204
66205
66206
66207
66208
66209
66210
66211
66212
66213
66214
66215
66216
66217
66218
66219
66220
66221
66222
66223
66224
66225
66226
66227
66228
66229
66230
66231
66232
66233
66234
66235
66236
66237
66238
66239
66240
66241
66242
66243
66244
66245
66246
66247
66248
66249
66250
66251
66252
66253
66254
66255
66256
66257
66258
66259
66260
66261
66262
66263
66264
66265
66266
66267
66268
66269
66270
66271
66272
66273
66274
66275
66276
66277
66278
66279
66280
66281
66282
66283
66284
66285
66286
66287
66288
66289
66290
66291
66292
66293
66294
66295
66296
66297
66298
66299
66300-END -----*-----      ----------------ZZZZZ------
66301