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

 

Link—165

 

 

@minobs..............

number of non-missing observations in the current sample for the

 

shortest series in the group.

@maxobs .............

number of non-missing observations in the current sample for the

 

the longest series in the group.

@seriesname(i) ....

string containing the name of the i-th series in the group.

Group Examples

To create a group G1, you may enter:

group g1 gdp income

To change the contents of an existing group, you can repeat the declaration, or use the add and drop commands:

group g1 x y

g1.add w z

g1.drop y

The following commands produce a cross-tabulation of the series in the group, display the covariance matrix, and test for equality of variance:

g1.freq

g1.cov

g1.testbtw(var,c)

You can index selected series in the group:

show g1(2).line

series sum=g1(1)+g1(2)

To create a scalar containing the number of series in the group, use the command:

scalar nsers=g1.@count

Link

Link object. Series or alpha link used to frequency converted or match merge data from another workfile page.

Once created, links may be used just like “Series” (p. 177) or “Alpha” (p. 154) objects.

Link Declaration

link ......................

link object declaration (p. 338).

To declare a link object, enter the keyword link, followed by a name:

166—Appendix A. Object, View and Procedure Reference

link newser

and an optional link specification:

link altser.linkto(c=obs,nacat) indiv::x @src ind1 ind2 @dest ind1 ind2

Link Procs

linkto...................

specify link object definition (p. 339).

Logl

Likelihood object. Used for performing maximum likelihood estimation of user-specified likelihood functions.

Logl Declaration

logl ...................... likelihood object declaration (p. 344).

To declare a logl object, use the logl keyword, followed by a name to be given to the object.

Logl Method

ml........................ maximum likelihood estimation (p. 369).

Logl Views

append.................

add line to the specification (p. 205).

cellipse ................

Confidence ellipses for coefficient restrictions (p. 236).

checkderivs ..........

compare user supplied and numeric derivatives (p. 240).

coefcov ................

coefficient covariance matrix (p. 244).

grads ...................

examine the gradients of the log likelihood (p. 315).

label ....................

label view of likelihood object (p. 330).

output..................

table of estimation results (p. 380).

results..................

estimation results (p. 423).

spec .....................

likelihood specification (p. 479).

wald ....................

Wald coefficient restriction test (p. 530).

Logl Procs

displayname.........

set display name (p. 276).

makegrads ...........

make group containing gradients of the log likelihood (p. 353).

makemodel ..........

make model (p. 358).

updatecoefs ..........

update coefficient vector(s) from likelihood (p. 521).

Logl—167

Logl Statements

The following statements can be included in the specification of the likelihood object. These statements are optional, except for “@logl” which is required. See Chapter 22, “The Log Likelihood (LogL) Object”, on page 669 of the User’s Guide for further discussion.

@byeqn................

evaluate specification by equation.

@byobs ................

evaluate specification by observation (default).

@deriv .................

specify an analytic derivative series.

@derivstep ...........

set parameters to control step size.

@logl ...................

specify the likelihood contribution series.

@param ...............

set starting values.

@temp .................

remove temporary working series.

Logl Data Members

Scalar Values (system data)

@aic.....................

Akaike information criterion.

@coefcov(i,j) ........

covariance of coefficients i and j.

@coefs(i)..............

coefficient i.

@hq ....................

Hannan-Quinn information criterion.

@logl ..................

value of the log likelihood function.

@ncoefs ...............

number of estimated coefficients.

@regobs ...............

number of observations used in estimation.

@sc .....................

Schwarz information criterion.

@stderrs(i) ...........

standard error for coefficient i.

@tstats(i) ............

t-statistic value for coefficient i.

coef_name(i) ........

i-th element of default coefficient vector for likelihood.

Vectors and Matrices

 

@coefcov..............

covariance matrix of estimated parameters.

@coefs .................

coefficient vector.

@stderrs...............

vector of standard errors for coefficients.

@tstats .................

vector of t-statistic values for coefficients.

Logl Examples

To declare a likelihood named LL1:

logl ll1

To define a likelihood function for OLS (not a recommended way to do OLS!):

ll1.append @logl logl1

168—Appendix A. Object, View and Procedure Reference

ll1.append res1 = y-c(1)-c(2)*x

ll1.append logl1 = log(@dnorm(res1/@sqrt(c(3))))-log(c(3))/2

To estimate LL1 by maximum likelihood (the “showstart” option displays the starting values):

ll1.ml(showstart)

To save the estimated covariance matrix of the parameters from LL1 as a named matrix COV1:

matrix cov1=ll1.@coefcov

Matrix

Matrix (two-dimensional array).

Matrix Declaration

matrix..................

declare matrix object (p. 366).

There are several ways to create a matrix object. You can enter the matrix keyword (with an optional row and column dimension) followed by a name:

matrix scalarmat

matrix(10,3) results

Alternatively, you can combine a declaration with an assignment statement, in which case the new matrix will be sized accordingly.

Lastly, a number of object procedures create matrices.

Matrix Views

area .....................

area graph of the columns in the matrix (p. 211).

bar.......................

single or multiple bar graph of each column against the row index

 

(p. 219).

cor.......................

correlation matrix by columns (p. 255).

cov ......................

covariance matrix by columns (p. 259).

errbar ..................

error bar graph view (p. 287).

hilo......................

high-low(-open-close) chart (p. 320).

label ....................

label information for the matrix (p. 330).

line......................

single or multiple line graph of each column by the row index

 

(p. 334).

pie .......................

pie chart view (p. 406).

scat......................

scatter diagrams of the columns of the matrix (p. 435).

 

Matrix—169

 

 

sheet ....................

spreadsheet view of the matrix (p. 469).

spike ....................

spike graph (p. 479).

stats......................

descriptive statistics by column (p. 487).

xy.........................

XY graph with one or more X columns plotted against one or more

 

Y (p. 556).

xyline ...................

XY line graph (p. 558).

xypair...................

XY pairs graph (p. 556).

Matrix Procs

 

displayname .........

set display name (p. 276).

fill ........................

fill the elements of the matrix (p. 293).

read......................

import data from disk (p. 414).

setformat ..............

set the display format for the matrix spreadsheet (p. 456).

setindent...............

set the indentation for the matrix spreadsheet (p. 462).

setjust...................

set the justification for the matrix spreadsheet (p. 463).

setwidth ...............

set the column width in the matrix spreadsheet(p. 468).

write ....................

export data to disk (p. 545).

Matrix Data Members

(i,j) ......................

(i,j)-th element of the matrix. Simply append “(i, j)” to the matrix

 

name (without a “.”).

Matrix Examples

The following assignment statements create and initialize matrix objects,

matrix copymat=results

matrix covmat1=eq1.@coefcov

matrix(5,2) count

count.fill 1,2,3,4,5,6,7,8,9,10

as does the equation procedure:

eq1.makecoefcov covmat2

You can declare and initialize a matrix in one command:

matrix(10,30) results=3

matrix(5,5) other=results1

Graphs and covariances may be generated for the columns of the matrix,

copymat.line

copymat.cov

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