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

344—Appendix B. Command Reference

gdp.linkto(c=s) quarterly\gdp

links to GDP in the QUARTERLY page, and will frequency convert by summing the nonmissing observations.

Cross-references

For a detailed discussion of linking, see Chapter 8, “Series Links”, on page 175 of the

User’s Guide.

See also link (p. 338), unlink (p. 519), and copy (p. 249).

load

Command

 

 

Load a workfile.

Provided for backward compatibility. Same as wfopen (p. 532).

.

logit

Command

 

 

Estimate binary models with logistic errors.

Provide for backward compatibility. Equivalent to issuing the command, binary with the option “(d=l)”.

See binary (p. 222).

logl

Object Declaration

 

 

Declare likelihood object.

Syntax

 

Command:

logl logl_name

Examples

logl ll1

declares a likelihood object named LL1.

ll1.append @logl logl1

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

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

ls—345

specifies the likelihood function for LL1 and estimates the parameters by maximum likelihood.

Cross-references

See Chapter 22, “The Log Likelihood (LogL) Object”, on page 669 of the User’s Guide for further examples of the use of the likelihood object.

See also append (p. 205) for adding specification lines to an existing likelihood object, and ml (p. 369) for estimation.

ls

Command || Equation Method | Pool Method | System Method | Var

Method

 

Estimation by linear or nonlinear least squares regression.

When used as a pool proc or when the current workfile has a panel structure, ls also estimates cross-section weighed least squares, feasible GLS, and fixed and random effects models.

Syntax

Command: ls(options) y x1 [x2 x3 ...]

ls(options) specification

Equation Method: eq_name.ls(options) y x1 [x2 x3 ...]

 

eq_name.ls(options) specification

 

paneleq_name.ls(options) y x1 [x2 x3 ...] [@cxreg z1 z2 ...]

 

[@perreg z3 z4 ...]

 

paneleq_name.ls(options) specification

Pool Method:

pool_name.ls(options) y x1 [x2 x3 ...] [@cxreg z1 z2 ...] [@perreg

 

z3 z4 ...]

System Method:

system_name.ls(options)

VAR Method:

var_name.ls(options) lag_pairs endog_list [@ exog_list]

Additional issues associated with each usage of the keyword are described in the following sections.

Equations

For linear specifications, list the dependent variable first, followed by a list of the independent variables. Use a “C” if you wish to include a constant or intercept term; unlike some programs, EViews does not automatically include a constant in the regression. You may add AR, MA, SAR, and SMA error specifications, and PDL specifications for polynomial

346—Appendix B. Command Reference

distributed lags. If you include lagged variables, EViews will adjust the sample automatically, if necessary.

Both dependent and independent variables may be created from existing series using standard EViews functions and transformations. EViews treats the equation as linear in each of the variables and assigns coefficients C(1), C(2), and so forth to each variable in the list.

Linear or nonlinear single equations may also be specified by explicit equation. You should specify the equation as a formula. The parameters to be estimated should be included explicitly: “C(1)”, “C(2)”, and so forth (assuming that you wish to use the default coefficient vector “C”). You may also declare an alternative coefficient vector using coef and use these coefficients in your expressions.

Pools

When used as a pool method, ls carries out pooled data estimation. Type the name of the dependent variable followed by one or more lists of regressors. The first list should contain ordinary and pool series that are restricted to have the same coefficient across all members of the pool. The second list, if provided, should contain pool variables that have different coefficients for each cross-section member of the pool. If there is a cross-section specific regressor list, the two lists must be separated by “@CXREG”. The third list, if provided, should contain pool variables that have different coefficients for each period. The list should be separated from the previous lists by “@PERREG”.

For pool estimation, you may include AR terms as regressors in either the common or cross-section specific lists. AR terms are, however, not allowed for some estimation methods. MA terms are not supported.

VARs

ls estimates an unrestricted VAR using equation-by-equation OLS. You must specify the order of the VAR (using one or more pairs of lag intervals), and then provide a list of series or groups to be used as endogenous variables. You may include exogenous variables such as trends and seasonal dummies in the VAR by including an “@-sign” followed by a list of series or groups. A constant is automatically added to the list of exogenous variables; to estimate a specification without a constant, you should use the option “noconst”.

Options

General options

m=integer

Set maximum number of iterations.

 

 

c=scalar

Set convergence criterion. The criterion is based upon

 

the maximum of the percentage changes in the scaled

 

coefficients.

ls—347

sUse the current coefficient values in “C” as starting values for equations with AR or MA terms (see also param (p. 404)).

s=number

Determine starting values for equations specified by list

 

with AR or MA terms. Specify a number between zero

 

and one representing the fraction of preliminary least

 

squares estimates computed without AR or MA terms to

 

be used. Note that out of range values are set to “s=1”.

 

Specifying “s=0” initializes coefficients to zero. By

 

default EViews uses “s=1”.

 

 

showopts /

[Do / do not] display the starting coefficient values and

-showopts

estimation options in the estimation output.

 

 

deriv=keyword

Set derivative methods. The argument keyword should

 

be a one or two letter string. The first letter should

 

