- •Table of Contents
- •Chapter 1. Introduction
- •Using Commands
- •Batch Program Use
- •How to Use this Manual
- •Chapter 2. Object and Command Basics
- •Object Declaration
- •Object Commands
- •Object Assignment
- •More on Object Declaration
- •Auxiliary Commands
- •Managing Workfiles and Databases
- •Managing Objects
- •Basic Command Summary
- •Chapter 3. Matrix Language
- •Declaring Matrices
- •Assigning Matrix Values
- •Copying Data Between Objects
- •Matrix Expressions
- •Matrix Commands and Functions
- •Matrix Views and Procs
- •Matrix Operations versus Loop Operations
- •Summary of Automatic Resizing of Matrix Objects
- •Matrix Function and Command Summary
- •Chapter 4. Working with Tables
- •Creating a Table
- •Assigning Table Values
- •Customizing Tables
- •Labeling Tables
- •Printing Tables
- •Exporting Tables to Files
- •Customizing Spreadsheet Views
- •Table Summary
- •Chapter 5. Working with Graphs
- •Creating a Graph
- •Changing Graph Types
- •Customizing a Graph
- •Labeling Graphs
- •Printing Graphs
- •Exporting Graphs to Files
- •Graph Summary
- •Chapter 6. EViews Programming
- •Program Basics
- •Simple Programs
- •Program Variables
- •Program Modes
- •Program Arguments
- •Control of Execution
- •Multiple Program Files
- •Subroutines
- •Programming Summary
- •Chapter 7. Strings and Dates
- •Strings
- •Dates
- •Appendix A. Object, View and Procedure Reference
- •Alpha
- •Coef
- •Equation
- •Graph
- •Group
- •Link
- •Logl
- •Matrix
- •Model
- •Pool
- •Rowvector
- •Sample
- •Scalar
- •Series
- •Sspace
- •System
- •Table
- •Text
- •Valmap
- •Vector
- •Appendix B. Command Reference
- •addassign
- •addinit
- •addtext
- •align
- •alpha
- •append
- •arch
- •archtest
- •area
- •arlm
- •arma
- •arroots
- •auto
- •axis
- •bdstest
- •binary
- •block
- •boxplot
- •boxplotby
- •bplabel
- •cause
- •ccopy
- •cdfplot
- •cellipse
- •censored
- •cfetch
- •chdir
- •checkderivs
- •chow
- •clabel
- •cleartext
- •close
- •coef
- •coefcov
- •coint
- •comment
- •control
- •copy
- •correl
- •correlsq
- •count
- •create
- •cross
- •data
- •datelabel
- •dates
- •dbcopy
- •dbcreate
- •dbdelete
- •dbopen
- •dbpack
- •dbrebuild
- •dbrename
- •dbrepair
- •decomp
- •define
- •delete
- •derivs
- •describe
- •displayname
- •draw
- •drawdefault
- •driconvert
- •drop
- •dtable
- •edftest
- •endog
- •equation
- •errbar
- •exclude
- •exit
- •expand
- •fetch
- •fill
- •fiml
- •fixedtest
- •forecast
- •freeze
- •freq
- •frml
- •garch
- •genr
- •grads
- •graph
- •group
- •hconvert
- •hfetch
- •hilo
- •hist
- •hlabel
- •impulse
- •jbera
- •kdensity
- •kerfit
- •label
- •laglen
- •legend
- •line
- •linefit
- •link
- •linkto
- •load
- •logit
- •logl
- •makecoint
- •makederivs
- •makeendog
- •makefilter
- •makegarch
- •makegrads
- •makegraph
- •makegroup
- •makelimits
- •makemap
- •makemodel
- •makeregs
- •makeresids
- •makesignals
- •makestates
- •makestats
- •makesystem
- •matrix
- •means
- •merge
- •metafile
- •model
- •name
- •nnfit
- •open
- •options
- •ordered
- •output
- •override
- •pageappend
- •pagecontract
- •pagecopy
- •pagecreate
- •pagedelete
- •pageload
- •pagerename
- •pagesave
- •pageselect
- •pagestack
- •pagestruct
- •pageunstack
- •param
- •pcomp
- •plot
- •pool
- •predict
- •probit
- •program
- •qqplot
- •qstats
- •range
- •ranhaus
- •read
- •rename
- •representations
- •resample
- •reset
- •residcor
- •residcov
- •resids
- •results
- •rndint
- •rndseed
- •rowvector
- •sample
- •save
- •scalar
- •scale
- •scat
- •scatmat
- •scenario
- •seas
- •seasplot
- •series
- •setbpelem
- •setcell
- •setcolwidth
- •setconvert
- •setelem
- •setfillcolor
- •setfont
- •setformat
- •setheight
- •setindent
- •setjust
- •setline
- •setlines
- •setmerge
- •settextcolor
- •setwidth
- •sheet
- •show
- •signalgraphs
- •smooth
- •smpl
- •solve
- •solveopt
- •sort
- •spec
- •spike
- •sspace
- •statby
- •stategraphs
- •statefinal
- •stateinit
- •stats
- •statusline
- •stom
- •stomna
- •store
- •structure
- •svar
- •system
- •table
- •template
- •testadd
- •testbtw
- •testby
- •testdrop
- •testexog
- •testfit
- •testlags
- •teststat
- •text
- •textdefault
- •trace
- •tramoseats
- •tsls
- •unlink
- •update
- •updatecoefs
- •uroot
- •usage
- •valmap
- •vars
- •vector
- •wald
- •wfcreate
- •wfopen
- •wfsave
- •wfselect
- •white
- •workfile
- •write
- •wtsls
- •xyline
- •xypair
- •Appendix C. Special Expression Reference
- •@expand
- •nrnd
- •Appendix D. Operator and Function Reference
- •Operators
- •Basic Mathematical Functions
- •Time Series Functions
- •Descriptive Statistics
- •By-Group Statistics
- •Special Functions
- •Trigonometric Functions
- •Statistical Distribution Functions
- •Appendix E. Workfile Functions
- •Basic Workfile Information
- •Dated Workfile Information
- •Panel Workfile Functions
- •Appendix F. String and Date Function Reference
- •@dateadd
- •@datediff
- •@datefloor
- •@datepart
- •@datestr
- •@dateval
- •@dtoo
- •@eqna
- •@insert
- •@instr
- •@isempty
- •@left
- •@len, @length
- •@lower
- •@ltrim
- •@makedate
- •@neqna
- •@otod
- •@replace
- •@right
- •@rtrim
- •@strdate
- •@strlen
- •@strnow
- •@trim
- •@upper
- •Appendix G. Matrix Reference
- •@cholesky
- •colplace
- •@columnextract
- •@columns
- •@cond
- •@convert
- •@eigenvalues
- •@eigenvectors
- •@explode
- •@filledmatrix
- •@filledrowvector
- •@filledsym
- •@filledvector
- •@getmaindiagonal
- •@identity
- •@implode
- •@inner
- •@inverse
- •@issingular
- •@kronecker
- •@makediagonal
- •matplace
- •mtos
- •@norm
- •@outer
- •@permute
- •@rank
- •@resample
- •@rowextract
- •rowplace
- •@rows
- •@solvesystem
- •stom
- •stomna
- •@subextract
- •@trace
- •@transpose
- •@unitvector
- •@vech
- •Appendix H. Programming Language Reference
- •call
- •@date
- •else
- •endif
- •endsub
- •@errorcount
- •@evpath
- •exitloop
- •include
- •@isobject
- •next
- •open
- •output
- •poff
- •program
- •return
- •statusline
- •step
- •stop
- •subroutine
- •@temppath
- •then
- •@time
- •wend
- •while
- •Index
- •Symbols
- •% (percent sign)
- •+ (plus)
- •addition 35
- •@crossid 593
- •@date 148, 590, 633
- •@eqna 124, 575, 599
- •@-functions
- •@inner 578, 619
- •@insert 126, 600
- •@instr 124, 600
- •@inverse 620
- •@isempty 124, 601
- •@isna 575
- •@isobject 637
- •@isperiod 591
- •@issingular 620
- •@kronecker 620
- •@kurtsby 580
- •@last 474
- •@lastmax 474
- •@lastmin 474
- •@left 125, 601, 606
- •@length 124, 602
- •@logit 583
- •@logx 576
- •@lower 127, 602
- •@ltrim 126, 602
- •@makedate 142, 603
- •@makediagonal 621
- •@maxsby 579
- •@meansby 579
- •@median 578
- •@mediansby 579
- •@minsby 579
- •@month 148, 591
- •@movav 576
- •@movsum 576
- •@nasby 580
- •@neqna 125, 575, 604
- •@ngroups 580
- •@norm 623
- •@obsby 579
- •@obsid 593
- •@obsnum 589
- •@obsrange 590
- •@obssmpl 590
- •@otod 128, 605
- •@outer 623
- •@pcha 577
- •@pchy 577
- •@permute 624
- •@quantile 579
- •@quantilesby 580
- •@quarter 148, 591
- •@rank 624
- •@recode 576
- •@replace 126, 605
- •@resample 625
- •@RGB specification of colors 454
- •@right 126
- •@round 576
- •@rowextract 625
- •@rows 626
- •@rtrim 126, 606
- •@seas 591
- •@skewsby 580
- •@solvesystem 626
- •@sqrt 576
- •@stdev 579
- •@stdevsby 579
- •@strdate 128, 148, 591, 607
- •@strlen 607
- •@strnow 128, 607
- •@subextract 628
- •@sumsby 579
- •@sumsq 579
- •@sumsqsby 579
- •@temppath 641
- •_ (continuation character) 84
- •Numerics
- •Add factor
- •align 203
- •views 154
- •Alpha series
- •append 205
- •ARCH
- •Arguments
- •in programs 98
- •ARMA
- •ASCII file
- •open as workfile 532
- •Autocorrelation
- •Autogressive error. See AR.
- •Autowrap text 83
- •Axis
- •rename label 371
- •axis 217
- •Beta
- •Binary
- •Binomial
- •customize 231
- •Breusch-Godfrey test
- •call 633
- •Cell
- •censored 238
- •Cholesky factor
- •Chow test 241
- •Close
- •Coefficient
- •See Coef.
- •update default coef vector 521
- •Cointegration
- •Color
- •Column
- •extract from matrix 612
- •stack matrix 630
- •Conditional standard deviation
- •Conditional variance
- •Control variable 88
- •Convert
- •date to observation number 599
- •matrix to sym 618
- •Coordinates
- •Copy
- •cross 260
- •matrix 259
- •Create
- •Cross section member
- •of squares 424
- •Data
- •Database
- •Date
- •Dates
- •current date and time 147
- •string representation 598
- •Declare
- •Delete
- •Derivatives
- •Directory
- •Distribution function
- •DRI database
- •fetch series 239
- •Drop
- •group series or cross-section from pool definition 281
- •Eigenvalues 615
- •Element
- •else 634
- •Error correction model
- •Errors
- •exclude 289
- •Exclude variables from model solution 289
- •Exit
- •Exponential
- •Export
- •matrix 41
- •Extract
- •row vector 625
- •Files
- •Fill
- •Filled
- •Fixed effects
- •For loop
- •Forecast
- •Freeze
- •frml 306
- •Full information maximum likelihood 296
- •GARCH
- •Gauss file 532
- •Gaussian distribution 586
- •Generalized autoregressive conditional heteroskedasticity
- •Generate series
- •Gompit models 222
- •Gradients
- •display 315
- •create 59
- •high-low-open-close 320
- •pie graph 406
- •XY graph 556
- •graph 316
- •greater than comparison 36
- •add series 198
- •group 317
- •Hausman test 413
- •hconvert 318
- •HTML
- •If statement 100
- •Include
- •Inverse of matrix 620
- •Jarque-Bera
- •Johansen cointegration test 245
- •Kernel
- •label 330
- •specify as range 643
- •Lagrange multiplier
- •Legend
- •line 334
- •Link object
- •Local
- •Logistic
- •logl 344
- •Loop
- •exit loop 108, 635
- •Lotus file
- •Matrix
- •resample rows from 625
- •matrix 366
- •Maximum 578
- •Median 578
- •Merge
- •Messages
- •model solution 371
- •Model 170
- •Models
- •block structure 223
- •solve 475
- •Multiplication operator (*) 35
- •Negative binomial
- •Number
- •evaluate a string 608
- •Numbers
- •converting from strings 124
- •store 16, 490
- •Open
- •database 266
- •Output
- •Output redirection 638
- •override 382
- •Override variables in model solution 382
- •Page
- •resize 399
- •Panel
- •Panel data
- •Percent change
- •Poisson
- •Pool 171
- •declare 408
- •delete identifiers 272
- •pool 408
- •portrait 8
- •probit 410
- •create 83
- •open 84
- •P-value functions 587
- •QQ-plot
- •Quantile function 579
- •Random effects
- •Random number
- •Read
- •Recode values 576
- •Regressors
- •Rename
- •Resample
- •Residuals
- •Results
- •return 639
- •height 50
- •Run program
- •multiple files 108
- •Sample
- •set current 474
- •Save
- •with kernel fit 329
- •scenario 438
- •seas 440
- •Second moment matrix 619
- •declare 442
- •formula 306
- •show 470
- •Signal variables
- •Singular matrix
- •test for 620
- •Smoothing
- •Solve
- •linear system 626
- •sort 478
- •Sspace
- •declare 482
- •procs 180
- •State space
- •State variables
- •display graphs of 484
- •Static forecast 297
- •insert string into 600
- •relational comparison 121
- •String variable 89
- •in for loop 104
- •return from 109, 639
- •Symmetric matrix
- •declare 497
- •Table 187
- •text color 54
- •Test
- •Chow 241
- •for ARCH 210
- •mean, median, variance equality 501
- •mean, median, variance equality by classification 502
- •Text file
- •Then 642
- •Time
- •current as string 607
- •trace 512
- •Trigonometric functions 583
- •Uniform distribution 587
- •Valmap 189
- •vector 529
- •Verbose mode 85
- •append contents of workfile page to current page 383
- •close 12
- •contract page 385
- •create 260
- •end date of observation interval 590
- •open existing 12, 532
- •period indicators 591
- •save 12, 540
- •stack page 396
- •Write
- •wtsls 547
- •xypair 561
214—Appendix B. Command Reference
arma |
Equation View |
|
|
Examine ARMA structure of estimated equation.
Provides diagnostic graphical and tabular views that aid you in assessing the structure of the ARMA component of an estimated equation. The view is currently available only for equations specified by list and estimated by least squares that include at least one AR or MA term. There are three views types available: roots, correlogram, and impulse response.
Syntax
Object View: |
eq_name.arma(type=arg [,options]) |
where eq_name is the name of an equation object specified by list, estimated by least squares, and contains at least one ARMA term.
Options
type=arg |
Required “type=” option selects the type of ARMA |
|
structure output: “root” displays the inverse roots of the |
|
AR/MA characteristic polynomials, “acf” displays the |
|
second moments (autocorrelation and partial autocorre- |
|
lation) for the data in the estimation sample and for the |
|
estimated model, “imp” displays the impulse responses. |
|
|
t |
Displays the table view of the results for the view speci- |
|
fied by the “type=” option. By default, EViews will dis- |
|
play a graphical view of the ARMA results. |
|
|
hrz=arg |
Specifies the maximum lag length for “type=acf”, and |
|
the maximum horizon (periods) for “type=imp”. |
|
|
imp=arg |
Specifies the size of the impulse for the impulse |
|
response (“type=imp”) view. By default, EViews will |
|
use the regression estimated standard error. |
|
|
save=arg |
Stores the results as a matrix object with the specified |
|
name. The matrix holds the results roughly as displayed |
|
in the table view of the corresponding type. For |
|
“type=root”, roots for the AR and MA polynomials will |
|
be stored in separate matrices as NAME_AR and |
|
NAME_MA, where “NAME” is the name given by the |
|
“save=” option. |
|
|
p |
Print the table or graph output. |
arroots—215
Examples
eq1.arma(type=root, save=root)
displays and saves the ARMA roots from the estimated equation EQ1. The roots will be placed in the matrix object ROOT.
eq1.arma(type=acf, hrz=25, save=acf)
computes the second moments (autocorrelation and partical autocorrelations) for the observations in the sample and the estimated model. The results are computed for a 25 period horizon. We save the results in the matrix object ACF.
eq1.arma(type=imp, hrz=25, save=imp)
computes the 25 period impulse-response function implied by the estimated ARMA coefficients. EViews will use the default 1 standard error of the estimated equation as the shock, and will save the results in the matrix object IMP.
Cross-references
See “ARMA Structure” on page 510 of the User’s Guide for details.
arroots |
Var View |
|
|
Inverse roots of the characteristic AR polynomial.
Syntax
|
Var View: |
var_name.arroots(options) |
Options |
|
|
|
|
|
|
name=arg |
Save roots in named matrix object. Each root is saved in |
|
|
a row of the matrix, with the first column containing |
|
|
the real, and the second column containing the imagi- |
|
|
nary part of the root. |
|
|
|
|
graph |
Plots the roots together with a unit circle. The VAR is |
|
|
stable if all of the roots are inside the unit circle. |
|
|
|
|
p |
Print table of AR roots. |
|
|
|
Examples
var var1.ls 1 6 lgdp lm1 lcpi
var1.arroots(graph)
216—Appendix B. Command Reference
The first line declares and estimates a VAR with 6 lags. The second line plots the AR roots of the estimated VAR.
var var1.ls 1 6 lgdp lm1 lcpi
store roots
freeze(tab1) var1.arroots(name=roots)
The first line declares and estimates a VAR with 6 lags. The second line stores the roots in a matrix named ROOTS, and the table view as a table named TAB1.
Cross-references
See “Diagnostic Views” on page 722 of the User’s Guide for other VAR diagnostics.
auto |
Command || Equation View |
|
|
Compute serial correlation LM (Lagrange multiplier) test.
Carries out Breusch-Godfrey Lagrange Multiplier (LM) tests for serial correlation in the estimation residuals.
Syntax
Command: auto(order, options)
Equation View: eq_name.auto(order, options)
You must specify the order of serial correlation for which you wish to test. You should specify the number of lags in parentheses after the auto keyword, followed by any additional options.
In command form, auto tests the residuals from the default equation.
Options
p |
Print output from the test. |
|
|
Examples
To regress OUTPUT on a constant, LABOR, and CAPITAL, and test for serial correlation of up to order four you may use the commands:
ls output c labor capital
auto(4)
The commands:
output(t) c:\result\artest.txt
axis—217
equation eq1.ls cons c y y(-1)
eq1.auto(12, p)
perform a regression of CONS on a constant, Y and lagged Y, and test for serial correlation of up to order twelve. The first line redirects printed tables/text to the ARTEST.TXT file.
Cross-references
See “Serial Correlation LM Test” on page 493 of the User’s Guide for further discussion of the Breusch-Godfrey test.
axis |
Graph Proc |
|
|
Sets axis display characteristics for the graph.
Syntax
Graph Proc: |
graph_name.axis(axis_id) options_list |
The axis_id parameter identifies which of the axes the proc modifies. If no option is specified, the proc will modify all of the axes. axis_id may take on one of the following values:
left / l |
Left vertical axis. |
|
|
right / r |
Right vertical axis. |
|
|
bottom / b |
Bottom axis. |
|
|
top / t |
Top axis. |
|
|
all / a |
All axes. |
|
|
Options
The options list may include any of the following options:
grid / -grid |
[Draw / Do not draw] grid lines. |
|
|
zeroline / -zero- |
[Draw / Do not draw] a line at zero on the data scale. |
line |
|
|
|
ticksout |
Draw tickmarks outside the graph axes. |
|
|
ticksin |
Draw tickmarks inside the graph axes. |
|
|
ticksboth |
Draw tickmarks both outside and inside the graph axes. |
|
|
ticksnone |
Do not draw tickmarks. |
218—Appendix B. Command Reference
minor /
-minor
label /
-label
font([face], [pt], [+/- b], [+/- i], [+/- u], [+/- s])
textcolor(arg)
mirror / -mirror
[Allow / Do not allow] minor tick marks.
[Place / Do not place] labels on the axes.
Set characteristics of font. The font name (face), size (pt), and characteristics are all optional. face should be a valid font name, enclosed in double quotes. pt should be the font size in points. The remaining options specify whether to turn on/off boldface (b), italic (i), underline (u), and strikeout (s) styles.
Sets the background color of the legend text. arg may be one of the predefined color keywords, or it may be made up of n1, n2, n3, a set of three integers from 0 to 255, representing the RGB values of the color. For a description of the available color keywords (“blue”, “red”, “green”, “black”, “white”, “purple”, “orange”, “yellow”, “gray”, “ltgray”), see setfillcolor
(p. 453).
[Label / Do not label] both left and right axes with duplicate axes (single scale graphs only).
The options which support the “-” may be proceeded by a “+” or “-” indicating whether to turn on or off the option. The “+” is optional.
Note that the default settings are taken from the Global Defaults.
Examples
graph1.axis(r) zeroline -minor font(12)
draws a horizontal line through the graph at zero on the right axis, removes minor ticks, and changes the font size of the right axis labels to 12 point.
graph2.axis -mirror
turns of mirroring of axes in single scale graphs.
mygra1.axis font("Times", 12, b, i) textcolor(blue)
sets the axis font to blue “Times” 12pt bold italic.
bar—219
Cross-references
See Chapter 14, “Graphs, Tables, and Text Objects”, on page 413 of the User’s Guide for a discussion of graph options.
See also scale (p. 433), datelabel (p. 262), options (p. 375) and setelem (p. 449).
bar
Command || Coef View | Graph Command | Group View | Matrix View | Rowvector View | Series View | Sym View | Vector View
Display bar graph of object, or change existing graph object type to bar graph.
Create bar graph from one or more series or from each column of a matrix object.
Note: when the individual bars in a bar graph become too thin to be distinguished, the graph will automatically be converted into an area graph (see area (p. 211)).
Syntax
Command: |
bar(options) arg1 [arg2 arg3 ...] |
Object View: |
object_name.bar(options) |
Graph Proc: |
graph_name.bar(options) |
When used as a graph proc, bar changes the graph type to a bar graph.
Options
Template and printing options
o= template |
Use appearance options from the specified template. |
|
template may be a predefined template keyword |
|
(‘default” - current global defaults, “classic”, “modern”, |
|
“reverse”, “midnight”, “spartan”, “monochrome”) or a |
|
graph in the workfile. |
|
|
t=graph_name |
Use appearance options and copy text and shading from |
|
the specified graph. |
|
|
b / -b |
[Apply / Remove] bold modifiers of the base template |
|
style specified using the “o=” option above. |
|
|
w / -w |
[Apply / Remove] wide modifiers of the base template |
|
style specified using the “o=” option above. |
|
|
p |
Print the bar graph. |
|
|
The options which support the “-” may be proceeded by a “+” or “-” indicating whether to turn on or off the option. The “+” is optional.
220—Appendix B. Command Reference
Scale options
a (default) |
Automatic single scale. |
|
|
d |
Dual scaling with no crossing. The first series is scaled |
|
on the left, and all other series are scaled on the right. |
|
|
x |
Dual scaling with possible crossing. See the “d” option. |
|
|
n |
Normalized scale (zero mean and unit standard devia- |
|
tion). May not be used with the “s” option. |
|
|
s |
Stacked bar graph. Each bar represents the cumulative |
|
total of the series listed. The difference between bars |
|
corresponds to the value of the corresponding stacked |
|
series. May not be used with the “l” option. |
|
|
l |
Bar graph for the first series and a line graph for all sub- |
|
sequent series. May not be used with the “s” option. |
|
|
m |
Plot bars in multiple graphs. Will override the “s” and |
|
the “l” options. Not for use with an existing graph |
|
object. |
|
|
Panel options
The following options apply when graphing panel structured data:
panel=arg |
Panel data display: “stack” (stack the cross-sections), |
(default taken |
“individual” or “1” (separate graph for each cross-sec- |
from global set- |
tion), “combine” or “c” (combine each cross-section in |
tings) |
single graph; one time axis), “mean” (plot means |
|
across cross-sections), “mean1se” (plot mean and +/- |
|
1 standard deviation summaries), “mean2sd” (plot |
|
mean and +/- 2 s.d. summaries), “mean3sd” (plot |
|
mean and +/- 3 s.d. summaries), “median” (plot |
|
median across cross-sections), “med25” (plot median |
|
and +/- .25 quantiles), “med10” (plot median and +/- |
|
.10 quantiles), “med05” (plot median +/- .05 quan- |
|
tiles), “med025” (plot median +/- .025 quantiles), |
|
“med005” (plot median +/- .005 quantiles), “med- |
|
mxmn” (plot median, max and min). |
|
|
Examples
Plot a bar graph of POP together with line graphs of GDP and CONS: