
- •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

Copying Data Between Objects—27
Same object type on right-hand side
If the source object on the right is a matrix or vector, and the target or destination object on the left is of the same type, the target will be resized to have the same dimension as the source, and every source element will be copied. For example:
matrix(10,2) zdata = 5
matrix ydata = zdata
matrix(10,10) xdata = ydata
declares that ZDATA is a 10 × 2 matrix filled with 5’s. YDATA is automatically resized to be a 10 × 2 matrix and is filled with the contents of ZDATA.
Note that even though the declaration of XDATA calls for a 10 × 10 matrix, XDATA is a 10 × 2 matrix of 5’s. This behavior occurs because the declaration statement above is equivalent to issuing the two commands:
matrix(10,10) xdata xdata = ydata
which will first declare the 10 × 10 matrix XDATA, and then automatically resize it to 10 × 2 when you fill it with the values for YDATA.
The next section discusses assignment statements in the more general case, where you are converting between object types. In some cases, the conversion is automatic; in other cases, EViews provides you with additional tools to perform the conversion.
Copying Data Between Objects
In addition to the basic assignment statements described in the previous section, EViews provides you with a large set of tools for copying data to and from matrix objects.
At times, you may wish to move data between different types of matrix objects. For example, you may wish to take the data from a vector and put it in a matrix. EViews has a number of built-in rules which make these conversions automatically.
At other times, you may wish to move data between a matrix object and an EViews series or group object. There are a separate set of tools which allow you to convert data across a variety of object types.
Copying data from matrix objects
Data may be moved between different types of matrix objects using assignments. If possible, EViews will resize the target object so that it contains the same information as the object on the right side of the equation.
The basic rules governing expressions of the form “Y=X” may be summarized as follows:

28—Chapter 3. Matrix Language
•Object type of Y does not change.
•The target object Y will, if possible, be resized to match the object X; otherwise, EViews will issue an error. Thus, assigning a vector to a matrix will resize the matrix, but assigning a matrix to a vector will generate an error if the matrix has more than one column.
•The data in X will be copied to Y.
Specific exceptions to the rules given above are:
•If X is a scalar, Y will keep its original size and will be filled with the value of X.
•If X and Y are both vector or rowvector objects, Y will be changed to the same type as X.
“Summary of Automatic Resizing of Matrix Objects” on page 42 contains a complete summary of the conversion rules for matrix objects.
Here are some simple examples illustrating the rules for matrix assignment:
vector(3) x x(1) = 1 x(2) = 2 x(3) = 3 vector y = x matrix z = x
Y is now a 3 element vector because it has the same dimension and values as X. EViews automatically resizes the Z Matrix to conform to the dimensions of X so that Z is now a 3 × 1 matrix containing the contents of X: Z(1,1)=1, Z(2,1)=2, Z(3,1)=3.
Here are some further examples where automatic resizing is allowed:
vector(7) y = 2
scalar value = 4
matrix(10,10) w = value
w = y
matrix(2,3) x = 1
rowvector(10) t = 100 x = t
W is declared as a 10 × 10 matrix of 4’s, but it is then reset to be a 7 × 1 matrix of 2’s. X is a 1 × 10 matrix of 100’s.
Lastly, consider the commands:

