Mercurial > octave-antonio
diff doc/interpreter/optim.txi @ 3368:a4cd1e9d9962
[project @ 1999-11-20 17:22:48 by jwe]
author | jwe |
---|---|
date | Sat, 20 Nov 1999 17:23:01 +0000 |
parents | bfe1573bd2ae |
children | aae05d51353c |
line wrap: on
line diff
--- a/doc/interpreter/optim.txi Sat Nov 20 14:52:42 1999 +0000 +++ b/doc/interpreter/optim.txi Sat Nov 20 17:23:01 1999 +0000 @@ -28,101 +28,6 @@ @node Linear Least Squares, , Nonlinear Programming, Optimization @section Linear Least Squares -@deftypefn {Function File} {[@var{beta}, @var{v}, @var{r}] =} gls (@var{y}, @var{x}, @var{o}) -Generalized least squares estimation for the multivariate model -@iftex -@tex -$y = x b + e$ -with $\bar{e} = 0$ and cov(vec($e$)) = $(s^2)o$, -@end tex -@end iftex -@ifinfo -@code{@var{y} = @var{x} * @var{b} + @var{e}} with @code{mean (@var{e}) = -0} and @code{cov (vec (@var{e})) = (@var{s}^2)*@var{o}}, -@end ifinfo - where -@iftex -@tex -$y$ is a $t \times p$ matrix, $x$ is a $t \times k$ matrix, $b$ is a $k -\times p$ matrix, $e$ is a $t \times p$ matrix, and $o$ is a $tp \times -tp$ matrix. -@end tex -@end iftex -@ifinfo -@var{Y} is a @var{T} by @var{p} matrix, @var{X} is a @var{T} by @var{k} -matrix, @var{B} is a @var{k} by @var{p} matrix, @var{E} is a @var{T} by -@var{p} matrix, and @var{O} is a @var{T}@var{p} by @var{T}@var{p} -matrix. -@end ifinfo - -@noindent -Each row of Y and X is an observation and each column a variable. - -The return values @var{beta}, @var{v}, and @var{r} are defined as -follows. - -@table @var -@item beta -The GLS estimator for @var{b}. - -@item v -The GLS estimator for @code{@var{s}^2}. - -@item r -The matrix of GLS residuals, @code{@var{r} = @var{y} - @var{x} * -@var{beta}}. -@end table -@end deftypefn +@DOCSTRING(gls) -@deftypefn {Function File} {[@var{beta}, @var{sigma}, @var{r}] =} ols (@var{y}, @var{x}) -Ordinary least squares estimation for the multivariate model -@iftex -@tex -$y = x b + e$ -with -$\bar{e} = 0$, and cov(vec($e$)) = kron ($s, I$) -@end tex -@end iftex -@ifinfo -@code{@var{y} = @var{x}*@var{b} + @var{e}} with -@code{mean (@var{e}) = 0} and @code{cov (vec (@var{e})) = kron (@var{s}, -@var{I})}. -@end ifinfo - where -@iftex -@tex -$y$ is a $t \times p$ matrix, $x$ is a $t \times k$ matrix, -$b$ is a $k \times p$ matrix, and $e$ is a $t \times p$ matrix. -@end tex -@end iftex -@ifinfo -@var{y} is a @var{t} by @var{p} matrix, @var{X} is a @var{t} by @var{k} -matrix, @var{B} is a @var{k} by @var{p} matrix, and @var{e} is a @var{t} -by @var{p} matrix. -@end ifinfo - -Each row of @var{y} and @var{x} is an observation and each column a -variable. - -The return values @var{beta}, @var{sigma}, and @var{r} are defined as -follows. - -@table @var -@item beta -The OLS estimator for @var{b}, @code{@var{beta} = pinv (@var{x}) * -@var{y}}, where @code{pinv (@var{x})} denotes the pseudoinverse of -@var{x}. - -@item sigma -The OLS estimator for the matrix @var{s}, - -@example -@group -@var{sigma} = (@var{y}-@var{x}*@var{beta})' * (@var{y}-@var{x}*@var{beta}) / (@var{t}-rank(@var{x})) -@end group -@end example - -@item r -The matrix of OLS residuals, @code{@var{r} = @var{y} - @var{x} * @var{beta}}. -@end table -@end deftypefn +@DOCSTRING(ols)