Command Reference
Commands
The following list summarizes the EViews basic commands.
Other chapters document different aspects of the command language:
Command Actions
do execute action without opening window.
preview preview objects contained in a database or workfile.
Global Commands
cd change default directory.
exit exit the EViews program.
help displays the documentation.
output redirect printer output.
param set parameter values.
rndseed set the seed of the random number generator.
smpl set the sample range.
Object Creation Commands
data enter data from keyboard.
factor factor analysis object.
frml numeric or alpha series object with a formula for auto-updating.
genr numeric or alpha series object.
graph graph object—create using a graph command or by merging existing graphs.
link series or alpha link object.
var var estimation object.
Object Container, Data, and File Commands
ccopy copy series from DRI database.
cfetch fetch series from DRI database.
clabel display DRI series description.
close close object, program, or workfile.
copy copy objects within and between workfiles, workfile pages, and databases.
db open or create a database.
dbcopy make copy of a database.
delete delete objects from a workfile.
driconvert convert the entire DRI database to an EViews database.
fetch fetch objects from databases or databank files.
hconvert convert an entire Haver Analytics database to an EViews database.
hfetch fetch series from a Haver Analytics database.
hlabel obtain label from a Haver Analytics database.
import imports data from a foreign file or a previously saved workfile into the current default workfile.
importattr imports observation values stored inside one or more series in a second workfile page into the attribute fields of objects within the current workfile page.
importmat imports data from a foreign file into a matrix object in the current workfile.
importtbl imports data from a foreign file into a table object in the current workfile.
open open a program or text (ASCII) file.
optsave save the current EViews global options settings .INI files into a directory.
optset replace the current EViews global options settings .INI files with ones based in a different directory.
pageload load one or more pages into a workfile from a workfile or a foreign data source.
pagerefresh refresh all links and auto-series in the active workfile page—primarily used to refresh links that use external database data.
pagesave save page into a workfile or a foreign data source.
pagestack reshape the workfile page by stacking observations.
pagestruct apply a workfile structure to the page.
pageunlink break links in all link objects and auto-updating series (formulae) in the active workfile page.
pageunstack reshape the workfile page by unstacking observations into multiple series.
range reset the workfile range
.
read import data from a foreign disk file into series.
save save workfile to disk.
store store objects in database and databank files.
unlink break links and auto-updating series (formulae) in the specified series objects.
wfcompare compare the contents of the current workfile or page with the contents of a different workfile, page, or database.
wfdetails change the details displayed in the current workfile window.
wfdir change the workfile view to a simple object directory listing.
wffilter change the workfile object filter for the current workfile window.
wfopen open workfile or foreign source data as a workfile.
wforder change the workfile page order.
wfrefresh refresh all links and auto-series in the active workfile—primarily used to refresh links that use external database data.
wfsave save workfile to disk as a workfile or a foreign data source.
wfsnapshot takes a manual snapshot of the current workfile.
wfstats display the workfile statistics and summary view.
wfunlink break links in all link objects and auto-updating series (formulae) in the active workfile.
wfuse activate a workfile.
workfile create or change active workfile.
write write series to a disk file.
Object Utility Commands
close close window of an object, program, or workfile.
Object Assignment Commands
data enter data from keyboard.
frml assign formula for auto-updating to a numeric or alpha series object.
genr create numeric or alpha series object.
nrnd fill object with standard normal random numbers.
rmvnorm fill object with multivariate normal random numbers.
rnd fill object with uniform random numbers.
rndint fill object with random integers.
rndseed set random number generator seed.
Matrix Utility Commands
colplace Places column vector into matrix.
matplace Places matrix object in another matrix object.
mtos Converts a matrix object to series, alpha, or group.
nrnd Fill the matrix with normal random numbers .
rmvnorm Fill the matrix with multivariate normal random numbers.
rnd Fill the matrix with uniform random numbers.
rowplace Places a rowvector in matrix object.
stom Converts series, alpha, or group to vector or matrix after removing observations with NAs.
stomna Converts series, alpha or group to vector or matrix without removing observations with NAs.
ttom Fills a matrix with the numeric contents of a table.
Graph Creation Commands
Graph creation is discussed in detail in
“Graph Creation Command Summary”.
hilo high-low(-open-close) graph.
qqplot quantile-quantile graph.
scatmat matrix of all pairwise scatterplots.
Table Commands
setcell format and fill in a table cell.
setline place a horizontal line in table.
tabplace insert a table into another table.
ttom fills a matrix with the numeric contents of a table.
Note that with the exception of
tabplace, these commands are supported primarily for backward compatibility. There is a more extensive set of table procs for working with and customizing tables. See
“Table Procs”.
Programming Commands
addin register an Add-in.
adduo register a user object.
clearerrs sets the current program error count to 0.
commandcap send text to the command capture window.
deleteaddin unregister a program file as an EViews Add-in.
logclear clears the log window of a program.
logclose closes one or more or all message log windows.
logeval sends result of the command to a log window.
logmode sets logging of specified messages.
logmsg adds a line of text to the program log.
logsave saves the program log to a text file.
open open a program file.
optimize find the solution to a user-defined optimization problem.
output redirects print output to objects or files.
poff turns off automatic printing in programs.
pon turns on automatic printing in programs.
seterr sets a user-specified execution error.
seterrcount sets the current program execution error count.
setmaxerrs sets the maximum number of errors that a program may encounter before execution is halted.
spawn spawn a new process.
toc display elapsed time (since timer reset) in seconds.
External Interface Commands
xclose close an open connection to an external application.
xget retrieve data from an external application into an EViews object.
xlog switch on or off the external application log inside EViews.
xoff turns off mode that sends all subsequent command lines to the external program.
xon turns on mode that sends all subsequent command lines to the external program.
xopen open a connection to an external application.
xpackage installs the specified R package in the current external R connection.
xput send an EViews object to an external application.
xrun run a command in an external application.
Interactive Use Commands
The following commands have object command forms (e.g.
, Equation::arch). These commands are particularly suited for interactive command line use. In general, we recommend that you use the object forms of the commands.
arch estimate autoregressive conditional heteroskedasticity (ARCH and GARCH) models.
archtest LM test for the presence of ARCH in the residuals.
ardl autoregressive distributed lag models.
auto Breusch-Godfrey serial correlation Lagrange Multiplier (LM) test.
binary binary dependent variable models (includes probit, logit, gompit) models.
breakls least squares with breakpoints and breakpoint determination
cause pairwise Granger causality tests.
censored estimate censored and truncated regression (includes tobit) models.
chow Chow breakpoint and forecast tests for structural change.
coint cointegration test.
cointreg estimate cointegrating equation using FMOLS, CCR, or DOLS.
count count data modeling (includes poisson, negative binomial and quasi-maximum likelihood count models).
data enter data from keyboard.
did estimate a panel equation using the difference-in-difference estimator.
enet elastic net regression (including Lasso and ridge regression).
facbreak factor breakpoint test for stability.
factest estimate a factor analysis model.
fit static forecast from an equation.
forecast dynamic forecast from an equation.
funcoef estimate a functional coefficient regression equation.
glm estimate a Generalized Linear Model (GLM).
gmm estimate an equation using generalized method of moments.
heckit estimate a selection equation using the Heckman ML or 2-step method.
hist histogram and descriptive statistics.
hpf Hodrick-Prescott filter.
liml estimate an equation using Limited Information Maximum Likelihood and K-class Estimation.
logit logit (binary) estimation.
ls equation using least squares or nonlinear least squares.
midas estimate an equation using Mixed Data Sampling (MIDAS) regression.
ordered ordinal dependent variable models (includes ordered probit, ordered logit, and ordered extreme value models).
probit probit (binary) estimation.
qreg estimate an equation using quantile regression.
reset Ramsey’s RESET test for functional form.
robustls robust regression (M-estimation, S-estimation and MM-estimation).
seas seasonal adjustment for quarterly and monthly time series.
stats descriptive statistics.
switchreg exogenous and Markov switching regression.
testadd likelihood ratio test for adding variables to equation.
testdrop likelihood ratio test for dropping variables from equation.
threshold threshold least squares, including threshold autoregression and smooth threshold autoregression.
tsls estimate an equation using two-stage least squares regression.
varest specify and estimate a VAR or VEC.
varsel equation estimation using least squares with variable selection (uni-directional, stepwise, swapwise, combinatorial, Auto-GETS, Lasso).