octave-bug-tracker
[Top][All Lists]

## [Octave-bug-tracker] [bug #52685] redundant sentence in meansq docstring

 From: Rik Subject: [Octave-bug-tracker] [bug #52685] redundant sentence in meansq docstring Date: Tue, 19 Dec 2017 12:44:44 -0500 (EST) User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

```Follow-up Comment #7, bug #52685 (project octave):

@Dan: Could you write a note about the documentation philosophy on the
Maintainer's List?  I think some of the changes are worth discussing first.

In the plaintext version of the help, for example, using @var() always
produces a CAPITAL, generally sans serif, font which can be confusing.

I think there is a distinction between saying what the code does, for example,
mean of a vector is

@example
@var{x} = 1 / length (@var{x} * sum (@var{x})
@end example

and the mathematical definition of the mean

@example
N
mean = 1 / N * sum (x_i)
i=1

where N is the number of elements
@end example

When defining a mathematical expression, y and x and other entries are general
variables, NOT the variables of this particular function, and therefore I
don't think they need the @var{} surrounding them.

In particular, once you go with @var{} you can't make the distinction between
vectors (lower case Roman alphabet) and matrices (upper case Roman alphabet).

For example,

y = M*x + b    # definition

versus

@var{y} = address@hidden + b     # what function computes
which renders as
Y = M*X + b

I don't have a function QUARTILE() in my distribution so I can't comment on
that.  Maybe that is in the statistics package?

There does seem to be some confusion between in ols.m between whether SIGMA or
sigma^2 is being calculated.  See Wikipedia
(https://en.wikipedia.org/wiki/Ordinary_least_squares).  The correction in the
denominator is for the statistical degrees of freedom.  The input x is a TxK
matrix.  That means there are T rows (observations).  If the matrix is square
and of full column rank then there is enough information to make the most
accurate determination of the parameters.  If x is not square, and rank
deficient, then the estimate will not be as good.  Still, for calculating the
variance the degrees of freedom, at the best of times, are N-1, which suggests
that there should be an extra 1 or 2 in this equation someplace.  In
particular, I tried ols() and for a full rank set of measurements sigma is
returned as Inf because (T - rank (x) == 0).  This isn't right.

statistical expertise to weigh in on this.

_______________________________________________________

<http://savannah.gnu.org/bugs/?52685>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/

```