Copying Data Between Objects—29
vector(7) y = 2
rowvector(12) z = 3
coef(20) beta
y = z
z = beta
Y will be a rowvector of length 3, containing the original contents of Z, and Z will be a column vector of length 20 containing the contents of BETA.
There are some cases where EViews will be unable to perform the specified assignment because the resize operation is not defined. For example, suppose that X is a 2 × 2 matrix. Then the assignment statement:
vector(7) y = x
will result in an error. EViews cannot change Y from a vector to a matrix and there is no way to assign the 4 elements of the matrix X to the vector Y. Other examples of invalid assignment statements involve assigning matrix objects to scalars or sym objects to vector objects.
Copying data from parts of matrix objects
In addition to the standard rules for conversion of data between objects, EViews provides functions for extracting and assigning parts of matrix objects. Matrix functions are described in greater detail later in this chapter. For now, note that some functions take a matrix object and perhaps other parameters as arguments and return a matrix object.
A comprehensive list of the EViews commands and functions that may be used for matrix object conversion appears in “Utility Functions and Commands” on page 44. However, a few examples will provide you with a sense of the type of operations that may be performed.
Suppose first that you are interested in copying data from a matrix into a vector. The following commands will copy data from M1 and SYM1 into the vectors V1, V2, V3, and V4.
matrix(10, 10) m1 sym(10) sym1
vector v1 = @vec(m1)
vector v2 = @columnextract(m1,3) vector v3 = @rowextract(m1,4) vector v4 = @columnextract(sym1,5)
The @vec function creates a 100 element vector, V1, from the columns of M1 stacked one on top of another. V2 will be a 10 element vector containing the contents of the third col-

30—Chapter 3. Matrix Language
umn of M1 while V3 will be a 10 element vector containing the fourth row of M1. The @vec, @rowextract, and @columnextract functions also work with sym objects. V4 is a 10 element vector containing the fifth column of SYM1.
You can also copy data from one matrix into a smaller matrix using @subextract. For example:
matrix(20,20) m1=1
matrix m2 = @subextract(m1,5,5,10,7)
matrix m3 = @subextract(m1,5,10)
matrix m4 = m1
M2 is a 6 × 3 matrix containing a submatrix of M1 defined by taking the part of the matrix M1 beginning at row 5 and column 5, and ending at row 10 and column 7. M3 is the
16 × 11 matrix taken from M1 at row 5 and column 10 to the last element of the matrix (row 20 and column 20). In contrast, M4 is defined to be an exact copy of the full 20 × 20 matrix.
Data from a matrix may be copied into another matrix object using the commands colplace, rowplace, and matplace. Consider the commands:
matrix(100,5) m1 = 0 matrix(100,2) m2 = 1 vector(100) v1 = 3 rowvector(100) v2 = 4 matplace(m1,m2,1,3) colplace(m1,v1,3) rowplace(m1,v2,80)
The matplace command places M2 in M1 beginning at row 1 and column 3. V1 is placed in column 3 of M1, while V2 is placed in row 80 of M1.
Copying data between matrix objects and other objects
The previous sections described techniques for copying data between matrix objects such as vectors, matrices and scalars. In this section, we describe techniques for copying data between matrix objects and other EViews objects such as series and groups.
Keep in mind that there are two primary differences between the ordinary series or group objects and the matrix objects. First, operations involving series and groups use information about the current workfile sample, while matrix objects do not. Second, there are important differences in the handling of missing values (NAs) between the two types of objects.

Copying Data Between Objects—31
Direct Assignment
The easiest method to copy data from series or group objects to a matrix object is to use direct assignment. Place the destination matrix object on the left side of an equal sign, and place the series or group to be converted on the right.
If you use a series object on the right, EViews will only include the observations from the current sample to make the vector. If you place a group object on the right, EViews will create a rectangular matrix, again only using observations from the current sample.
While very convenient, there are two principal limitations of this approach. First, EViews will only include observations in the current sample when copying the data. Second, observations containing missing data (NAs) for a series, or for any series in the group, are not placed in the matrix. Thus, if the current sample contains 20 observations, but the series or group contains missing data, the dimension of the vector or matrix will be less than 20. Below, we provide you with methods which allow you to override the current sample and to retain missing values.
Examples:
smpl 1963:3 1993:6 fetch hsf gmpyq
group mygrp hsf gmpyq vector xvec = gmpyq matrix xmat = mygrp
These statements create the vector XVEC and the two column matrix XMAT containing the non-missing series and group data from 1963:3 to 1993:6. Note that if GMPYQ has a missing value in 1970:01, and HSF contains a missing value in 1980:01, both observations for both series will be excluded from XMAT.
When performing matrix assignment, you may refer to an element of a series, just as you would refer to an element of a vector, by placing an index value in parentheses after the name. An index value i refers to the i-th element of the series from the beginning of the workfile range. For example, if the range of the current annual workfile is 1961 to 1980, the expression GNP(6) refers to the 1966 value of GNP. These series element expressions may be used in assigning specific series values to matrix elements, or to assign matrix values to a specific series element. For example:
matrix(5,10) x
series yser = nrnd
x(1,1) = yser(4)
yser(5) = x(2,3)
yser(6) = 4000.2