either be “f” or “a” corresponding to fast or accurate

 

numeric derivatives (if used). The second letter should

 

be either “n” (always use numeric) or “a” (use analytic

 

if possible). If omitted, EViews will use the global

 

defaults.

 

 

p

Print basic estimation results.

 

 

Additional Options for Equation, System, and Var estimation

w =

Weighted Least Squares. Each observation will be

series_name

weighted by multiplying by the specified series.

 

 

h

White’s heteroskedasticity consistent standard errors.

nNewey-West heteroskedasticity and autocorrelation consistent (HAC) standard errors.

z

Turn off backcasting in ARMA models.

 

 

noconst

Do not include a constant in exogenous regressors list

 

for VARs.

 

 

Note: not all options are available for all equation methods. See the User’s Guide for details on each estimation method.

Additional Options for Pool and Panel Equation estimation

cx=arg

Cross-section effects: (default) none, fixed effects

 

(“cx=f”), random effects (“cx=r”).

 

 

348—Appendix B. Command Reference

per=arg

Period effects: (default) none, fixed effects (“per=f”),

 

random effects (“per=r”).

 

 

wgt=arg

GLS weighting: (default) none, cross-section system

 

weights (“wgt=cxsur”), period system weights

 

(“wgt=persur”), cross-section diagonal weighs

 

(“wgt=cxdiag”), period diagonal weights (“wgt=per-

 

diag”).

 

 

cov=arg

Coefficient covariance method: (default) ordinary,

 

White cross-section system robust (“cov=cxwhite”),

 

White period system robust (“cov=perwhite”), White

 

heteroskedasticity robust (“cov=stackedwhite”), Cross-

 

section system robust/PCSE (“cov=cxsur”), Period sys-

 

tem robust/PCSE (“cov=persur”), Cross-section het-

 

eroskedasticity robust/PCSE (“cov=cxdiag”), Period

 

heteroskedasticity robust/PCSE (“cov=perdiag”).

 

 

keepwgts

Keep full set of GLS weights used in estimation with

 

object, if applicable (by default, only small memory

 

weights are saved).

 

 

rancalc=arg

Random component method: Swamy-Arora (“ran-

(default=“sa”)

calc=sa”), Wansbeek-Kapteyn (“rancalc=wk”), Wal-

 

lace-Hussain (“rancalc=wh”).

 

 

nodf

Do not perform degree of freedom corrections in com-

 

puting coefficient covariance matrix. The default is to

 

use degree of freedom corrections.

 

 

bEstimate using a balanced sample (pool estimation only).

coef=arg

Specify the name of the coefficient vector (if specified

 

by list); the default behavior is to use the “C” coeffi-

 

cient vector.

 

 

iter=arg

Iteration control for GLS specifications: perform one

(default=

weight iteration, then iterate coefficients to convergence

“onec”)

(“iter=onec”), iterate weights and coefficients simulta-

 

neously to convergence (“iter=sim”), iterate weights

 

and coefficients sequentially to convergence

 

(“iter=seq”), perform one weight iteration, then one

 

coefficient step (“iter=oneb”).

 

Note that random effects models currently do not per-

 

mit weight iteration to convergence.

ls—349

Examples

equation eq1.ls m1 c uemp inf(0 to -4) @trend(1960:1)

estimates a linear regression of M1 on a constant, UEMP, INF (from current up to four lags), and a linear trend.

equation eq2.ls(z) d(tbill) c inf @seas(1) @seas(1)*inf ma(2)

regresses the first difference of TBILL on a constant, INF, a seasonal dummy, and an interaction of the dummy and INF, with an MA(2) error. The “z” option turns off backcasting.

coef(2) beta

param beta(1) .2 beta(2) .5 c(1) 0.1

equation eq3.ls(h) q = beta(1)+beta(2)*(l^c(1) + k^(1-c(1)))

estimates the nonlinear regression starting from the specified initial values. The “h” option reports heteroskedasticity consistent standard errors.

equation eq4.ls r = c(1)+c(2)*r(-1)+div(-1)^c(3)

sym betacov = eq4.@cov

declares and estimates a nonlinear equation and stores the coefficient covariance matrix in a symmetric matrix called BETACOV.

pool1.ls dy? inv? edu? year

estimates pooled OLS of DY? on a constant, INV?, EDU? and YEAR.

pool1.ls(cx=f) dy? @cxreg inv? edu? year ar(1)

estimates a fixed effects model without restricting any of the coefficients to be the same across pool members.

group rhs c dum1 dum2 dum3 dum4

ls cons rhs ar(1)

uses the group definition for RHS to regress CONS on C, DUM1, DUM2, DUM3, and DUM4, with an AR(1) correction.

Cross-references

Chapter 15, “Basic Regression”, on page 441 and Chapter 16, “Additional Regression Methods”, on page 459 of the User’s Guide discuss the various regression methods in greater depth.

See Chapter 27, “Pooled Time Series, Cross-Section Data”, on page 823 of the User’s Guide for a discussion of pool estimation, and Chapter 29, “Panel Estimation”, on page 899 of the User’s Guide for a discussion of panel equation estimation.

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