File: octave_22.html

package info (click to toggle)
octave 2.0.13.95-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 26,052 kB
  • ctags: 16,420
  • sloc: cpp: 67,184; fortran: 41,514; ansic: 26,607; sh: 7,291; makefile: 4,089; lex: 1,961; yacc: 1,852; perl: 1,676; lisp: 1,664; exp: 123
file content (114 lines) | stat: -rw-r--r-- 2,851 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.51
     from ./octave.texi on 9 October 1998 -->

<TITLE>GNU Octave - Optimization</TITLE>
</HEAD>
<BODY>
Go to the <A HREF="octave_1.html">first</A>, <A HREF="octave_21.html">previous</A>, <A HREF="octave_23.html">next</A>, <A HREF="octave_40.html">last</A> section, <A HREF="octave_toc.html">table of contents</A>.
<P><HR><P>


<H1><A NAME="SEC154" HREF="octave_toc.html#TOC154">Optimization</A></H1>

<P>
<A NAME="IDX752"></A>
<A NAME="IDX753"></A>
<A NAME="IDX754"></A>
<A NAME="IDX755"></A>
<A NAME="IDX756"></A>
<A NAME="IDX757"></A>

</P>


<H2><A NAME="SEC155" HREF="octave_toc.html#TOC155">Quadratic Programming</A></H2>



<H2><A NAME="SEC156" HREF="octave_toc.html#TOC156">Nonlinear Programming</A></H2>



<H2><A NAME="SEC157" HREF="octave_toc.html#TOC157">Linear Least Squares</A></H2>

<P>
<DL>
<DT><U>Function File:</U> [<VAR>beta</VAR>, <VAR>v</VAR>, <VAR>r</VAR>] = <B>gls</B> <I>(<VAR>y</VAR>, <VAR>x</VAR>, <VAR>o</VAR>)</I>
<DD><A NAME="IDX758"></A>
Generalized least squares estimation for the multivariate model
 where

</P>
<P>
Each row of Y and X is an observation and each column a variable.

</P>
<P>
The return values <VAR>beta</VAR>, <VAR>v</VAR>, and <VAR>r</VAR> are defined as
follows.

</P>
<DL COMPACT>

<DT><VAR>beta</VAR>
<DD>
The GLS estimator for <VAR>b</VAR>.

<DT><VAR>v</VAR>
<DD>
The GLS estimator for <CODE><VAR>s</VAR>^2</CODE>.

<DT><VAR>r</VAR>
<DD>
The matrix of GLS residuals, <CODE><VAR>r</VAR> = <VAR>y</VAR> - <VAR>x</VAR> *
<VAR>beta</VAR></CODE>.
</DL>
</DL>

<P>
<DL>
<DT><U>Function File:</U> [<VAR>beta</VAR>, <VAR>sigma</VAR>, <VAR>r</VAR>] = <B>ols</B> <I>(<VAR>y</VAR>, <VAR>x</VAR>)</I>
<DD><A NAME="IDX759"></A>
Ordinary least squares estimation for the multivariate model
 where

</P>
<P>
Each row of <VAR>y</VAR> and <VAR>x</VAR> is an observation and each column a
variable.

</P>
<P>
The return values <VAR>beta</VAR>, <VAR>sigma</VAR>, and <VAR>r</VAR> are defined as
follows.

</P>
<DL COMPACT>

<DT><VAR>beta</VAR>
<DD>
The OLS estimator for <VAR>b</VAR>, <CODE><VAR>beta</VAR> = pinv (<VAR>x</VAR>) *
<VAR>y</VAR></CODE>, where <CODE>pinv (<VAR>x</VAR>)</CODE> denotes the pseudoinverse of
<VAR>x</VAR>.

<DT><VAR>sigma</VAR>
<DD>
The OLS estimator for the matrix <VAR>s</VAR>,


<PRE>
<VAR>sigma</VAR> = (<VAR>y</VAR>-<VAR>x</VAR>*<VAR>beta</VAR>)' * (<VAR>y</VAR>-<VAR>x</VAR>*<VAR>beta</VAR>) / (<VAR>t</VAR>-rank(<VAR>x</VAR>))
</PRE>

<DT><VAR>r</VAR>
<DD>
The matrix of OLS residuals, <CODE><VAR>r</VAR> = <VAR>y</VAR> - <VAR>x</VAR> * <VAR>beta</VAR></CODE>.
</DL>
</DL>

<P><HR><P>
Go to the <A HREF="octave_1.html">first</A>, <A HREF="octave_21.html">previous</A>, <A HREF="octave_23.html">next</A>, <A HREF="octave_40.html">last</A> section, <A HREF="octave_toc.html">table of contents</A>.
</BODY>
</HTML>