diff scripts/statistics/tests/kolmogorov_smirnov_test.m @ 3454:d8b731d3f7a3

[project @ 2000-01-18 10:13:31 by jwe]
author jwe
date Tue, 18 Jan 2000 10:13:39 +0000
parents f8dde1807dee
children 434790acb067
line wrap: on
line diff
--- a/scripts/statistics/tests/kolmogorov_smirnov_test.m	Tue Jan 18 08:32:15 2000 +0000
+++ b/scripts/statistics/tests/kolmogorov_smirnov_test.m	Tue Jan 18 10:13:39 2000 +0000
@@ -14,31 +14,34 @@
 ## along with this file.  If not, write to the Free Software Foundation,
 ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-## usage:
-##   [pval, ks] = kolmogorov_smirnov_test (x, dist [, params] [, alt])
-##
+## -*- texinfo -*-
+## @deftypefn {Function File} {[@var{pval}, @var{ks}] =} kolmogorov_smirnov_test (@var{x}, @var{dist}, @var{params}, @var{alt})
+## Perform a Kolmogorov-Smirnov test of the null hypothesis that the
+## sample @var{x} comes from the (continuous) distribution dist. I.e.,
+## if F and G are the CDFs corresponding to the sample and dist,
+## respectively, then the null is that F == G.
 ##
-## Performs a Kolmogorov-Smirnov test of the null hypothesis that the
-## sample x comes from the (continuous) distribution dist. I.e., if F
-## and G are the CDFs corresponding to the sample and dist, respectively,
-## then the null is that F == G.
+## The optional argument @var{params} contains a list of parameters of
+## @var{dist}.  For example, to test whether a sample @var{x} comes from
+## a uniform distribution on [2,4], use
 ##
-## The optional argument params contains a list of parameters of dist.
-## E.g., to test whether a sample x comes from a uniform distribution on
-## [2,4], use `kolmogorov_smirnov_test(x, "uniform", 2, 4)'.
+## @example
+## kolmogorov_smirnov_test(x, "uniform", 2, 4)
+## @end example
 ##
-## With the optional argument string alt, the alternative of interest
-## can be selected. If alt is "!=" or "<>", the null is tested against
-## the two-sided alternative F != G.  In this case, the test statistic
-## ks follows a two-sided Kolmogorov-Smirnov distribution.
-## If alt is ">", the one-sided alternative F > G is considered,
-## similarly for "<".  In this case, the test statistic ks has a
-## one-sided Kolmogorov-Smirnov distribution.
-## The default is the two-sided case.
+## With the optional argument string @var{alt}, the alternative of
+## interest can be selected.  If @var{alt} is @code{"!="} or
+## @code{"<>"}, the null is tested against the two-sided alternative F
+## != G.  In this case, the test statistic @var{ks} follows a two-sided
+## Kolmogorov-Smirnov distribution.  If @var{alt} is @code{">"}, the
+## one-sided alternative F > G is considered, similarly for @code{"<"}.
+## In this case, the test statistic @var{ks} has a one-sided
+## Kolmogorov-Smirnov distribution.  The default is the two-sided case.
 ##
-## pval is the p-value of the test.
+## The p-value of the test is returned in @var{pval}.
 ##
 ## If no output argument is given, the p-value is displayed.
+## @end deftypefn
 
 ## Author:  KH <Kurt.Hornik@ci.tuwien.ac.at>
 ## Description:  One-sample Kolmogorov-Smirnov test