- •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
174—Appendix A. Object, View and Procedure Reference
c(i) ...................... |
i-th element of default coefficient vector for the pool. |
Vectors and Matrices |
|
@coefcov ............. |
covariance matrix for coefficients of equation. |
@coefs................. |
coefficient vector. |
@effects............... |
vector of estimated fixed or random effects (only for fixed or ran- |
|
dom effects estimation). |
@stderrs .............. |
vector of standard errors for coefficients. |
@tstats ................ |
vector of t-statistic values for coefficients. |
Pool Examples
To read data using the pool object:
mypool1.read(b2) data.xls x? y? z?
To delete and store pool series you may enter:
mypool1.delete x? y?
mypool1.store z?
Descriptive statistics may be computed using the command:
mypool1.describe(m) z?
To estimate a pool equation using least squares and to access the t-statistics, enter:
mypool1.ls y? c z? @ w?
vector tstat1 = mypool1.@tstats
Rowvector
Row vector. (One dimensional array of numbers).
Rowvector Declaration
rowvector............. |
declare rowvector object (p. 427). |
There are several ways to create a rowvector object. First, you can enter the rowvector keyword (with an optional dimension) followed by a name:
rowvector scalarmat
rowvector(10) results
The resulting rowvector will be initialized with zeros.
Alternatively, you may combine a declaration with an assignment statement. The new vector will be sized and initialized accordingly:
Rowvector—175
rowvector(10) y=3 rowvector z=results
Rowvector Views
area ...................... |
area graph of the vector (p. 211). |
bar ....................... |
bar graph of each column (element) of the data against the row |
|
index (p. 219). |
errbar ................... |
error bar graph view (p. 287). |
label ..................... |
label information for the rowvector (p. 330). |
line....................... |
line graph of each column (element) of the data against the row |
|
index (p. 334). |
scat ...................... |
scatter diagrams of the columns of the rowvector (p. 435). |
sheet .................... |
spreadsheet view of the vector (p. 469). |
spike .................... |
spike graph (p. 479). |
stats...................... |
(trivial) descriptive statistics (p. 487). |
Rowvector Procs
displayname ......... |
set display name (p. 276). |
fill ........................ |
fill elements of the vector (p. 293). |
read...................... |
import data from disk (p. 414). |
setformat .............. |
set the display format for the vector spreadsheet (p. 456). |
setindent............... |
set the indentation for the vector spreadsheet (p. 462). |
setjust................... |
set the justification for the vector spreadsheet (p. 463). |
setwidth ............... |
set the column width in the vector spreadsheet (p. 468). |
write .................... |
export data to disk (p. 545). |
Rowvector Data Members
(i) ........................ |
i-th element of the vector. Simply append “(i)” to the matrix name |
|
(without a “.”). |
Rowvector Examples
To declare a rowvector and to fill it with data read from an Excel file:
rowvector(10) mydata
mydata.read(b2) thedata.xls
To access a single element of the vector using direct indexing:
scalar result1=mydata(2)
The rowvector may be used in standard matrix expressions:
176—Appendix A. Object, View and Procedure Reference
vector transdata=@transpose(mydata)
Sample
Sample of observations. Description of a set of observations to be used in operations.
Sample Declaration
sample ................. |
declare sample object (p. 429). |
To declare a sample object, use the keyword sample, followed by a name and a sample string:
sample mysample 1960:1 1990:4
sample altsample 120 170 300 1000 if x>0
Sample Procs
set ....................... |
reset the sample range (p. 444). |
Sample Example
To change the observations in a sample object, you can use the set proc:
mysample.set 1960:1 1980:4 if y>0
sample thesamp 1 10 20 30 40 60 if x>0
thesamp.set @all
To set the current sample to use a sample, enter a smpl statement, followed by the name of the sample object:
smpl mysample
equation eq1.ls y x c
Scalar
Scalar (single number). A scalar holds a single numeric value. Scalar values may be used in standard EViews expressions in place of numeric values.
Scalar Declaration
scalar................... |
declare scalar object (p. 433). |
To declare a scalar object, use the keyword scalar, followed by a name, an “=” sign and a scalar expression or value.
Scalar objects have no views or procedures, and do not open windows. The value of the scalar may be displayed in the status line at the bottom of the EViews window.
Series—177
Scalar Examples
You can declare a scalar and examine its contents in the status line:
scalar pi=3.14159
scalar shape=beta(7)
show shape
or you can declare a scalar and use it in an expression:
scalar inner=@transpose(mydata)*mydata
series x=1/@sqrt(inner)*y
Series
Series of numeric observations. An EViews series contains a set of observations on a numeric variable.
Series Declaration
frml ...................... |
create numeric series object with a formula for auto-updating |
|
(p. 306). |
genr...................... |
create numeric series object (p. 308). |
series.................... |
declare numeric series object (p. 442). |
To declare a series, use the keyword series or alpha followed by a name, and optionally, by an “=” sign and a valid numeric series expression:
series y
genr x=3*z
If there is no assignment, the series will be initialized to contain NAs.
Series Views
area ...................... |
area graph of the series (p. 211). |
bar ....................... |
bar graph of the series (p. 219). |
bdstest.................. |
BDS independence test (p. 221). |
boxplotby ............. |
boxplot by classification (p. 225). |
cdfplot .................. |
distribution (cumulative, survivor, quantile) functions (p. 235). |
correl.................... |
correlogram, autocorrelation and partial autocorrelation functions |
|
(p. 256). |
edftest .................. |
empirical distribution function tests (p. 284). |
freq ...................... |
one-way tabulation (p. 303). |
hist....................... |
descriptive statistics and histogram (p. 322). |
kdensity................ |
kernel density estimate (p. 328). |
178—Appendix A. Object, View and Procedure Reference
label .................... |
label information for the series (p. 330). |
line...................... |
line graph of the series (p. 334). |
qqplot .................. |
quantile-quantile plot (p. 411). |
seasplot................ |
seasonal line graph (p. 441). |
sheet.................... |
spreadsheet view of the series (p. 469). |
spike.................... |
spike graph (p. 479). |
statby................... |
statistics by classification (p. 482). |
stats..................... |
descriptive statistics table (p. 322). |
testby................... |
equality test by classification (p. 502). |
teststat ................. |
simple hypothesis tests (p. 507). |
uroot.................... |
unit root test on an ordinary or panel series (p. 522). |
Series Procs
displayname......... |
set display name (p. 276). |
fill ....................... |
fill the elements of the series (p. 293). |
hpf....................... |
Hodrick-Prescott filter (p. 323). |
map ..................... |
assign or remove value map setting (p. 366). |
resample .............. |
resample from the observations in the series (p. 418). |
seas ..................... |
seasonal adjustment for quarterly and monthly time series |
|
(p. 440). |
setconvert ............ |
set default frequency conversion method (p. 448). |
setformat ............. |
set the display format for the series spreadsheet (p. 456). |
setindent.............. |
set the indentation for the series spreadsheet (p. 462). |
setjust.................. |
set the justification for the series spreadsheet (p. 463). |
setwidth............... |
set the column width in the series spreadsheet (p. 468). |
smooth ................ |
exponential smoothing (p. 472). |
tramoseats ........... |
seasonal adjustment using Tramo/Seats (p. 512). |
x11 ...................... |
seasonal adjustment by Census X11 method for quarterly and |
|
monthly time series (p. 548). |
x12 ...................... |
seasonal adjustment by Census X12 method for quarterly and |
|
monthly time series (p. 550). |
Series Data Members
(i)........................ |
i-th element of the series from the beginning of the workfile (when |
|
used on the left-hand side of an assignment, or when the element |
|
appears in a matrix, vector, or scalar assignment). |