32—Chapter 3. Matrix Language
assigns the fourth value of the series YSER to X(1,1), and assigns to the fifth and sixth values of YSER, the X(2,3) value and the scalar value “4000.2”, respectively.
While matrix assignments allow you to refer to elements of series as though they were elements of vectors, you cannot generally use series in place of vectors. Most vector and matrix operations will error if you use a series in place of a vector. For example, you cannot perform a rowplace command using a series name.
Furthermore, note that when you are not performing matrix assignment, a series name followed by a number in parentheses will indicate that the lag/lead operator be applied to the entire series. Thus, when used in generating series or in an equation, system, or model specification, GNP(6) refers to the sixth lead of the GNP series. To refer to specific elements of the GNP series in these settings, you should use the @elem function.
Copy using @convert
The @convert function takes a series or group object and, optionally, a sample object, and returns a vector or rectangular matrix. If no sample is provided, @convert will use the workfile sample. The sample determines which series elements are included in the matrix. Example:
smpl 61 90
group groupx inv gdp m1
vector v = @convert(gdp)
matrix x = @convert(groupx)
X is a 30 × 3 matrix with the first column containing data from INV, the second column from GDP, and the third column from M1.
As with direct assignment, the @convert function excludes observations for which the series or any of the series in the group contain missing data. If, in the example above, INV contains missing observations in 1970 and 1980, V would be a 29 element vector while X would be a 28 × 3 matrix. This will cause errors in subsequent operations that require V and X to have a common row dimension.
There are two primary advantages of using @convert over direct assignment. First, since @convert is a function, it may be used in the middle of a matrix expression. Second, an optional second argument allows you to specify a sample to be used in conversion. For example:
sample s1.set 1950 1990
matrix x = @convert(grp,s1)
sym y = @inverse(@inner(@convert(grp,s1)))
performs the conversion using the sample defined in S1.

Copying Data Between Objects—33
Copy data between Series and Matrices
EViews also provides three useful commands that perform explicit conversions between series and matrices with control over both the sample, and the handling of NAs.
stom (Series TO Matrix) takes a series or group object and copies its data to a vector or matrix using either the current workfile sample, or the optionally specified sample. As with direct assignment, the stom command excludes observations for which the series or any of the series in the group contain missing data.
Example:
sample smpl_cnvrt.set 1950 1995 smpl 1961 1990
group group1 gnp gdp money vector(46) vec1 matrix(3,30) mat1 stom(gdp,vec1,smpl_cnvrt) stom(group1,mat1)
While the operation of stom is similar to @convert, stom is a command and cannot be included in a matrix expression. Furthermore, unlike @convert, the destination matrix or vector must already exist and have the proper dimension.
stomna (Series TO Matrix with NAs) works identically to stom, but does not exclude observations for which there are missing values. The elements of the series for the relevant sample will map directly into the target vector or matrix. Thus,
smpl 1951 2000
vector(50) gvector
stom(gdp,gvector)
will always create a 50 element vector GVECTOR that contains the values of GDP from 1951 to 2000, including observations with NAs.
mtos (Matrix TO Series) takes a matrix or vector and copies its data into an existing series or group, using the current workfile sample or a sample that you provide.
Examples:
mtos(mat1,group1)
mtos(vec1,resid)
mtos(mat2,group1,smpl1)
As with stom the destination series or group must already exist and the destination dimension given by the sample must match that of the source vector or matrix.