Command Reference : Command Reference
  
 
tsls
Two-stage least squares.
Carries out estimation using two-stage least squares.
Syntax
tsls(options) y x1 [x2 x3 ...] @ z1 [z2 z3 ...]
tsls(options) specification @ z1 [z2 z3 ...]
To use the tsls command, list the dependent variable first, followed by the regressors, then any AR or MA error specifications, then an “@”-sign, and finally, a list of exogenous instruments. You may estimate nonlinear equations or equations specified with formulas by first providing a specification, then listing the instrumental variables after an “@”-sign.
There must be at least as many instrumental variables as there are independent variables. All exogenous variables included in the regressor list should also be included in the instrument list. A constant is included in the list of instrumental variables even if not explicitly specified.
Options
Non-Panel TSLS Options
 
nocinst
Do not automatically include a constant as an instrument.
w=arg
Weight series or expression.
Note: we recommend that, absent a good reason, you employ the default settings Inverse std. dev. weights (“wtype=istdev”) with EViews default scaling (“wscale=eviews”) for backward compatibility with versions prior to EViews 7.
wtype=arg (default=“istdev”)
Weight specification type: inverse standard deviation (“istdev”), inverse variance (“ivar”), standard deviation (“stdev”), variance (“var”).
wscale=arg
Weight scaling: EViews default (“eviews”), average (“avg”), none (“none”).
The default setting depends upon the weight type: “eviews” if “wtype=istdev”, “avg” for all others.
z
Turn off backcasting in ARMA models.
cov=keyword
Covariance type (optional): “white” (White diagonal matrix), “hac” (Newey-West HAC).
nodf
Do not perform degree of freedom corrections in computing coefficient covariance matrix. The default is to use degree of freedom corrections.
covlag=arg (default=1)
Whitening lag specification: integer (user-specified lag value), “a” (automatic selection).
covinfosel=arg (default=“aic”)
Information criterion for automatic selection: “aic” (Akaike), “sic” (Schwarz), “hqc” (Hannan-Quinn) (if “lag=a”).
covmaxlag=integer
Maximum lag-length for automatic selection (optional) (if “lag=a”). The default is an observation-based maximum of .
covkern=arg (default=“bart”)
Kernel shape: “none” (no kernel), “bart” (Bartlett, default), “bohman” (Bohman), “daniell” (Daniel), “parzen” (Parzen), “parzriesz” (Parzen-Riesz), “parzgeo” (Parzen-Geometric), “parzcauchy” (Parzen-Cauchy), “quadspec” (Quadratic Spectral), “trunc” (Truncated), “thamm” (Tukey-Hamming), “thann” (Tukey-Hanning), “tparz” (Tukey-Parzen).
covbw=arg (default=“fixednw”)
Kernel Bandwidth: “fixednw” (Newey-West fixed), “andrews” (Andrews automatic), “neweywest” (Newey-West automatic), number (User-specified bandwidth).
covnwlag=integer
Newey-West lag-selection parameter for use in nonparametric kernel bandwidth selection (if “covbw=neweywest”).
covbwint
Use integer portion of bandwidth.
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. The criterion will be set to the nearest value between 1e-24 and 0.2.
s
Use the current coefficient values in estimator coefficient vector as starting values for equations specified by list with AR or MA terms (see also param ).
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 TSLS 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”.
Does not apply to coefficients for AR and MA terms which are set to EViews determined default values.
numericderiv / ‑numericderiv
[Do / do not] use numeric derivatives only. If omitted, EViews will follow the global default.
fastderiv / ‑fastderiv
[Do / do not] use fast derivative computation. If omitted, EViews will follow the global default.
showopts / ‑showopts
[Do / do not] display the starting coefficient values and estimation options in the estimation output.
coef=arg
Specify the name of the coefficient vector (if specified by list); the default behavior is to use the “C” coefficient vector.
prompt
Force the dialog to appear from within a program.
p
Print basic estimation results.
Panel TSLS Options
 
cx=arg
Cross-section effects. For fixed effects estimation, use “cx=f”; for random effects estimation, use “cx=r”.
per=arg
Period effects. For fixed effects estimation, use “cx=f”; for random effects estimation, use “cx=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=perdiag”).
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 system robust/PCSE (“cov=persur”), Cross-section heteroskedasticity robust/PCSE (“cov=cxdiag”), Period heteroskedasticity robust (“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 (default=“sa”)
Random component method: Swamy-Arora (“rancalc=sa”), Wansbeek-Kapteyn (“rancalc=wk”), Wallace-Hussain (“rancalc=wh”).
nodf
Do not perform degree of freedom corrections in computing coefficient covariance matrix. The default is to use degree of freedom corrections.
iter=arg (default=“onec”)
Iteration control for GLS specifications: perform one weight iteration, then iterate coefficients to convergence (“iter=onec”), iterate weights and coefficients simultaneously 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 permit weight iteration to convergence.
unbalsur
Compute SUR factorization in unbalanced data using the subset of available observations for a cluster.
coef=arg
Specify the name of the coefficient vector (if specified by list); the default is to use the “C” coefficient vector.
s
Use the current coefficient values in estimator coefficient vector as starting values for equations specified by list with AR terms (see also param ).
s=number
Determine starting values for equations specified by list with AR terms. Specify a number between zero and one representing the fraction of TSLS estimates computed without AR 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”.
Does not apply to coefficients for AR terms which are instead set to EViews determined default values.
m=integer
Set maximum number of iterations.
c=number
Set convergence criterion. The criterion is based upon the maximum of the percentage changes in the scaled coefficients. The criterion will be set to the nearest value between 1e-24 and 0.2.
numericderiv / ‑numericderiv
[Do / do not] use numeric derivatives only. If omitted, EViews will follow the global default.
fastderiv / ‑fastderiv
[Do / do not] use fast derivative computation. If omitted, EViews will follow the global default.
showopts / ‑showopts
[Do / do not] display the starting coefficient values and estimation options in the estimation output.
prompt
Force the dialog to appear from within a program.
p
Print estimation results.
Examples
tsls y_d c cpi inc ar(1) @ lw(-1 to -3)
estimates an UNTITLED equation using TSLS regression of Y_D on a constant, CPI, INC with AR(1) using a constant, LW(-1), LW(-2), and LW(-3) as instruments.
param c(1) .1 c(2) .1
tsls(s,m=500) y_d=c(1)+inc^c(2) @ cpi
estimates a nonlinear TSLS model using a constant and CPI as instruments. The first line sets the starting values for the nonlinear iteration algorithm.
Cross-references
See “Additional Regression Tools” and “Two-Stage Least Squares” for details on two-stage least squares estimation in single equations and systems, respectively. “Instrumental Variables” discusses estimation using pool objects, while “Instrumental Variables Estimation” discusses estimation in panel structured workfiles.
See also ls.