Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Eviews5 / EViews5 / Docs / EViews 5 Command Ref.pdf
Скачиваний:
47
Добавлен:
23.03.2015
Размер:
5.23 Mб
Скачать

@eigenvalues—615

scalar sc1 = @cov(v1, v2)

s1(1,2) = @cov(v1, r1)

If used with a matrix object or group, o, @cov calculates the covariance matrix between the columns of the matrix object.

!1 = @cov(v1, v2)

mat3(4,2) = 100*@cov(r1, v1)

For series and group calculations, EViews will use the current workfile sample. See also @cor (p. 614).

@det

Matrix Algebra Function

 

 

Syntax:

@det(m)

Argument:

matrix or sym, m

Return:

scalar

Calculate the determinant of the square matrix or sym, m. The determinant is nonzero for a nonsingular matrix and 0 for a singular matrix. Example:

scalar sc1 = @det(m1) vec4(2) = @det(s2)

See also @rank (p. 624).

@eigenvalues

Matrix Algebra Function

 

 

Syntax:

@eigenvalues(s)

Argument:

sym, s

Return:

vector

Returns a vector containing the eigenvalues of the sym. The eigenvalues are those scalars λ that satisfy Sx=λx where S is the sym associated with the argument s . Associated with each eigenvalue is an eigenvector (see @eigenvectors (p. 616)). The eigenvalues are arranged in ascending order.

Example:

616—Appendix G. Matrix Reference

vector v1 = @eigenvalues(s1)

@eigenvectors

Matrix Algebra Function

 

 

Syntax:

@eigenvectors(s)

Argument:

sym, s

Return:

matrix

Returns a square matrix, of the same dimension as the sym, whose columns are the eigenvectors of the source matrix. Each eigenvector v satisfies Sv=nv, where S is the symmetric matrix given by s, and where n is the eigenvalue associated with the eigenvector v. The eigenvalues are arranged in ascending order, and the columns of the eigenvector matrix correspond to the sorted eigenvalues. Example:

matrix m2 = @eigenvectors(s1)

See also the function @eigenvalues (p. 615).

@explode

Matrix Utility Function

 

 

Syntax:

@explode(s)

Argument:

sym, s

Return:

matrix

Creates a square matrix from a sym, s, by duplicating the lower triangle elements into the upper triangle. Example:

matrix m2 = @explode(s1)

See also @implode (p. 618).

@filledmatrix

Matrix Utility Function

 

 

Syntax:

@filledmatrix(n1, n2, n3)

Argument 1:

integer, n1

Argument 2:

integer, n2

Argument 3:

scalar, n3

Return:

matrix

@filledvector—617

Returns a matrix with n1 rows and n2 columns, where each element contains the value n3. Example:

matrix m2 = @filledmatrix(3,2,7)

creates a 3 × 2 matrix where each element is set to 7. See also fill (p. 293).

@filledrowvector

Matrix Utility Function

 

 

Syntax:

@filledrowvector(n1, n2)

Argument 1:

integer, n1

Argument 2:

scalar, n2

Return:

rowvector

Returns a rowvector of length n1, where each element contains the value n2. Example:

rowvector r1 = @filledrowvector(3,1)

creates a 3 element rowvector where each element is set to 1. See also fill (p. 293).

@filledsym

Matrix Utility Function

 

 

Syntax:

@filledsym(n1, n2)

Argument 1:

integer, n1

Argument 2:

scalar, n2

Return:

sym

Returns an n1 × n1 sym, where each element contains n2. Example:

sym s2= @filledsym(3,9)

creates a 3 × 3 sym where each element is set to 9. See also fill (p. 293).

@filledvector

Matrix Utility Function

 

 

Syntax:

@filledvector(n1, n2)

Argument 1:

integer, n1

Argument 2:

scalar, n2

Return:

vector

Returns a vector of length n1, where each element contains the value n2. Example:

618—Appendix G. Matrix Reference

vector r1 = @filledvector(5,6)

creates a 5 element column vector where each element is set to 6. See also fill (p. 293).

@getmaindiagonal

Matrix Utility Function

 

 

Syntax:

@getmaindiagonal(m)

Argument:

matrix or sym, m

Return:

vector

Returns a vector created from the main diagonal of the matrix or sym object. Example:

vector v1 = @getmaindiagonal(m1)

vector v2 = @getmaindiagonal(s1)

@identity

Matrix Utility Function

 

 

Syntax:

@identity(n)

Argument:

integer, n

Return:

matrix

Returns a square n × n identity matrix. Example:

matrix i1 = @identity(4)

@implode

Matrix Utility Function

 

 

Syntax:

@implode(m)

Argument:

square matrix, m

Return:

sym

Forms a sym by copying the lower triangle of a square input matrix, m. Where possible, you should use a sym in place of a matrix to take advantage of computational efficiencies. Be sure you know what you are doing if the original matrix is not symmetric—this function does not check for symmetry. Example:

sym s2 = @implode(m1)

See also @explode (p. 616).

Соседние файлы в папке Docs