Page 205 - Applied Statistics Using SPSS, STATISTICA, MATLAB and R
P. 205

186      5 Non-Parametric Tests of Hypotheses


              p :    Observed significance.
              ksstat, lstat  : Values of the Kolmogorov-Smirnov and Liliefors statistics,
                     respectively.
              cv  :    Critical value for significant test.

              Some of these parameters and  return  values can  be  omitted.  For  instance,
                                                        x
           h = kstest(x)   only performs the normality test of  .
              The arguments of the R function ks.test   are as follows:

              x:    A numeric vector of data values.
              y:    Either a numeric vector of expected data values or a  character  string
                    naming a distribution function.
              ...   Parameters of the distribution specified by y.


           Commands 5.6. SPSS, STATISTICA, MATLAB and R commands used to obtain
           cumulative distribution plots and normal probability plots.

                           Graphs; Interactive; Histogram; Cumulative
                           histogram
             SPSS          Analyze; Descriptive Statistics; Explore;
                           Plots; Normality plots with tests  |
                           Graphs; P-P
                           Graphs; Histograms; Showing Type;
                           Cumulative
             STATISTICA
                           Graphs; 2D Graphs; Probability-Probability
                           Plots
             MATLAB        cdfplot(x) ; normplot(x)

             R             plot.ecdf(x) ; qqnorm(x)


           The  cumulative distribution plot  shown  in Figure 5.2a was  obtained  with
           MATLAB using the following sequence of commands:

              » art = corkstoppers(1:50,3);
              » cdfplot(art)
              » hold on
              » xaxis = 0:1:250;
              » plot(xaxis,normcdf(xaxis,mean(art),std(art)))

              Note the  hold on   command used to superimpose the standard normal
           distribution  over the previous empirical distribution  of the data. This  facility  is
           disabled with hold off  . The normcdf   command is used to obtain the normal
           cumulative distribution in the interval specified  by  xaxis   with the  mean and
           standard deviation also specified.
   200   201   202   203   204   205   206   207   208   209   210