Mercurial > hg > octave-lojdl
changeset 3453:71d2e09c15a2
[project @ 2000-01-18 08:32:09 by jwe]
line wrap: on
line diff
--- a/doc/interpreter/octave.texi +++ b/doc/interpreter/octave.texi @@ -40,7 +40,7 @@ @defindex op -@c Things like the Octave version number are defined in conf.txi. +@c Things like the Octave version number are defined in conf.texi. @c This file doesn't include a chapter, so it must not be included @c if you want to run the Emacs function texinfo-multiple-files-update. @@ -160,11 +160,328 @@ * Operator Index:: An item for each documented operator. + @detailmenu --- The Detailed Node Listing --- Preface +* Acknowledgements:: +* How You Can Contribute to Octave:: +* Distribution:: + +A Brief Introduction to Octave + +* Running Octave:: +* Simple Examples:: +* Conventions:: + +Conventions + +* Fonts:: +* Evaluation Notation:: +* Printing Notation:: +* Error Messages:: +* Format of Descriptions:: + +Format of Descriptions + +* A Sample Function Description:: +* A Sample Command Description:: +* A Sample Variable Description:: + +Getting Started + +* Invoking Octave:: +* Quitting Octave:: +* Getting Help:: +* Command Line Editing:: +* Errors:: +* Executable Octave Programs:: +* Comments:: + +Invoking Octave + +* Command Line Options:: +* Startup Files:: + +Command Line Editing + +* Cursor Motion:: +* Killing and Yanking:: +* Commands For Text:: +* Commands For Completion:: +* Commands For History:: +* Customizing readline:: +* Customizing the Prompt:: +* Diary and Echo Commands:: + +Data Types + +* Built-in Data Types:: +* User-defined Data Types:: +* Object Sizes:: + +Built-in Data Types + +* Numeric Objects:: +* String Objects:: +* Data Structure Objects:: + +Numeric Data Types + +* Matrices:: +* Ranges:: +* Logical Values:: +* Predicates for Numeric Objects:: + +Matrices + +* Empty Matrices:: + +Strings + +* Creating Strings:: +* Searching and Replacing:: +* String Conversions:: +* Character Class Functions:: + +Containers + +* Lists:: +* Cell Arrays:: + +Variables + +* Global Variables:: +* Status of Variables:: +* Summary of Built-in Variables:: +* Defaults from the Environment:: + +Expressions + +* Index Expressions:: +* Calling Functions:: +* Arithmetic Ops:: +* Comparison Ops:: +* Boolean Expressions:: +* Assignment Ops:: +* Increment Ops:: +* Operator Precedence:: + +Calling Functions + +* Call by Value:: +* Recursion:: + +Boolean Expressions + +* Element-by-element Boolean Operators:: +* Short-circuit Boolean Operators:: + +Statements + +* The if Statement:: +* The switch Statement:: +* The while Statement:: +* The for Statement:: +* The break Statement:: +* The continue Statement:: +* The unwind_protect Statement:: +* The try Statement:: +* Continuation Lines:: + +The @code{for} Statement + +* Looping Over Structure Elements:: + +Functions and Script Files + +* Defining Functions:: +* Multiple Return Values:: +* Variable-length Argument Lists:: +* Variable-length Return Lists:: +* Returning From a Function:: +* Function Files:: +* Script Files:: +* Dynamically Linked Functions:: +* Organization of Functions:: + +Input and Output + +* Basic Input and Output:: +* C-Style I/O Functions:: + +Basic Input and Output + +* Terminal Output:: +* Terminal Input:: +* Simple File I/O:: + +C-Style I/O Functions + +* Opening and Closing Files:: +* Simple Output:: +* Line-Oriented Input:: +* Formatted Output:: +* Output Conversion for Matrices:: +* Output Conversion Syntax:: +* Table of Output Conversions:: +* Integer Conversions:: +* Floating-Point Conversions:: Other Output Conversions:: +* Other Output Conversions:: +* Formatted Input:: +* Input Conversion Syntax:: +* Table of Input Conversions:: +* Numeric Input Conversions:: +* String Input Conversions:: +* Binary I/O:: +* Temporary Files:: +* EOF and Errors:: +* File Positioning:: + +Plotting + +* Two-Dimensional Plotting:: +* Specialized Two-Dimensional Plots:: +* Three-Dimensional Plotting:: +* Plot Annotations:: +* Multiple Plots on One Page:: +* Multiple Plot Windows:: +* Interaction with gnuplot:: + +Matrix Manipulation + +* Finding Elements and Checking Conditions:: +* Rearranging Matrices:: +* Special Utility Matrices:: +* Famous Matrices:: + +Arithmetic + +* Utility Functions:: +* Complex Arithmetic:: +* Trigonometry:: +* Sums and Products:: +* Special Functions:: +* Mathematical Constants:: + +Linear Algebra + +* Basic Matrix Functions:: +* Matrix Factorizations:: +* Functions of a Matrix:: + +Quadrature + +* Functions of One Variable:: +* Orthogonal Collocation:: + +Differential Equations + +* Ordinary Differential Equations:: +* Differential-Algebraic Equations:: + +Optimization + +* Quadratic Programming:: +* Nonlinear Programming:: +* Linear Least Squares:: + +Statistics + +* Basic Statistical Functions:: +* Models:: +* Distributions:: + +Control Theory + +* sysstruct:: +* sysinterface:: +* sysdisp:: +* blockdiag:: +* numerical:: +* sysprop:: +* systime:: +* sysfreq:: +* cacsd:: +* misc:: + +System Data Structure + +* sysstructvars:: +* sysstructtf:: +* sysstructzp:: +* sysstructss:: + +System Construction and Interface Functions + +* fir2sys:: +* ss2sys:: +* tf2sys:: +* zp2sys:: +* structaccess:: +* structintern:: + +System Utilities + +* Timing Utilities:: +* Filesystem Utilities:: +* Controlling Subprocesses:: +* Process ID Information:: +* Environment Variables:: +* Current Working Directory:: +* Password Database Functions:: +* Group Database Functions:: +* System Information:: + +Tips and Standards + +* Style Tips:: Writing clean and robust programs. +* Coding Tips:: Making code run faster. +* Documentation Tips:: Writing readable documentation strings. +* Comment Tips:: Conventions for writing comments. +* Function Headers:: Standard headers for functions. + +Known Causes of Trouble with Octave + +* Actual Bugs:: Bugs we will fix later. +* Reporting Bugs:: +* Bug Criteria:: +* Bug Lists:: +* Bug Reporting:: +* Sending Patches:: +* Service:: + +Reporting Bugs + +* Bug Criteria:: +* Where: Bug Lists. Where to send your bug report. +* Reporting: Bug Reporting. How to report a bug effectively. +* Patches: Sending Patches. How to send a patch for Octave. + +Installing Octave + +* Installation Problems:: +* Binary Distributions:: + +Binary Distributions + +* Installing Octave from a Binary Distribution:: +* Creating a Binary Distribution:: + +Emacs Octave Support + +* Installing EOS:: +* Using Octave Mode:: +* Running Octave From Within Emacs:: +* Using the Emacs Info Reader for Octave:: + +Grammar + +* Keywords:: + +@end detailmenu @end menu @include preface.texi
--- a/doc/interpreter/stats.txi +++ b/doc/interpreter/stats.txi @@ -9,6 +9,15 @@ you would like to help improve Octave in this area, please contact @email{bug-octave@@bevo.che.wisc.edu}. +@menu +* Basic Statistical Functions:: +* Models:: +* Distributions:: +@end menu + +@node Basic Statistical Functions, Models, Statistics, Statistics +@section Basic Statistical Functions + @DOCSTRING(mean) @DOCSTRING(median) @@ -24,3 +33,56 @@ @DOCSTRING(mahalanobis) @DOCSTRING(skewness) + +@c XXX FIXME XXX -- these need to be organized. + +@DOCSTRING(values) + +@DOCSTRING(var) + +@DOCSTRING(table) + +@DOCSTRING(studentize) + +@DOCSTRING(statistics) + +@DOCSTRING(spearman) + +@DOCSTRING(run_count) + +@DOCSTRING(ranks) + +@DOCSTRING(range) + +@DOCSTRING(qqplot) + +@DOCSTRING(probit) + +@DOCSTRING(ppplot) + +@DOCSTRING(moment) + +@DOCSTRING(meansq) + +@DOCSTRING(logit) + +@DOCSTRING(kendall) + +@DOCSTRING(iqr) + +@DOCSTRING(cut) + +@DOCSTRING(cor) + +@DOCSTRING(cloglog) + +@DOCSTRING(center) + +@node Tests, Models, Basic Statistical Functions, Statistics +@section Tests + +@node Models, Distributions, Basic Statistical Functions, Statistics +@section Models + +@node Distributions, , Models, Statistics +@section Distributions
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,27 @@ +2000-01-18 John W. Eaton <jwe@bevo.che.wisc.edu> + + * statistics/base/values.m: Texinfoize doc string. + * statistics/base/var.m: Ditto. + * statistics/base/table.m: Ditto. + * statistics/base/studentize.m: Ditto. + * statistics/base/statistics.m: Ditto. + * statistics/base/spearman.m: Ditto. + * statistics/base/run_count.m: Ditto. + * statistics/base/ranks.m: Ditto. + * statistics/base/range.m: Ditto. + * statistics/base/qqplot.m: Ditto. + * statistics/base/probit.m: Ditto. + * statistics/base/ppplot.m: Ditto. + * statistics/base/moment.m: Ditto. + * statistics/base/meansq.m: Ditto. + * statistics/base/logit.m: Ditto. + * statistics/base/kendall.m: Ditto. + * statistics/base/iqr.m: Ditto. + * statistics/base/cut.m: Ditto. + * statistics/base/cor.m: Ditto. + * statistics/base/cloglog.m: Ditto. + * statistics/base/center.m: Ditto. + 2000-01-17 John W. Eaton <jwe@bevo.che.wisc.edu> * strings/bin2dec.m: Texinfoize doc string.
--- a/scripts/statistics/base/center.m +++ b/scripts/statistics/base/center.m @@ -14,10 +14,11 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: center (x) -## -## If x is a vector, subtract its mean. -## If x is a matrix, do the above for each column. +## -*- texinfo -*- +## @deftypefn {Function File} {} center (@var{x}) +## If @var{x} is a vector, subtract its mean. +## If @var{x} is a matrix, do the above for each column. +## @end deftypefn ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> ## Description: Center by subtracting means
--- a/scripts/statistics/base/cloglog.m +++ b/scripts/statistics/base/cloglog.m @@ -14,8 +14,14 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## Returns cloglog (x) = - log (- log (x)), the complementary log-log -## function. +## -*- texinfo -*- +## @deftypefn {Function File} {} cloglog (@var{x}) +## Return the complementary log-log function of @var{x}, defined as +## +## @example +## - log (- log (@var{x})) +## @end example +## @end deftypefn ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> ## Description: Complementary log-log function
--- a/scripts/statistics/base/cor.m +++ b/scripts/statistics/base/cor.m @@ -14,15 +14,17 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: cor (x [, y]) -## -## The (i,j)-th entry of cor (x, y) is the correlation between the i-th -## variable in x and the j-th variable in y. +## -*- texinfo -*- +## @deftypefn {Function File} {} cor (@var{x}, @var{y}) +## The (@var{i},@var{j})-th entry of @code{cor (@var{x}, @var{y})} is +## the correlation between the @var{i}-th variable in @var{x} and the +## @var{j}-th variable in @var{y}. ## ## For matrices, each row is an observation and each column a variable; ## vectors are always observations and may be row or column vectors. ## -## cor (x) is cor (x, x). +## @code{cor (@var{x})} is equivalent to @code{cor (@var{x}, @var{x})}. +## @end deftypefn ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> ## Description: Compute correlations
--- a/scripts/statistics/base/cut.m +++ b/scripts/statistics/base/cut.m @@ -14,18 +14,20 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: cut (X, BREAKS) -## +## -*- texinfo -*- +## @deftypefn {Function File} {} cut (@var{x}, @var{breaks}) ## Create categorical data out of numerical or continuous data by ## cutting into intervals. ## -## If BREAKS is a scalar, the data is cut into that many equal-width -## intervals. If BREAKS is a vector of break points, the category has -## length(BREAKS)-1 groups. +## If @var{breaks} is a scalar, the data is cut into that many +## equal-width intervals. If @var{breaks} is a vector of break points, +## the category has @code{length (@var{breaks}) - 1} groups. ## -## Returns a vector of the same size as X telling which group each point -## in X belongs to. Groups are labelled from 1 to the number of groups; -## points outside the range of BREAKS are labelled by NaN. +## The returned value is a vector of the same size as @var{x} telling +## which group each point in @var{x} belongs to. Groups are labelled +## from 1 to the number of groups; points outside the range of +## @var{breaks} are labelled by @code{NaN}. +## @end deftypefn ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> ## Description: Cut data into intervals
--- a/scripts/statistics/base/iqr.m +++ b/scripts/statistics/base/iqr.m @@ -14,12 +14,13 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: iqr (x) -## -## If x is a vector, return the interquartile range, i.e., the +## -*- texinfo -*- +## @deftypefn {Function File} {} iqr (@var{x}) +## If @var{x} is a vector, return the interquartile range, i.e., the ## difference between the upper and lower quartile, of the input data. ## -## If x is a matrix, do the above for each column of x. +## If @var{x} is a matrix, do the above for each column of @var{x}. +## @end deftypefn ## Author KH <Kurt.Hornik@ci.tuwien.ac.at> ## Description: Interquartile range
--- a/scripts/statistics/base/kendall.m +++ b/scripts/statistics/base/kendall.m @@ -14,25 +14,52 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: kendall (x [, y]) -## -## Computes Kendall's tau for each of the variables specified by the -## input arguments. +## -*- texinfo -*- +## @deftypefn {Function File} {} kendall (@var{x}, @var{y}) +## Compute Kendall's @var{tau} for each of the variables specified by +## the input arguments. ## ## For matrices, each row is an observation and each column a variable; ## vectors are always observations and may be row or column vectors. ## -## kendall (x) is equivalent to kendall (x, x). +## @code{kendall (@var{x})} is equivalent to @code{kendall (@var{x}, +## @var{x})}. +## +## For two data vectors @var{x}, @var{y} of common length @var{n}, +## Kendall's @var{tau} is the correlation of the signs of all rank +## differences of @var{x} and @var{y}; i.e., if both @var{x} and +## @var{y} have distinct entries, then ## -## For two data vectors x, y of common length n, Kendall's tau is the -## correlation of the signs of all rank differences of x and y; i.e., -## if both x and y have distinct entries, then \tau = \frac{1}{n(n-1)} -## \sum_{i,j} SIGN(q_i-q_j) SIGN(r_i-r_j), where the q_i and r_i are the -## ranks of x and y, respectively. +## @iftex +## @tex +## $$ \tau = {1 \over n(n-1)} \sum_{i,j} {\rm sign}(q_i-q_j) {\rm sign}(r_i-r_j) $$ +## @end tex +## @end iftex +## @ifinfo +## @example +## 1 +## tau = ------- SUM sign (q(i) - q(j)) * sign (r(i) - r(j)) +## n (n-1) i,j +## @end example +## @end ifinfo ## -## If x and y are drawn from independent distributions, Kendall's tau is -## asymptotically normal with mean 0 and variance (2 * (2n+5)) / (9 * n -## * (n-1)). +## @noindent +## in which the +## @iftex +## @tex +## $q_i$ and $r_i$ +## @end tex +## @end iftex +## @ifinfo +## @var{q}(@var{i}) and @var{r}(@var{i}) +## @end ifinfo +## are the ranks of +## @var{x} and @var{y}, respectively. +## +## If @var{x} and @var{y} are drawn from independent distributions, +## Kendall's @var{tau} is asymptotically normal with mean 0 and variance +## @code{(2 * (2@var{n}+5)) / (9 * @var{n} * (@var{n}-1))}. +## @end deftypefn ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> ## Description: Kendall's rank correlation tau
--- a/scripts/statistics/base/logit.m +++ b/scripts/statistics/base/logit.m @@ -14,7 +14,11 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## For each component of p, return the logit log (p / (1-p)) of p. +## -*- texinfo -*- +## @deftypefn {Function File} {} logit (@var{p}) +## For each component of @var{p}, return the logit @code{log (@var{p} / +## (1-@var{p}))} of @var{p}. +## @end deftypefn ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> ## Description: Logit transformation
--- a/scripts/statistics/base/meansq.m +++ b/scripts/statistics/base/meansq.m @@ -14,11 +14,12 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: meansq (x) -## +## -*- texinfo -*- +## @deftypefn {Function File} {} meansq (@var{x}) ## For vector arguments, return the mean square of the values. ## For matrix arguments, return a row vector contaning the mean square ## of each column. +## @end deftypefn ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> ## Description: Compute mean square
--- a/scripts/statistics/base/moment.m +++ b/scripts/statistics/base/moment.m @@ -14,15 +14,24 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: moment (x, p [, opt]) +## -*- texinfo -*- +## @deftypefn {Function File} {} moment (@var{x}, @var{p}, @var{opt}) +## If @var{x} is a vector, compute the @var{p}-th moment of @var{x}. ## -## Computes the p-th moment of x if it is a vector; if x is a matrix, -## return the row vector of the p-th moment of each column. +## If @var{x} is a matrix, return the row vector containing the +## @var{p}-th moment of each column. ## ## With the optional string opt, the kind of moment to be computed can -## be specified. If opt contains `c' or `a', central and/or absolute -## moments are returned. I.e., `moment(x, 3, "ac")' computes the third -## central absolute moment of x. +## be specified. If opt contains @code{"c"} or @code{"a"}, central +## and/or absolute moments are returned. For example, +## +## @example +## moment (x, 3, "ac") +## @end example +## +## @noindent +## computes the third central absolute moment of @var{x}. +## @end deftypefn ## Can easily be made to work for continuous distributions (using quad) ## as well, but how does the general case work?
--- a/scripts/statistics/base/ppplot.m +++ b/scripts/statistics/base/ppplot.m @@ -14,22 +14,28 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: [p, y] = ppplot (x [, dist [, params]]) -## -## Performs a PP-plot (probability plot). +## -*- texinfo -*- +## @deftypefn {Function File} {[@var{p}, @var{y}] =} ppplot (@var{x}, @var{dist}, @var{params}) +## Perform a PP-plot (probability plot). ## -## If F is the CDF of the distribution `dist' with parameters `params' -## and x a sample vector of length n, the PP-plot graphs ordinate y(i) = -## F (i-th largest element of x) versus abscissa p(i) = (i - 0.5)/n. If -## the sample comes from F, the pairs will approximately follow a -## straight line. +## If F is the CDF of the distribution @var{dist} with parameters +## @var{params} and @var{x} a sample vector of length @var{n}, the +## PP-plot graphs ordinate @var{y}(@var{i}) = F (@var{i}-th largest +## element of @var{x}) versus abscissa @var{p}(@var{i}) = (@var{i} - +## 0.5)/@var{n}. If the sample comes from F, the pairs will +## approximately follow a straight line. ## -## The default for `dist' is the standard normal distribution. The -## optional argument `params' contains a list of parameters of -## `dist'. E.g., for a probability plot of the uniform distribution on -## [2,4] ans x, use `ppplot (x, "uniform", 2, 4)'. +## The default for @var{dist} is the standard normal distribution. The +## optional argument @var{params} contains a list of parameters of +## @var{dist}. For example, for a probability plot of the uniform +## distribution on [2,4] and @var{x}, use +## +## @example +## ppplot (x, "uniform", 2, 4) +## @end example ## ## If no output arguments are given, the data are plotted directly. +## @end deftypefn ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> ## Description: Perform a PP-plot (probability plot)
--- a/scripts/statistics/base/probit.m +++ b/scripts/statistics/base/probit.m @@ -14,8 +14,11 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## For each component of p, return the probit (the quantile of the -## standard normal distribution) of p. +## -*- texinfo -*- +## @deftypefn {Function File} {} probit (@var{p}) +## For each component of @var{p}, return the probit (the quantile of the +## standard normal distribution) of @var{p}. +## @end deftypefn ## Written by KH <Kurt.Hornik@ci.tuwien.ac.at> on 1995/02/04 ## Description: Probit transformation
--- a/scripts/statistics/base/qqplot.m +++ b/scripts/statistics/base/qqplot.m @@ -14,24 +14,30 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: [q, s] = qqplot (x [, dist [, params]]) -## -## Performs a QQ-plot (quantile plot). +## -*- texinfo -*- +## @deftypefn {Function File} {[@var{q}, @var{s}] =} qqplot (@var{x}, @var{dist}, @var{params}) +## Perform a QQ-plot (quantile plot). ## -## If F is the CDF of the distribution `dist' with parameters `params' -## and G its inverse, and x a sample vector of length n, the QQ-plot -## graphs ordinate s(i) = i-th largest element of x versus abscissa q(i) -## = G((i - 0.5)/n). +## If F is the CDF of the distribution @var{dist} with parameters +## @var{params} and G its inverse, and @var{x} a sample vector of length +## @var{n}, the QQ-plot graphs ordinate @var{s}(@var{i}) = @var{i}-th +## largest element of x versus abscissa @var{q}(@var{i}f) = G((@var{i} - +## 0.5)/@var{n}). ## ## If the sample comes from F except for a transformation of location ## and scale, the pairs will approximately follow a straight line. ## -## The default for `dist' is the standard normal distribution. The -## optional argument `params' contains a list of parameters of -## `dist'. E.g., for a quantile plot of the uniform distribution on -## [2,4] and x, use `qqplot (x, "uniform", 2, 4)'. +## The default for @var{dist} is the standard normal distribution. The +## optional argument @var{params} contains a list of parameters of +## @var{dist}. For example, for a quantile plot of the uniform +## distribution on [2,4] and @var{x}, use +## +## @example +## qqplot (x, "uniform", 2, 4) +## @end example ## ## If no output arguments are given, the data are plotted directly. +## @end deftypefn ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> ## Description: Perform a QQ-plot (quantile plot)
--- a/scripts/statistics/base/range.m +++ b/scripts/statistics/base/range.m @@ -14,11 +14,13 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: range (x) +## -*- texinfo -*- +## @deftypefn {Function File} {} range (@var{x}) +## If @var{x} is a vector, return the range, i.e., the difference +## between the maximum and the minimum, of the input data. ## -## If x is a vector, return the range, i.e., the difference between the -## maximum and the minimum, of the input data. -## If x is a matrix, do the above for each column of x. +## If @var{x} is a matrix, do the above for each column of @var{x}. +## @end deftypefn ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> ## Description: Compute range
--- a/scripts/statistics/base/ranks.m +++ b/scripts/statistics/base/ranks.m @@ -14,11 +14,13 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: ranks (x) +## -*- texinfo -*- +## @deftypefn {Function File} {} ranks (@var{x}) +## If @var{x} is a vector, return the (column) vector of ranks of +## @var{x} adjusted for ties. ## -## If x is a vector, return the (column) vector of ranks of x adjusted -## for ties. -## If x is a matrix, do the above for each column of x. +## If @var{x} is a matrix, do the above for each column of @var{x}. +## @end deftypefn ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> ## Description: Compute ranks
--- a/scripts/statistics/base/run_count.m +++ b/scripts/statistics/base/run_count.m @@ -14,10 +14,11 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: run_count (x, n) -## -## Counts the upward runs in the columns of x of length 1, 2, ... n-1 -## and >= n. +## -*- texinfo -*- +## @deftypefn {Function File} {} run_count (@var{x}, @var{n}) +## Count the upward runs in the columns of @var{x} of length 1, 2, ..., +## @var{n}-1 and greater than or equal to @var{n}. +## @end deftypefn ## Author: FL <Friedrich.Leisch@ci.tuwien.ac.at> ## Description: Count upward runs
--- a/scripts/statistics/base/spearman.m +++ b/scripts/statistics/base/spearman.m @@ -14,22 +14,24 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: spearman (x [, y]) -## -## Computes Spearman's rank correlation coefficient rho for each of the -## variables specified by the input arguments. +## -*- texinfo -*- +## @deftypefn {Function File} {} spearman (@var{x}, @var{y}) +## Compute Spearman's rank correlation coefficient @var{rho} for each of +## the variables specified by the input arguments. ## ## For matrices, each row is an observation and each column a variable; ## vectors are always observations and may be row or column vectors. ## -## spearman (x) is equivalent to spearman (x, x). +## @code{spearman (@var{x})} is equivalent to @code{spearman (@var{x}, +## @var{x})}. ## -## For two data vectors x and y, Spearman's rho is the correlation of -## the ranks of x and y. +## For two data vectors @var{x} and @var{y}, Spearman's @var{rho} is the +## correlation of the ranks of @var{x} and @var{y}. ## -## If x and y are drawn from independent distributions, rho has zero -## mean and variance 1 / (n - 1), and is asymptotically normally -## distributed. +## If @var{x} and @var{y} are drawn from independent distributions, +## @var{rho} has zero mean and variance @code{1 / (n - 1)}, and is +## asymptotically normally distributed. +## @end deftypefn ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> ## Description: Spearman's rank correlation rho
--- a/scripts/statistics/base/statistics.m +++ b/scripts/statistics/base/statistics.m @@ -14,13 +14,14 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: S = statistics (X) +## -*- texinfo -*- +## @deftypefn {Function File} {} statistics (@var{x}) +## If @var{x} is a matrix, return a matrix with the minimum, first +## quartile, median, third quartile, maximum, mean, standard deviation, +## skewness and kurtosis of the columns of @var{x} as its rows. ## -## If X is a matrix, return a matrix S with the min, first quartile, -## median, third quartile, max, mean, std, skewness and kurtosis of the -## columns of X as its rows. -## -## If X is a vector, treat it as a column vector. +## If @var{x} is a vector, treat it as a column vector. +## @end deftypefn ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> ## Description: Compute basic statistics
--- a/scripts/statistics/base/studentize.m +++ b/scripts/statistics/base/studentize.m @@ -14,12 +14,13 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: studentize (x) -## -## If x is a vector, subtract its mean and divide by its standard +## -*- texinfo -*- +## @deftypefn {Function File} {} studentize (@var{x}) +## If @var{x} is a vector, subtract its mean and divide by its standard ## deviation. ## -## If x is a matrix, do the above for each column. +## If @var{x} is a matrix, do the above for each column. +## @end deftypefn ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> ## Description: Subtract mean and divide by standard deviation
--- a/scripts/statistics/base/table.m +++ b/scripts/statistics/base/table.m @@ -14,13 +14,14 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: [t, l_x] = table (x) -## [t, l_x, l_y] = table (x, y) -## -## Create a contingency table t from data vectors. The l vectors are -## the corresponding levels. +## -*- texinfo -*- +## @deftypefn {Function File} {} [@var{t}, @var{l_x}] = table (@var{x}) +## @deftypefnx {Function File} {} [@var{t}, @var{l_x}, @var{l_y}] = table (@var{x}, @var{y}) +## Create a contingency table @var{t} from data vectors. The @var{l} +## vectors are the corresponding levels. ## ## Currently, only 1- and 2-dimensional tables are supported. +## @end deftypefn ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> ## Description: Cross tabulation
--- a/scripts/statistics/base/values.m +++ b/scripts/statistics/base/values.m @@ -14,10 +14,11 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: values (x) -## +## -*- texinfo -*- +## @deftypefn {Function File} {} values (@var{x}) ## Return the different values in a column vector, arranged in ascending ## order. +## @end deftypefn ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> ## Description: Extract unique elements
--- a/scripts/statistics/base/var.m +++ b/scripts/statistics/base/var.m @@ -14,11 +14,12 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: var (x) -## +## -*- texinfo -*- +## @deftypefn {Function File} {} var (@var{x}) ## For vector arguments, return the (real) variance of the values. ## For matrix arguments, return a row vector contaning the variance for ## each column. +## @end deftypefn ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> ## Description: Compute variance