01.03.2013 Views

Applied Statistics Using SPSS, STATISTICA, MATLAB and R

Applied Statistics Using SPSS, STATISTICA, MATLAB and R

Applied Statistics Using SPSS, STATISTICA, MATLAB and R

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

186 5 Non-Parametric Tests of Hypotheses<br />

p: Observed significance.<br />

ksstat, lstat: Values of the Kolmogorov-Smirnov <strong>and</strong> Liliefors statistics,<br />

respectively.<br />

cv: Critical value for significant test.<br />

Some of these parameters <strong>and</strong> return values can be omitted. For instance,<br />

h = kstest(x)only performs the normality test of x.<br />

The arguments of the R function ks.test are as follows:<br />

x: A numeric vector of data values.<br />

y: Either a numeric vector of expected data values or a character string<br />

naming a distribution function.<br />

... Parameters of the distribution specified by y.<br />

<br />

Comm<strong>and</strong>s 5.6. <strong>SPSS</strong>, <strong>STATISTICA</strong>, <strong>MATLAB</strong> <strong>and</strong> R comm<strong>and</strong>s used to obtain<br />

cumulative distribution plots <strong>and</strong> normal probability plots.<br />

<strong>SPSS</strong><br />

<strong>STATISTICA</strong><br />

Graphs; Interactive; Histogram; Cumulative<br />

histogram<br />

Analyze; Descriptive <strong>Statistics</strong>; Explore;<br />

Plots; Normality plots with tests |<br />

Graphs; P-P<br />

Graphs; Histograms; Showing Type;<br />

Cumulative<br />

Graphs; 2D Graphs; Probability-Probability<br />

Plots<br />

<strong>MATLAB</strong> cdfplot(x) ; normplot(x)<br />

R plot.ecdf(x) ; qqnorm(x)<br />

The cumulative distribution plot shown in Figure 5.2a was obtained with<br />

<strong>MATLAB</strong> using the following sequence of comm<strong>and</strong>s:<br />

» art = corkstoppers(1:50,3);<br />

» cdfplot(art)<br />

» hold on<br />

» xaxis = 0:1:250;<br />

» plot(xaxis,normcdf(xaxis,mean(art),std(art)))<br />

Note the hold on comm<strong>and</strong> used to superimpose the st<strong>and</strong>ard normal<br />

distribution over the previous empirical distribution of the data. This facility is<br />

disabled with hold off. The normcdf comm<strong>and</strong> is used to obtain the normal<br />

cumulative distribution in the interval specified by xaxis with the mean <strong>and</strong><br />

st<strong>and</strong>ard deviation also specified.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!