__Function File:__[`beta`,`v`,`r`] =**gls***(*`y`,`x`,`o`)-
Generalized least squares estimation for the multivariate model

with`y`=`x`*`b`+`e``mean (`

and`e`) = 0`cov (vec (`

, where`e`)) = (`s`^2)*`o``Y`is a`T`by`p`matrix,`X`is a`T`by`k`matrix,`B`is a`k`by`p`matrix,`E`is a`T`by`p`matrix, and`O`is a`T``p`by`T``p`matrix.Each row of Y and X is an observation and each column a variable.

The return values

`beta`,`v`, and`r`are defined as follows.`beta`-
The GLS estimator for
`b`. `v`-
The GLS estimator for

.`s`^2 `r`-
The matrix of GLS residuals,

.`r`=`y`-`x`*`beta`

__Function File:__[`beta`,`sigma`,`r`] =**ols***(*`y`,`x`)-
Ordinary least squares estimation for the multivariate model

with`y`=`x`*`b`+`e``mean (`

and`e`) = 0`cov (vec (`

. where`e`)) = kron (`s`,`I`)`y`is a`t`by`p`matrix,`X`is a`t`by`k`matrix,`B`is a`k`by`p`matrix, and`e`is a`t`by`p`matrix.Each row of

`y`and`x`is an observation and each column a variable.The return values

`beta`,`sigma`, and`r`are defined as follows.`beta`-
The OLS estimator for
`b`,

, where`beta`= pinv (`x`) *`y``pinv (`

denotes the pseudoinverse of`x`)`x`. `sigma`-
The OLS estimator for the matrix
`s`,`sigma`= (`y`-`x`*`beta`)' * (`y`-`x`*`beta`) / (`t`-rank(`x`)) `r`-
The matrix of OLS residuals,

.`r`=`y`-`x`*`beta`

Go to the first, previous, next, last section, table of contents.